@posthog/rrweb 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb.cjs +11 -4
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +11 -4
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +11 -4
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +13 -13
- package/dist/rrweb.umd.min.cjs.map +2 -2
- package/package.json +1 -1
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var qo=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;var Vs=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&Vs(e,r,t[r]);if(ht)for(var r of ht(t))Gs.call(t,r)&&Vs(e,r,t[r]);return e},se=(e,t)=>Vo(e,jo(t));var Ue=(e,t)=>{var r={};for(var s in e)js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Gs.call(e,s)&&(r[s]=e[s]);return r};var Go=Object.defineProperty,Ho=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r),Hs;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yo=Object.defineProperty,Jo=(e,t,r)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ys=(e,t,r)=>Jo(e,typeof t!="symbol"?t+"":t,r),U=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(U||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function Xo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function as(e){if(ft[e])return ft[e];const t=Xo(e)||globalThis[e],r=t.prototype,s=e in Js?Js[e]:void 0,i=!!(s&&s.every(l=>{var u,c;return!!((c=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&c.toString().includes("[native code]"))})),a=e in Xs?Xs[e]:void 0,o=!!(a&&a.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const c=u[e].prototype;return document.body.removeChild(l),c?ft[e]=c:r}catch(l){return r}}const jt={};function De(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=as(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Fn(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function Qo(e){return De("Node",e,"childNodes")}function Ko(e){return De("Node",e,"parentNode")}function Zo(e){return De("Node",e,"parentElement")}function ea(e){return De("Node",e,"textContent")}function ta(e,t){return Fn("Node",e,"contains")(t)}function ra(e){return Fn("Node",e,"getRootNode")()}function sa(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function ia(e){return e.styleSheets}function na(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function oa(e,t){return De("Element",e,"querySelector")(t)}function aa(e,t){return De("Element",e,"querySelectorAll")(t)}function la(){return as("MutationObserver").constructor}function ua(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Qo,parentNode:Ko,parentElement:Zo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function ls(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ca(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ha(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.baseURI);const s=Array.from(t,i=>Un(i,r)).join("");return ca(s)}catch(t){return null}}function Un(e,t){var r;if(da(e)){let s;try{s=xt(e.styleSheet)||ha(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Mt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return pa(e)&&e.selectorText.includes(":")&&(s=fa(s)),t?Mt(s,t):s}}function fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function da(e){return"styleSheet"in e}function pa(e){return"selectorText"in e}class us{constructor(){Ys(this,"idNodeMap",new Map),Ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Bn(){return new us}function cs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const l=s&&Ie(s);return(t[r.toLowerCase()]||l&&t[l])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function Ie(e){return e.toLowerCase()}const Qs="__rrweb_original__";function ma(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const a=t.getImageData,o=Qs in a?a[Qs]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function ga(e,t){return!e||!t||e.type!==t.type?!1:e.type===U.Document?e.compatMode===t.compatMode:e.type===U.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===U.Comment||e.type===U.Text||e.type===U.CDATA?e.textContent===t.textContent:e.type===U.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ie(t):null}function fs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function ya(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,va=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(wa,(r,s,i,a,o,l)=>{const u=i||o||l,c=s||a||"";if(!u)return r;if(ba.test(u)||va.test(u))return`url(${c}${u}${c})`;if(Sa.test(u))return`url(${c}${u}${c})`;if(u[0]==="/")return`url(${c}${ya(t)+u}${c})`;const n=t.split("/"),h=u.split("/");n.pop();for(const d of h)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${c}${n.join("/")}${c})`})}let Ca=1;const Ea=new RegExp("[^a-z0-9-_:]"),st=-2;function $n(){return Ca++}function Ra(e){if(e instanceof HTMLFormElement)return"form";const t=Ie(e.tagName);return Ea.test(t)?"div":t}let Be,Ks;const xa=/^[^ \t\n\r\u000c]+/,Ma=/^[, \t\n\r\u000c]+/;function Na(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const l=a.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;s(Ma),!(r>=t.length);){let a=s(xa);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let l=!1;for(;;){const u=t.charAt(r);if(u===""){i.push((a+o).trim());break}else if(l)u===")"&&(l=!1);else if(u===","){r+=1,i.push((a+o).trim());break}else u==="("&&(l=!0);o+=u,r+=1}}}return i.join(", ")}const Zs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ds(e,t)}function Oa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ds(e,t){let r=Zs.get(e);if(r||(r=e.createElement("a"),Zs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Wn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Na(e,s):r==="style"?Mt(s,ds(e)):t==="object"&&r==="data"?qe(e,s):s)}function zn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Nt(ne.parentNode(e),t,r):!1}function qn(e,t,r,s){let i;if(ls(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Nt(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function Da(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(l){return}if(a!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aa(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ta(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:n,dataURLOptions:h={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=_a(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:U.Document,childNodes:[],compatMode:e.compatMode}:{type:U.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return La(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:u,maskInputFn:n,dataURLOptions:h,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Pa(e,{doc:r,needsMask:o,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:U.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function _a(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Pa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:a}=t,o=ne.parentNode(e),l=o&&o.tagName;let u=ne.textContent(e);const c=l==="STYLE"?!0:void 0,n=l==="SCRIPT"?!0:void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(u=xt(o.sheet))}catch(h){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${h}`,e)}u=Mt(u,ds(t.doc))}return n&&(u="SCRIPT_PLACEHOLDER"),!c&&!n&&u&&s&&(u=i?i(u,ne.parentElement(e)):u.replace(/[\S]/g,"*")),{type:U.Text,textContent:u||"",isStyle:c,rootId:a}}function ei(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ka(e){return e.href}function La(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:n,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:f}=t,m=Ia(e,s,i),p=Ra(e);let g={};const b=e.attributes.length;for(let w=0;w<b;w++){const C=e.attributes[w];zn(p,C.name,C.value)||(g[C.name]=Wn(r,p,Ie(C.name),C.value))}if(p==="link"&&a){const w=ka(e);if(w){let C=ei(r,w);if(!C&&w.includes(".css")){const S=window.location.origin,E=w.replace(window.location.href,""),R=S+"/"+E;C=ei(r,R)}let v=null;C&&(v=xt(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=xt(e.sheet);w&&(g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=cs({element:e,type:hs(e),tagName:p,value:w,maskInputOptions:o,maskInputFn:l}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ma(e)||(g.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const w=e.toDataURL(u.type,u.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(u.type,u.quality);w!==v&&(g.rr_dataURL=w)}}if(p==="img"&&c){Be||(Be=r.createElement("canvas"),Ks=Be.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",v=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,Ks.drawImage(w,0,0),g.rr_dataURL=Be.toDataURL(u.type,u.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:U.Element,tagName:p,attributes:g,childNodes:[],isSVG:Oa(e)||void 0,needBlock:m,rootId:f,isCustom:y}}function H(e){return e==null?"":e.toLowerCase()}function Fa(e,t){if(t.comment&&e.type===U.Comment)return!0;if(e.type===U.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:n={},maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=qn(e,o,l,R===void 0));const N=Ta(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!N)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Fa(N,f)||!I&&N.type===U.Text&&!N.isStyle&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?F=st:F=$n();const D=Object.assign(N,{id:F});if(s.add(e,D),F===st)return null;b&&b(e);let re=!u;if(D.type===U.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&et(x)&&(D.isShadowHost=!0)}if((D.type===U.Document||D.type===U.Element)&&re){f.headWhitespace&&D.type===U.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:u,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S};if(!(D.type===U.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=Ve(P,x);V&&D.childNodes.push(V)}let Z=null;if(ls(e)&&(Z=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(Z))){const V=Ve(P,x);V&&(et(Z)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&Ze(ie)&&et(ie)&&(D.isShadow=!0),D.type===U.Element&&D.tagName==="iframe"&&Da(e,()=>{const x=e.contentDocument;if(x&&y){const Z=Ve(x,{doc:x,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});Z&&y(e,Z)}},w),D.type===U.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&fs(D.attributes.href)==="css")&&Aa(e,()=>{if(C){const x=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});x&&C(e,x)}},v),D}function Ua(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:n=!1,maskTextFn:h,maskInputFn:d,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:f==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:f===!1?{}:f,dataURLOptions:m,inlineImages:u,recordCanvas:c,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Ba=/(max|min)-device-(width|height)/,ti=new RegExp(Ba.source,"g"),$a={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ti)&&(e.params=e.params.replace(ti,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
14
|
+
"use strict";var qo=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Gs=Object.prototype.propertyIsEnumerable;var Vs=(e,t,r)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))js.call(t,r)&&Vs(e,r,t[r]);if(ht)for(var r of ht(t))Gs.call(t,r)&&Vs(e,r,t[r]);return e},se=(e,t)=>Vo(e,jo(t));var Be=(e,t)=>{var r={};for(var s in e)js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Gs.call(e,s)&&(r[s]=e[s]);return r};var Go=Object.defineProperty,Ho=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r),Hs;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yo=Object.defineProperty,Jo=(e,t,r)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ys=(e,t,r)=>Jo(e,typeof t!="symbol"?t+"":t,r),B=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(B||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function Xo(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function as(e){if(ft[e])return ft[e];const t=Xo(e)||globalThis[e],r=t.prototype,s=e in Js?Js[e]:void 0,i=!!(s&&s.every(l=>{var u,c;return!!((c=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&c.toString().includes("[native code]"))})),a=e in Xs?Xs[e]:void 0,o=!!(a&&a.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const c=u[e].prototype;return document.body.removeChild(l),c?ft[e]=c:r}catch(l){return r}}const jt={};function De(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=as(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Fn(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=as(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function Qo(e){return De("Node",e,"childNodes")}function Ko(e){return De("Node",e,"parentNode")}function Zo(e){return De("Node",e,"parentElement")}function ea(e){return De("Node",e,"textContent")}function ta(e,t){return Fn("Node",e,"contains")(t)}function ra(e){return Fn("Node",e,"getRootNode")()}function sa(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function ia(e){return e.styleSheets}function na(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function oa(e,t){return De("Element",e,"querySelector")(t)}function aa(e,t){return De("Element",e,"querySelectorAll")(t)}function la(){return as("MutationObserver").constructor}function ua(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const ne={childNodes:Qo,parentNode:Ko,parentElement:Zo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function ls(e){return e.nodeType===e.ELEMENT_NODE}function Ze(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ca(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ha(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function xt(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>Bn(i,r)).join("");return ca(s)}catch(t){return null}}function Bn(e,t){var r;if(da(e)){let s;try{s=xt(e.styleSheet)||ha(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Mt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return pa(e)&&e.selectorText.includes(":")&&(s=fa(s)),t?Mt(s,t):s}}function fa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function da(e){return"styleSheet"in e}function pa(e){return"selectorText"in e}class us{constructor(){Ys(this,"idNodeMap",new Map),Ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Un(){return new us}function cs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const l=s&&Ie(s);return(t[r.toLowerCase()]||l&&t[l])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function Ie(e){return e.toLowerCase()}const Qs="__rrweb_original__";function ma(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const a=t.getImageData,o=Qs in a?a[Qs]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(u=>u!==0))return!1}return!0}function ga(e,t){return!e||!t||e.type!==t.type?!1:e.type===B.Document?e.compatMode===t.compatMode:e.type===B.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===B.Comment||e.type===B.Text||e.type===B.CDATA?e.textContent===t.textContent:e.type===B.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ie(t):null}function fs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function ya(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,va=/^www\..*/i,Sa=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(wa,(r,s,i,a,o,l)=>{const u=i||o||l,c=s||a||"";if(!u)return r;if(ba.test(u)||va.test(u))return`url(${c}${u}${c})`;if(Sa.test(u))return`url(${c}${u}${c})`;if(u[0]==="/")return`url(${c}${ya(t)+u}${c})`;const n=t.split("/"),h=u.split("/");n.pop();for(const d of h)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${c}${n.join("/")}${c})`})}let Ca=1;const Ea=new RegExp("[^a-z0-9-_:]"),st=-2;function $n(){return Ca++}function Ra(e){if(e instanceof HTMLFormElement)return"form";const t=Ie(e.tagName);return Ea.test(t)?"div":t}let Ue,Ks;const xa=/^[^ \t\n\r\u000c]+/,Ma=/^[, \t\n\r\u000c]+/;function Oa(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const l=a.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;s(Ma),!(r>=t.length);){let a=s(xa);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let l=!1;for(;;){const u=t.charAt(r);if(u===""){i.push((a+o).trim());break}else if(l)u===")"&&(l=!1);else if(u===","){r+=1,i.push((a+o).trim());break}else u==="("&&(l=!0);o+=u,r+=1}}}return i.join(", ")}const Zs=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ds(e,t)}function Na(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ds(e,t){let r=Zs.get(e);if(r||(r=e.createElement("a"),Zs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Wn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Oa(e,s):r==="style"?Mt(s,ds(e)):t==="object"&&r==="data"?qe(e,s):s)}function zn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Ia(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(ne.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(ne.parentNode(e),t,r):!1}function qn(e,t,r,s){let i;if(ls(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function Da(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(l){return}if(a!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Aa(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ta(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:n,dataURLOptions:h={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=_a(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return La(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:u,maskInputFn:n,dataURLOptions:h,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Pa(e,{doc:r,needsMask:o,maskTextFn:c,rootId:g});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:B.Comment,textContent:ne.textContent(e)||"",rootId:g};default:return!1}}function _a(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Pa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:a}=t,o=ne.parentNode(e),l=o&&o.tagName;let u=ne.textContent(e);const c=l==="STYLE"?!0:void 0,n=l==="SCRIPT"?!0:void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(r=o.sheet)!=null&&r.cssRules&&(u=xt(o.sheet))}catch(h){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${h}`,e)}u=Mt(u,ds(t.doc))}return n&&(u="SCRIPT_PLACEHOLDER"),!c&&!n&&u&&s&&(u=i?i(u,ne.parentElement(e)):u.replace(/[\S]/g,"*")),{type:B.Text,textContent:u||"",isStyle:c,rootId:a}}function ei(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function ka(e){return e.href}function La(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:n,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:f}=t,m=Ia(e,s,i),p=Ra(e);let g={};const b=e.attributes.length;for(let w=0;w<b;w++){const C=e.attributes[w];zn(p,C.name,C.value)||(g[C.name]=Wn(r,p,Ie(C.name),C.value))}if(p==="link"&&a){const w=ka(e);if(w){let C=ei(r,w);if(!C&&w.includes(".css")){const S=window.location.origin,E=w.replace(window.location.href,""),R=S+"/"+E;C=ei(r,R)}let v=null;C&&(v=xt(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet&&!(e.innerText||ne.textContent(e)||"").trim().length){const w=xt(e.sheet);w&&(g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=cs({element:e,type:hs(e),tagName:p,value:w,maskInputOptions:o,maskInputFn:l}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")ma(e)||(g.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const w=e.toDataURL(u.type,u.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(u.type,u.quality);w!==v&&(g.rr_dataURL=w)}}if(p==="img"&&c){Ue||(Ue=r.createElement("canvas"),Ks=Ue.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",v=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{Ue.width=w.naturalWidth,Ue.height=w.naturalHeight,Ks.drawImage(w,0,0),g.rr_dataURL=Ue.toDataURL(u.type,u.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:B.Element,tagName:p,attributes:g,childNodes:[],isSVG:Na(e)||void 0,needBlock:m,rootId:f,isCustom:y}}function H(e){return e==null?"":e.toLowerCase()}function Fa(e,t){if(t.comment&&e.type===B.Comment)return!0;if(e.type===B.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(H(e.attributes.name).match(/^msapplication-tile(image|color)$/)||H(e.attributes.name)==="application-name"||H(e.attributes.rel)==="icon"||H(e.attributes.rel)==="apple-touch-icon"||H(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&H(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(H(e.attributes.property).match(/^(og|twitter|fb):/)||H(e.attributes.name).match(/^(og|twitter):/)||H(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(H(e.attributes.name)==="robots"||H(e.attributes.name)==="googlebot"||H(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(H(e.attributes.name)==="author"||H(e.attributes.name)==="generator"||H(e.attributes.name)==="framework"||H(e.attributes.name)==="publisher"||H(e.attributes.name)==="progid"||H(e.attributes.property).match(/^article:/)||H(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(H(e.attributes.name)==="google-site-verification"||H(e.attributes.name)==="yandex-verification"||H(e.attributes.name)==="csrf-token"||H(e.attributes.name)==="p:domain_verify"||H(e.attributes.name)==="verify-v1"||H(e.attributes.name)==="verification"||H(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:n={},maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:R}=t,{preserveWhiteSpace:I=!0}=t;R||(R=qn(e,o,l,R===void 0));const O=Ta(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!O)return console.warn(e,"not serialized"),null;let F;s.hasNode(e)?F=s.getId(e):Fa(O,f)||!I&&O.type===B.Text&&!O.isStyle&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?F=st:F=$n();const D=Object.assign(O,{id:F});if(s.add(e,D),F===st)return null;b&&b(e);let re=!u;if(D.type===B.Element){re=re&&!D.needBlock,delete D.needBlock;const x=ne.shadowRoot(e);x&&et(x)&&(D.isShadowHost=!0)}if((D.type===B.Document||D.type===B.Element)&&re){f.headWhitespace&&D.type===B.Element&&D.tagName==="head"&&(I=!1);const x={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:u,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S};if(!(D.type===B.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(ne.childNodes(e))){const V=Ve(P,x);V&&D.childNodes.push(V)}let Z=null;if(ls(e)&&(Z=ne.shadowRoot(e)))for(const P of Array.from(ne.childNodes(Z))){const V=Ve(P,x);V&&(et(Z)&&(V.isShadow=!0),D.childNodes.push(V))}}const ie=ne.parentNode(e);return ie&&Ze(ie)&&et(ie)&&(D.isShadow=!0),D.type===B.Element&&D.tagName==="iframe"&&Da(e,()=>{const x=e.contentDocument;if(x&&y){const Z=Ve(x,{doc:x,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});Z&&y(e,Z)}},w),D.type===B.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&fs(D.attributes.href)==="css")&&Aa(e,()=>{if(C){const x=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:R,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});x&&C(e,x)}},v),D}function Ba(e,t){const{mirror:r=new us,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:n=!1,maskTextFn:h,maskInputFn:d,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:h,maskInputFn:d,slimDOMOptions:f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:f==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:f===!1?{}:f,dataURLOptions:m,inlineImages:u,recordCanvas:c,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Ua=/(max|min)-device-(width|height)/,ti=new RegExp(Ua.source,"g"),$a={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ti)&&(e.params=e.params.replace(ti,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
15
15
|
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function za(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var dt={exports:{}},ri;function qa(){if(ri)return dt.exports;ri=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return dt.exports=t(),dt.exports.createColors=t,dt.exports}const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),de=za(ja);var Ht,si;function ps(){if(si)return Ht;si=1;let e=qa(),t=de;class r extends Error{constructor(i,a,o,l,u,c){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),c&&(this.plugin=c),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=f=>f,l=f=>f,u=f=>f;if(i){let{bold:f,gray:m,red:p}=e.createColors(!0);l=g=>f(p(g)),o=g=>m(g),t&&(u=g=>t(g))}let c=a.split(/\r?\n/),n=Math.max(this.line-3,0),h=Math.min(this.line+2,c.length),d=String(h).length;return c.slice(n,h).map((f,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(f.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=f.slice(w,C),S=o(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(v)+`
|
|
16
16
|
`+S+l("^")}let b=o(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+u(f)+`
|
|
17
17
|
`+b+l("^")}return" "+o(g)+u(f)}).join(`
|
|
@@ -33,19 +33,19 @@ var module = { exports };
|
|
|
33
33
|
`?(n=1,h+=1):n+=1}return d}class l{constructor(c={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in c)if(n==="nodes"){this.nodes=[];for(let h of c[n])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[n]=c[n]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let n=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let n in c)this[n]=c[n];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let n=a(this);for(let h in c)n[h]=c[h];return n}cloneAfter(c={}){let n=this.clone(c);return this.parent.insertAfter(this,n),n}cloneBefore(c={}){let n=this.clone(c);return this.parent.insertBefore(this,n),n}error(c,n={}){if(this.source){let{end:h,start:d}=this.rangeBy(n);return this.source.input.error(c,{column:d.column,line:d.line},{column:h.column,line:h.line},n)}return new e(c)}getProxyProcessor(){return{get(c,n){return n==="proxyOf"?c:n==="root"?()=>c.root().toProxy():c[n]},set(c,n,h){return c[n]===h||(c[n]=h,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&c.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let c=this;for(;c=c.parent;)c[s]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c){let n=this.source.start;if(c.index)n=this.positionInside(c.index);else if(c.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,f=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(c.word);f!==-1&&(n=this.positionInside(f))}return n}positionInside(c){let n=this.source.start.column,h=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,f=o(d,this.source.start),m=f+c;for(let p=f;p<m;p++)d[p]===`
|
|
34
34
|
`?(n=1,h+=1):n+=1;return{column:n,line:h}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let n={column:this.source.start.column,line:this.source.start.line},h=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(c.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(c.word);m!==-1&&(n=this.positionInside(m),h=this.positionInside(m+c.word.length))}else c.start?n={column:c.start.column,line:c.start.line}:c.index&&(n=this.positionInside(c.index)),c.end?h={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?h=this.positionInside(c.endIndex):c.index&&(h=this.positionInside(c.index+1));return(h.line<n.line||h.line===n.line&&h.column<=n.column)&&(h={column:n.column+1,line:n.line}),{end:h,start:n}}raw(c,n){return new t().raw(this,c,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let n=this,h=!1;for(let d of c)d===this?h=!0:h?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);h||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,n){let h={},d=n==null;n=n||new Map;let f=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))h[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)h[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=f,n.set(p.input,f),f++),h[m]={end:p.end,inputId:g,start:p.start}}else h[m]=p}return d&&(h.inputs=[...n.keys()].map(m=>m.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=r){c.stringify&&(c=c.stringify);let n="";return c(this,h=>{n+=h}),n}warn(c,n,h){let d={node:this};for(let f in h)d[f]=h[f];return c.warn(n,d)}get proxyOf(){return this}}return Xt=l,l.default=l,Xt}var Qt,li;function nt(){if(li)return Qt;li=1;let e=kt();class t extends e{constructor(s){super(s),this.type="comment"}}return Qt=t,t.default=t,Qt}var Kt,ui;function Lt(){if(ui)return Kt;ui=1;let e=kt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Kt=t,t.default=t,Kt}var Zt,ci;function ke(){if(ci)return Zt;ci=1;let e=nt(),t=Lt(),r=kt(),{isClean:s,my:i}=ms(),a,o,l,u;function c(d){return d.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)n(f)}class h extends r{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(o(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new t(f)]}else if(f.selector||f.selectors)f=[new u(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new e(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[i]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(b){throw m.addToError(b)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=d=>{o=d},h.registerRule=d=>{u=d},h.registerAtRule=d=>{a=d},h.registerRoot=d=>{l=d},Zt=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,a.prototype):d.type==="rule"?Object.setPrototypeOf(d,u.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,l.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},Zt}var er,hi;function gs(){if(hi)return er;hi=1;let e=ke();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return er=t,t.default=t,e.registerAtRule(t),er}var tr,fi;function ys(){if(fi)return tr;fi=1;let e=ke(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},tr=s,s.default=s,tr}var rr,di;function Ga(){if(di)return rr;di=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return rr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},rr}var sr,pi;function Gn(){if(pi)return sr;pi=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let h=n.map?n.map.prev:void 0,d=this.loadMap(n.from,h);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/,m=c.match(d)||c.match(f);if(m)return decodeURIComponent(c.substr(m[0].length));let p=c.match(n)||c.match(h);if(p)return o(c.substr(p[0].length));let g=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let h=c.lastIndexOf(n.pop()),d=c.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(c.substring(h,d)))}loadFile(c){if(this.root=r(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let h=n(c);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return c&&(h=s(r(c),h)),this.loadFile(h)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return sr=l,l.default=l,sr}var ir,mi;function Ft(){if(mi)return ir;mi=1;let{nanoid:e}=Ga(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:s,SourceMapGenerator:i}=de,{fileURLToPath:a,pathToFileURL:o}=de,l=ps(),u=Gn(),c=de,n=Symbol("fromOffsetCache"),h=!!(s&&i),d=!!(r&&t);class f{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&h){let b=new u(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,w);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:w,line:C},this.css,this.file,y.plugin),v.input={column:b,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
|
|
35
35
|
`);b=new Array(w.length);let C=0;for(let v=0,S=w.length;v<S;v++)b[v]=C,C+=w[v].length+1;this[n]=b}g=b[b.length-1];let y=0;if(p>=g)y=b.length-1;else{let w=b.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<b[C])w=C-1;else if(p>=b[C+1])y=C+1;else{y=C;break}}return{col:p-b[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,b,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof b=="number"&&(v=w.originalPositionFor({column:y,line:b}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ir=f,f.default=f,c&&c.registerInput&&c.registerInput(f),ir}var nr,gi;function ot(){if(gi)return nr;gi=1;let e=ke(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let u=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let c of u)c.raws.before=o.raws.before}return u}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},nr=s,s.default=s,e.registerRoot(s),nr}var or,yi;function Hn(){if(yi)return or;yi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
36
|
-
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return or=e,e.default=e,or}var ar,wi;function ws(){if(wi)return ar;wi=1;let e=ke(),t=Hn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ar=r,r.default=r,e.registerRule(r),ar}var lr,bi;function Ha(){if(bi)return lr;bi=1;let e=gs(),t=nt(),r=Lt(),s=Ft(),i=Gn(),a=ot(),o=ws();function l(u,c){if(Array.isArray(u))return u.map(m=>l(m));let d=u,{inputs:n}=d,h=
|
|
36
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return or=e,e.default=e,or}var ar,wi;function ws(){if(wi)return ar;wi=1;let e=ke(),t=Hn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return ar=r,r.default=r,e.registerRule(r),ar}var lr,bi;function Ha(){if(bi)return lr;bi=1;let e=gs(),t=nt(),r=Lt(),s=Ft(),i=Gn(),a=ot(),o=ws();function l(u,c){if(Array.isArray(u))return u.map(m=>l(m));let d=u,{inputs:n}=d,h=Be(d,["inputs"]);if(n){c=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),c.push(p)}}if(h.nodes&&(h.nodes=u.nodes.map(m=>l(m,c))),h.source){let f=h.source,{inputId:m}=f,p=Be(f,["inputId"]);h.source=p,m!=null&&(h.source.input=c[m])}if(h.type==="root")return new a(h);if(h.type==="decl")return new r(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new t(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+u.type)}return lr=l,l.default=l,lr}var ur,vi;function Yn(){if(vi)return ur;vi=1;let{dirname:e,relative:t,resolve:r,sep:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de,{pathToFileURL:o}=de,l=Ft(),u=!!(i&&a),c=!!(e&&r&&t&&s);class n{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
37
37
|
`;this.css.includes(`\r
|
|
38
38
|
`)&&(f=`\r
|
|
39
39
|
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=a.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),b=y.match(/\n/g),b?(d+=b.length,g=y.lastIndexOf(`
|
|
40
|
-
`),f=y.length-g):f+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ur=n,ur}var cr,Si;function Jn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,h=40,d=41,f=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case a:case l:case u:case o:{x=O;do x+=1,D=N.charCodeAt(x);while(D===a||D===i||D===l||D===u||D===o);P=["space",N.slice(O,x)],O=x-1;break}case c:case n:case f:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,O];break}case h:{if(be=ge.length?ge.pop()[1]:"",X=N.charCodeAt(O+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==u){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||v.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{Z=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(Z,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{w.lastIndex=O+1,w.test(N),w.lastIndex===0?x=N.length-1:x=w.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==u&&D!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},cr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Jn();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let h=c[n],d=h[3]||h[2];if(d)return d}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let d,f,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,f=b[m];f&&f[0]==="space";)f=b[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),p&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,d,f,m;for(let[p,g]of n.entries()){if(f=g,m=f[0],m==="("&&(h+=1),m===")"&&(h-=1),h===0&&m===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let d=new r;this.init(d,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,d=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&f&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,d,f){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!f?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[h]={raw:v,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let h,d="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],h==="space");)d=n.pop()[1]+d;return d}stringFrom(n,h){let d="";for(let f=h;f<n.length;f++)d+=n[f][1];return n.splice(h,n.length-h),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return hr=u,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Xn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(u){throw u}return l.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Qn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Qn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Kn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Ni;function Zn(){if(Ni)return gr;Ni=1;let e=ke(),t=ys(),r=Yn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:l,my:u}=ms(),c=Kn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,f,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,f,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",f,"DocumentExit"]:C.type==="root"?v=["Root",f,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[u]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!h[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===f){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===f)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},gr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),gr}var yr,Oi;function Ya(){if(Oi)return yr;Oi=1;let e=Yn(),t=bs();const r=vs();let s=Pt(),i=Kn();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new e(h,n,this._opts,u);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=Zn(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function eo(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),l=Ft(),u=Zn(),c=Hn(),n=kt(),h=bs(),d=Ja(),f=vs(),m=ot(),p=ws(),g=Pt(),b=Qn();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
40
|
+
`),f=y.length-g):f+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ur=n,ur}var cr,Si;function Jn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,h=40,d=41,f=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function _e(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case l:case u:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===l||D===u||D===o);P=["space",O.slice(N,x)],N=x-1;break}case c:case n:case f:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,N];break}case h:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==u){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{w.lastIndex=N+1,w.test(O),w.lastIndex===0?x=O.length-1:x=w.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==u&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},cr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Jn();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let h=c[n],d=h[3]||h[2];if(d)return d}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let d,f,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,f=b[m];f&&f[0]==="space";)f=b[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),p&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,d,f,m;for(let[p,g]of n.entries()){if(f=g,m=f[0],m==="("&&(h+=1),m===")"&&(h-=1),h===0&&m===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let d=new r;this.init(d,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,d=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&f&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,d,f){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!f?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[h]={raw:v,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let h,d="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],h==="space");)d=n.pop()[1]+d;return d}stringFrom(n,h){let d="";for(let f=h;f<n.length;f++)d+=n[f][1];return n.splice(h,n.length-h),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return hr=u,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Xn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(u){throw u}return l.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Qn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Qn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Kn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Oi;function Zn(){if(Oi)return gr;Oi=1;let e=ke(),t=ys(),r=Yn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:l,my:u}=ms(),c=Kn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,f,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,f,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",f,"DocumentExit"]:C.type==="root"?v=["Root",f,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[u]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!h[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===f){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===f)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},gr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),gr}var yr,Ni;function Ya(){if(Ni)return yr;Ni=1;let e=Yn(),t=bs();const r=vs();let s=Pt(),i=Kn();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new e(h,n,this._opts,u);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=Zn(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function eo(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),l=Ft(),u=Zn(),c=Hn(),n=kt(),h=bs(),d=Ja(),f=vs(),m=ot(),p=ws(),g=Pt(),b=Qn();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
41
41
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
42
|
-
https://www.w3ctech.com/topic/2226`));let N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new d().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=c,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,u.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Xn(),r=Jn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let u=a[1].slice(2);if(u.slice(-2)==="*/"&&(u=u.slice(0,-2)),/^\s*$/.test(u))o.text="",o.raws.left=u,o.raws.right="";else{let c=u.match(/^(\s*)([^]*\S)(\s*)$/);o.text=c[2],o.raws.left=c[1],o.raws.right=c[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,u;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(u=l-1;u>=0;u--)if(a[u][0]!=="space"){u+=1;break}let c=a.slice(l),n=a.slice(u,l);a.splice(u,a.length-u),this.spaces=n.map(h=>h[1]).join(""),this.decl(c)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=eo(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=Vn(Ka);var el=eo();const Y=Vn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function to(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Pi(){return{stylesWithHoverClass:new Map}}function rl(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=to(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function sl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const u={};for(const c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let n=e.attributes[c];if(o==="option"&&c==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),c.startsWith("rr_")){u[c]=n;continue}const h=o==="textarea"&&c==="value",d=o==="style"&&c==="_cssText";if(d&&i&&typeof n=="string"&&(n=to(n,a)),(h||d)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,n.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(c,n.toString()))}catch(f){}}for(const c in u){const n=u[c];if(o==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",e.attributes.src),h.src=n.toString())}if(c==="rr_width")l.style.setProperty("width",n.toString());else if(c==="rr_height")l.style.setProperty("height",n.toString());else if(c==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(c==="rr_mediaState")switch(n){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:c==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:c==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:c==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case U.Text:return rl(e,{cache:a,doc:s,hackCss:i});case U.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const c=s.getNode(e.id),n=s.getMeta(c);if(ga(n,e))return s.getNode(e.id)}let u=sl(e,{doc:r,hackCss:a,cache:l});if(!u)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=r),s.add(u,e),(e.type===U.Document||e.type===U.Element)&&!i)for(const c of e.childNodes){const n=tt(c,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&ls(u)&&u.shadowRoot)u.shadowRoot.appendChild(n);else if(e.type===U.Document&&c.type==U.Element){const h=n;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),u.appendChild(n),h.appendChild(d)):u.appendChild(n)}else u.appendChild(n);o&&o(n,c.id)}return u}function il(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function nl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function ol(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,u=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return il(l,c=>{s&&s(c),nl(c,l)}),u}var al=Object.defineProperty,ll=(e,t,r)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>ll(e,typeof t!="symbol"?t+"":t,r),ul=Object.defineProperty,cl=(e,t,r)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>cl(e,typeof t!="symbol"?t+"":t,r);let hl=class{constructor(){ki(this,"idNodeMap",new Map),ki(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fl(){return new hl}function dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Li;function ml(){if(Li)return mt.exports;Li=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),pe=pl(yl);var Cr,Fi;function Ss(){if(Fi)return Cr;Fi=1;let e=ml(),t=pe;class r extends Error{constructor(i,a,o,l,u,c){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),c&&(this.plugin=c),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=f=>f,l=f=>f,u=f=>f;if(i){let{bold:f,gray:m,red:p}=e.createColors(!0);l=g=>f(p(g)),o=g=>m(g),t&&(u=g=>t(g))}let c=a.split(/\r?\n/),n=Math.max(this.line-3,0),h=Math.min(this.line+2,c.length),d=String(h).length;return c.slice(n,h).map((f,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(f.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=f.slice(w,C),S=o(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(v)+`
|
|
42
|
+
https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new d().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=c,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,u.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Xn(),r=Jn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let u=a[1].slice(2);if(u.slice(-2)==="*/"&&(u=u.slice(0,-2)),/^\s*$/.test(u))o.text="",o.raws.left=u,o.raws.right="";else{let c=u.match(/^(\s*)([^]*\S)(\s*)$/);o.text=c[2],o.raws.left=c[1],o.raws.right=c[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,u;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(u=l-1;u>=0;u--)if(a[u][0]!=="space"){u+=1;break}let c=a.slice(l),n=a.slice(u,l);a.splice(u,a.length-u),this.spaces=n.map(h=>h[1]).join(""),this.decl(c)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=eo(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=Vn(Ka);var el=eo();const Y=Vn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function to(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Pi(){return{stylesWithHoverClass:new Map}}function rl(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=to(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function sl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case B.Document:return s.implementation.createDocument(null,"",null);case B.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case B.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const u={};for(const c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let n=e.attributes[c];if(o==="option"&&c==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),c.startsWith("rr_")){u[c]=n;continue}const h=o==="textarea"&&c==="value",d=o==="style"&&c==="_cssText";if(d&&i&&typeof n=="string"&&(n=to(n,a)),(h||d)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&c==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",c,n.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")l.setAttribute("_"+c,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(c,n.toString()))}catch(f){}}for(const c in u){const n=u[c];if(o==="canvas"&&c==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&c==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",e.attributes.src),h.src=n.toString())}if(c==="rr_width")l.style.setProperty("width",n.toString());else if(c==="rr_height")l.style.setProperty("height",n.toString());else if(c==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(c==="rr_mediaState")switch(n){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else c==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:c==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:c==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:c==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:c==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case B.Text:return rl(e,{cache:a,doc:s,hackCss:i});case B.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case B.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const c=s.getNode(e.id),n=s.getMeta(c);if(ga(n,e))return s.getNode(e.id)}let u=sl(e,{doc:r,hackCss:a,cache:l});if(!u)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===B.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==B.DocumentType&&(e.childNodes[0].type===B.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=r),s.add(u,e),(e.type===B.Document||e.type===B.Element)&&!i)for(const c of e.childNodes){const n=tt(c,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&ls(u)&&u.shadowRoot)u.shadowRoot.appendChild(n);else if(e.type===B.Document&&c.type==B.Element){const h=n;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),u.appendChild(n),h.appendChild(d)):u.appendChild(n)}else e.type===B.Document&&c.type===B.DocumentType&&u.firstChild&&u.firstChild.nodeType===1?u.insertBefore(n,u.firstChild):u.appendChild(n);o&&o(n,c.id)}return u}function il(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function nl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==B.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function ol(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,u=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return il(l,c=>{s&&s(c),nl(c,l)}),u}var al=Object.defineProperty,ll=(e,t,r)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>ll(e,typeof t!="symbol"?t+"":t,r),ul=Object.defineProperty,cl=(e,t,r)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ki=(e,t,r)=>cl(e,typeof t!="symbol"?t+"":t,r);let hl=class{constructor(){ki(this,"idNodeMap",new Map),ki(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fl(){return new hl}function dl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Li;function ml(){if(Li)return mt.exports;Li=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),pe=pl(yl);var Cr,Fi;function Ss(){if(Fi)return Cr;Fi=1;let e=ml(),t=pe;class r extends Error{constructor(i,a,o,l,u,c){super(i),this.name="CssSyntaxError",this.reason=i,u&&(this.file=u),l&&(this.source=l),c&&(this.plugin=c),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=f=>f,l=f=>f,u=f=>f;if(i){let{bold:f,gray:m,red:p}=e.createColors(!0);l=g=>f(p(g)),o=g=>m(g),t&&(u=g=>t(g))}let c=a.split(/\r?\n/),n=Math.max(this.line-3,0),h=Math.min(this.line+2,c.length),d=String(h).length;return c.slice(n,h).map((f,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(f.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=f.slice(w,C),S=o(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+u(v)+`
|
|
43
43
|
`+S+l("^")}let b=o(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+u(f)+`
|
|
44
44
|
`+b+l("^")}return" "+o(g)+u(f)}).join(`
|
|
45
45
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
46
46
|
|
|
47
47
|
`+i+`
|
|
48
|
-
`),this.name+": "+this.message+i}}return Cr=r,r.default=r,Cr}var Er,
|
|
48
|
+
`),this.name+": "+this.message+i}}return Cr=r,r.default=r,Cr}var Er,Bi;function ro(){if(Bi)return Er;Bi=1;const e={after:`
|
|
49
49
|
`,beforeClose:`
|
|
50
50
|
`,beforeComment:`
|
|
51
51
|
`,beforeDecl:`
|
|
@@ -56,19 +56,19 @@ https://www.w3ctech.com/topic/2226`));let N=v(...I);return N.postcssPlugin=C,N.p
|
|
|
56
56
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
57
57
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
|
|
58
58
|
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let u=o.raws.before.split(`
|
|
59
|
-
`);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Er=r,r.default=r,Er}var Rr,
|
|
59
|
+
`);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Er=r,r.default=r,Er}var Rr,Ui;function Bt(){if(Ui)return Rr;Ui=1;let e=ro();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var gt={},$i;function Cs(){return $i||($i=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var xr,Wi;function Ut(){if(Wi)return xr;Wi=1;let e=Ss(),t=ro(),r=Bt(),{isClean:s,my:i}=Cs();function a(u,c){let n=new u.constructor;for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||h==="proxyCache")continue;let d=u[h],f=typeof d;h==="parent"&&f==="object"?c&&(n[h]=c):h==="source"?n[h]=d:Array.isArray(d)?n[h]=d.map(m=>a(m,n)):(f==="object"&&d!==null&&(d=a(d)),n[h]=d)}return n}function o(u,c){if(c&&typeof c.offset!="undefined")return c.offset;let n=1,h=1,d=0;for(let f=0;f<u.length;f++){if(h===c.line&&n===c.column){d=f;break}u[f]===`
|
|
60
60
|
`?(n=1,h+=1):n+=1}return d}class l{constructor(c={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in c)if(n==="nodes"){this.nodes=[];for(let h of c[n])typeof h.clone=="function"?this.append(h.clone()):this.append(h)}else this[n]=c[n]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let n=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let n in c)this[n]=c[n];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let n=a(this);for(let h in c)n[h]=c[h];return n}cloneAfter(c={}){let n=this.clone(c);return this.parent.insertAfter(this,n),n}cloneBefore(c={}){let n=this.clone(c);return this.parent.insertBefore(this,n),n}error(c,n={}){if(this.source){let{end:h,start:d}=this.rangeBy(n);return this.source.input.error(c,{column:d.column,line:d.line},{column:h.column,line:h.line},n)}return new e(c)}getProxyProcessor(){return{get(c,n){return n==="proxyOf"?c:n==="root"?()=>c.root().toProxy():c[n]},set(c,n,h){return c[n]===h||(c[n]=h,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&c.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let c=this;for(;c=c.parent;)c[s]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c){let n=this.source.start;if(c.index)n=this.positionInside(c.index);else if(c.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,f=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(c.word);f!==-1&&(n=this.positionInside(f))}return n}positionInside(c){let n=this.source.start.column,h=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,f=o(d,this.source.start),m=f+c;for(let p=f;p<m;p++)d[p]===`
|
|
61
|
-
`?(n=1,h+=1):n+=1;return{column:n,line:h}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let n={column:this.source.start.column,line:this.source.start.line},h=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(c.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(c.word);m!==-1&&(n=this.positionInside(m),h=this.positionInside(m+c.word.length))}else c.start?n={column:c.start.column,line:c.start.line}:c.index&&(n=this.positionInside(c.index)),c.end?h={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?h=this.positionInside(c.endIndex):c.index&&(h=this.positionInside(c.index+1));return(h.line<n.line||h.line===n.line&&h.column<=n.column)&&(h={column:n.column+1,line:n.line}),{end:h,start:n}}raw(c,n){return new t().raw(this,c,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let n=this,h=!1;for(let d of c)d===this?h=!0:h?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);h||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,n){let h={},d=n==null;n=n||new Map;let f=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))h[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)h[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=f,n.set(p.input,f),f++),h[m]={end:p.end,inputId:g,start:p.start}}else h[m]=p}return d&&(h.inputs=[...n.keys()].map(m=>m.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=r){c.stringify&&(c=c.stringify);let n="";return c(this,h=>{n+=h}),n}warn(c,n,h){let d={node:this};for(let f in h)d[f]=h[f];return c.warn(n,d)}get proxyOf(){return this}}return xr=l,l.default=l,xr}var Mr,zi;function at(){if(zi)return Mr;zi=1;let e=Bt();class t extends e{constructor(s){super(s),this.type="comment"}}return Mr=t,t.default=t,Mr}var Nr,qi;function $t(){if(qi)return Nr;qi=1;let e=Bt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Nr=t,t.default=t,Nr}var Or,Vi;function Le(){if(Vi)return Or;Vi=1;let e=at(),t=$t(),r=Bt(),{isClean:s,my:i}=Cs(),a,o,l,u;function c(d){return d.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)n(f)}class h extends r{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(o(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new t(f)]}else if(f.selector||f.selectors)f=[new u(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new e(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[i]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(b){throw m.addToError(b)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=d=>{o=d},h.registerRule=d=>{u=d},h.registerAtRule=d=>{a=d},h.registerRoot=d=>{l=d},Or=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,a.prototype):d.type==="rule"?Object.setPrototypeOf(d,u.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,l.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},Or}var Ir,ji;function Es(){if(ji)return Ir;ji=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ir=t,t.default=t,e.registerAtRule(t),Ir}var Dr,Gi;function Rs(){if(Gi)return Dr;Gi=1;let e=Le(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Dr=s,s.default=s,Dr}var Ar,Hi;function wl(){if(Hi)return Ar;Hi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ar={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Ar}var Tr,Yi;function so(){if(Yi)return Tr;Yi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let h=n.map?n.map.prev:void 0,d=this.loadMap(n.from,h);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/,m=c.match(d)||c.match(f);if(m)return decodeURIComponent(c.substr(m[0].length));let p=c.match(n)||c.match(h);if(p)return o(c.substr(p[0].length));let g=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let h=c.lastIndexOf(n.pop()),d=c.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(c.substring(h,d)))}loadFile(c){if(this.root=r(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let h=n(c);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return c&&(h=s(r(c),h)),this.loadFile(h)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Tr=l,l.default=l,Tr}var _r,Ji;function Wt(){if(Ji)return _r;Ji=1;let{nanoid:e}=wl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,l=Ss(),u=so(),c=pe,n=Symbol("fromOffsetCache"),h=!!(s&&i),d=!!(r&&t);class f{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&h){let b=new u(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,w);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:w,line:C},this.css,this.file,y.plugin),v.input={column:b,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
|
|
61
|
+
`?(n=1,h+=1):n+=1;return{column:n,line:h}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let n={column:this.source.start.column,line:this.source.start.line},h=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(c.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(o(d,this.source.start),o(d,this.source.end)).indexOf(c.word);m!==-1&&(n=this.positionInside(m),h=this.positionInside(m+c.word.length))}else c.start?n={column:c.start.column,line:c.start.line}:c.index&&(n=this.positionInside(c.index)),c.end?h={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?h=this.positionInside(c.endIndex):c.index&&(h=this.positionInside(c.index+1));return(h.line<n.line||h.line===n.line&&h.column<=n.column)&&(h={column:n.column+1,line:n.line}),{end:h,start:n}}raw(c,n){return new t().raw(this,c,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let n=this,h=!1;for(let d of c)d===this?h=!0:h?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);h||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,n){let h={},d=n==null;n=n||new Map;let f=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))h[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)h[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=f,n.set(p.input,f),f++),h[m]={end:p.end,inputId:g,start:p.start}}else h[m]=p}return d&&(h.inputs=[...n.keys()].map(m=>m.toJSON())),h}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=r){c.stringify&&(c=c.stringify);let n="";return c(this,h=>{n+=h}),n}warn(c,n,h){let d={node:this};for(let f in h)d[f]=h[f];return c.warn(n,d)}get proxyOf(){return this}}return xr=l,l.default=l,xr}var Mr,zi;function at(){if(zi)return Mr;zi=1;let e=Ut();class t extends e{constructor(s){super(s),this.type="comment"}}return Mr=t,t.default=t,Mr}var Or,qi;function $t(){if(qi)return Or;qi=1;let e=Ut();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(L({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Nr,Vi;function Le(){if(Vi)return Nr;Vi=1;let e=at(),t=$t(),r=Ut(),{isClean:s,my:i}=Cs(),a,o,l,u;function c(d){return d.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)n(f)}class h extends r{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(b,y)=>g(b.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...b)=>p(g.toProxy(),...b)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let b;for(let y in this.indexes)b=this.indexes[y],p<b&&(this.indexes[y]=b+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,b=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let w of b)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+b.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(o(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new t(f)]}else if(f.selector||f.selectors)f=[new u(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new e(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[i]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(b){throw m.addToError(b)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=d=>{o=d},h.registerRule=d=>{u=d},h.registerAtRule=d=>{a=d},h.registerRoot=d=>{l=d},Nr=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,a.prototype):d.type==="rule"?Object.setPrototypeOf(d,u.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,l.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},Nr}var Ir,ji;function Es(){if(ji)return Ir;ji=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ir=t,t.default=t,e.registerAtRule(t),Ir}var Dr,Gi;function Rs(){if(Gi)return Dr;Gi=1;let e=Le(),t,r;class s extends e{constructor(a){super(L({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Dr=s,s.default=s,Dr}var Ar,Hi;function wl(){if(Hi)return Ar;Hi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ar={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Ar}var Tr,Yi;function so(){if(Yi)return Tr;Yi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class l{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let h=n.map?n.map.prev:void 0,d=this.loadMap(n.from,h);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/,m=c.match(d)||c.match(f);if(m)return decodeURIComponent(c.substr(m[0].length));let p=c.match(n)||c.match(h);if(p)return o(c.substr(p[0].length));let g=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let h=c.lastIndexOf(n.pop()),d=c.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(c.substring(h,d)))}loadFile(c){if(this.root=r(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let h=n(c);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return c&&(h=s(r(c),h)),this.loadFile(h)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Tr=l,l.default=l,Tr}var _r,Ji;function Wt(){if(Ji)return _r;Ji=1;let{nanoid:e}=wl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,l=Ss(),u=so(),c=pe,n=Symbol("fromOffsetCache"),h=!!(s&&i),d=!!(r&&t);class f{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&h){let b=new u(this.css,g);if(b.text){this.map=b;let y=b.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,b,y={}){let w,C,v;if(g&&typeof g=="object"){let E=g,R=b;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,b=I.col}else g=E.line,b=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,w=I.col}else C=R.line,w=R.column}else if(!b){let E=this.fromOffset(g);g=E.line,b=E.col}let S=this.origin(g,b,C,w);return S?v=new l(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):v=new l(p,C===void 0?g:{column:b,line:g},C===void 0?b:{column:w,line:C},this.css,this.file,y.plugin),v.input={column:b,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,b;if(this[n])b=this[n];else{let w=this.css.split(`
|
|
62
62
|
`);b=new Array(w.length);let C=0;for(let v=0,S=w.length;v<S;v++)b[v]=C,C+=w[v].length+1;this[n]=b}g=b[b.length-1];let y=0;if(p>=g)y=b.length-1;else{let w=b.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<b[C])w=C-1;else if(p>=b[C+1])y=C+1;else{y=C;break}}return{col:p-b[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,b,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof b=="number"&&(v=w.originalPositionFor({column:y,line:b}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=w.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=L({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return _r=f,f.default=f,c&&c.registerInput&&c.registerInput(f),_r}var Pr,Xi;function lt(){if(Xi)return Pr;Xi=1;let e=Le(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let u=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let c of u)c.raws.before=o.raws.before}return u}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Pr=s,s.default=s,e.registerRoot(s),Pr}var kr,Qi;function io(){if(Qi)return kr;Qi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
63
|
-
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return kr=e,e.default=e,kr}var Lr,Ki;function xs(){if(Ki)return Lr;Ki=1;let e=Le(),t=io();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Fr,Zi;function bl(){if(Zi)return Fr;Zi=1;let e=Es(),t=at(),r=$t(),s=Wt(),i=so(),a=lt(),o=xs();function l(u,c){if(Array.isArray(u))return u.map(m=>l(m));let d=u,{inputs:n}=d,h=
|
|
63
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,u=!1,c="",n=!1;for(let h of t)n?n=!1:h==="\\"?n=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=h;return(s||a!=="")&&i.push(a.trim()),i}};return kr=e,e.default=e,kr}var Lr,Ki;function xs(){if(Ki)return Lr;Ki=1;let e=Le(),t=io();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Lr=r,r.default=r,e.registerRule(r),Lr}var Fr,Zi;function bl(){if(Zi)return Fr;Zi=1;let e=Es(),t=at(),r=$t(),s=Wt(),i=so(),a=lt(),o=xs();function l(u,c){if(Array.isArray(u))return u.map(m=>l(m));let d=u,{inputs:n}=d,h=Be(d,["inputs"]);if(n){c=[];for(let m of n){let p=se(L({},m),{__proto__:s.prototype});p.map&&(p.map=se(L({},p.map),{__proto__:i.prototype})),c.push(p)}}if(h.nodes&&(h.nodes=u.nodes.map(m=>l(m,c))),h.source){let f=h.source,{inputId:m}=f,p=Be(f,["inputId"]);h.source=p,m!=null&&(h.source.input=c[m])}if(h.type==="root")return new a(h);if(h.type==="decl")return new r(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new t(h);if(h.type==="atrule")return new e(h);throw new Error("Unknown node type: "+u.type)}return Fr=l,l.default=l,Fr}var Br,en;function no(){if(en)return Br;en=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe,{pathToFileURL:o}=pe,l=Wt(),u=!!(i&&a),c=!!(e&&r&&t&&s);class n{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
64
64
|
`;this.css.includes(`\r
|
|
65
65
|
`)&&(f=`\r
|
|
66
66
|
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&u&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=a.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),b=y.match(/\n/g),b?(d+=b.length,g=y.lastIndexOf(`
|
|
67
|
-
`),f=y.length-g):f+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Ur=n,Ur}var Br,tn;function oo(){if(tn)return Br;tn=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,h=40,d=41,f=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Br=function(R,I={}){let N=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=N.charCodeAt(O),D){case i:case a:case l:case u:case o:{x=O;do x+=1,D=N.charCodeAt(x);while(D===a||D===i||D===l||D===u||D===o);P=["space",N.slice(O,x)],O=x-1;break}case c:case n:case f:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,O];break}case h:{if(be=ge.length?ge.pop()[1]:"",X=N.charCodeAt(O+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==u){x=O;do{if(V=!1,x=N.indexOf(")",x+1),x===-1)if(F||te){x=O;break}else le("bracket");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),re=N.slice(O,x+1),x===-1||v.test(re)?P=["(","(",O]:(P=["brackets",re,O,x],O=x);break}case e:case t:{Z=D===e?"'":'"',x=O;do{if(V=!1,x=N.indexOf(Z,x+1),x===-1)if(F||te){x=O+1;break}else le("string");for(ee=x;N.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",N.slice(O,x+1),O,x],O=x;break}case y:{w.lastIndex=O+1,w.test(N),w.lastIndex===0?x=N.length-1:x=w.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=N.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==u&&D!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{D===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(F||te?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},Br}var $r,rn;function ao(){if(rn)return $r;rn=1;let e=Es(),t=at(),r=$t(),s=lt(),i=xs(),a=oo();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let h=c[n],d=h[3]||h[2];if(d)return d}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let d,f,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,f=b[m];f&&f[0]==="space";)f=b[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),p&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,d,f,m;for(let[p,g]of n.entries()){if(f=g,m=f[0],m==="("&&(h+=1),m===")"&&(h-=1),h===0&&m===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let d=new r;this.init(d,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,d=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&f&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,d,f){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!f?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[h]={raw:v,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let h,d="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],h==="space");)d=n.pop()[1]+d;return d}stringFrom(n,h){let d="";for(let f=h;f<n.length;f++)d+=n[f][1];return n.splice(h,n.length-h),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return $r=u,$r}var Wr,sn;function Ms(){if(sn)return Wr;sn=1;let e=Le(),t=Wt(),r=ao();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(u){throw u}return l.root}return Wr=s,s.default=s,e.registerParse(s),Wr}var zr,nn;function lo(){if(nn)return zr;nn=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return zr=e,e.default=e,zr}var qr,on;function Ns(){if(on)return qr;on=1;let e=lo();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return qr=t,t.default=t,qr}var Vr,an;function uo(){if(an)return Vr;an=1;let e={};return Vr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Vr}var jr,ln;function co(){if(ln)return jr;ln=1;let e=Le(),t=Rs(),r=no(),s=Ms(),i=Ns(),a=lt(),o=Ut(),{isClean:l,my:u}=Cs(),c=uo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,f,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,f,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",f,"DocumentExit"]:C.type==="root"?v=["Root",f,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[u]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!h[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let N=S.iterator,F;for(;F=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===f){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===f)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},jr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),jr}var Gr,un;function vl(){if(un)return Gr;un=1;let e=no(),t=Ms();const r=Ns();let s=Ut(),i=uo();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new e(h,n,this._opts,u);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gr=a,a.default=a,Gr}var Hr,cn;function Sl(){if(cn)return Hr;cn=1;let e=Rs(),t=co(),r=vl(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Hr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Hr}var Yr,hn;function ho(){if(hn)return Yr;hn=1;let e=Es(),t=at(),r=Le(),s=Ss(),i=$t(),a=Rs(),o=bl(),l=Wt(),u=co(),c=io(),n=Bt(),h=Ms(),d=Sl(),f=Ns(),m=lt(),p=xs(),g=Ut(),b=lo();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
67
|
+
`),f=y.length-g):f+=y.length,w&&C!=="start"){let v=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==v.last||v.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Br=n,Br}var Ur,tn;function oo(){if(tn)return Ur;tn=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,u=13,c=91,n=93,h=40,d=41,f=123,m=125,p=59,g=42,b=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Ur=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function _e(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case l:case u:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===l||D===u||D===o);P=["space",O.slice(N,x)],N=x-1;break}case c:case n:case f:case m:case b:case p:case d:{let j=String.fromCharCode(D);P=[j,j,N];break}case h:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==u){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{w.lastIndex=N+1,w.test(O),w.lastIndex===0?x=O.length-1:x=w.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==u&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},Ur}var $r,rn;function ao(){if(rn)return $r;rn=1;let e=Es(),t=at(),r=$t(),s=lt(),i=xs(),a=oo();const o={empty:!0,space:!0};function l(c){for(let n=c.length-1;n>=0;n--){let h=c[n],d=h[3]||h[2];if(d)return d}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let h=new e;h.name=n[1].slice(1),h.name===""&&this.unnamedAtrule(h,n),this.init(h,n[2]);let d,f,m,p=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){h.source.end=this.getPosition(n[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(b.length>0){for(m=b.length-1,f=b[m];f&&f[0]==="space";)f=b[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(h.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(h,"params",b),p&&(n=b[b.length-1],h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(n){let h=this.colon(n);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let h=0,d,f,m;for(let[p,g]of n.entries()){if(f=g,m=f[0],m==="("&&(h+=1),m===")"&&(h-=1),h===0&&m===":")if(!d)this.doubleColon(f);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=f}return!1}comment(n){let h=new t;this.init(h,n[2]),h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,h){let d=new r;this.init(d,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let v=y;v>0;v--){let S=w[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let h=new i;this.init(h,n[2]),h.selector="",h.raws.between="",this.current=h}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let h=this.input.fromOffset(n);return{column:h.col,line:h.line,offset:n}}init(n,h){this.current.push(n),n.source={input:this.input,start:this.getPosition(h)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let h=!1,d=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),b=[],y=n;for(;y;){if(d=y[0],b.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&f&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(b,g);return}else break;else if(d==="{"){this.rule(b);return}else if(d==="}"){this.tokenizer.back(b.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,h,d,f){let m,p,g=d.length,b="",y=!0,w,C;for(let v=0;v<g;v+=1)m=d[v],p=m[0],p==="space"&&v===g-1&&!f?y=!1:p==="comment"?(C=d[v-1]?d[v-1][0]:"empty",w=d[v+1]?d[v+1][0]:"empty",!o[C]&&!o[w]?b.slice(-1)===","?y=!1:b+=m[1]:y=!1):b+=m[1];if(!y){let v=d.reduce((S,E)=>S+E[1],"");n.raws[h]={raw:v,value:b}}n[h]=b}rule(n){n.pop();let h=new i;this.init(h,n[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(h,"selector",n),this.current=h}spacesAndCommentsFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],!(h!=="space"&&h!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let h,d="";for(;n.length&&(h=n[0][0],!(h!=="space"&&h!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let h,d="";for(;n.length&&(h=n[n.length-1][0],h==="space");)d=n.pop()[1]+d;return d}stringFrom(n,h){let d="";for(let f=h;f<n.length;f++)d+=n[f][1];return n.splice(h,n.length-h),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return $r=u,$r}var Wr,sn;function Ms(){if(sn)return Wr;sn=1;let e=Le(),t=Wt(),r=ao();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(u){throw u}return l.root}return Wr=s,s.default=s,e.registerParse(s),Wr}var zr,nn;function lo(){if(nn)return zr;nn=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return zr=e,e.default=e,zr}var qr,on;function Os(){if(on)return qr;on=1;let e=lo();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return qr=t,t.default=t,qr}var Vr,an;function uo(){if(an)return Vr;an=1;let e={};return Vr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Vr}var jr,ln;function co(){if(ln)return jr;ln=1;let e=Le(),t=Rs(),r=no(),s=Ms(),i=Os(),a=lt(),o=Bt(),{isClean:l,my:u}=Cs(),c=uo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,f,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,f,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",f,"DocumentExit"]:C.type==="root"?v=["Root",f,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function b(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>b(v)),C}let y={};class w{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=b(S);else if(S instanceof w||S instanceof i)R=b(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[u]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!h[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===f){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===f)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},jr=w,w.default=w,a.registerLazyResult(w),t.registerLazyResult(w),jr}var Gr,un;function vl(){if(un)return Gr;un=1;let e=no(),t=Ms();const r=Os();let s=Bt(),i=uo();class a{constructor(l,u,c){u=u.toString(),this.stringified=!1,this._processor=l,this._css=u,this._opts=c,this._map=void 0;let n,h=s;this.result=new r(this._processor,n,this._opts),this.result.css=u;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new e(h,n,this._opts,u);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,u){return this.async().then(l,u)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,u=t;try{l=u(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Gr=a,a.default=a,Gr}var Hr,cn;function Sl(){if(cn)return Hr;cn=1;let e=Rs(),t=co(),r=vl(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let u of o)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))l=l.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)l.push(u);else if(typeof u=="function")l.push(u);else if(!(typeof u=="object"&&(u.parse||u.stringify)))throw new Error(u+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Hr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Hr}var Yr,hn;function ho(){if(hn)return Yr;hn=1;let e=Es(),t=at(),r=Le(),s=Ss(),i=$t(),a=Rs(),o=bl(),l=Wt(),u=co(),c=io(),n=Ut(),h=Ms(),d=Sl(),f=Os(),m=lt(),p=xs(),g=Bt(),b=lo();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
68
68
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
69
|
-
https://www.w3ctech.com/topic/2226`));let N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new d().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,F){return y([E(F)]).process(I,N)},E},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=c,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,u.registerPostcss(y),Yr=y,y.default=y,Yr}var Jr,fn;function Cl(){if(fn)return Jr;fn=1;let e=at(),t=ao(),r=oo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let u=a[1].slice(2);if(u.slice(-2)==="*/"&&(u=u.slice(0,-2)),/^\s*$/.test(u))o.text="",o.raws.left=u,o.raws.right="";else{let c=u.match(/^(\s*)([^]*\S)(\s*)$/);o.text=c[2],o.raws.left=c[1],o.raws.right=c[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,u;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(u=l-1;u>=0;u--)if(a[u][0]!=="space"){u+=1;break}let c=a.slice(l),n=a.slice(u,l);a.splice(u,a.length-u),this.spaces=n.map(h=>h[1]).join(""),this.decl(c)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Jr=s,Jr}var Xr,dn;function El(){if(dn)return Xr;dn=1;let{Input:e}=ho(),t=Cl();return Xr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Xr}El();var Rl=ho();const J=dl(Rl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function xl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[rs(o[0].trim())]=o[1].trim())}}),t}function pn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Il(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Ml=/-([a-z])/g,Nl=/^--[a-zA-Z0-9-]+$/,rs=e=>Nl.test(e)?e:e.replace(Ml,(t,r)=>r?r.toUpperCase():""),Ol=/\B([A-Z])/g,Il=e=>e.replace(Ol,"-$1").toLowerCase();class me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Os extends me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Is(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=yo(this,t,r);return i.parentElement=null,i}removeChild(t){return wo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Os}createDocumentType(t,r,s){const i=new fo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new po(t);return r.ownerDocument=this,r}createComment(t){const r=new mo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new go(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class fo extends me{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Tl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?xl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=rs(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=pn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=rs(s),a=t[i]||"";return delete t[i],this.attributes.style=pn(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Is(this,t)}insertBefore(t,r){return yo(this,t,r)}removeChild(t){return wo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Dl extends zt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Al extends zt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class po extends me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class mo extends me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class go extends me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Tl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Is(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yo(e,t,r){if(!r)return Is(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function wo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const ss={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},_l={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Ot(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Pl(e,t,r,s),bo(e,t,r,s),kl(e,t,r)}function Pl(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ds(e,t)){const a=It(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case $.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case $.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;Ot(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),bo(a.shadowRoot,o.shadowRoot,r,s)),Ll(a,o,s);break}}return e}function kl(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,u=o.open,c=o.matches("dialog:modal"),n=l.open,h=l.isModal,d=c!==h,f=u!==n;if((d||u&&f)&&o.close(),n&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Ll(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&ss[a])e.setAttributeNS(ss[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const u=document.createElement("img");u.src=o,u.onload=()=>{const c=e.getContext("2d");c&&c.drawImage(u,0,0,u.width,u.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(u){console.warn(u)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,u=0,c=a.length-1,n=i[o],h=i[l],d=a[u],f=a[c],m,p;for(;o<=l&&u<=c;)if(n===void 0)n=i[++o];else if(h===void 0)h=i[--l];else if($e(n,d,r.mirror,s))n=i[++o],d=a[++u];else if($e(h,f,r.mirror,s))h=i[--l],f=a[--c];else if($e(n,f,r.mirror,s)){try{e.insertBefore(n,h.nextSibling)}catch(y){console.warn(y)}n=i[++o],f=a[--c]}else if($e(h,d,r.mirror,s)){try{e.insertBefore(h,n)}catch(y){console.warn(y)}h=i[--l],d=a[++u]}else{if(!m){m={};for(let w=o;w<=l;w++){const C=i[w];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=w)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&$e(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(w){console.warn(w)}i[p]=void 0}else{const w=It(d,r.mirror,s);e.nodeName==="#document"&&n&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(w,n||null)}catch(C){console.warn(C)}}d=a[++u]}if(o>l){const y=a[c+1];let w=null;for(y&&(w=r.mirror.getNode(s.getId(y)));u<=c;++u){const C=It(a[u],r.mirror,s);try{e.insertBefore(C,w)}catch(v){console.warn(v)}}}else if(u>c)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)Ot(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function It(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ds(a,e))return a;switch(e.RRNodeType){case $.Document:a=new Document;break;case $.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let o=e.tagName.toLowerCase();o=_l[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(ss.svg,o):a=document.createElement(e.tagName);break}case $.Text:a=document.createTextNode(e.data);break;case $.Comment:a=document.createComment(e.data);break;case $.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,L({},i));try{we==null||we.add(a)}catch(o){}return a}function Ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ds(e,t)}class Xe extends Os{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Yl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}createDocumentType(t,r,s){const i=new Fl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Ul(r);break;case"IFRAME":s=new zl(r,this.mirror);break;case"CANVAS":s=new $l(r);break;case"STYLE":s=new Wl(r);break;case"DIALOG":s=new Bl(r);break;default:s=new qt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Vl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new jl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new ql(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Fl=fo;class qt extends zt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Ul extends Dl{}class Bl extends Al{}class $l extends qt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Wl extends qt{constructor(){super(...arguments),A(this,"rules",[])}}class zl extends qt{constructor(t,r){super(t),A(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const ql=po,Vl=mo,jl=go;function Gl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function vo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,l=Gl(o);i=t.createElement(l);const u=i;for(const{name:c,value:n}of Array.from(o.attributes))u.attributes[c]=n;o.scrollLeft&&(u.scrollLeft=o.scrollLeft),o.scrollTop&&(u.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=So(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,L({},a))),i}function Hl(e,t=fl(),r=new Xe){function s(i,a){const o=vo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function Yl(){return new Jl}class Jl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function So(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const mn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Xl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function As(e){if(yt[e])return yt[e];const t=Xl(e)||globalThis[e],r=t.prototype,s=e in mn?mn[e]:void 0,i=!!(s&&s.every(l=>{var u,c;return!!((c=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&c.toString().includes("[native code]"))})),a=e in gn?gn[e]:void 0,o=!!(a&&a.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const c=u[e].prototype;return document.body.removeChild(l),c?yt[e]=c:r}catch(l){return r}}const Qr={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qr[i])return Qr[i].call(t);const a=As(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Qr[i]=o,o.call(t)):t[r]}const Kr={};function Co(e,t,r){const s=`${e}.${String(r)}`;if(Kr[s])return Kr[s].bind(t);const a=As(e)[r];return typeof a!="function"?t[r]:(Kr[s]=a,a.bind(t))}function Ql(e){return Ae("Node",e,"childNodes")}function Kl(e){return Ae("Node",e,"parentNode")}function Zl(e){return Ae("Node",e,"parentElement")}function eu(e){return Ae("Node",e,"textContent")}function tu(e,t){return Co("Node",e,"contains")(t)}function ru(e){return Co("Node",e,"getRootNode")()}function su(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function iu(e){return e.styleSheets}function nu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function ou(e,t){return Ae("Element",e,"querySelector")(t)}function au(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Eo(){return As("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const B={childNodes:Ql,parentNode:Kl,parentElement:Zl,textContent:eu,contains:tu,getRootNode:ru,host:su,styleSheets:iu,shadowRoot:nu,querySelector:ou,querySelectorAll:au,mutationObserver:Eo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`Please stop import mirror directly. Instead of that,\r
|
|
69
|
+
https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new d().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=h,y.fromJSON=o,y.list=c,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new a(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=f,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,u.registerPostcss(y),Yr=y,y.default=y,Yr}var Jr,fn;function Cl(){if(fn)return Jr;fn=1;let e=at(),t=ao(),r=oo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let u=a[1].slice(2);if(u.slice(-2)==="*/"&&(u=u.slice(0,-2)),/^\s*$/.test(u))o.text="",o.raws.left=u,o.raws.right="";else{let c=u.match(/^(\s*)([^]*\S)(\s*)$/);o.text=c[2],o.raws.left=c[1],o.raws.right=c[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,u;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(u=l-1;u>=0;u--)if(a[u][0]!=="space"){u+=1;break}let c=a.slice(l),n=a.slice(u,l);a.splice(u,a.length-u),this.spaces=n.map(h=>h[1]).join(""),this.decl(c)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Jr=s,Jr}var Xr,dn;function El(){if(dn)return Xr;dn=1;let{Input:e}=ho(),t=Cl();return Xr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Xr}El();var Rl=ho();const J=dl(Rl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var $=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))($||{});function xl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(s);o.length>1&&(t[rs(o[0].trim())]=o[1].trim())}}),t}function pn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Il(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Ml=/-([a-z])/g,Ol=/^--[a-zA-Z0-9-]+$/,rs=e=>Ol.test(e)?e:e.replace(Ml,(t,r)=>r?r.toUpperCase():""),Nl=/\B([A-Z])/g,Il=e=>e.replace(Nl,"-$1").toLowerCase();class me{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof me){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ns extends me{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",$.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===$.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===$.Element||r===$.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Is(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===$.Element||s===$.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===$.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=yo(this,t,r);return i.parentElement=null,i}removeChild(t){return wo(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ns}createDocumentType(t,r,s){const i=new fo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new po(t);return r.ownerDocument=this,r}createComment(t){const r=new mo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new go(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class fo extends me{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",$.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",$.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Tl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?xl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const o=rs(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=pn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=rs(s),a=t[i]||"";return delete t[i],this.attributes.style=pn(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Is(this,t)}insertBefore(t,r){return yo(this,t,r)}removeChild(t){return wo(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Dl extends zt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Al extends zt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class po extends me{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",$.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class mo extends me{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",$.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class go extends me{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",$.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Tl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function Is(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function yo(e,t,r){if(!r)return Is(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function wo(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ue=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ue||{});const ss={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},_l={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let we=null;function Nt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Pl(e,t,r,s),bo(e,t,r,s),kl(e,t,r)}function Pl(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ds(e,t)){const a=It(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case $.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case $.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;Nt(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),bo(a.shadowRoot,o.shadowRoot,r,s)),Ll(a,o,s);break}}return e}function kl(e,t,r){var s;switch(t.RRNodeType){case $.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case $.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,u=o.open,c=o.matches("dialog:modal"),n=l.open,h=l.isModal,d=c!==h,f=u!==n;if((d||u&&f)&&o.close(),n&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case $.Text:case $.Comment:case $.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function Ll(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&ss[a])e.setAttributeNS(ss[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const u=document.createElement("img");u.src=o,u.onload=()=>{const c=e.getContext("2d");c&&c.drawImage(u,0,0,u.width,u.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(u){console.warn(u)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function bo(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,u=0,c=a.length-1,n=i[o],h=i[l],d=a[u],f=a[c],m,p;for(;o<=l&&u<=c;)if(n===void 0)n=i[++o];else if(h===void 0)h=i[--l];else if($e(n,d,r.mirror,s))n=i[++o],d=a[++u];else if($e(h,f,r.mirror,s))h=i[--l],f=a[--c];else if($e(n,f,r.mirror,s)){try{e.insertBefore(n,h.nextSibling)}catch(y){console.warn(y)}n=i[++o],f=a[--c]}else if($e(h,d,r.mirror,s)){try{e.insertBefore(h,n)}catch(y){console.warn(y)}h=i[--l],d=a[++u]}else{if(!m){m={};for(let w=o;w<=l;w++){const C=i[w];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=w)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&$e(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(w){console.warn(w)}i[p]=void 0}else{const w=It(d,r.mirror,s);e.nodeName==="#document"&&n&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(w,n||null)}catch(C){console.warn(C)}}d=a[++u]}if(o>l){const y=a[c+1];let w=null;for(y&&(w=r.mirror.getNode(s.getId(y)));u<=c;++u){const C=It(a[u],r.mirror,s);try{e.insertBefore(C,w)}catch(v){console.warn(v)}}}else if(u>c)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)Nt(g,b,r,s),g=g.nextSibling,b=b.nextSibling}function It(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ds(a,e))return a;switch(e.RRNodeType){case $.Document:a=new Document;break;case $.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case $.Element:{let o=e.tagName.toLowerCase();o=_l[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(ss.svg,o):a=document.createElement(e.tagName);break}case $.Text:a=document.createTextNode(e.data);break;case $.Comment:a=document.createComment(e.data);break;case $.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,L({},i));try{we==null||we.add(a)}catch(o){}return a}function Ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ds(e,t)}class Xe extends Ns{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Yl()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}createDocumentType(t,r,s){const i=new Fl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Bl(r);break;case"IFRAME":s=new zl(r,this.mirror);break;case"CANVAS":s=new $l(r);break;case"STYLE":s=new Wl(r);break;case"DIALOG":s=new Ul(r);break;default:s=new qt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Vl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new jl(t);return r.ownerDocument=this,r}createTextNode(t){const r=new ql(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Fl=fo;class qt extends zt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Bl extends Dl{}class Ul extends Al{}class $l extends qt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Wl extends qt{constructor(){super(...arguments),A(this,"rules",[])}}class zl extends qt{constructor(t,r){super(t),A(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const ql=po,Vl=mo,jl=go;function Gl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function vo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,l=Gl(o);i=t.createElement(l);const u=i;for(const{name:c,value:n}of Array.from(o.attributes))u.attributes[c]=n;o.scrollLeft&&(u.scrollLeft=o.scrollLeft),o.scrollTop&&(u.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=So(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,L({},a))),i}function Hl(e,t=fl(),r=new Xe){function s(i,a){const o=vo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function Yl(){return new Jl}class Jl{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function So(e,t){switch(e.RRNodeType){case $.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case $.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case $.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case $.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case $.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const mn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},gn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Xl(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function As(e){if(yt[e])return yt[e];const t=Xl(e)||globalThis[e],r=t.prototype,s=e in mn?mn[e]:void 0,i=!!(s&&s.every(l=>{var u,c;return!!((c=(u=Object.getOwnPropertyDescriptor(r,l))==null?void 0:u.get)!=null&&c.toString().includes("[native code]"))})),a=e in gn?gn[e]:void 0,o=!!(a&&a.every(l=>{var u;return typeof r[l]=="function"&&((u=r[l])==null?void 0:u.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const c=u[e].prototype;return document.body.removeChild(l),c?yt[e]=c:r}catch(l){return r}}const Qr={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(Qr[i])return Qr[i].call(t);const a=As(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(Qr[i]=o,o.call(t)):t[r]}const Kr={};function Co(e,t,r){const s=`${e}.${String(r)}`;if(Kr[s])return Kr[s].bind(t);const a=As(e)[r];return typeof a!="function"?t[r]:(Kr[s]=a,a.bind(t))}function Ql(e){return Ae("Node",e,"childNodes")}function Kl(e){return Ae("Node",e,"parentNode")}function Zl(e){return Ae("Node",e,"parentElement")}function eu(e){return Ae("Node",e,"textContent")}function tu(e,t){return Co("Node",e,"contains")(t)}function ru(e){return Co("Node",e,"getRootNode")()}function su(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function iu(e){return e.styleSheets}function nu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function ou(e,t){return Ae("Element",e,"querySelector")(t)}function au(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Eo(){return As("MutationObserver").constructor}function Fe(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const U={childNodes:Ql,parentNode:Kl,parentElement:Zl,textContent:eu,contains:tu,getRootNode:ru,host:su,styleSheets:iu,shadowRoot:nu,querySelector:ou,querySelectorAll:au,mutationObserver:Eo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`Please stop import mirror directly. Instead of that,\r
|
|
70
70
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
71
|
-
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),u=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(u,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(u,a)},l))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ts(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=B.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=B.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function _s(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ks(e){return e?e.nodeType===e.ELEMENT_NODE?e:B.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=ks(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Nt(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Ro(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function Ls(e,t){if(Ze(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=B.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ls(s,t):!0}function Dt(e){return!!e.changedTouches}function Fs(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)}function xo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const u=l.parent.children.indexOf(l);l.parent.children.splice(u,0,r(i,l.parent))}else{const u=s.indexOf(l);s.splice(u,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function Us(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Us(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Bs(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $s(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=$s(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ne(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!B.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function is(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Mo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Ws{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zs(e){var t;let r=null;return"getRootNode"in e&&((t=B.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&B.host(B.getRootNode(e))&&(r=B.host(B.getRootNode(e))),r}function No(e){let t=e,r;for(;r=zs(t);)t=r;return t}function Oo(e){const t=e.ownerDocument;if(!t)return!1;const r=No(e);return B.contains(t,r)}function qs(e){const t=e.ownerDocument;return t?B.contains(t,e)||Oo(e):!1}const lu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ws,get _mirror(){return exports.mirror},closestElementOfNode:ks,getBaseDimension:$s,getNestedRule:je,getPositionsAndIndex:is,getRootShadowHost:No,getShadowHost:zs,getWindowHeight:_s,getWindowScroll:Ts,getWindowWidth:Ps,hasShadowRoot:Ne,hookSetter:ut,inDom:qs,isAncestorRemoved:Ls,isBlocked:ae,isIgnored:Ct,isSerialized:Ro,isSerializedIframe:Ye,isSerializedStylesheet:Bs,iterateResolveTree:Us,legacy_isTouchEvent:Dt,get nowTimestamp(){return it},on:oe,polyfill:Fs,queueToResolveTrees:xo,shadowHostInDom:Oo,throttle:Je,uniqueTextMutations:Mo},Symbol.toStringTag,{value:"Module"}));var _=(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))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(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))(q||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function yn(e){return"__ln"in e}class uu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&yn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&yn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=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.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wn=(e,t)=>`${e}@${t}`;class cu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new uu,i=u=>{let c=u,n=st;for(;n===st;)c=c&&c.nextSibling,n=c&&this.mirror.getId(c);return n},a=u=>{const c=B.parentNode(u);if(!c||!qs(u)||c.tagName==="TEXTAREA")return;const n=Ze(c)?this.mirror.getId(zs(u)):this.mirror.getId(c),h=i(u);if(n===-1||h===-1)return s.addNode(u);const d=Ve(u,{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:f=>{Ye(f,this.mirror)&&this.iframeManager.addIframe(f),Bs(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Ne(u)&&this.shadowDomManager.addShadowRoot(B.shadowRoot(u),this.doc)},onIframeLoad:(f,m)=>{this.iframeManager.attachIframe(f,m),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,m)=>{this.stylesheetManager.attachLinkElement(f,m)}});d&&(t.push({parentId:n,nextId:h,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)bn(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(B.parentNode(u))||a(u);for(const u of this.addedSet)!vn(this.droppedSet,u)&&!bn(this.removesSubTreeCache,u,this.mirror)||vn(this.movedSet,u)?a(u):this.droppedSet.add(u);let o=null;for(;s.length;){let u=null;if(o){const c=this.mirror.getId(B.parentNode(o.value)),n=i(o.value);c!==-1&&n!==-1&&(u=o)}if(!u){let c=s.tail;for(;c;){const n=c;if(c=c.previous,n){const h=this.mirror.getId(B.parentNode(n.value));if(i(n.value)===-1)continue;if(h!==-1){u=n;break}else{const f=n.value,m=B.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=B.host(m);if(this.mirror.getId(p)!==-1){u=n;break}}}}}}if(!u){for(;s.head;)s.removeNode(s.head.value);break}o=u.previous,s.removeNode(u.value),a(u.value)}const l={texts:this.texts.map(u=>{const c=u.node,n=B.parentNode(c);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(c),value:u.value}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:c}=u;if(typeof c.style=="string"){const n=JSON.stringify(u.styleDiff),h=JSON.stringify(u._unchangedStyles);n.length<c.style.length&&(n+h).split("var(").length===c.style.split("var(").length&&(c.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:c}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(B.childNodes(t),s=>B.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=B.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:qn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ks(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const o=hs(r);i=cs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!zn(r.tagName,s))if(a.attributes[s]=Wn(this.doc,Ie(r.tagName),Ie(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const u=r.style.getPropertyValue(l),c=r.style.getPropertyPriority(l);u!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?a.styleDiff[l]=u:a.styleDiff[l]=[u,c]:a._unchangedStyles[l]=[u,c]}for(const l of Array.from(o.style))r.style.getPropertyValue(l)===""&&(a.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ze(t.target)?this.mirror.getId(B.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!Ro(r,this.mirror)||(this.addedSet.has(r)?(ns(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ls(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[wn(s,i)]?ns(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ze(t.target)&&et(t.target)?!0:void 0}),hu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[wn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(B.childNodes(t).forEach(s=>this.genAdds(s)),Ne(t)&&B.childNodes(B.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(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 ns(e,t){e.delete(t),B.childNodes(t).forEach(r=>ns(e,r))}function hu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),B.childNodes(s).forEach(i=>r.push(i)))}}function bn(e,t,r){return e.size===0?!1:fu(e,t)}function fu(e,t,r){const s=B.parentNode(t);return s?e.has(s):!1}function vn(e,t){return e.size===0?!1:Io(e,t)}function Io(e,t){const r=B.parentNode(t);return r?e.has(r)?!0:Io(e,r):!1}let rt;function du(e){rt=e}function pu(){rt=void 0}const W=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Pe=[];function ct(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]}catch(t){}return e&&e.target}function Do(e,t){const r=new cu;Pe.push(r),r.init(e);const s=new(Eo())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const u=Je(W(h=>{const d=Date.now()-l;e(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),a),c=W(Je(W(h=>{const d=ct(h),{clientX:f,clientY:m}=Dt(h)?h.changedTouches[0]:h;l||(l=it()),o.push({x:f,y:m,id:s.getId(d),timeOffset:it()-l}),u(typeof DragEvent!="undefined"&&h instanceof DragEvent?T.Drag:h instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",c,r),oe("touchmove",c,r),oe("drag",c,r)];return W(()=>{n.forEach(h=>h())})}function gu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let u=null;const c=n=>h=>{const d=ct(h);if(ae(d,s,i,!0))return;let f=null,m=n;if("pointerType"in h){switch(h.pointerType){case"mouse":f=ve.Mouse;break;case"touch":f=ve.Touch;break;case"pen":f=ve.Pen;break}f===ve.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):ve.Pen}else Dt(h)&&(f=ve.Touch);f!==null?(u=f,(m.startsWith("Touch")&&f===ve.Touch||m.startsWith("Mouse")&&f===ve.Mouse)&&(f=null)):q[n]===q.Click&&(f=u,u=null);const p=Dt(h)?h.changedTouches[0]:h;if(!p)return;const g=r.getId(d),{clientX:b,clientY:y}=p;W(e)(L({type:q[m],id:g,x:b,y},f!==null&&{pointerType:f}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let h=Ie(n);const d=c(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(oe(h,d,t))}),W(()=>{l.forEach(n=>n())})}function Ao({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=W(Je(W(l=>{const u=ct(l);if(!u||ae(u,s,i,!0))return;const c=r.getId(u);if(u===t&&t.defaultView){const n=Ts(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function yu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Je(W(()=>{const a=_s(),o=Ps();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const wu=["INPUT","TEXTAREA","SELECT"],Sn=new WeakMap;function bu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:n}){function h(y){let w=ct(y);const C=y.isTrusted,v=w&&w.tagName;if(w&&v==="OPTION"&&(w=B.parentElement(w)),!w||!v||wu.indexOf(v)<0||ae(w,s,i,!0)||w.classList.contains(a)||o&&w.matches(o))return;let S=w.value,E=!1;const R=hs(w)||"";R==="radio"||R==="checkbox"?E=w.checked:(l[v.toLowerCase()]||l[R])&&(S=cs({element:w,maskInputOptions:l,tagName:v,type:R,value:S,maskInputFn:u})),d(w,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=w.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(N=>{if(N!==w){const F=N.value;d(N,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function d(y,w){const C=Sn.get(y);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Sn.set(y,w);const v=r.getId(y);W(e)(se(L({},w),{id:v}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(h),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...b.map(y=>ut(y[0],y[1],{set(){W(h)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function At(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function vu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,h,d)=>{const[f,m]=d,{id:p,styleId:g}=xe(h,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:f,index:m}]}),n.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,h,d=this.cssRules.length){const f=`${n} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:f}]}),n.apply(h,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:f}),n.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:f}),n.apply(h,d)})}));const u={};bt("CSSGroupingRule")?u.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(u.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(u.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(u.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(u).forEach(([n,h])=>{c[n]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[n].insertRule,{apply:W((d,f,m)=>{const[p,g]=m,{id:b,styleId:y}=xe(f.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||y&&y!==-1)&&e({id:b,styleId:y,adds:[{rule:p,index:[...At(f),g||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:W((d,f,m)=>{const[p]=m,{id:g,styleId:b}=xe(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,removes:[{index:[...At(f),p]}]}),d.apply(f,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach(([n,h])=>{h.prototype.insertRule=c[n].insertRule,h.prototype.deleteRule=c[n].deleteRule})})}function To({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(B.host(r));const l=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,u=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var c;return(c=u.get)==null?void 0:c.call(this)},set(c){var n;const h=(n=u.set)==null?void 0:n.call(this,c);if(o!==null&&o!==-1)try{t.adoptStyleSheets(c,o)}catch(d){}return h}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function Su({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:W((l,u,c)=>{var n;const[h,d,f]=c;if(r.has(h))return a.apply(u,[h,d,f]);const{id:m,styleId:p}=xe((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:h,value:d,priority:f},index:At(u.parentRule)}),l.apply(u,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:W((l,u,c)=>{var n;const[h]=c;if(r.has(h))return o.apply(u,[h]);const{id:d,styleId:f}=xe((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:h},index:At(u.parentRule)}),l.apply(u,c)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=W(u=>Je(W(c=>{const n=ct(c);if(!n||ae(n,t,r,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:p}=n;e({type:u,id:s.getId(n),currentTime:h,volume:d,muted:f,playbackRate:m,loop:p})}),i.media||500)),l=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return W(()=>{l.forEach(u=>u())})}function Eu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(u,c,n){const h=new a(u,c,n);return i.set(h,{family:u,buffer:typeof c!="string",descriptors:n,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const o=Fe(t.fonts,"add",function(l){return function(u){return setTimeout(W(()=>{const c=i.get(u);c&&(e(c),i.delete(u))}),0),l.apply(this,[u])}});return s.push(()=>{r.FontFace=a}),s.push(o),W(()=>{s.forEach(l=>l())})}function Ru(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const l=W(()=>{const u=t.getSelection();if(!u||o&&(u!=null&&u.isCollapsed))return;o=u.isCollapsed||!1;const c=[],n=u.rangeCount||0;for(let h=0;h<n;h++){const d=u.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:p,endOffset:g}=d;ae(f,s,i,!0)||ae(p,s,i,!0)||c.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:c})});return l(),oe("selectionchange",l)}function xu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,l){try{t({define:{name:a}})}catch(u){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,l])}})}function Mu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:n,canvasMutationCb:h,fontCb:d,selectionCb:f,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),l(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),u(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),h(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),f(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Nu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Mu(e,t);let s;e.recordDOM&&(s=Do(e,e.doc));const i=mu(e),a=gu(e),o=Ao(e),l=yu(e,{win:r}),u=bu(e),c=Cu(e);let n=()=>{},h=()=>{},d=()=>{},f=()=>{};e.recordDOM&&(n=vu(e,{win:r}),h=To(e,e.doc),d=Su(e,{win:r}),e.collectFonts&&(f=Eu(e)));const m=Ru(e),p=xu(e),g=[];for(const b of e.plugins)g.push(b.observer(b.callback,r,b.options));return W(()=>{Pe.forEach(b=>b.reset()),s==null||s.disconnect(),i(),a(),o(),l(),u(),c(),n(),h(),d(),f(),m(),p(),g.forEach(b=>b())})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Cn{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),o.set(l,r)),l}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}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 Ou{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Cn($n)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Cn(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 s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),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 T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class Iu{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Do(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Ao(se(L({},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(B.host(t))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),l=B.shadowRoot(this);return l&&qs(this)&&s.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ke[Ge.charCodeAt(vt)]=vt;var Du=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Au=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),n=new Uint8Array(c);for(s=0;s<r;s+=4)a=Ke[e.charCodeAt(s)],o=Ke[e.charCodeAt(s+1)],l=Ke[e.charCodeAt(s+2)],u=Ke[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|u&63;return c};const En=new Map;function Tu(e,t){let r=En.get(e);return r||(r=new Map,En.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const _o=(e,t,r)=>{if(!e||!(ko(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Tu(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,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 s=e.constructor.name,i=Du(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(ko(e,t)||typeof e=="object"){const s=e.constructor.name,i=_o(e,t,r);return{rr_type:s,index:i}}}}return e}const Po=(e,t,r)=>e.map(s=>Et(s,t,r)),ko=(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 _u(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Fe(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...c){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Po(c,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),u.apply(this,c)}});i.push(l)}catch(l){const u=ut(t.CanvasRenderingContext2D.prototype,o,{set(c){e(this.canvas,{type:Ce["2D"],property:o,args:[c],setter:!0})}});i.push(u)}return()=>{i.forEach(o=>o())}}function Pu(e){return e==="experimental-webgl"?"webgl":e}function Rn(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...u){if(!ae(this,t,r,!0)){const c=Pu(l);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(u[0]&&typeof u[0]=="object"){const n=u[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...u])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function xn(e,t,r,s,i,a){const o=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const c=Fe(e,u,function(n){return function(...h){const d=n.apply(this,h);if(_o(d,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const f=Po(h,a,this),m={type:t,property:u,args:f};r(this.canvas,m)}return d}});o.push(c)}catch(c){const n=ut(e,u,{set(h){r(this.canvas,{type:t,property:u,args:[h],setter:!0})}});o.push(n)}return o}function ku(e,t,r,s){const i=[];return i.push(...xn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...xn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Lo=`(function() {
|
|
71
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),u=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(u,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(u,a)},l))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ts(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=U.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=U.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function _s(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ks(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=ks(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Ro(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function Ls(e,t){if(Ze(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=U.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Ls(s,t):!0}function Dt(e){return!!e.changedTouches}function Fs(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)}function xo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const u=l.parent.children.indexOf(l);l.parent.children.splice(u,0,r(i,l.parent))}else{const u=s.indexOf(l);s.splice(u,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function Bs(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Bs(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Us(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $s(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const a=i.getBoundingClientRect(),o=$s(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Oe(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function is(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Mo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Ws{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zs(e){var t;let r=null;return"getRootNode"in e&&((t=U.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(r=U.host(U.getRootNode(e))),r}function Oo(e){let t=e,r;for(;r=zs(t);)t=r;return t}function No(e){const t=e.ownerDocument;if(!t)return!1;const r=Oo(e);return U.contains(t,r)}function qs(e){const t=e.ownerDocument;return t?U.contains(t,e)||No(e):!1}const lu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ws,get _mirror(){return exports.mirror},closestElementOfNode:ks,getBaseDimension:$s,getNestedRule:je,getPositionsAndIndex:is,getRootShadowHost:Oo,getShadowHost:zs,getWindowHeight:_s,getWindowScroll:Ts,getWindowWidth:Ps,hasShadowRoot:Oe,hookSetter:ut,inDom:qs,isAncestorRemoved:Ls,isBlocked:ae,isIgnored:Ct,isSerialized:Ro,isSerializedIframe:Ye,isSerializedStylesheet:Us,iterateResolveTree:Bs,legacy_isTouchEvent:Dt,get nowTimestamp(){return it},on:oe,polyfill:Fs,queueToResolveTrees:xo,shadowHostInDom:No,throttle:Je,uniqueTextMutations:Mo},Symbol.toStringTag,{value:"Module"}));var _=(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))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(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))(q||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Me||{}),z=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(z||{}),Se=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Se||{});function yn(e){return"__ln"in e}class uu{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&yn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&yn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=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.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wn=(e,t)=>`${e}@${t}`;class cu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new uu,i=u=>{let c=u,n=st;for(;n===st;)c=c&&c.nextSibling,n=c&&this.mirror.getId(c);return n},a=u=>{const c=U.parentNode(u);if(!c||!qs(u)||c.tagName==="TEXTAREA")return;const n=Ze(c)?this.mirror.getId(zs(u)):this.mirror.getId(c),h=i(u);if(n===-1||h===-1)return s.addNode(u);const d=Ve(u,{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:f=>{Ye(f,this.mirror)&&this.iframeManager.addIframe(f),Us(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Oe(u)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(u),this.doc)},onIframeLoad:(f,m)=>{this.iframeManager.attachIframe(f,m),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,m)=>{this.stylesheetManager.attachLinkElement(f,m)}});d&&(t.push({parentId:n,nextId:h,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)bn(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(U.parentNode(u))||a(u);for(const u of this.addedSet)!vn(this.droppedSet,u)&&!bn(this.removesSubTreeCache,u,this.mirror)||vn(this.movedSet,u)?a(u):this.droppedSet.add(u);let o=null;for(;s.length;){let u=null;if(o){const c=this.mirror.getId(U.parentNode(o.value)),n=i(o.value);c!==-1&&n!==-1&&(u=o)}if(!u){let c=s.tail;for(;c;){const n=c;if(c=c.previous,n){const h=this.mirror.getId(U.parentNode(n.value));if(i(n.value)===-1)continue;if(h!==-1){u=n;break}else{const f=n.value,m=U.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=U.host(m);if(this.mirror.getId(p)!==-1){u=n;break}}}}}}if(!u){for(;s.head;)s.removeNode(s.head.value);break}o=u.previous,s.removeNode(u.value),a(u.value)}const l={texts:this.texts.map(u=>{const c=u.node,n=U.parentNode(c);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(c),value:u.value}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:c}=u;if(typeof c.style=="string"){const n=JSON.stringify(u.styleDiff),h=JSON.stringify(u._unchangedStyles);n.length<c.style.length&&(n+h).split("var(").length===c.style.split("var(").length&&(c.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:c}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(U.childNodes(t),s=>U.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=U.textContent(t.target);!ae(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:qn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ks(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const o=hs(r);i=cs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!zn(r.tagName,s))if(a.attributes[s]=Wn(this.doc,Ie(r.tagName),Ie(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const u=r.style.getPropertyValue(l),c=r.style.getPropertyPriority(l);u!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?a.styleDiff[l]=u:a.styleDiff[l]=[u,c]:a._unchangedStyles[l]=[u,c]}for(const l of Array.from(o.style))r.style.getPropertyValue(l)===""&&(a.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=Ze(t.target)?this.mirror.getId(U.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!Ro(r,this.mirror)||(this.addedSet.has(r)?(ns(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Ls(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[wn(s,i)]?ns(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ze(t.target)&&et(t.target)?!0:void 0}),hu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[wn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||(U.childNodes(t).forEach(s=>this.genAdds(s)),Oe(t)&&U.childNodes(U.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(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 ns(e,t){e.delete(t),U.childNodes(t).forEach(r=>ns(e,r))}function hu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),U.childNodes(s).forEach(i=>r.push(i)))}}function bn(e,t,r){return e.size===0?!1:fu(e,t)}function fu(e,t,r){const s=U.parentNode(t);return s?e.has(s):!1}function vn(e,t){return e.size===0?!1:Io(e,t)}function Io(e,t){const r=U.parentNode(t);return r?e.has(r)?!0:Io(e,r):!1}let rt;function du(e){rt=e}function pu(){rt=void 0}const W=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Pe=[];function ct(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]}catch(t){}return e&&e.target}function Do(e,t){const r=new cu;Pe.push(r),r.init(e);const s=new(Eo())(W(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mu({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const u=Je(W(h=>{const d=Date.now()-l;e(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),a),c=W(Je(W(h=>{const d=ct(h),{clientX:f,clientY:m}=Dt(h)?h.changedTouches[0]:h;l||(l=it()),o.push({x:f,y:m,id:s.getId(d),timeOffset:it()-l}),u(typeof DragEvent!="undefined"&&h instanceof DragEvent?T.Drag:h instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",c,r),oe("touchmove",c,r),oe("drag",c,r)];return W(()=>{n.forEach(h=>h())})}function gu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let u=null;const c=n=>h=>{const d=ct(h);if(ae(d,s,i,!0))return;let f=null,m=n;if("pointerType"in h){switch(h.pointerType){case"mouse":f=ve.Mouse;break;case"touch":f=ve.Touch;break;case"pen":f=ve.Pen;break}f===ve.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):ve.Pen}else Dt(h)&&(f=ve.Touch);f!==null?(u=f,(m.startsWith("Touch")&&f===ve.Touch||m.startsWith("Mouse")&&f===ve.Mouse)&&(f=null)):q[n]===q.Click&&(f=u,u=null);const p=Dt(h)?h.changedTouches[0]:h;if(!p)return;const g=r.getId(d),{clientX:b,clientY:y}=p;W(e)(L({type:q[m],id:g,x:b,y},f!==null&&{pointerType:f}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let h=Ie(n);const d=c(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(oe(h,d,t))}),W(()=>{l.forEach(n=>n())})}function Ao({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=W(Je(W(l=>{const u=ct(l);if(!u||ae(u,s,i,!0))return;const c=r.getId(u);if(u===t&&t.defaultView){const n=Ts(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function yu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=W(Je(W(()=>{const a=_s(),o=Ps();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const wu=["INPUT","TEXTAREA","SELECT"],Sn=new WeakMap;function bu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:n}){function h(y){let w=ct(y);const C=y.isTrusted,v=w&&w.tagName;if(w&&v==="OPTION"&&(w=U.parentElement(w)),!w||!v||wu.indexOf(v)<0||ae(w,s,i,!0)||w.classList.contains(a)||o&&w.matches(o))return;let S=w.value,E=!1;const R=hs(w)||"";R==="radio"||R==="checkbox"?E=w.checked:(l[v.toLowerCase()]||l[R])&&(S=cs({element:w,maskInputOptions:l,tagName:v,type:R,value:S,maskInputFn:u})),d(w,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=w.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(O=>{if(O!==w){const F=O.value;d(O,n?{text:F,isChecked:!E,userTriggered:!1}:{text:F,isChecked:!E})}})}function d(y,w){const C=Sn.get(y);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){Sn.set(y,w);const v=r.getId(y);W(e)(se(L({},w),{id:v}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(y=>oe(y,W(h),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...b.map(y=>ut(y[0],y[1],{set(){W(h)({target:this,isTrusted:!1})}},!1,p))),W(()=>{m.forEach(y=>y())})}function At(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function vu({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:W((n,h,d)=>{const[f,m]=d,{id:p,styleId:g}=xe(h,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:f,index:m}]}),n.apply(h,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,h,d=this.cssRules.length){const f=`${n} { ${h} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:f}]}),n.apply(h,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:f}),n.apply(h,d)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:W((n,h,d)=>{const[f]=d,{id:m,styleId:p}=xe(h,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:f}),n.apply(h,d)})}));const u={};bt("CSSGroupingRule")?u.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(u.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(u.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(u.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(u).forEach(([n,h])=>{c[n]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[n].insertRule,{apply:W((d,f,m)=>{const[p,g]=m,{id:b,styleId:y}=xe(f.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||y&&y!==-1)&&e({id:b,styleId:y,adds:[{rule:p,index:[...At(f),g||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:W((d,f,m)=>{const[p]=m,{id:g,styleId:b}=xe(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||b&&b!==-1)&&e({id:g,styleId:b,removes:[{index:[...At(f),p]}]}),d.apply(f,m)})})}),W(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach(([n,h])=>{h.prototype.insertRule=c[n].insertRule,h.prototype.deleteRule=c[n].deleteRule})})}function To({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(U.host(r));const l=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,u=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var c;return(c=u.get)==null?void 0:c.call(this)},set(c){var n;const h=(n=u.set)==null?void 0:n.call(this,c);if(o!==null&&o!==-1)try{t.adoptStyleSheets(c,o)}catch(d){}return h}}),W(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function Su({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:W((l,u,c)=>{var n;const[h,d,f]=c;if(r.has(h))return a.apply(u,[h,d,f]);const{id:m,styleId:p}=xe((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:h,value:d,priority:f},index:At(u.parentRule)}),l.apply(u,c)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:W((l,u,c)=>{var n;const[h]=c;if(r.has(h))return o.apply(u,[h]);const{id:d,styleId:f}=xe((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:h},index:At(u.parentRule)}),l.apply(u,c)})}),W(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=W(u=>Je(W(c=>{const n=ct(c);if(!n||ae(n,t,r,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:p}=n;e({type:u,id:s.getId(n),currentTime:h,volume:d,muted:f,playbackRate:m,loop:p})}),i.media||500)),l=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return W(()=>{l.forEach(u=>u())})}function Eu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(u,c,n){const h=new a(u,c,n);return i.set(h,{family:u,buffer:typeof c!="string",descriptors:n,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const o=Fe(t.fonts,"add",function(l){return function(u){return setTimeout(W(()=>{const c=i.get(u);c&&(e(c),i.delete(u))}),0),l.apply(this,[u])}});return s.push(()=>{r.FontFace=a}),s.push(o),W(()=>{s.forEach(l=>l())})}function Ru(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const l=W(()=>{const u=t.getSelection();if(!u||o&&(u!=null&&u.isCollapsed))return;o=u.isCollapsed||!1;const c=[],n=u.rangeCount||0;for(let h=0;h<n;h++){const d=u.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:p,endOffset:g}=d;ae(f,s,i,!0)||ae(p,s,i,!0)||c.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:c})});return l(),oe("selectionchange",l)}function xu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,l){try{t({define:{name:a}})}catch(u){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,l])}})}function Mu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:n,canvasMutationCb:h,fontCb:d,selectionCb:f,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),l(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),u(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),h(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),f(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Ou(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Mu(e,t);let s;e.recordDOM&&(s=Do(e,e.doc));const i=mu(e),a=gu(e),o=Ao(e),l=yu(e,{win:r}),u=bu(e),c=Cu(e);let n=()=>{},h=()=>{},d=()=>{},f=()=>{};e.recordDOM&&(n=vu(e,{win:r}),h=To(e,e.doc),d=Su(e,{win:r}),e.collectFonts&&(f=Eu(e)));const m=Ru(e),p=xu(e),g=[];for(const b of e.plugins)g.push(b.observer(b.callback,r,b.options));return W(()=>{Pe.forEach(b=>b.reset()),s==null||s.disconnect(),i(),a(),o(),l(),u(),c(),n(),h(),d(),f(),m(),p(),g.forEach(b=>b())})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Cn{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),o.set(l,r)),l}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}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 Nu{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Cn($n)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Cn(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 s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.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){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),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 T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class Iu{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=Do(se(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Ao(se(L({},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(U.host(t))),this.restoreHandlers.push(To({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),l=U.shadowRoot(this);return l&&qs(this)&&s.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ke[Ge.charCodeAt(vt)]=vt;var Du=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Au=function(e){var t=e.length*.75,r=e.length,s,i=0,a,o,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),n=new Uint8Array(c);for(s=0;s<r;s+=4)a=Ke[e.charCodeAt(s)],o=Ke[e.charCodeAt(s+1)],l=Ke[e.charCodeAt(s+2)],u=Ke[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|u&63;return c};const En=new Map;function Tu(e,t){let r=En.get(e);return r||(r=new Map,En.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const _o=(e,t,r)=>{if(!e||!(ko(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Tu(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,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 s=e.constructor.name,i=Du(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(ko(e,t)||typeof e=="object"){const s=e.constructor.name,i=_o(e,t,r);return{rr_type:s,index:i}}}}return e}const Po=(e,t,r)=>e.map(s=>Et(s,t,r)),ko=(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 _u(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Fe(t.CanvasRenderingContext2D.prototype,o,function(u){return function(...c){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Po(c,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),u.apply(this,c)}});i.push(l)}catch(l){const u=ut(t.CanvasRenderingContext2D.prototype,o,{set(c){e(this.canvas,{type:Ce["2D"],property:o,args:[c],setter:!0})}});i.push(u)}return()=>{i.forEach(o=>o())}}function Pu(e){return e==="experimental-webgl"?"webgl":e}function Rn(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...u){if(!ae(this,t,r,!0)){const c=Pu(l);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(u[0]&&typeof u[0]=="object"){const n=u[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...u])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function xn(e,t,r,s,i,a){const o=[],l=Object.getOwnPropertyNames(e);for(const u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const c=Fe(e,u,function(n){return function(...h){const d=n.apply(this,h);if(_o(d,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const f=Po(h,a,this),m={type:t,property:u,args:f};r(this.canvas,m)}return d}});o.push(c)}catch(c){const n=ut(e,u,{set(h){r(this.canvas,{type:t,property:u,args:[h],setter:!0})}});o.push(n)}return o}function ku(e,t,r,s){const i=[];return i.push(...xn(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...xn(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Lo=`(function() {
|
|
72
72
|
"use strict";
|
|
73
73
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
74
74
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -143,7 +143,7 @@ or you can use record.mirror to access the mirror instance during recording.`;ex
|
|
|
143
143
|
};
|
|
144
144
|
})();
|
|
145
145
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
146
|
-
`,Mn=typeof self!="undefined"&&self.Blob&&new Blob([Lo],{type:"text/javascript;charset=utf-8"});function Lu(e){let t;try{if(t=Mn&&(self.URL||self.webkitURL).createObjectURL(Mn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Lo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Fu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(u,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(c)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{dataURLOptions:l})}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,s,i,a){const o=Rn(r,s,i,!0),l=new Map,u=new Lu;u.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:g,type:b,width:y,height:w}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:b}]},0,0]}]})};const c=1e3/t;let n=0,h;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(b=>{ae(b,s,i,!0)||m.push(b)}),g.querySelectorAll("*").forEach(b=>{b.shadowRoot&&p(b.shadowRoot)})};return p(r.document),m},f=m=>{if(n&&m-n<c){h=requestAnimationFrame(f);return}n=m,d().forEach(async p=>{var g;const b=this.mirror.getId(p);if(l.get(b)||p.width===0||p.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,w=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:w});u.postMessage({id:b,bitmap:C,width:y,height:w,dataURLOptions:a.dataURLOptions},[C])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Rn(t,r,s,!1),a=_u(this.processMutation.bind(this),t,r,s),o=ku(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(o=>{const c=o,{type:l}=c;return Ue(c,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Uu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Ws),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 s={id:r,styleIds:[]},i=[];for(const a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(l,u)=>({rule:Un(l,a.href),index:u}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Bu{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,Rt,Zr,Tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Hs=e.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=Bn();function Te(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:n=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:g,packFn:b,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:N=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;du(x);const Z=E?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),fe.reset();const V=h===!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},ee=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{};Fs();let X,be=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return b&&!P&&(k=b(k)),k};K=(k,te)=>{var j;const Q=k;if(Q.timestamp=it(),(j=Pe[0])!=null&&j.isFrozen()&&Q.type!==_.FullSnapshot&&!(Q.type===_.IncrementalSnapshot&&Q.data.source===T.Mutation)&&Pe.forEach(ye=>ye.unfreeze()),Z)t==null||t(Ee(Q),te);else if(P){const ye={type:"rrweb",event:Ee(Q),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ye,"*")}if(Q.type===_.FullSnapshot)X=Q,be=0;else if(Q.type===_.IncrementalSnapshot){if(Q.data.source===T.Mutation&&Q.data.isAttachIframe)return;be++;const ye=s&&be>=s,G=r&&Q.timestamp-X.timestamp>r;(ye||G)&&Rt(!0)}};const O=k=>{K({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ge=k=>K({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),ce=k=>K({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Qe=k=>K({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Uu({mutationCb:O,adoptedStyleSheetCb:Qe}),he=new Ou({mirror:fe,mutationCb:O,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:K});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const _e=new Bu;Zr=new Fu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:y.canvas,dataURLOptions:w});const Re=new Iu({mutationCb:O,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:ee,iframeManager:he,stylesheetManager:le,canvasManager:Zr,keepIframeSrcFn:re,processedNodeManager:_e},mirror:fe});Rt=(k=!1)=>{if(!v)return;K({type:_.Meta,data:{href:window.location.href,width:Ps(),height:_s()}},k),le.reset(),Re.init(),Pe.forEach(j=>j.lock());const te=Ua(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:w,recordCanvas:S,inlineImages:F,onSerialize:j=>{Ye(j,fe)&&he.addIframe(j),Bs(j,fe)&&le.trackLinkElement(j),Ne(j)&&Re.addShadowRoot(B.shadowRoot(j),document)},onIframeLoad:(j,Q)=>{he.attachIframe(j,Q),Re.observeAttachShadow(j)},onStylesheetLoad:(j,Q)=>{le.attachLinkElement(j,Q)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:te,initialOffset:Ts(window)}},k),Pe.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],te=Q=>{var ye;return W(Nu)({mutationCb:O,mousemoveCb:(G,Vt)=>K({type:_.IncrementalSnapshot,data:{source:Vt,positions:G}}),mouseInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},G)}),scrollCb:ge,viewportResizeCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},G)}),inputCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Input},G)}),mediaInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},G)}),styleSheetRuleCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},G)}),styleDeclarationCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},G)}),canvasMutationCb:ce,fontCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Font},G)}),selectionCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.Selection},G)})},customElementCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},G)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:u,maskTextSelector:c,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:v,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:N,doc:Q,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:a,slimDOMOptions:ee,dataURLOptions:w,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:_e,canvasManager:Zr,ignoreCSSAttributes:ie,plugins:((ye=D==null?void 0:D.filter(G=>G.observer))==null?void 0:ye.map(G=>({observer:G.observer,options:G.options,callback:Vt=>K({type:_.Plugin,data:{plugin:G.name,payload:Vt}})})))||[]},g)};he.addLoadListener(Q=>{try{k.push(te(Q.contentDocument))}catch(ye){console.warn(ye)}});const j=()=>{Rt(),k.push(te(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?j():(k.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&j()})),k.push(oe("load",()=>{K({type:_.Load,data:{}}),R==="load"&&j()},window))),()=>{k.forEach(Q=>Q()),_e.destroy(),Tt=!1,pu()}}catch(k){console.warn(k)}}Te.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};Te.freezePage=()=>{Pe.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");Rt(e)};Te.mirror=fe;function Fo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));function Wu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const l=o(e.navigator.userAgent)?1:0;function u(b,y){this.scrollLeft=b,this.scrollTop=y}function c(b){return .5*(1-Math.cos(Math.PI*b))}function n(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(b,y){if(y==="Y")return b.clientHeight+l<b.scrollHeight;if(y==="X")return b.clientWidth+l<b.scrollWidth}function d(b,y){const w=e.getComputedStyle(b,null)["overflow"+y];return w==="auto"||w==="scroll"}function f(b){const y=h(b,"Y")&&d(b,"Y"),w=h(b,"X")&&d(b,"X");return y||w}function m(b){for(;b!==t.body&&f(b)===!1;)b=b.parentNode||b.host;return b}function p(b){const y=a();let w,C,v,S=(y-b.startTime)/s;S=S>1?1:S,w=c(S),C=b.startX+(b.x-b.startX)*w,v=b.startY+(b.y-b.startY)*w,b.method.call(b.scrollable,C,v),(C!==b.x||v!==b.y)&&e.requestAnimationFrame(p.bind(e,b))}function g(b,y,w){let C,v,S,E;const R=a();b===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=b,v=b.scrollLeft,S=b.scrollTop,E=u),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=m(this),y=b.getBoundingClientRect(),w=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+w.left-y.left,b.scrollTop+w.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class zu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Nn(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
146
|
+
`,Mn=typeof self!="undefined"&&self.Blob&&new Blob([Lo],{type:"text/javascript;charset=utf-8"});function Lu(e){let t;try{if(t=Mn&&(self.URL||self.webkitURL).createObjectURL(Mn),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Lo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Fu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(u,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(c)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{dataURLOptions:l})}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,s,i,a){const o=Rn(r,s,i,!0),l=new Map,u=new Lu;u.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:g,type:b,width:y,height:w}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,y,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:b}]},0,0]}]})};const c=1e3/t;let n=0,h;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(b=>{ae(b,s,i,!0)||m.push(b)}),g.querySelectorAll("*").forEach(b=>{b.shadowRoot&&p(b.shadowRoot)})};return p(r.document),m},f=m=>{if(n&&m-n<c){h=requestAnimationFrame(f);return}n=m,d().forEach(async p=>{var g;const b=this.mirror.getId(p);if(l.get(b)||p.width===0||p.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,w=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:w});u.postMessage({id:b,bitmap:C,width:y,height:w,dataURLOptions:a.dataURLOptions},[C])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Rn(t,r,s,!1),a=_u(this.processMutation.bind(this),t,r,s),o=ku(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(o=>{const c=o,{type:l}=c;return Be(c,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Bu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Ws),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 s={id:r,styleIds:[]},i=[];for(const a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(l,u)=>({rule:Bn(l,a.href),index:u}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Uu{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let K,Rt,Zr,Tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Hs=e.contentWindow)==null?void 0:Hs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=Un();function Te(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:n=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:g,packFn:b,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:O=!1,inlineImages:F=!1,plugins:D,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;du(x);const Z=E?window.parent===window:!0;let P=!1;if(!Z)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(Z&&!t)throw new Error("emit function is required");if(!Z&&!P)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),fe.reset();const V=h===!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},ee=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{};Fs();let X,be=0;const Ee=k=>{for(const te of D||[])te.eventProcessor&&(k=te.eventProcessor(k));return b&&!P&&(k=b(k)),k};K=(k,te)=>{var j;const Q=k;if(Q.timestamp=it(),(j=Pe[0])!=null&&j.isFrozen()&&Q.type!==_.FullSnapshot&&!(Q.type===_.IncrementalSnapshot&&Q.data.source===T.Mutation)&&Pe.forEach(ye=>ye.unfreeze()),Z)t==null||t(Ee(Q),te);else if(P){const ye={type:"rrweb",event:Ee(Q),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ye,"*")}if(Q.type===_.FullSnapshot)X=Q,be=0;else if(Q.type===_.IncrementalSnapshot){if(Q.data.source===T.Mutation&&Q.data.isAttachIframe)return;be++;const ye=s&&be>=s,G=r&&Q.timestamp-X.timestamp>r;(ye||G)&&Rt(!0)}};const N=k=>{K({type:_.IncrementalSnapshot,data:L({source:T.Mutation},k)})},ge=k=>K({type:_.IncrementalSnapshot,data:L({source:T.Scroll},k)}),ce=k=>K({type:_.IncrementalSnapshot,data:L({source:T.CanvasMutation},k)}),Qe=k=>K({type:_.IncrementalSnapshot,data:L({source:T.AdoptedStyleSheet},k)}),le=new Bu({mutationCb:N,adoptedStyleSheetCb:Qe}),he=new Nu({mirror:fe,mutationCb:N,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:K});for(const k of D||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const _e=new Uu;Zr=new Fu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:y.canvas,dataURLOptions:w});const Re=new Iu({mutationCb:N,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,inlineStylesheet:n,maskInputOptions:V,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:F,sampling:y,slimDOMOptions:ee,iframeManager:he,stylesheetManager:le,canvasManager:Zr,keepIframeSrcFn:re,processedNodeManager:_e},mirror:fe});Rt=(k=!1)=>{if(!v)return;K({type:_.Meta,data:{href:window.location.href,width:Ps(),height:_s()}},k),le.reset(),Re.init(),Pe.forEach(j=>j.lock());const te=Ba(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:u,maskTextSelector:c,inlineStylesheet:n,maskAllInputs:V,maskTextFn:p,maskInputFn:m,slimDOM:ee,dataURLOptions:w,recordCanvas:S,inlineImages:F,onSerialize:j=>{Ye(j,fe)&&he.addIframe(j),Us(j,fe)&&le.trackLinkElement(j),Oe(j)&&Re.addShadowRoot(U.shadowRoot(j),document)},onIframeLoad:(j,Q)=>{he.attachIframe(j,Q),Re.observeAttachShadow(j)},onStylesheetLoad:(j,Q)=>{le.attachLinkElement(j,Q)},keepIframeSrcFn:re});if(!te)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:te,initialOffset:Ts(window)}},k),Pe.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],te=Q=>{var ye;return W(Ou)({mutationCb:N,mousemoveCb:(G,Vt)=>K({type:_.IncrementalSnapshot,data:{source:Vt,positions:G}}),mouseInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MouseInteraction},G)}),scrollCb:ge,viewportResizeCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.ViewportResize},G)}),inputCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Input},G)}),mediaInteractionCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.MediaInteraction},G)}),styleSheetRuleCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleSheetRule},G)}),styleDeclarationCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.StyleDeclaration},G)}),canvasMutationCb:ce,fontCb:G=>K({type:_.IncrementalSnapshot,data:L({source:T.Font},G)}),selectionCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.Selection},G)})},customElementCb:G=>{K({type:_.IncrementalSnapshot,data:L({source:T.CustomElement},G)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:u,maskTextSelector:c,maskInputOptions:V,inlineStylesheet:n,sampling:y,recordDOM:v,recordCanvas:S,inlineImages:F,userTriggeredOnInput:I,collectFonts:O,doc:Q,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:re,blockSelector:a,slimDOMOptions:ee,dataURLOptions:w,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:_e,canvasManager:Zr,ignoreCSSAttributes:ie,plugins:((ye=D==null?void 0:D.filter(G=>G.observer))==null?void 0:ye.map(G=>({observer:G.observer,options:G.options,callback:Vt=>K({type:_.Plugin,data:{plugin:G.name,payload:Vt}})})))||[]},g)};he.addLoadListener(Q=>{try{k.push(te(Q.contentDocument))}catch(ye){console.warn(ye)}});const j=()=>{Rt(),k.push(te(document)),Tt=!0};return document.readyState==="interactive"||document.readyState==="complete"?j():(k.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&j()})),k.push(oe("load",()=>{K({type:_.Load,data:{}}),R==="load"&&j()},window))),()=>{k.forEach(Q=>Q()),_e.destroy(),Tt=!1,pu()}}catch(k){console.warn(k)}}Te.addCustomEvent=(e,t)=>{if(!Tt)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};Te.freezePage=()=>{Pe.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!Tt)throw new Error("please take full snapshot after start recording");Rt(e)};Te.mirror=fe;function Fo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));function Wu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(b){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(b)}const l=o(e.navigator.userAgent)?1:0;function u(b,y){this.scrollLeft=b,this.scrollTop=y}function c(b){return .5*(1-Math.cos(Math.PI*b))}function n(b){if(b===null||typeof b!="object"||b.behavior===void 0||b.behavior==="auto"||b.behavior==="instant")return!0;if(typeof b=="object"&&b.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+b.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(b,y){if(y==="Y")return b.clientHeight+l<b.scrollHeight;if(y==="X")return b.clientWidth+l<b.scrollWidth}function d(b,y){const w=e.getComputedStyle(b,null)["overflow"+y];return w==="auto"||w==="scroll"}function f(b){const y=h(b,"Y")&&d(b,"Y"),w=h(b,"X")&&d(b,"X");return y||w}function m(b){for(;b!==t.body&&f(b)===!1;)b=b.parentNode||b.host;return b}function p(b){const y=a();let w,C,v,S=(y-b.startTime)/s;S=S>1?1:S,w=c(S),C=b.startX+(b.x-b.startX)*w,v=b.startY+(b.y-b.startY)*w,b.method.call(b.scrollable,C,v),(C!==b.x||v!==b.y)&&e.requestAnimationFrame(p.bind(e,b))}function g(b,y,w){let C,v,S,E;const R=a();b===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=b,v=b.scrollLeft,S=b.scrollTop,E=u),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const b=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof b=="undefined"?this.scrollLeft:~~b,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const b=m(this),y=b.getBoundingClientRect(),w=this.getBoundingClientRect();b!==t.body?(g.call(this,b,b.scrollLeft+w.left-y.left,b.scrollTop+w.top-y.top),e.getComputedStyle(b).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class zu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function On(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
147
147
|
Copyright (c) Microsoft Corporation.
|
|
148
148
|
|
|
149
149
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -156,7 +156,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
156
156
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
157
157
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
158
158
|
PERFORMANCE OF THIS SOFTWARE.
|
|
159
|
-
***************************************************************************** */function On(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Uo={type:"xstate.init"};function es(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function In(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function _t(e){return function(t){return e===t}}function Bo(e){return typeof e=="string"?{type:e}:e}function Dn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_t(e)}}function An(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function $o(e,t){t===void 0&&(t={});var r=On(An(es(e.states[e.initial].entry).map(function(o){return In(o,t.actions)}),e.context,Uo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:_t(e.initial)},transition:function(o,l){var u,c,n=typeof o=="string"?{value:o,context:e.context}:o,h=n.value,d=n.context,f=Bo(l),m=e.states[h];if(m.on){var p=es(m.on[f.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,ee=V&&P[V],X=0;if(ee)return ee.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return Dn(h,d);var w=typeof y=="string"?{target:y}:y,C=w.target,v=w.actions,S=v===void 0?[]:v,E=w.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,N=C!=null?C:h,F=e.states[N];if(R(d,f)){var D=On(An((I?es(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return In(P,a._options.actions)}),d,f),3),re=D[0],ie=D[1],x=D[2],Z=C!=null?C:h;return{value:Z,context:ie,actions:re,changed:C!==h||re.length>0||x,matches:_t(Z)}}}}catch(P){u={error:P}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}}return Dn(h,d)}};return a}var Tn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Wo(e){var t=e.initialState,r=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),Tn(t,Bo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:_t(o.value)}}return r=He.Running,Tn(t,Uo),i},stop:function(){return r=He.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function qu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Vu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=$o({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),se(L({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:u,baselineTime:c,lastPlayedEvent:n}=a;l.clear();for(const m of u)Nn(m,c);const h=qu(u,c);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(z.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<c&&(m.timestamp<=d||m===n)))if(m.timestamp<c)f.push(m);else{const p=t(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(f),s.emit(z.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(L({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:l,timer:u,events:c}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;Nn(n,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=n.timestamp)c.push(n);else{let m=-1,p=0;for(;p<=h;){const g=Math.floor((p+h)/2);c[g].timestamp<=n.timestamp?p=g+1:h=g-1}m===-1&&(m=p),c.splice(m,0,n)}const d=n.timestamp<l,f=t(n,d);d?f():u.isActive()&&u.addAction({doAction:()=>{f()},delay:n.delay})}return se(L({},a),{events:c})})}});return Wo(i)}function ju(e){const t=$o({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Wo(t)}const Gu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],_n=new Map;function zo(e,t){let r=_n.get(e);return r||(r=new Map,_n.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Oe(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Oe(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return zo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Oe(e,t,r))))}else{if("base64"in s)return Au(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Oe(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Oe(e,t,r)));return s}}function Hu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Yu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ju(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Yu.includes(r))return;const s=zo(e,r);s.includes(t)||s.push(t)}async function Xu({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Hu(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Oe(s,a))),u=o.apply(a,l);Ju(a,u);const c=!1}catch(a){i(e,a)}}async function Qu({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async u=>Promise.all(u.args.map(Oe(s,a))));(await Promise.all(o)).forEach((u,c)=>{const n=t[c];try{if(n.setter){a[n.property]=n.args[0];return}const h=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),h.apply(a,n.args)):h.apply(a,u)}catch(h){i(n,h)}})}async function os({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let u=0;u<l.length;u++){const c=l[u];await Xu({mutation:c,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Qu({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const Pn=["AUDIO","VIDEO"];class Ku{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var f,m,p,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:u,volume:c,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=c!=null?c:i==null?void 0:i.volume)!=null?p:1,muted:(g=u!=null?u:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=n!=null?n:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),u=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==u&&(t.playbackRate=u),o&&!l?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let u=!1;l.rr_mediaState?u=l.rr_mediaState==="played":u=i.getAttribute("autoplay")!==null,u&&o&&i.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:u,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:c,volume:d,muted:n,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Pn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Pn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Zu(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const ec=5*1e3,tc=Fo||$u,kn="[replayer]",ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ln(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class rc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",tc()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",Pi()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",Bn()),M(this,"styleMirror",new Ws),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const u of[this.mouseTail,this.iframe])u&&(u.setAttribute("width",String(l.width)),u.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const u of l){switch(u.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(u,!0)()}}),M(this,"getCastFn",(l,u=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,u),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,u),!u&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/ec),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(z.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,u,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let f=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(z.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(u,c,n)=>{os({event:u,mutation:c,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(u,c)=>{u.source===T.StyleSheetRule?this.applyStyleSheetRule(u,c):u.source===T.StyleDeclaration&&this.applyStyleDeclaration(u,c)},afterAppend:(u,c)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Ot(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(u){this.warn(u)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],n=It(c.node,this.mirror,this.virtualDom.mirror);Ot(n,c.node,l,this.virtualDom.mirror),c.node=n}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(u=>{this.applyStyleSheetMutation(u)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(u=>{this.applyAdoptedStyleSheet(u)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,u]=this.lastMouseDownEvent;l.dispatchEvent(u)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(z.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new zu([],{speed:this.config.speed});this.service=Vu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,u)=>l.timestamp-u.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=ju({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Ku({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===_.Meta),o=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(a){const{width:l,height:u}=a.data;setTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:u})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Ln)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Ln(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Pi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wu(this.iframe.contentWindow,this.iframe.contentDocument),Fs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(u,c)=>{if(u.nodeName==="DIALOG"&&i.add(u),this.collectIframeAndAttachDocument(s,u),this.mediaManager.isSupportedMediaElement(u)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(u,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ol(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:u,builtNode:c}of s)this.attachDocumentToIframe(u,c),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==u);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(u=>St(u)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Gu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,So(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:T.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,u)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Se.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:h}=r.contentDocument;this.insertStyleRules(n,h)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:u,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:u}of i)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);a.forEach(l=>St(l))}collectIframeAndAttachDocument(t,r){if(Ye(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(z.Start,o),this.emitter.on(z.Pause,o);const l=()=>{this.emitter.off(z.Start,o),this.emitter.off(z.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{u.sheet||(s.add(u),u.addEventListener("load",()=>{s.delete(u),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Oe(this.imageMap,null,s)));return se(L({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Oe(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case T.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const u={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(u)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ie(q[o.type])),u=this.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);this.emitter.emit(z.MouseInteraction,{type:o.type,target:u});const{triggerFocus:c}=this.config;switch(o.type){case q.Blur:"blur"in u&&u.blur();break;case q.Focus:c&&u.focus&&u.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(o.type===q.TouchStart?this.touchActive=!0:o.type===q.TouchEnd&&(this.touchActive=!1),o.type===q.MouseDown?this.lastMouseDownEvent=[u,l]:o.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):u.dispatchEvent(l));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:u.dispatchEvent(l)}break}case T.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:o.width,height:o.height});break;case T.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case T.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const u=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:u,timeOffset:t.timestamp-c[0].timestamp,mutation:o});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);os({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case T.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Hl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],n=vo(c.node,this.virtualDom,this.mirror);n&&(c.node=n)}catch(c){this.warn(c)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return;let h=s.getNode(u.parentId);if(!h)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&Ne(h)&&(h=h.shadowRoot),s.removeNodeFromMap(n),h)try{h.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&h.nodeName==="STYLE"&&((c=h.rules)==null?void 0:c.length)>0&&(h.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",h,n,t);else throw d}});const i=L({},this.legacy_missingNodeRetryMap),a=[],o=u=>{var c,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let h=s.getNode(u.parentId);if(!h)return u.node.type===Se.Document?this.newDocumentQueue.push(u):t.adds.some(w=>w.node.id===u.parentId)?a.push(u):void 0;u.node.isShadow&&(Ne(h)||h.attachShadow({mode:"open"}),h=h.shadowRoot);let d=null,f=null;if(u.previousId&&(d=s.getNode(u.previousId)),u.nextId&&(f=s.getNode(u.nextId)),u.node.rootId&&!s.getNode(u.node.rootId))return;const m=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(h,s)){this.attachDocumentToIframe(u,h);return}const p=(y,w)=>{if(!this.usingVirtualDom){St(y);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(y,{id:w,replayer:this})}},g=tt(u.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:g,mutation:u};return}const b=s.getMeta(h);if(b&&b.type===Se.Element&&u.node.type===Se.Text){const y=Array.isArray(h.childNodes)?h.childNodes:Array.from(h.childNodes);if(b.tagName==="textarea")for(const w of y)w.nodeType===h.TEXT_NODE&&h.removeChild(w);else if(b.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===h.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,h.removeChild(w))}else if((b==null?void 0:b.type)===Se.Document){const y=h;u.node.type===Se.DocumentType&&((c=y.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?h.insertBefore(g,d.nextSibling):f&&f.parentNode?h.contains(f)?h.insertBefore(g,f):h.insertBefore(g,null):h.appendChild(g),p(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&h.nodeName==="STYLE"&&((n=h.rules)==null?void 0:n.length)>0&&(h.rules=[]),Ye(g,this.mirror)){const y=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===y);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,h,g,u)};t.adds.forEach(u=>{o(u)});const l=performance.now();for(;a.length;){const u=xo(a);if(a.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)s.getNode(c.value.parentId)?Us(c,h=>{o(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Mo(t.texts).forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return t.removes.find(h=>h.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);if(n.textContent=u.value,this.usingVirtualDom){const h=n.parentNode;((c=h==null?void 0:h.rules)==null?void 0:c.length)>0&&(h.rules=[])}}),t.attributes.forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return t.removes.find(h=>h.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const h in u.attributes)if(typeof h=="string"){const d=u.attributes[h];if(d===null)n.removeAttribute(h),h==="open"&&Zu(n,u);else if(typeof d=="string")try{if(h==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const f=s.getMeta(n);Object.assign(f.attributes,u.attributes);const m=tt(f,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(u.id,m);break}}catch(f){}if(h==="value"&&n.nodeName==="TEXTAREA"){const f=n;f.childNodes.forEach(p=>f.removeChild(p));const m=(c=n.ownerDocument)==null?void 0:c.createTextNode(d);m&&f.appendChild(m)}else n.setAttribute(h,d);h==="rr_open_mode"&&n.nodeName==="DIALOG"&&St(n,u)}catch(f){this.warn("An error occurred may due to the checkout feature.",f)}else if(h==="style"){const f=d,m=n;for(const p in f)if(f[p]===!1)m.style.removeProperty(p);else if(f[p]instanceof Array){const g=f[p];m.style.setProperty(p,g[0],g[1])}else{const g=f[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const u=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!u||!c)return;const n=new Range;n.setStart(u,a),n.setEnd(c,l);const h=u.ownerDocument,d=h==null?void 0:h.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:u})=>{try{if(Array.isArray(u)){const{positions:c,index:n}=is(u);je(r.cssRules,c).insertRule(l,n)}else{const c=u===void 0?void 0:Math.min(u,r.cssRules.length);r==null||r.insertRule(l,c)}}catch(c){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=is(l);je(r.cssRules,u).deleteRule(c||0)}else r==null||r.deleteRule(l)}catch(u){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var u;let c=null,n=null;if(Ne(s)?n=((u=s.ownerDocument)==null?void 0:u.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{c=new n.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:l.rules},c)}catch(h){}});const i=10;let a=0;const o=(l,u)=>{const c=u.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Ne(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==u.length&&a<i&&(setTimeout(()=>o(l,u),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],u=o&&t[o];if(l){const{node:c,mutation:n}=l;r.insertBefore(c,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}if(u){const{node:c,mutation:n}=u;r.insertBefore(c,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=$s(o,this.iframe),u=t*l.absoluteScale+l.x,c=r*l.absoluteScale+l.y;this.mouse.style.left=`${u}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:u,y:c}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ts:Object.assign({},ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(u=>l.lineTo(u.x,u.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(kn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(kn,...t)}}const{addCustomEvent:sc}=Te,{freezePage:ic}=Te,{takeFullSnapshot:nc}=Te;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=rc;exports.ReplayerEvents=z;exports.addCustomEvent=sc;exports.canvasMutation=os;exports.freezePage=ic;exports.record=Te;exports.takeFullSnapshot=nc;exports.utils=lu;
|
|
159
|
+
***************************************************************************** */function Nn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Bo={type:"xstate.init"};function es(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function In(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function _t(e){return function(t){return e===t}}function Uo(e){return typeof e=="string"?{type:e}:e}function Dn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_t(e)}}function An(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function $o(e,t){t===void 0&&(t={});var r=Nn(An(es(e.states[e.initial].entry).map(function(o){return In(o,t.actions)}),e.context,Bo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:_t(e.initial)},transition:function(o,l){var u,c,n=typeof o=="string"?{value:o,context:e.context}:o,h=n.value,d=n.context,f=Uo(l),m=e.states[h];if(m.on){var p=es(m.on[f.type]);try{for(var g=function(P){var V=typeof Symbol=="function"&&Symbol.iterator,ee=V&&P[V],X=0;if(ee)return ee.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&X>=P.length&&(P=void 0),{value:P&&P[X++],done:!P}}};throw new TypeError(V?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return Dn(h,d);var w=typeof y=="string"?{target:y}:y,C=w.target,v=w.actions,S=v===void 0?[]:v,E=w.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,O=C!=null?C:h,F=e.states[O];if(R(d,f)){var D=Nn(An((I?es(S):[].concat(m.exit,S,F.entry).filter(function(P){return P})).map(function(P){return In(P,a._options.actions)}),d,f),3),re=D[0],ie=D[1],x=D[2],Z=C!=null?C:h;return{value:Z,context:ie,actions:re,changed:C!==h||re.length>0||x,matches:_t(Z)}}}}catch(P){u={error:P}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}}return Dn(h,d)}};return a}var Tn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Wo(e){var t=e.initialState,r=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),Tn(t,Uo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:_t(o.value)}}return r=He.Running,Tn(t,Bo),i},stop:function(){return r=He.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function qu(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Vu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=$o({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),se(L({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:u,baselineTime:c,lastPlayedEvent:n}=a;l.clear();for(const m of u)On(m,c);const h=qu(u,c);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),c<(d||0)&&s.emit(z.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<c&&(m.timestamp<=d||m===n)))if(m.timestamp<c)f.push(m);else{const p=t(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(f),s.emit(z.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(L({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:l,timer:u,events:c}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;On(n,l);let h=c.length-1;if(!c[h]||c[h].timestamp<=n.timestamp)c.push(n);else{let m=-1,p=0;for(;p<=h;){const g=Math.floor((p+h)/2);c[g].timestamp<=n.timestamp?p=g+1:h=g-1}m===-1&&(m=p),c.splice(m,0,n)}const d=n.timestamp<l,f=t(n,d);d?f():u.isActive()&&u.addAction({doAction:()=>{f()},delay:n.delay})}return se(L({},a),{events:c})})}});return Wo(i)}function ju(e){const t=$o({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:ze({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Wo(t)}const Gu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],_n=new Map;function zo(e,t){let r=_n.get(e);return r||(r=new Map,_n.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ne(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await Ne(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:a}=s;return zo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Ne(e,t,r))))}else{if("base64"in s)return Au(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Ne(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Ne(e,t,r)));return s}}function Hu(e,t){try{return t===Ce.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Yu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ju(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Yu.includes(r))return;const s=zo(e,r);s.includes(t)||s.push(t)}async function Xu({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=Hu(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Ne(s,a))),u=o.apply(a,l);Ju(a,u);const c=!1}catch(a){i(e,a)}}async function Qu({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async u=>Promise.all(u.args.map(Ne(s,a))));(await Promise.all(o)).forEach((u,c)=>{const n=t[c];try{if(n.setter){a[n.property]=n.args[0];return}const h=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),h.apply(a,n.args)):h.apply(a,u)}catch(h){i(n,h)}})}async function os({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let u=0;u<l.length;u++){const c=l[u];await Xu({mutation:c,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await Qu({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const Pn=["AUDIO","VIDEO"];class Ku{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(z.Start,this.start.bind(this)),this.emitter.on(z.SkipStart,this.start.bind(this)),this.emitter.on(z.Pause,this.pause.bind(this)),this.emitter.on(z.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var f,m,p,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:u,volume:c,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=c!=null?c:i==null?void 0:i.volume)!=null?p:1,muted:(g=u!=null?u:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=n!=null?n:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),u=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==u&&(t.playbackRate=u),o&&!l?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let u=!1;l.rr_mediaState?u=l.rr_mediaState==="played":u=i.getAttribute("autoplay")!==null,u&&o&&i.pause();let c=1;typeof l.rr_mediaPlaybackRate=="number"&&(c=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:u,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:c,volume:d,muted:n,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Pn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Pn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function Zu(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const ec=5*1e3,tc=Fo||$u,kn="[replayer]",ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ln(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class rc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",tc()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",Pi()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",Un()),M(this,"styleMirror",new Ws),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const u of[this.mouseTail,this.iframe])u&&(u.setAttribute("width",String(l.width)),u.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const u of l){switch(u.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(u,!0)()}}),M(this,"getCastFn",(l,u=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(z.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(z.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,u),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,u),!u&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/ec),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(z.SkipStart,d)}}};break}return()=>{c&&c();for(const d of this.config.plugins||[])d.handler&&d.handler(l,u,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(z.Finish))};let f=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(z.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(z.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(z.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(u,c,n)=>{os({event:u,mutation:c,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(u,c)=>{u.source===T.StyleSheetRule?this.applyStyleSheetRule(u,c):u.source===T.StyleDeclaration&&this.applyStyleDeclaration(u,c)},afterAppend:(u,c)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Nt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(u){this.warn(u)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],n=It(c.node,this.mirror,this.virtualDom.mirror);Nt(n,c.node,l,this.virtualDom.mirror),c.node=n}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(u=>{this.applyStyleSheetMutation(u)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(u=>{this.applyAdoptedStyleSheet(u)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,u]=this.lastMouseDownEvent;l.dispatchEvent(u)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(z.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new zu([],{speed:this.config.speed});this.service=Vu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,u)=>l.timestamp-u.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(z.StateChange,{player:l})}),this.speedService=ju({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(z.StateChange,{speed:l})}),this.mediaManager=new Ku({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===_.Meta),o=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(a){const{width:l,height:u}=a.data;setTimeout(()=>{this.emitter.emit(z.Resize,{width:l,height:u})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Ln)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(z.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(z.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(z.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(z.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Ln(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Pi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wu(this.iframe.contentWindow,this.iframe.contentDocument),Fs(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,a=(u,c)=>{if(u.nodeName==="DIALOG"&&i.add(u),this.collectIframeAndAttachDocument(s,u),this.mediaManager.isSupportedMediaElement(u)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(u,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ol(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:u,builtNode:c}of s)this.attachDocumentToIframe(u,c),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==u);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(u=>St(u)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(z.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Gu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,So(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:T.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,u)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const c=s.getMeta(l);if((c==null?void 0:c.type)===Se.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:h}=r.contentDocument;this.insertStyleRules(n,h)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:u,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:u}of i)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);a.forEach(l=>St(l))}collectIframeAndAttachDocument(t,r){if(Ye(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(z.Start,o),this.emitter.on(z.Pause,o);const l=()=>{this.emitter.off(z.Start,o),this.emitter.off(z.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{u.sheet||(s.add(u),u.addEventListener("load",()=>{s.delete(u),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(z.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(z.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(Ne(this.imageMap,null,s)));return se(L({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Ne(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(L({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case T.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const u={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(u)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ie(q[o.type])),u=this.mirror.getNode(o.id);if(!u)return this.debugNodeNotFound(o,o.id);this.emitter.emit(z.MouseInteraction,{type:o.type,target:u});const{triggerFocus:c}=this.config;switch(o.type){case q.Blur:"blur"in u&&u.blur();break;case q.Focus:c&&u.focus&&u.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(o.type===q.TouchStart?this.touchActive=!0:o.type===q.TouchEnd&&(this.touchActive=!1),o.type===q.MouseDown?this.lastMouseDownEvent=[u,l]:o.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):u.dispatchEvent(l));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:u.dispatchEvent(l)}break}case T.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case T.ViewportResize:this.emitter.emit(z.Resize,{width:o.width,height:o.height});break;case T.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case T.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const u=l,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:u,timeOffset:t.timestamp-c[0].timestamp,mutation:o});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);os({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case T.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Hl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],n=vo(c.node,this.virtualDom,this.mirror);n&&(c.node=n)}catch(c){this.warn(c)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return;let h=s.getNode(u.parentId);if(!h)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&Oe(h)&&(h=h.shadowRoot),s.removeNodeFromMap(n),h)try{h.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&h.nodeName==="STYLE"&&((c=h.rules)==null?void 0:c.length)>0&&(h.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",h,n,t);else throw d}});const i=L({},this.legacy_missingNodeRetryMap),a=[],o=u=>{var c,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let h=s.getNode(u.parentId);if(!h)return u.node.type===Se.Document?this.newDocumentQueue.push(u):t.adds.some(w=>w.node.id===u.parentId)?a.push(u):void 0;u.node.isShadow&&(Oe(h)||h.attachShadow({mode:"open"}),h=h.shadowRoot);let d=null,f=null;if(u.previousId&&(d=s.getNode(u.previousId)),u.nextId&&(f=s.getNode(u.nextId)),u.node.rootId&&!s.getNode(u.node.rootId))return;const m=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(h,s)){this.attachDocumentToIframe(u,h);return}const p=(y,w)=>{if(!this.usingVirtualDom){St(y);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(y,{id:w,replayer:this})}},g=tt(u.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:g,mutation:u};return}const b=s.getMeta(h);if(b&&b.type===Se.Element&&u.node.type===Se.Text){const y=Array.isArray(h.childNodes)?h.childNodes:Array.from(h.childNodes);if(b.tagName==="textarea")for(const w of y)w.nodeType===h.TEXT_NODE&&h.removeChild(w);else if(b.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===h.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,h.removeChild(w))}else if((b==null?void 0:b.type)===Se.Document){const y=h;u.node.type===Se.DocumentType&&((c=y.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?h.insertBefore(g,d.nextSibling):f&&f.parentNode?h.contains(f)?h.insertBefore(g,f):h.insertBefore(g,null):h.appendChild(g),p(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&h.nodeName==="STYLE"&&((n=h.rules)==null?void 0:n.length)>0&&(h.rules=[]),Ye(g,this.mirror)){const y=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===y);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,h,g,u)};t.adds.forEach(u=>{o(u)});const l=performance.now();for(;a.length;){const u=xo(a);if(a.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)s.getNode(c.value.parentId)?Bs(c,h=>{o(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Mo(t.texts).forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return t.removes.find(h=>h.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);if(n.textContent=u.value,this.usingVirtualDom){const h=n.parentNode;((c=h==null?void 0:h.rules)==null?void 0:c.length)>0&&(h.rules=[])}}),t.attributes.forEach(u=>{var c;const n=s.getNode(u.id);if(!n)return t.removes.find(h=>h.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const h in u.attributes)if(typeof h=="string"){const d=u.attributes[h];if(d===null)n.removeAttribute(h),h==="open"&&Zu(n,u);else if(typeof d=="string")try{if(h==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const f=s.getMeta(n);Object.assign(f.attributes,u.attributes);const m=tt(f,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(u.id,m);break}}catch(f){}if(h==="value"&&n.nodeName==="TEXTAREA"){const f=n;f.childNodes.forEach(p=>f.removeChild(p));const m=(c=n.ownerDocument)==null?void 0:c.createTextNode(d);m&&f.appendChild(m)}else n.setAttribute(h,d);h==="rr_open_mode"&&n.nodeName==="DIALOG"&&St(n,u)}catch(f){this.warn("An error occurred may due to the checkout feature.",f)}else if(h==="style"){const f=d,m=n;for(const p in f)if(f[p]===!1)m.style.removeProperty(p);else if(f[p]instanceof Array){const g=f[p];m.style.setProperty(p,g[0],g[1])}else{const g=f[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const u=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!u||!c)return;const n=new Range;n.setStart(u,a),n.setEnd(c,l);const h=u.ownerDocument,d=h==null?void 0:h.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:u})=>{try{if(Array.isArray(u)){const{positions:c,index:n}=is(u);je(r.cssRules,c).insertRule(l,n)}else{const c=u===void 0?void 0:Math.min(u,r.cssRules.length);r==null||r.insertRule(l,c)}}catch(c){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=is(l);je(r.cssRules,u).deleteRule(c||0)}else r==null||r.deleteRule(l)}catch(u){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){var s,i;if(t.set){const a=je(r.rules,t.index);(s=a==null?void 0:a.style)==null||s.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const a=je(r.rules,t.index);(i=a==null?void 0:a.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var u;let c=null,n=null;if(Oe(s)?n=((u=s.ownerDocument)==null?void 0:u.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{c=new n.CSSStyleSheet,this.styleMirror.add(c,l.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:l.rules},c)}catch(h){}});const i=10;let a=0;const o=(l,u)=>{const c=u.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Oe(l)?l.shadowRoot.adoptedStyleSheets=c:l.nodeName==="#document"&&(l.adoptedStyleSheets=c),c.length!==u.length&&a<i&&(setTimeout(()=>o(l,u),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],u=o&&t[o];if(l){const{node:c,mutation:n}=l;r.insertBefore(c,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}if(u){const{node:c,mutation:n}=u;r.insertBefore(c,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=$s(o,this.iframe),u=t*l.absoluteScale+l.x,c=r*l.absoluteScale+l.y;this.mouse.style.left=`${u}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:u,y:c}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ts:Object.assign({},ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(u=>l.lineTo(u.x,u.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(z.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(kn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(kn,...t)}}const{addCustomEvent:sc}=Te,{freezePage:ic}=Te,{takeFullSnapshot:nc}=Te;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=rc;exports.ReplayerEvents=z;exports.addCustomEvent=sc;exports.canvasMutation=os;exports.freezePage=ic;exports.record=Te;exports.takeFullSnapshot=nc;exports.utils=lu;
|
|
160
160
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
161
161
|
var __cp = (to, from, except, desc) => {
|
|
162
162
|
if ((from && typeof from === "object") || typeof from === "function") {
|