ontrackd 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -12
- package/dist/cli/pull.js +5 -0
- package/dist/cli/pull.js.map +1 -1
- package/dist/core/attachmentTypes.d.ts +4 -1
- package/dist/core/attachmentTypes.js +25 -4
- package/dist/core/attachmentTypes.js.map +1 -1
- package/dist/core/exportTaskDoc.js +43 -1
- package/dist/core/exportTaskDoc.js.map +1 -1
- package/dist/core/feedbackTypes.d.ts +41 -1
- package/dist/core/journey.d.ts +31 -0
- package/dist/core/journey.js +93 -0
- package/dist/core/journey.js.map +1 -0
- package/dist/core/untrusted.js +12 -7
- package/dist/core/untrusted.js.map +1 -1
- package/dist/integration/middleware.js +11 -0
- package/dist/integration/middleware.js.map +1 -1
- package/dist/mcp/search.js +3 -2
- package/dist/mcp/search.js.map +1 -1
- package/dist/mcp/server.js +13 -7
- package/dist/mcp/server.js.map +1 -1
- package/dist/overlay/anchors.d.ts +1 -0
- package/dist/overlay/anchors.js +3 -0
- package/dist/overlay/anchors.js.map +1 -1
- package/dist/overlay/api.d.ts +27 -2
- package/dist/overlay/api.js +47 -9
- package/dist/overlay/api.js.map +1 -1
- package/dist/overlay/attachments.d.ts +5 -1
- package/dist/overlay/attachments.js +16 -3
- package/dist/overlay/attachments.js.map +1 -1
- package/dist/overlay/camera.d.ts +130 -0
- package/dist/overlay/camera.js +388 -0
- package/dist/overlay/camera.js.map +1 -0
- package/dist/overlay/cameraEffects.d.ts +10 -0
- package/dist/overlay/cameraEffects.js +240 -0
- package/dist/overlay/cameraEffects.js.map +1 -0
- package/dist/overlay/cameraPanel.d.ts +39 -0
- package/dist/overlay/cameraPanel.js +275 -0
- package/dist/overlay/cameraPanel.js.map +1 -0
- package/dist/overlay/cameraPlayback.d.ts +75 -0
- package/dist/overlay/cameraPlayback.js +291 -0
- package/dist/overlay/cameraPlayback.js.map +1 -0
- package/dist/overlay/connectDialog.js +1 -1
- package/dist/overlay/connectDialog.js.map +1 -1
- package/dist/overlay/directReviewer.d.ts +27 -3
- package/dist/overlay/directReviewer.js +59 -19
- package/dist/overlay/directReviewer.js.map +1 -1
- package/dist/overlay/effects/NOTICE.md +10 -0
- package/dist/overlay/effects/selfie_segmenter.tflite +0 -0
- package/dist/overlay/effects/vision_wasm_internal.js +9155 -0
- package/dist/overlay/effects/vision_wasm_internal.wasm +0 -0
- package/dist/overlay/icons.js +8 -1
- package/dist/overlay/icons.js.map +1 -1
- package/dist/overlay/journeyRecorder.d.ts +30 -0
- package/dist/overlay/journeyRecorder.js +238 -0
- package/dist/overlay/journeyRecorder.js.map +1 -0
- package/dist/overlay/movedAnchors.js +5 -0
- package/dist/overlay/movedAnchors.js.map +1 -1
- package/dist/overlay/recorder.d.ts +11 -4
- package/dist/overlay/recorder.js +186 -46
- package/dist/overlay/recorder.js.map +1 -1
- package/dist/overlay/recordingEditor.d.ts +12 -0
- package/dist/overlay/recordingEditor.js +131 -0
- package/dist/overlay/recordingEditor.js.map +1 -0
- package/dist/overlay/recordingPlayer.d.ts +24 -0
- package/dist/overlay/recordingPlayer.js +379 -0
- package/dist/overlay/recordingPlayer.js.map +1 -0
- package/dist/overlay/recordingPlayerShell.d.ts +19 -0
- package/dist/overlay/recordingPlayerShell.js +51 -0
- package/dist/overlay/recordingPlayerShell.js.map +1 -0
- package/dist/overlay/rrweb-replay.js +120 -0
- package/dist/overlay/runtime.js +1046 -57
- package/dist/overlay/runtime.js.map +1 -1
- package/dist/overlay/state.js +2 -1
- package/dist/overlay/state.js.map +1 -1
- package/dist/overlay/storageFull.d.ts +16 -0
- package/dist/overlay/storageFull.js +39 -0
- package/dist/overlay/storageFull.js.map +1 -0
- package/dist/overlay/styles.js +118 -5
- package/dist/overlay/styles.js.map +1 -1
- package/dist/overlay/tasks-vision.js +3 -0
- package/dist/overlay/upload.d.ts +2 -2
- package/dist/overlay/upload.js +4 -2
- package/dist/overlay/upload.js.map +1 -1
- package/dist/remote/client.d.ts +3 -2
- package/dist/remote/client.js +3 -3
- package/dist/remote/client.js.map +1 -1
- package/dist/remote/content-schema.d.ts +291 -43
- package/dist/remote/content-schema.js +91 -0
- package/dist/remote/content-schema.js.map +1 -1
- package/dist/remote/content.js +4 -2
- package/dist/remote/content.js.map +1 -1
- package/dist/remote/store.js +3 -1
- package/dist/remote/store.js.map +1 -1
- package/dist/remote/types.d.ts +1 -0
- package/dist/sidecar/commentFiles.js +5 -3
- package/dist/sidecar/commentFiles.js.map +1 -1
- package/dist/storage/localAttachments.js +1 -1
- package/dist/storage/localAttachments.js.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*! @rrweb/replay 2.2.2 | MIT License | https://github.com/rrweb-io/rrweb */
|
|
2
|
+
var Ir=Object.defineProperty,Wi=(e,t)=>{let r={};for(var o in e)Ir(r,o,{get:e[o],enumerable:!0});return t||Ir(r,Symbol.toStringTag,{value:"Module"}),r},$i=Object.create,gs=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,ji=Object.getOwnPropertyNames,Vi=Object.getPrototypeOf,ys=Object.prototype.hasOwnProperty,H=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),Gi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var c=ji(t),h=0,d=c.length,g;h<d;h++)g=c[h],!ys.call(e,g)&&g!==r&&gs(e,g,{get:(p=>t[p]).bind(null,g),enumerable:!(o=zi(t,g))||o.enumerable});return e},Hi=(e,t,r)=>(r=e!=null?$i(Vi(e)):{},Gi(t||!e||!e.__esModule||!ys.call(e,"default")?gs(r,"default",{value:e,enumerable:!0}):r,e)),B=(function(e){return 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})({}),Ar={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Dr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ye={},Jt={},Tr=0;function qi(e){let t=globalThis?.Zone?.__symbol__?.(e);if(t&&globalThis[t])return globalThis[t]}function lr(e){if(Ye[e])return Ye[e];let t=qi(e)||globalThis[e],r=t.prototype,o=e in Ar?Ar[e]:void 0,c=!!(o&&o.every(g=>!!Object.getOwnPropertyDescriptor(r,g)?.get?.toString().includes("[native code]"))),h=e in Dr?Dr[e]:void 0,d=!!(h&&h.every(g=>typeof r[g]=="function"&&r[g]?.toString().includes("[native code]")));if(c&&d)return Ye[e]=t.prototype,t.prototype;try{let g=document.createElement("iframe");g.style.display="none",document.body.appendChild(g);let p=g.contentWindow;if(!p)return t.prototype;let m=p[e].prototype;if(!m)return g.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(g.classList.add("rr-block"),g.setAttribute("__rrwebUntaintedMutationObserver",""),Jt[e]=()=>g.remove()):g.remove(),Ye[e]=m}catch{return r}}var _r={};function he(e,t,r){let o=_r[e]?.[r];if(o)return o.call(t);let c=lr(e),h=Object.getOwnPropertyDescriptor(c,r)?.get;return h?((_r[e]||={})[r]=h,h.call(t)):t[r]}var zt={};function vs(e,t,r){let o=`${e}.${String(r)}`;if(zt[o])return zt[o].bind(t);let c=lr(e)[r];return typeof c!="function"?t[r]:(zt[o]=c,c.bind(t))}function Yi(e){return he("Node",e,"ownerDocument")}function Ji(e){return he("Node",e,"childNodes")}function Xi(e){return he("Node",e,"parentNode")}function Qi(e){return he("Node",e,"parentElement")}function Zi(e){return he("Node",e,"textContent")}function Ki(e){return he("Node",e,"firstChild")}function en(e){return he("Node",e,"lastChild")}function tn(e){return he("Node",e,"nextSibling")}function rn(e){return he("Node",e,"previousSibling")}function sn(e,t){return vs("Node",e,"contains")(t)}function nn(e){return vs("Node",e,"getRootNode")()}function on(e){return!e||!("host"in e)?null:he("ShadowRoot",e,"host")}function an(e){return e.styleSheets}function ln(e){return!e||!("shadowRoot"in e)?null:he("Element",e,"shadowRoot")}function un(e,t){return he("Element",e,"querySelector")(t)}function cn(e,t){return he("Element",e,"querySelectorAll")(t)}function fn(){let e=lr("MutationObserver");Tr++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--Tr!==0))return;let r=Jt.MutationObserver;if(r)try{r()}finally{delete Ye.MutationObserver,delete Jt.MutationObserver}}]}var ws=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ws=()=>new Date().getTime());function hn(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],c=r(o);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=c,()=>{e[t]=o}}catch{return()=>{}}}var ne={ownerDocument:Yi,childNodes:Ji,parentNode:Xi,parentElement:Qi,textContent:Zi,firstChild:Ki,lastChild:en,nextSibling:tn,previousSibling:rn,contains:sn,getRootNode:nn,host:on,styleSheets:an,shadowRoot:ln,querySelector:un,querySelectorAll:cn,nowTimestamp:ws,mutationObserverCtor:fn,patch:hn};function ur(e){return e.nodeType===e.ELEMENT_NODE}function Ke(e){let 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 dn(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 pn(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Xt(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),dn(Array.from(t,o=>bs(o,r)).join(""))}catch{return null}}function bs(e,t){if(gn(e)){let r;try{r=Xt(e.styleSheet)||pn(e)}catch{r=e.cssText}return e.styleSheet.href?vt(r,e.styleSheet.href):r}else{let r=e.cssText;return yn(e)&&e.selectorText.includes(":")&&(r=mn(r)),t?vt(r,t):r}}function mn(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function gn(e){return"styleSheet"in e}function yn(e){return"selectorText"in e}var cr=class{idNodeMap=new Map;nodeMetaMap=new WeakMap;getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(o=>this.removeNodeFromMap(o));let r=ne.shadowRoot(e);r&&this.removeNodeFromMap(r)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ss(){return new cr}function gt({element:e,maskInputOptions:t,tagName:r,type:o,value:c,maskInputFn:h}){let d=c||"",g=o&&Ce(o);return(t[r.toLowerCase()]||g&&t[g])&&(h?d=h(d,e):d="*".repeat(d.length)),d}function Ce(e){return e.toLowerCase()}var kr="__rrweb_original__";function vn(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let c=0;c<e.height;c+=r){let h=t.getImageData,d=kr in h?h[kr]:h;if(new Uint32Array(d.call(t,o,c,Math.min(r,e.width-o),Math.min(r,e.height-c)).data.buffer).some(g=>g!==0))return!1}return!0}function wn(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 yt(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ce(t):null}function fr(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}return r.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function bn(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Sn=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Cn=/^(?:[a-z+]+:)?\/\//i,xn=/^www\..*/i,En=/^(data:)([^,]*),(.*)/i,Mn=/^blob:/i;function vt(e,t){return(e||"").replace(Sn,(r,o,c,h,d,g)=>{let p=c||d||g,m=o||h||"";if(!p)return r;if(Cn.test(p)||xn.test(p))return`url(${m}${p}${m})`;if(En.test(p)||Mn.test(p))return`url(${m}${p}${m})`;if(p[0]==="#")return`url(${m}${p}${m})`;if(p[0]==="/")return`url(${m}${bn(t)+p}${m})`;let v=p.split("#")[0],u=p.substring(v.length),n=t.split("#")[0].split("/"),i=v.split("/");n.pop();for(let l of i)l!=="."&&(l===".."?n.pop():n.push(l));return`url(${m}${n.join("/")}${u}${m})`})}var Cs="(?:/\\*[^*]*\\*/)|[\\s;]",Rn=new RegExp(`${Cs}|\\b(0)px?`,"g"),Nn=new RegExp(Cs,"g");function ct(e,t=!1){return t?e.replace(Nn,""):e.replace(Rn,"$1")}function On(e,t,r=!1){let o=Array.from(t.childNodes),c=[],h=0;if(o.length>1&&e&&typeof e=="string"){let d=ct(e,r),g=d.length/e.length;for(let p=1;p<o.length;p++)if(o[p].textContent&&typeof o[p].textContent=="string"){let m=ct(o[p].textContent,r),v=100,u=3;for(;u<m.length&&(m[u].match(/[a-zA-Z0-9]/)||m.indexOf(m.substring(0,u),1)!==-1);u++);for(;u<m.length;u++){let n=m.substring(0,u),i=d.split(n),l=-1;if(i.length===2)l=i[0].length;else if(i.length>2&&i[0]===""&&o[p-1].textContent!=="")l=d.indexOf(n,1);else if(i.length===1){if(n=n.substring(0,n.length-1),i=d.split(n),i.length<=1)return c.push(e),c;u=101}else u===m.length-1&&(l=d.indexOf(n));if(i.length>=2&&u>v){let s=o[p-1].textContent;if(s&&typeof s=="string"){let a=ct(s).length;l=d.indexOf(n,a)}l===-1&&(l=i[0].length)}if(l!==-1){let s=Math.floor(l/g);for(;s>0&&s<e.length;){if(h+=1,h>50*o.length)return c.push(e),c;let a=ct(e.substring(0,s),r);if(a.length===l){c.push(e.substring(0,s)),e=e.substring(s),d=d.substring(l);break}else a.length<l?s+=Math.max(1,Math.floor((l-a.length)/g)):s-=Math.max(1,Math.floor((a.length-l)*g))}break}}}}return c.push(e),c}function In(e,t){return On(e,t).join("/* rr_split */")}var An=1,Dn=new RegExp("[^a-z0-9-_:]");function xs(){return An++}function Tn(e){if(e instanceof HTMLFormElement)return"form";let t=Ce(e.tagName);return Dn.test(t)?"div":t}var Ue,Lr,_n=/^[^ \t\n\r\u000c]+/,kn=/^[, \t\n\r\u000c]+/;function Ln(e,t){if(t.trim()==="")return t;let r=0;function o(h){let d,g=h.exec(t.substring(r));return g?(d=g[0],r+=d.length,d):""}let c=[];for(;o(kn),!(r>=t.length);){let h=o(_n);if(h.slice(-1)===",")h=ze(e,h.substring(0,h.length-1)),c.push(h);else{let d="";h=ze(e,h);let g=!1;for(;;){let p=t.charAt(r);if(p===""){c.push((h+d).trim());break}else if(g)p===")"&&(g=!1);else if(p===","){r+=1,c.push((h+d).trim());break}else p==="("&&(g=!0);d+=p,r+=1}}}return c.join(", ")}var Pr=new WeakMap;function ze(e,t){return!t||t.trim()===""?t:hr(e,t)}function Pn(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hr(e,t){let r=Pr.get(e);if(r||(r=e.createElement("a"),Pr.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Es(e,t,r,o){return o&&(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")||r==="xlink:href"&&o[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?ze(e,o):r==="srcset"?Ln(e,o):r==="style"?vt(o,hr(e)):t==="object"&&r==="data"?ze(e,o):o)}function Ms(e,t,r){return["video","audio"].includes(e)&&Ce(t)==="autoplay"}function Rs(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let c=e.classList[o];if(t.test(c))return!0}if(r)return e.matches(r)}catch{}return!1}function wt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?wt(ne.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let c=e.classList[o];if(t.test(c))return!0}return r?wt(ne.parentNode(e),t,r):!1}function Ns(e,t,r,o){let c;if(ur(e)){if(c=e,!ne.childNodes(c).length)return!1}else{if(ne.parentElement(e)===null)return!1;c=ne.parentElement(e)}try{if(typeof t=="string"){if(o){if(c.closest(`.${t}`))return!0}else if(c.classList.contains(t))return!0}else if(wt(c,t,o))return!0;if(r){if(o){if(c.closest(r))return!0}else if(c.matches(r))return!0}}catch{}return!1}function Fn(e,t,r){let o=e.contentWindow;if(!o)return;let c=!1,h;try{h=o.document.readyState}catch{return}if(h!=="complete"){let g=setTimeout(()=>{c||(t(),c=!0)},r);e.addEventListener("load",()=>{clearTimeout(g),c=!0,t()});return}let d="about:blank";if(o.location.href!==d||e.src===d||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Un(e,t,r){let o=!1,c;try{c=e.sheet}catch{return}if(c)return;let h=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(h),o=!0,t()})}function Bn(e,t){let{doc:r,mirror:o,blockClass:c,blockSelector:h,needsMask:d,inlineStylesheet:g,maskInputOptions:p={},maskTextFn:m,maskInputFn:v,dataURLOptions:u={},inlineImages:n,recordCanvas:i,keepIframeSrcFn:l,newlyAddedElement:s=!1,cssCaptured:a=!1}=t,f=Wn(r,o);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:f};case e.ELEMENT_NODE:return zn(e,{doc:r,blockClass:c,blockSelector:h,inlineStylesheet:g,maskInputOptions:p,maskInputFn:v,dataURLOptions:u,inlineImages:n,recordCanvas:i,keepIframeSrcFn:l,newlyAddedElement:s,rootId:f});case e.TEXT_NODE:return $n(e,{doc:r,needsMask:d,maskTextFn:m,rootId:f,cssCaptured:a});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:f};case e.COMMENT_NODE:return{type:B.Comment,textContent:ne.textContent(e)||"",rootId:f};default:return!1}}function Wn(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function $n(e,t){let{needsMask:r,maskTextFn:o,rootId:c,cssCaptured:h}=t,d=ne.parentNode(e),g=d&&d.tagName,p="",m=g==="STYLE"?!0:void 0,v=g==="SCRIPT"?!0:void 0;return v?p="SCRIPT_PLACEHOLDER":h||(p=ne.textContent(e),m&&p&&(p=vt(p,hr(t.doc)))),!m&&!v&&p&&r&&(p=o?o(p,ne.parentElement(e)):p.replace(/[\S]/g,"*")),{type:B.Text,textContent:p||"",rootId:c}}function zn(e,t){let{doc:r,blockClass:o,blockSelector:c,inlineStylesheet:h,maskInputOptions:d={},maskInputFn:g,dataURLOptions:p={},inlineImages:m,recordCanvas:v,keepIframeSrcFn:u,newlyAddedElement:n=!1,rootId:i}=t,l=Rs(e,o,c),s=Tn(e),a={},f=e.attributes.length;for(let b=0;b<f;b++){let w=e.attributes[b];Ms(s,w.name,w.value)||(a[w.name]=Es(r,s,Ce(w.name),w.value))}if(s==="link"&&h){let b=Array.from(r.styleSheets).find(M=>M.href===e.href),w=null;b&&(w=Xt(b)),w&&(delete a.rel,delete a.href,a._cssText=w)}if(s==="style"&&e.sheet){let b=Xt(e.sheet);b&&(e.childNodes.length>1&&(b=In(b,e)),a._cssText=b)}if(["input","textarea","select"].includes(s)){let b=e.value,w=e.checked;a.type!=="radio"&&a.type!=="checkbox"&&a.type!=="submit"&&a.type!=="button"&&b?a.value=gt({element:e,type:yt(e),tagName:s,value:b,maskInputOptions:d,maskInputFn:g}):w&&(a.checked=w)}if(s==="option"&&(e.selected&&!d.select?a.selected=!0:delete a.selected),s==="dialog"&&e.open&&(a.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),s==="canvas"&&v){if(e.__context==="2d")vn(e)||(a.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let b=e.toDataURL(p.type,p.quality),w=r.createElement("canvas");w.width=e.width,w.height=e.height,b!==w.toDataURL(p.type,p.quality)&&(a.rr_dataURL=b)}}if(s==="img"&&m){Ue||(Ue=r.createElement("canvas"),Lr=Ue.getContext("2d"));let b=e,w=b.currentSrc||b.getAttribute("src")||"<unknown-src>",M=b.crossOrigin,x=()=>{b.removeEventListener("load",x);try{Ue.width=b.naturalWidth,Ue.height=b.naturalHeight,Lr.drawImage(b,0,0),a.rr_dataURL=Ue.toDataURL(p.type,p.quality)}catch(C){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${w}! Error: ${C}`)}b.crossOrigin==="anonymous"&&(M?a.crossOrigin=M:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x)}if(["audio","video"].includes(s)){let b=a;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(n||(e.scrollLeft&&(a.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(a.rr_scrollTop=e.scrollTop)),l){let{width:b,height:w}=e.getBoundingClientRect();a={class:a.class,rr_width:`${b}px`,rr_height:`${w}px`}}s==="iframe"&&!u(a.src)&&(e.contentDocument||(a.rr_src=a.src),delete a.src);let y;try{customElements.get(s)&&(y=!0)}catch{}return{type:B.Element,tagName:s,attributes:a,childNodes:[],isSVG:Pn(e)||void 0,needBlock:l,rootId:i,isCustom:y}}function J(e){return e==null?"":e.toLowerCase()}function Os(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function jn(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"&&fr(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)==="application-name"||J(e.attributes.rel)==="icon"||J(e.attributes.rel)==="apple-touch-icon"||J(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(J(e.attributes.name)==="robots"||J(e.attributes.name)==="googlebot"||J(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(J(e.attributes.name)==="author"||J(e.attributes.name)==="generator"||J(e.attributes.name)==="framework"||J(e.attributes.name)==="publisher"||J(e.attributes.name)==="progid"||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(J(e.attributes.name)==="google-site-verification"||J(e.attributes.name)==="yandex-verification"||J(e.attributes.name)==="csrf-token"||J(e.attributes.name)==="p:domain_verify"||J(e.attributes.name)==="verify-v1"||J(e.attributes.name)==="verification"||J(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(e,t){let{doc:r,mirror:o,blockClass:c,blockSelector:h,maskTextClass:d,maskTextSelector:g,skipChild:p=!1,inlineStylesheet:m=!0,maskInputOptions:v={},maskTextFn:u,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l={},inlineImages:s=!1,recordCanvas:a=!1,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:C=!1,cssCaptured:S=!1}=t,{needsMask:E}=t,{preserveWhiteSpace:R=!0}=t;E||(E=Ns(e,d,g,E===void 0));let I=Bn(e,{doc:r,mirror:o,blockClass:c,blockSelector:h,needsMask:E,inlineStylesheet:m,maskInputOptions:v,maskTextFn:u,maskInputFn:n,dataURLOptions:l,inlineImages:s,recordCanvas:a,keepIframeSrcFn:x,newlyAddedElement:C,cssCaptured:S});if(!I)return console.warn(e,"not serialized"),null;let N;o.hasNode(e)?N=o.getId(e):jn(I,i)||!R&&I.type===B.Text&&!I.textContent.replace(/^\s+|\s+$/gm,"").length?N=-2:N=xs();let D=Object.assign(I,{id:N});if(o.add(e,D),N===-2)return null;f&&f(e);let k=!p;if(D.type===B.Element){k=k&&!D.needBlock,delete D.needBlock;let V=ne.shadowRoot(e);V&&et(V)&&(D.isShadowHost=!0)}if((D.type===B.Document||D.type===B.Element)&&k){i.headWhitespace&&D.type===B.Element&&D.tagName==="head"&&(R=!1);let V={doc:r,mirror:o,blockClass:c,blockSelector:h,needsMask:E,maskTextClass:d,maskTextSelector:g,skipChild:p,inlineStylesheet:m,maskInputOptions:v,maskTextFn:u,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:s,recordCanvas:a,preserveWhiteSpace:R,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:M,keepIframeSrcFn:x,cssCaptured:!1};if(!(D.type===B.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0)){D.type===B.Element&&D.attributes._cssText!==void 0&&typeof D.attributes._cssText=="string"&&(V.cssCaptured=!0);for(let re of Array.from(ne.childNodes(e))){let F=je(re,V);F&&D.childNodes.push(F)}}let O=null;if(ur(e)&&(O=ne.shadowRoot(e)))for(let re of Array.from(ne.childNodes(O))){let F=je(re,V);F&&(et(O)&&(F.isShadow=!0),D.childNodes.push(F))}}let ae=ne.parentNode(e);return ae&&Ke(ae)&&et(ae)&&(D.isShadow=!0),D.type===B.Element&&D.tagName==="iframe"&&!Rs(e,c,h)&&Fn(e,()=>{let V=e.contentDocument;if(V&&y){let O=je(V,{doc:V,mirror:o,blockClass:c,blockSelector:h,needsMask:E,maskTextClass:d,maskTextSelector:g,skipChild:!1,inlineStylesheet:m,maskInputOptions:v,maskTextFn:u,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:s,recordCanvas:a,preserveWhiteSpace:R,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:M,keepIframeSrcFn:x});O&&y(e,O)}},b),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"&&fr(D.attributes.href)==="css")&&Un(e,()=>{if(w){let V=je(e,{doc:r,mirror:o,blockClass:c,blockSelector:h,needsMask:E,maskTextClass:d,maskTextSelector:g,skipChild:!1,inlineStylesheet:m,maskInputOptions:v,maskTextFn:u,maskInputFn:n,slimDOMOptions:i,dataURLOptions:l,inlineImages:s,recordCanvas:a,preserveWhiteSpace:R,onSerialize:f,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:M,keepIframeSrcFn:x});V&&w(e,V)}},M),D}function Vn(e,t){let{mirror:r=new cr,blockClass:o="rr-block",blockSelector:c=null,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:g=!0,inlineImages:p=!1,recordCanvas:m=!1,maskAllInputs:v=!1,maskTextFn:u,maskInputFn:n,slimDOM:i=!1,dataURLOptions:l,preserveWhiteSpace:s,onSerialize:a,onIframeLoad:f,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:M=()=>!1}=t||{};return je(e,{doc:e,mirror:r,blockClass:o,blockSelector:c,maskTextClass:h,maskTextSelector:d,skipChild:!1,inlineStylesheet:g,maskInputOptions:v===!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}:v===!1?{password:!0}:v,maskTextFn:u,maskInputFn:n,slimDOMOptions:Os(i),dataURLOptions:l,inlineImages:p,recordCanvas:m,preserveWhiteSpace:s,onSerialize:a,onIframeLoad:f,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:M,newlyAddedElement:!1})}var Fr=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Gn={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Fr)&&(e.params=e.params.replace(Fr,"$1-$2"))}}}},Hn={postcssPlugin:"postcss-hover-classes",prepare:function(){let e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
3
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}},qn=H(((e,t)=>{var r=String,o=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};t.exports=o(),t.exports.createColors=o})),ye=H(((e,t)=>{t.exports={}})),dr=H(((e,t)=>{var r=qn(),o=ye(),c=class Is extends Error{constructor(d,g,p,m,v,u){super(d),this.name="CssSyntaxError",this.reason=d,v&&(this.file=v),m&&(this.source=m),u&&(this.plugin=u),typeof g<"u"&&typeof p<"u"&&(typeof g=="number"?(this.line=g,this.column=p):(this.line=g.line,this.column=g.column,this.endLine=p.line,this.endColumn=p.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Is)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(d){if(!this.source)return"";let g=this.source;d==null&&(d=r.isColorSupported);let p=s=>s,m=s=>s,v=s=>s;if(d){let{bold:s,gray:a,red:f}=r.createColors(!0);m=y=>s(f(y)),p=y=>a(y),o&&(v=y=>o(y))}let u=g.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,u.length),l=String(i).length;return u.slice(n,i).map((s,a)=>{let f=n+1+a,y=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(s.length>160){let w=20,M=Math.max(0,this.column-w),x=Math.max(this.column+w,this.endColumn+w),C=s.slice(M,x),S=p(y.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return m(">")+p(y)+v(C)+`
|
|
4
|
+
`+S+m("^")}let b=p(y.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+p(y)+v(s)+`
|
|
5
|
+
`+b+m("^")}return" "+p(y)+v(s)}).join(`
|
|
6
|
+
`)}toString(){let d=this.showSourceCode();return d&&(d=`
|
|
7
|
+
|
|
8
|
+
`+d+`
|
|
9
|
+
`),this.name+": "+this.message+d}};t.exports=c,c.default=c})),As=H(((e,t)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/,o={after:`
|
|
10
|
+
`,beforeClose:`
|
|
11
|
+
`,beforeComment:`
|
|
12
|
+
`,beforeDecl:`
|
|
13
|
+
`,beforeOpen:" ",beforeRule:`
|
|
14
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function c(v){return v[0].toUpperCase()+v.slice(1)}function h(v,u){let n="@"+u.name,i=u.params?v.rawValue(u,"params"):"",l=u.raws.afterName;return typeof l>"u"?l=i?" ":"":l===""&&i&&!r.test(i[0])&&(l=" "),n+l+i}function d(v){if(!v.prop.startsWith("--"))return!1;let u=v.raws.before;return typeof u>"u"||!/[^\s;]$/.test(u)}function g(v,u,n){let i=n.nodes,l=i.length-1;for(;l>0&&i[l].type==="comment";)l-=1;let s=v.raw(n,"semicolon"),a=n.type==="document";for(let f=i.length-1;f>=0;f--){let y=i[f],b=l!==f||s;!b&&f<i.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&d(y))&&(b=!0),u.push({document:a,node:y,semicolon:b})}}function p(v,u,n,i){let l=v.raw(n,"between","beforeOpen");v.builder(i+l+"{",n,"start");let s=n.nodes&&n.nodes.length,a=()=>{let f=s?v.raw(n,"after"):v.raw(n,"after","emptyBody");f&&v.builder(f),v.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&v.builder(n.raws.ownSemicolon,n,"end")};s?(u.push(a),g(v,u,n)):a()}var m=class Ds{constructor(u){this.builder=u}atrule(u,n){let i=h(this,u);if(u.nodes)this.block(u,i);else{let l=(u.raws.between||"")+(n?";":"");this.builder(i+l,u)}}beforeAfter(u,n){let i;u.type==="decl"?i=this.raw(u,null,"beforeDecl"):u.type==="comment"?i=this.raw(u,null,"beforeComment"):n==="before"?i=this.raw(u,null,"beforeRule"):i=this.raw(u,null,"beforeClose");let l=u.parent,s=0;for(;l&&l.type!=="root";)s+=1,l=l.parent;if(i.includes(`
|
|
15
|
+
`)){let a=this.raw(u,null,"indent");if(a.length)for(let f=0;f<s;f++)i+=a}return i}block(u,n){let i=this.raw(u,"between","beforeOpen");this.builder(n+i+"{",u,"start");let l;u.nodes&&u.nodes.length?(this.body(u),l=this.raw(u,"after")):l=this.raw(u,"after","emptyBody"),l&&this.builder(l),this.builder("}",u,"end")}body(u){let n=Ds.prototype,i=["atrule","block","body","rule","stringify"].every(s=>this[s]===n[s]),l=[];for(g(this,l,u);l.length>0;){let s=l.pop();if(typeof s=="function"){s();continue}let a=s.node,f=this.raw(a,"before");f&&this.builder(f),i&&a.type==="rule"?p(this,l,a,this.rawValue(a,"selector")):i&&a.type==="atrule"&&a.nodes?p(this,l,a,h(this,a)):this.stringify(a,s.semicolon)}}comment(u){let n=this.raw(u,"left","commentLeft"),i=this.raw(u,"right","commentRight");this.builder("/*"+n+u.text+i+"*/",u)}decl(u,n){let i=u.raws,l=this.raw(u,"between","colon"),s=u.prop+l+this.rawValue(u,"value");u.important&&(s+=i.important||" !important"),n&&(s+=";"),this.builder(s,u)}document(u){this.body(u)}raw(u,n,i){let l;if(i||(i=n),n&&(l=u.raws[n],typeof l<"u"))return l;let s=u.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===u||s&&s.type==="document"))return"";if(!s)return o[i];let a=u.root(),f=a.rawCache||(a.rawCache={});if(typeof f[i]<"u")return f[i];if(i==="before"||i==="after")return this.beforeAfter(u,i);{let y="raw"+c(i);this[y]?l=this[y](a,u):a.walk(b=>{if(l=b.raws[n],typeof l<"u")return!1})}return typeof l>"u"&&(l=o[i]),f[i]=l,l}rawBeforeClose(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(u,n){let i;return u.walkComments(l=>{if(typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
|
|
17
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(u,n){let i;return u.walkDecls(l=>{if(typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
|
|
18
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(u){let n;return u.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(u){let n;return u.walk(i=>{if(i.nodes&&(i.parent!==u||u.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
|
|
19
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(u){let n;return u.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(u){if(u.raws.indent)return u.raws.indent;let n;return u.walk(i=>{let l=i.parent;if(l&&l!==u&&l.parent&&l.parent===u&&typeof i.raws.before<"u"){let s=i.raws.before.split(`
|
|
20
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(u,n){let i=u[n],l=u.raws[n];return l&&l.value===i?l.raw:i}root(u){!(u.parent&&u.parent.type==="document")&&u.source&&u.source.input.hasBOM&&this.builder("\uFEFF",u,"start"),this.body(u),u.raws.after&&this.builder(u.raws.after)}rule(u){this.block(u,this.rawValue(u,"selector")),u.raws.ownSemicolon&&this.builder(u.raws.ownSemicolon,u,"end")}stringify(u,n){if(!this[u.type])throw new Error("Unknown AST node type "+u.type+". Maybe you need to change PostCSS stringifier.");this[u.type](u,n)}};t.exports=m,m.default=m})),Et=H(((e,t)=>{var r=As(),o=/(<)(\/?style\b)/gi,c=/(<)(!--)/g;function h(m){return m.includes("<")?m.replace(o,"\\3c $2").replace(c,"\\3c $2"):m}function d(m,v,u){let n=[],i=0,l=0;for(let s=0;s<m.length;s+=3){let a=l,f=i+m[s].length;for(;i<f;)v[i]===u[l]?(i+=1,l+=1):(i+=1,l+=4);n.push(u.slice(a,l))}return n}var g=class extends r{escapeHTML(m){let v=this.builder,u,n;if(this.builder=(l,s,a)=>{u?(n+=l,u.push(l,s,a)):l.includes("<")?(n=l,u=[l,s,a]):v(l,s,a)},m(),this.builder=v,!u)return;let i=h(n);if(i===n)for(let l=0;l<u.length;l+=3)v(u[l],u[l+1],u[l+2]);else{let l=d(u,n,i);for(let s=0;s<u.length;s+=3)v(l[s/3],u[s+1],u[s+2])}}root(m){m.parent&&m.parent.type==="document"?(this.escapeHTML(()=>this.body(m)),m.raws.after&&this.builder(m.raws.after)):this.escapeHTML(()=>super.root(m))}};function p(m,v){let u=new g(v);m.type==="root"||m.type==="document"?u.stringify(m):u.escapeHTML(()=>u.stringify(m))}t.exports=p,p.default=p})),Mt=H(((e,t)=>{t.exports.isClean=Symbol("isClean"),t.exports.my=Symbol("my")})),Rt=H(((e,t)=>{var r=dr(),o=As(),c=Et(),{isClean:h,my:d}=Mt();function g(v,u){let n=new v.constructor,i=[[v,n,u]];for(;i.length>0;){let[l,s,a]=i.pop();for(let f in l){if(!Object.prototype.hasOwnProperty.call(l,f)||f==="proxyCache")continue;let y=l[f],b=typeof y;if(f==="parent"&&b==="object")a&&(s[f]=a);else if(f==="source")s[f]=y;else if(Array.isArray(y)){let w=[];s[f]=w;for(let M of y){let x=new M.constructor;w.push(x),i.push([M,x,s])}}else{if(b==="object"&&y!==null){let w=new y.constructor;i.push([y,w,void 0]),y=w}s[f]=y}}}return n}function p(v,u){if(u&&typeof u.offset<"u")return u.offset;let n=1,i=1,l=0;for(let s=0;s<v.length;s++){if(i===u.line&&n===u.column){l=s;break}v[s]===`
|
|
21
|
+
`?(n=1,i+=1):n+=1}return l}var m=class Qt{get proxyOf(){return this}constructor(u={}){this.raws={},this[h]=!1,this[d]=!0;for(let n of Object.keys(u))if(n!=="__proto__")if(n==="nodes"){this.nodes=[];for(let i of u[n])typeof i.clone=="function"&&i.parent?this.append(i.clone()):this.append(i)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=g(this);for(let i in u)n[i]=u[i];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:i,start:l}=this.rangeBy(n);return this.source.input.error(u,{column:l.column,line:l.line},{column:i.column,line:i.line},n)}return new r(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,i){return u[n]===i||(u[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[h]=!0}markDirty(){if(this[h]){this[h]=!1;let u=this;for(;u=u.parent;)u[h]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:p(n,this.source.start)};if(u.index)i=this.positionInside(u.index);else if(u.word){let l=n.slice(p(n,this.source.start),this.rangeBy().end.offset).indexOf(u.word);l!==-1&&(i=this.positionInside(l))}return i}positionInside(u){let n=this.source.start.column,i=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,s=p(l,this.source.start),a=s+u;for(let f=s;f<a;f++)l[f]===`
|
|
22
|
+
`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:p(n,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:p(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(u.word){let s=n.slice(p(n,this.source.start),l.offset).indexOf(u.word);s!==-1&&(i=this.positionInside(s),l=this.positionInside(s+u.word.length))}else u.start?i={column:u.start.column,line:u.start.line,offset:p(n,u.start)}:typeof u.index=="number"&&(i=this.positionInside(u.index)),u.end?l={column:u.end.column,line:u.end.line,offset:p(n,u.end)}:typeof u.endIndex=="number"?l=this.positionInside(u.endIndex):typeof u.index=="number"&&(l=this.positionInside(u.index+1));return(l.line<i.line||l.line===i.line&&l.column<=i.column)&&(l={column:i.column+1,line:i.line,offset:i.offset+1}),{end:l,start:i}}raw(u,n){return new o().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,i=!1;for(let l of u)l===this?i=!0:i?(this.parent.insertAfter(n,l),n=l):this.parent.insertBefore(n,l);i||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let i=n==null;n=n||new Map;let l=[],s=[[this,l,0]];for(let f=0;f<s.length;f++){let[y,b,w]=s[f],M={};b[w]=M;for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x)||x==="parent"||x==="proxyCache")continue;let C=y[x];if(Array.isArray(C)){let S=[];M[x]=S;for(let E=0;E<C.length;E++){let R=C[E];typeof R=="object"&&R.toJSON?R.toJSON===Qt.prototype.toJSON?s.push([R,S,E]):S[E]=R.toJSON(null,n):S[E]=R}}else if(typeof C=="object"&&C.toJSON)C.toJSON===Qt.prototype.toJSON?s.push([C,M,x]):M[x]=C.toJSON(null,n);else if(x==="source"){if(C==null)continue;let S=n.get(C.input);S==null&&(S=n.size,n.set(C.input,S)),M[x]={end:C.end,inputId:S,start:C.start}}else M[x]=C}}let a=l[0];return i&&(a.inputs=[...n.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=c){u.stringify&&(u=u.stringify);let n="";return u(this,i=>{n+=i}),n}warn(u,n,i={}){let l={node:this};for(let s in i)l[s]=i[s];return u.warn(n,l)}};t.exports=m,m.default=m})),Nt=H(((e,t)=>{var r=Rt(),o=class extends r{constructor(c){super(c),this.type="comment"}};t.exports=o,o.default=o})),Ot=H(((e,t)=>{var r=Rt(),o=class extends r{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(c){c&&typeof c.value<"u"&&typeof c.value!="string"&&(c={...c,value:String(c.value)}),super(c),this.type="decl"}};t.exports=o,o.default=o})),Ae=H(((e,t)=>{var r=Nt(),o=Ot(),c=Rt(),{isClean:h,my:d}=Mt(),g,p,m,v;function u(l){let s=l.slice();for(;s.length>0;){let a=s.pop();if(delete a.source,a.nodes){a.nodes=a.nodes.slice();for(let f of a.nodes)s.push(f)}}return l.slice()}function n(l){let s=[l];for(;s.length>0;){let a=s.pop();if(a[h]=!1,a.proxyOf.nodes)for(let f of a.proxyOf.nodes)s.push(f)}}var i=class Zt extends c{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]}append(...s){for(let a of s){let f=this.normalize(a,this.last);for(let y of f)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(s){let a=[this];for(;a.length>0;){let f=a.pop();if(f!==this&&f.cleanRaws!==Zt.prototype.cleanRaws){f.cleanRaws(s);continue}if(c.prototype.cleanRaws.call(f,s),f.nodes)for(let y of f.nodes)a.push(y)}}each(s){if(!this.proxyOf.nodes)return;let a=this.getIterator(),f,y;for(;this.indexes[a]<this.proxyOf.nodes.length&&(f=this.indexes[a],y=s(this.proxyOf.nodes[f],f),y!==!1);)this.indexes[a]+=1;return delete this.indexes[a],y}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,a){return a==="proxyOf"?s:s[a]?a==="each"||typeof a=="string"&&a.startsWith("walk")?(...f)=>s[a](...f.map(y=>typeof y=="function"?(b,w)=>y(b.toProxy(),w):y)):a==="every"||a==="some"?f=>s[a]((y,...b)=>f(y.toProxy(),...b)):a==="root"?()=>s.root().toProxy():a==="nodes"?s.nodes.map(f=>f.toProxy()):a==="first"||a==="last"?s[a].toProxy():s[a]:s[a]},set(s,a,f){return s[a]===f||(s[a]=f,(a==="name"||a==="params"||a==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,a){let f=this.index(s),y=this.normalize(a,this.proxyOf.nodes[f]).reverse();f=this.index(s);for(let w of y)this.proxyOf.nodes.splice(f+1,0,w);let b;for(let w in this.indexes)b=this.indexes[w],f<b&&(this.indexes[w]=b+y.length);return this.markDirty(),this}insertBefore(s,a){let f=this.index(s),y=f===0?"prepend":!1,b=this.normalize(a,this.proxyOf.nodes[f],y).reverse();f=this.index(s);for(let M of b)this.proxyOf.nodes.splice(f,0,M);let w;for(let M in this.indexes)w=this.indexes[M],f<=w&&(this.indexes[M]=w+b.length);return this.markDirty(),this}normalize(s,a){if(typeof s=="string")s=u(p(s).nodes);else if(typeof s>"u")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let f of s)f.parent&&f.parent.removeChild(f,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let f of s)f.parent&&f.parent.removeChild(f,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value>"u")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new v(s)];else if(s.name)s=[new g(s)];else if(s.text)s=[new r(s)];else throw new Error("Unknown node type in node creation");return s.map(f=>(f[d]||Zt.rebuild(f),f=f.proxyOf,f.parent&&f.parent.removeChild(f),f[h]&&n(f),f.raws||(f.raws={}),typeof f.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(f.raws.before=a.raws.before.replace(/\S/g,"")),f.parent=this.proxyOf,f))}prepend(...s){s=s.reverse();for(let a of s){let f=this.normalize(a,this.first,"prepend").reverse();for(let y of f)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+f.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let a;for(let f in this.indexes)a=this.indexes[f],a>=s&&(this.indexes[f]=a-1);return this.markDirty(),this}replaceValues(s,a,f){return f||(f=a,a={}),this.walkDecls(y=>{a.props&&!a.props.includes(y.prop)||a.fast&&!y.value.includes(a.fast)||(y.value=y.value.replace(s,f))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let a=[{iterator:this.getIterator(),node:this.proxyOf}];for(;a.length>0;){let{iterator:f,node:y}=a[a.length-1],b=y.indexes[f];if(b>=y.proxyOf.nodes.length){delete y.indexes[f],a.pop();let x=a[a.length-1];x&&(x.node.indexes[x.iterator]+=1);continue}let w=y.proxyOf.nodes[b],M;try{M=s(w,b)}catch(x){throw w.addToError(x)}if(M===!1){for(let x of a)delete x.node.indexes[x.iterator];return!1}w.walk&&w.proxyOf.nodes?a.push({iterator:w.getIterator(),node:w}):y.indexes[f]+=1}}walkAtRules(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="atrule"&&s.test(f.name))return a(f,y)}):this.walk((f,y)=>{if(f.type==="atrule"&&f.name===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="atrule")return a(f,y)}))}walkComments(s){return this.walk((a,f)=>{if(a.type==="comment")return s(a,f)})}walkDecls(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="decl"&&s.test(f.prop))return a(f,y)}):this.walk((f,y)=>{if(f.type==="decl"&&f.prop===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="decl")return a(f,y)}))}walkRules(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="rule"&&s.test(f.selector))return a(f,y)}):this.walk((f,y)=>{if(f.type==="rule"&&f.selector===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="rule")return a(f,y)}))}};i.registerParse=l=>{p=l},i.registerRule=l=>{v=l},i.registerAtRule=l=>{g=l},i.registerRoot=l=>{m=l},t.exports=i,i.default=i,i.rebuild=l=>{let s=[l];for(;s.length>0;){let a=s.pop();if(a.type==="atrule"?Object.setPrototypeOf(a,g.prototype):a.type==="rule"?Object.setPrototypeOf(a,v.prototype):a.type==="decl"?Object.setPrototypeOf(a,o.prototype):a.type==="comment"?Object.setPrototypeOf(a,r.prototype):a.type==="root"&&Object.setPrototypeOf(a,m.prototype),a[d]=!0,a.nodes)for(let f of a.nodes)s.push(f)}}})),pr=H(((e,t)=>{var r=Ae(),o=class extends r{constructor(c){super(c),this.type="atrule"}append(...c){return this.proxyOf.nodes||(this.nodes=[]),super.append(...c)}prepend(...c){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...c)}};t.exports=o,o.default=o,r.registerAtRule(o)})),mr=H(((e,t)=>{var r=Ae(),o,c,h=class extends r{constructor(d){super({type:"document",...d}),this.nodes||(this.nodes=[])}toResult(d={}){return new o(new c,this,d).stringify()}};h.registerLazyResult=d=>{o=d},h.registerProcessor=d=>{c=d},t.exports=h,h.default=h})),Yn=H(((e,t)=>{var r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",o=(h,d=21)=>(g=d)=>{let p="",m=g|0;for(;m-- >0;)p+=h[Math.random()*h.length|0];return p},c=(h=21)=>{let d="",g=h|0;for(;g-- >0;)d+=r[Math.random()*64|0];return d};t.exports={nanoid:c,customAlphabet:o}})),Ts=H(((e,t)=>{var{existsSync:r,readFileSync:o,realpathSync:c}=ye(),{dirname:h,isAbsolute:d,join:g,relative:p,sep:m}=ye(),{SourceMapConsumer:v,SourceMapGenerator:u}=ye();function n(s){try{return c(s)}catch{return s}}function i(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var l=class{constructor(s,a){if(a.map===!1)return;a.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(s),this.inline=this.startWith(this.annotation,"data:");let f=a.map?a.map.prev:void 0,y=this.loadMap(a.from,f);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=h(this.mapFile)),y&&(this.text=y)}consumer(){return this.consumerCache||(this.consumerCache=new v(this.json||this.text)),this.consumerCache}decodeInline(s){let a=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,y=s.match(/^data:application\/json;charset=utf-?8,/)||s.match(/^data:application\/json,/);if(y)return decodeURIComponent(s.substr(y[0].length));let b=s.match(a)||s.match(f);if(b)return i(s.substr(b[0].length));let w=s.slice(22);throw w=w.slice(0,w.indexOf(",")),new Error("Unsupported source map encoding "+w)}getAnnotationURL(s){return s.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(s){return typeof s!="object"?!1:typeof s.mappings=="string"||typeof s._mappings=="string"||Array.isArray(s.sections)}loadAnnotation(s){let a=s.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let f=s.lastIndexOf(a.pop()),y=s.indexOf("*/",f);f>-1&&y>-1&&(this.annotation=this.getAnnotationURL(s.substring(f,y)))}loadFile(s,a,f){if(!f&&!this.unsafeMap){if(!/\.map$/i.test(s)||!a)return;let y=p(n(h(a)),n(s));if(y===".."||y.startsWith(".."+m)||d(y))return}if(this.root=h(s),r(s))return this.mapFile=s,o(s,"utf-8").toString().trim()}loadMap(s,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let f=a(s);if(f){let y=this.loadFile(f,s,!0);if(!y)throw new Error("Unable to load previous source map: "+f.toString());return y}}else{if(a instanceof v)return u.fromSourceMap(a).toString();if(a instanceof u)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;s&&(f=g(h(s),f));let y=this.loadFile(f,s,!1);if(y)try{this.json=JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return y}}}startWith(s,a){return s?s.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=l,l.default=l})),It=H(((e,t)=>{var{nanoid:r}=Yn(),{isAbsolute:o,resolve:c}=ye(),{SourceMapConsumer:h,SourceMapGenerator:d}=ye(),{fileURLToPath:g,pathToFileURL:p}=ye(),m=dr(),v=Ts(),u=ye(),n=Symbol("lineToIndexCache"),i=!!(h&&d),l=!!(c&&o);function s(f){if(f[n])return f[n];let y=f.css.split(`
|
|
23
|
+
`),b=new Array(y.length),w=0;for(let M=0,x=y.length;M<x;M++)b[M]=w,w+=y[M].length+1;return f[n]=b,b}var a=class{get from(){return this.file||this.id}constructor(f,y={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.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,y.document&&(this.document=y.document.toString()),y.from&&(!l||/^\w+:\/\//.test(y.from)||o(y.from)?this.file=y.from:this.file=c(y.from)),l&&i){let b=new v(this.css,y);if(b.text){this.map=b;let w=b.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(f,y,b,w={}){let M,x,C,S,E;if(y&&typeof y=="object"){let I=y,N=b;if(typeof I.offset=="number"){S=I.offset;let D=this.fromOffset(S);y=D.line,b=D.col}else y=I.line,b=I.column,S=this.fromLineAndColumn(y,b);if(typeof N.offset=="number"){C=N.offset;let D=this.fromOffset(C);x=D.line,M=D.col}else x=N.line,M=N.column,C=this.fromLineAndColumn(N.line,N.column)}else if(b)S=this.fromLineAndColumn(y,b);else{S=y;let I=this.fromOffset(S);y=I.line,b=I.col}let R=this.origin(y,b,x,M);return R?E=new m(f,R.endLine===void 0?R.line:{column:R.column,line:R.line},R.endLine===void 0?R.column:{column:R.endColumn,line:R.endLine},R.source,R.file,w.plugin):E=new m(f,x===void 0?y:{column:b,line:y},x===void 0?b:{column:M,line:x},this.css,this.file,w.plugin),E.input={column:b,endColumn:M,endLine:x,endOffset:C,line:y,offset:S,source:this.css},this.file&&(p&&(E.input.url=p(this.file).toString()),E.input.file=this.file),E}fromLineAndColumn(f,y){return s(this)[f-1]+y-1}fromOffset(f){let y=s(this),b=y[y.length-1],w=0;if(f>=b)w=y.length-1;else{let M=y.length-2,x;for(;w<M;)if(x=w+(M-w>>1),f<y[x])M=x-1;else if(f>=y[x+1])w=x+1;else{w=x;break}}return{col:f-y[w]+1,line:w+1}}mapResolve(f){return/^\w+:\/\//.test(f)?f:c(this.map.consumer().sourceRoot||this.map.root||".",f)}origin(f,y,b,w){if(!this.map)return!1;let M=this.map.consumer(),x=M.originalPositionFor({column:y-1,line:f});if(!x.source)return!1;let C;if(typeof b=="number"){let I=M.originalPositionFor({column:w-1,line:b});I.source&&(C=I)}let S;o(x.source)?S=p(x.source):S=new URL(x.source,p(this.map.mapFile||c(".")+"/"));let E={column:x.column+1,endColumn:C&&C.column+1,endLine:C&&C.line,line:x.line,url:S.toString()};if(S.protocol==="file:")if(g)E.file=g(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=M.sourceContentFor(x.source);return R&&(E.source=R),E}toJSON(){let f={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(f[y]=this[y]);return this.map&&(f.map={...this.map},f.map.consumerCache&&(f.map.consumerCache=void 0)),f}};t.exports=a,a.default=a,u&&u.registerInput&&u.registerInput(a)})),at=H(((e,t)=>{var r=Ae(),o,c,h=class extends r{constructor(d){super(d),this.type="root",this.nodes||(this.nodes=[])}normalize(d,g,p){let m=new Set;for(let u of Array.isArray(d)?d:[d])u&&typeof u=="object"&&!u.parent&&u.raws&&typeof u.raws.before<"u"&&m.add(u.raws);let v=super.normalize(d);if(g){if(p==="prepend")this.nodes.length>1?g.raws.before=this.nodes[1].raws.before:delete g.raws.before;else if(this.first!==g)for(let u of v)m.has(u.raws)||(u.raws.before=g.raws.before)}return v}removeChild(d,g){let p=this.index(d);return!g&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(d)}toResult(d={}){return new o(new c,this,d).stringify()}};h.registerLazyResult=d=>{o=d},h.registerProcessor=d=>{c=d},t.exports=h,h.default=h,r.registerRoot(h)})),_s=H(((e,t)=>{var r={comma(o){return r.split(o,[","],!0)},space(o){return r.split(o,[" ",`
|
|
24
|
+
`," "])},split(o,c,h){if(typeof o!="string")return[];let d=[],g="",p=!1,m=0,v=!1,u="",n=!1,i=!1;for(let s=0;s<o.length;s++){let a=o[s];if(i){g+=a,a==="*"&&o[s+1]==="/"&&(g+="/",s+=1,i=!1);continue}if(n)n=!1;else if(a==="\\")n=!0;else if(v)a===u&&(v=!1);else if(a==='"'||a==="'")v=!0,u=a;else if(a==="/"&&o[s+1]==="*"){g+="/*",s+=1,i=!0;continue}else a==="("?m+=1:a===")"?m>0&&(m-=1):m===0&&c.includes(a)&&(p=!0);if(p){let f=g.trim();(h||f!=="")&&d.push(f),g="",p=!1}else g+=a}let l=g.trim();return(h||l!=="")&&d.push(l),d}};t.exports=r,r.default=r})),gr=H(((e,t)=>{var r=Ae(),o=_s(),c=class extends r{get selectors(){return o.comma(this.selector)}set selectors(h){let d=this.selector?this.selector.match(/,\s*/):null,g=d?d[0]:","+this.raw("between","beforeOpen");this.selector=h.join(g)}constructor(h){super(h),this.type="rule",this.nodes||(this.nodes=[])}};t.exports=c,c.default=c,r.registerRule(c)})),Jn=H(((e,t)=>{var r=pr(),o=Nt(),c=Ot(),h=It(),d=Ts(),g=at(),p=gr();function m(n,i){return n.inputs?n.inputs.map(l=>{let s={...l,__proto__:h.prototype};return s.map&&(s.map={...s.map,__proto__:d.prototype}),s}):i}function v(n,i,l){let s={...n};if(delete s.inputs,delete s.nodes,s.source){let{inputId:f,...y}=s.source;s.source=y,f!=null&&(s.source.input=i[f])}let a;if(s.type==="root")a=new g(s);else if(s.type==="decl")a=new c(s);else if(s.type==="rule")a=new p(s);else if(s.type==="comment")a=new o(s);else if(s.type==="atrule")a=new r(s);else throw new Error("Unknown node type: "+n.type);if(l){a.nodes=l;for(let f of l)f.parent=a}return a}function u(n,i){if(Array.isArray(n))return n.map(a=>u(a));let l,s=[{childIndex:0,children:[],inputs:m(n,i),json:n}];for(;s.length>0;){let a=s[s.length-1],f=a.json.nodes;if(f&&a.childIndex<f.length){let b=f[a.childIndex];a.childIndex+=1,s.push({childIndex:0,children:[],inputs:m(b,a.inputs),json:b});continue}s.pop();let y=v(a.json,a.inputs,f?a.children:void 0);s.length>0?s[s.length-1].children.push(y):l=y}return l}t.exports=u,u.default=u})),ks=H(((e,t)=>{var{dirname:r,relative:o,resolve:c,sep:h}=ye(),{SourceMapConsumer:d,SourceMapGenerator:g}=ye(),{pathToFileURL:p}=ye(),m=It(),v=!!(d&&g),u=!!(r&&c&&o&&h),n=class{constructor(i,l,s,a){this.stringify=i,this.mapOpts=s.map||{},this.root=l,this.opts=s,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let i;this.isInline()?i="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?i=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?i=this.mapOpts.annotation(this.opts.to,this.root):i=this.outputFile()+".map";let l=`
|
|
25
|
+
`;this.css.includes(`\r
|
|
26
|
+
`)&&(l=`\r
|
|
27
|
+
`),this.css+=l+"/*# sourceMappingURL="+i+" */"}applyPrevMaps(){for(let i of this.previous()){let l=this.toUrl(this.path(i.file)),s=i.root||r(i.file),a;this.mapOpts.sourcesContent===!1?(a=new d(i.text),a.sourcesContent&&(a.sourcesContent=null)):a=i.consumer(),this.map.applySourceMap(a,l,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let i;for(let l=this.root.nodes.length-1;l>=0;l--)i=this.root.nodes[l],i.type==="comment"&&i.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(l)}else if(this.css){let i="/*# sourceMappingURL=",l="",s=0,a;for(;(a=this.css.indexOf(i,s))!==-1;){let f=this.css.indexOf("*/",a+21);if(f===-1)break;for(;a>s&&this.css[a-1]===`
|
|
28
|
+
`;)a--;l+=this.css.slice(s,a),s=f+2}s>0&&(this.css=l+this.css.slice(s))}}}generate(){if(this.clearAnnotation(),u&&v&&this.isMap())return this.generateMap();{let i="";return this.stringify(this.root,l=>{i+=l}),[i]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let i=this.previous()[0].consumer();i.file=this.outputFile(),this.map=g.fromSourceMap(i,{ignoreInvalidMapping:!0})}else this.map=new g({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 g({file:this.outputFile(),ignoreInvalidMapping:!0});let i=1,l=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},f,y;this.stringify(this.root,(b,w,M)=>{if(this.css+=b,w&&M!=="end"&&(a.generated.line=i,a.generated.column=l-1,w.source&&w.source.start?(a.source=this.sourcePath(w),a.original.line=w.source.start.line,a.original.column=w.source.start.column-1,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,this.map.addMapping(a))),y=b.match(/\n/g),y?(i+=y.length,f=b.lastIndexOf(`
|
|
29
|
+
`),l=b.length-f):l+=b.length,w&&M!=="start"){let x=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==x.last||x.raws.semicolon)&&(w.source&&w.source.end?(a.source=this.sourcePath(w),a.original.line=w.source.end.line,a.original.column=w.source.end.column-1,a.generated.line=i,a.generated.column=l-2,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=l-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(i=>i.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let i=this.mapOpts.annotation;return typeof i<"u"&&i!==!0?!1:this.previous().length?this.previous().some(l=>l.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(i=>i.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute||i.charCodeAt(0)===60||/^\w+:\/\//.test(i))return i;let l=this.memoizedPaths.get(i);if(l)return l;let s=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=r(c(s,this.mapOpts.annotation)));let a=o(s,i);return this.memoizedPaths.set(i,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(i=>{if(i.source&&i.source.input.map){let l=i.source.input.map;this.previousMaps.includes(l)||this.previousMaps.push(l)}});else{let i=new m(this.originalCSS,this.opts);i.map&&this.previousMaps.push(i.map)}return this.previousMaps}setSourcesContent(){let i={};if(this.root)this.root.walk(l=>{if(l.source){let s=l.source.input.from;if(s&&!i[s]){i[s]=!0;let a=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(a,l.source.input.css)}}});else if(this.css){let l=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(l,this.css)}}sourcePath(i){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(i.source.input.from):this.toUrl(this.path(i.source.input.from))}toBase64(i){return Buffer?Buffer.from(i).toString("base64"):window.btoa(unescape(encodeURIComponent(i)))}toFileUrl(i){let l=this.memoizedFileURLs.get(i);if(l)return l;if(p){let s=p(i).toString();return this.memoizedFileURLs.set(i,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(i){let l=this.memoizedURLs.get(i);if(l)return l;h==="\\"&&(i=i.replace(/\\/g,"/"));let s=encodeURI(i).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(i,s),s}};t.exports=n})),Xn=H(((e,t)=>{var r=39,o=34,c=92,h=47,d=10,g=32,p=12,m=9,v=13,u=91,n=93,i=40,l=41,s=123,a=125,f=59,y=42,b=58,w=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,S=/[\da-f]/i;t.exports=function(R,I={}){let N=R.css.valueOf(),D=I.ignoreErrors,k,ae,V,O,re,F,Z,se,ee,we,be=N.length,A=0,Se=[],ie=[],le=-1;function _e(){return A}function fe(Y){throw R.error("Unclosed "+Y,A)}function z(){return ie.length===0&&A>=be}function ue(Y){if(ie.length)return ie.pop();if(A>=be)return;let te=Y?Y.ignoreUnclosed:!1;switch(k=N.charCodeAt(A),k){case d:case g:case m:case v:case p:O=A;do O+=1,k=N.charCodeAt(O);while(k===g||k===d||k===m||k===v||k===p);F=["space",N.slice(A,O)],A=O-1;break;case u:case n:case s:case a:case b:case f:case l:{let L=String.fromCharCode(k);F=[L,L,A];break}case i:if(we=Se.length?Se.pop()[1]:"",ee=N.charCodeAt(A+1),we==="url"&&ee!==r&&ee!==o&&ee!==g&&ee!==d&&ee!==m&&ee!==p&&ee!==v){O=A;do{if(Z=!1,O=N.indexOf(")",O+1),O===-1)if(D||te){O=A;break}else fe("bracket");for(se=O;N.charCodeAt(se-1)===c;)se-=1,Z=!Z}while(Z);F=["brackets",N.slice(A,O+1),A,O],A=O}else A<=le?F=["(","(",A]:(O=N.indexOf(")",A+1),ae=N.slice(A,O+1),O===-1||C.test(ae)?(le=O===-1?be:O,F=["(","(",A]):(F=["brackets",ae,A,O],A=O));break;case r:case o:re=k===r?"'":'"',O=A;do{if(Z=!1,O=N.indexOf(re,O+1),O===-1)if(D||te){O=A+1;break}else fe("string");for(se=O;N.charCodeAt(se-1)===c;)se-=1,Z=!Z}while(Z);F=["string",N.slice(A,O+1),A,O],A=O;break;case w:M.lastIndex=A+1,M.test(N),M.lastIndex===0?O=N.length-1:O=M.lastIndex-2,F=["at-word",N.slice(A,O+1),A,O],A=O;break;case c:for(O=A,V=!0;N.charCodeAt(O+1)===c;)O+=1,V=!V;if(k=N.charCodeAt(O+1),V&&k!==h&&k!==g&&k!==d&&k!==m&&k!==v&&k!==p&&(O+=1,S.test(N.charAt(O)))){for(;S.test(N.charAt(O+1));)O+=1;N.charCodeAt(O+1)===g&&(O+=1)}F=["word",N.slice(A,O+1),A,O],A=O;break;default:k===h&&N.charCodeAt(A+1)===y?(O=N.indexOf("*/",A+2)+1,O===0&&(D||te?O=N.length:fe("comment")),F=["comment",N.slice(A,O+1),A,O],A=O):(x.lastIndex=A+1,x.test(N),x.lastIndex===0?O=N.length-1:O=x.lastIndex-2,F=["word",N.slice(A,O+1),A,O],Se.push(F),A=O)}return A++,F}function U(Y){ie.push(Y)}return{back:U,endOfFile:z,nextToken:ue,position:_e}}})),Qn=H(((e,t)=>{var r=pr(),o=Nt(),c=Ot(),h=at(),d=gr(),g=Xn(),p={empty:!0,space:!0};function m(n){for(let i=n.length-1;i>=0;i--){let l=n[i],s=l[3]||l[2];if(s)return s}}function v(n,i,l){let s="";for(let a=i;a<l;a++)s+=n[a][1];return s}var u=class{constructor(n){this.input=n,this.root=new h,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 i=new r;i.name=n[1].slice(1),i.name===""&&this.unnamedAtrule(i,n),this.init(i,n[2]);let l,s,a,f=!1,y=!1,b=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),l=n[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){i.source.end=this.getPosition(n[2]),i.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){y=!0;break}else if(l==="}"){if(b.length>0){for(a=b.length-1,s=b[a];s&&s[0]==="space";)s=b[--a];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){f=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(i.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(i,"params",b),f&&(n=b[b.length-1],i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),y&&(i.nodes=[],this.current=i)}checkMissedSemicolon(n){let i=this.colon(n);if(i===!1)return;let l=0,s;for(let a=i-1;a>=0&&(s=n[a],!(s[0]!=="space"&&(l+=1,l===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(n){let i=0,l,s,a;for(let[f,y]of n.entries()){if(s=y,a=s[0],a==="("&&(i+=1),a===")"&&(i-=1),i===0&&a===":")if(!l)this.doubleColon(s);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=s}return!1}comment(n){let i=new o;this.init(i,n[2]),i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++;let l=n[1].slice(2,-2);if(!l.trim())i.text="",i.raws.left=l,i.raws.right="";else{let s=l.match(/^(\s*)([^]*\S)(\s*)$/);i.text=s[2],i.raws.left=s[1],i.raws.right=s[3]}}createTokenizer(){this.tokenizer=g(this.input)}decl(n,i){let l=new c;this.init(l,n[0][2]);let s=n[n.length-1];s[0]===";"&&(this.semicolon=!0,n.pop()),l.source.end=this.getPosition(s[3]||s[2]||m(n)),l.source.end.offset++;let a=0;for(;n[a][0]!=="word";)a===n.length-1&&this.unknownWord([n[a]]),a++;l.raws.before+=v(n,0,a),l.source.start=this.getPosition(n[a][2]);let f=a;for(;a<n.length;){let x=n[a][0];if(x===":"||x==="space"||x==="comment")break;a++}l.prop=v(n,f,a);let y=a,b;for(;a<n.length&&(b=n[a],a++,b[0]!==":");)b[0]==="word"&&/\w/.test(b[1])&&this.unknownWord([b]);l.raws.between=v(n,y,a),(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=a;for(;a<n.length;){let x=n[a][0];if(x!=="space"&&x!=="comment")break;a++}let M=n.slice(w,a);n=n.slice(a),this.precheckMissedSemicolon(n);for(let x=n.length-1;x>=0;x--){if(b=n[x],b[1].toLowerCase()==="!important"){l.important=!0;let C=this.stringFrom(n,x);C=this.spacesFromEnd(n)+C,C!==" !important"&&(l.raws.important=C);break}else if(b[1].toLowerCase()==="important"){let C=n.slice(0),S="";for(let E=x;E>0;E--){let R=C[E][0];if(S.trim().startsWith("!")&&R!=="space")break;S=C.pop()[1]+S}S.trim().startsWith("!")&&(l.important=!0,l.raws.important=S,n=C)}if(b[0]!=="space"&&b[0]!=="comment")break}n.some(x=>x[0]!=="space"&&x[0]!=="comment")&&(l.raws.between+=M.map(x=>x[1]).join(""),M=[]),this.raw(l,"value",M.concat(n),i),l.value.includes(":")&&!i&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let i=new d;this.init(i,n[2]),i.selector="",i.raws.between="",this.current=i}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 i=this.current.nodes[this.current.nodes.length-1];i&&i.type==="rule"&&!i.raws.ownSemicolon&&(i.raws.ownSemicolon=this.spaces,this.spaces="",i.source.end=this.getPosition(n[2]),i.source.end.offset++)}}getPosition(n){let i=this.input.fromOffset(n);return{column:i.col,line:i.line,offset:n}}init(n,i){this.current.push(n),n.source={input:this.input,start:this.getPosition(i)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let i=!1,l=null,s=!1,a=null,f=[],y=n[1].startsWith("--"),b=[],w=n;for(;w;){if(l=w[0],b.push(w),l==="("||l==="[")a||(a=w),f.push(l==="("?")":"]");else if(y&&s&&l==="{")a||(a=w),f.push("}");else if(f.length===0)if(l===";")if(s){this.decl(b,y);return}else break;else if(l==="{"){this.rule(b);return}else if(l==="}"){this.tokenizer.back(b.pop()),i=!0;break}else l===":"&&(s=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(a=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),f.length>0&&this.unclosedBracket(a),i&&s){if(!y)for(;b.length&&(w=b[b.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,y)}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)}this.endFile()}precheckMissedSemicolon(){}raw(n,i,l,s){let a,f,y=l.length,b="",w="",M=!0,x,C;for(let S=0;S<y;S+=1)a=l[S],f=a[0],f==="space"&&S===y-1&&!s?M=!1:f==="comment"?(C=l[S-1]?l[S-1][0]:"empty",x=l[S+1]?l[S+1][0]:"empty",!p[C]&&!p[x]?w===","?M=!1:(b+=a[1],w=a[1].slice(-1)):M=!1):(b+=a[1],w=a[1].slice(-1));if(!M){let S=l.reduce((E,R)=>E+R[1],"");n.raws[i]={raw:S,value:b}}n[i]=b}rule(n){n.pop();let i=new d;this.init(i,n[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(i,"selector",n),this.current=i}spacesAndCommentsFromEnd(n){let i,l="";for(;n.length&&(i=n[n.length-1][0],!(i!=="space"&&i!=="comment"));)l=n.pop()[1]+l;return l}spacesAndCommentsFromStart(n){let i,l="";for(;n.length&&(i=n[0][0],!(i!=="space"&&i!=="comment"));)l+=n.shift()[1];return l}spacesFromEnd(n){let i,l="";for(;n.length&&(i=n[n.length-1][0],i==="space");)l=n.pop()[1]+l;return l}stringFrom(n,i){let l="";for(let s=i;s<n.length;s++)l+=n[s][1];return n.splice(i,n.length-i),l}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 "+n[0][1],{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})}};t.exports=u})),yr=H(((e,t)=>{var r=Ae(),o=It(),c=Qn();function h(d,g){let p=new c(new o(d,g));try{p.parse()}catch(m){throw m}return p.root}t.exports=h,h.default=h,r.registerParse(h)})),Ls=H(((e,t)=>{var r=Ae(),{my:o}=Mt(),c=class{constructor(h,d={}){if(this.type="warning",this.text=h,d.node&&d.node.source){d.node[o]||r.rebuild(d.node);let g=d.node.rangeBy(d);this.line=g.start.line,this.column=g.start.column,this.endLine=g.end.line,this.endColumn=g.end.column}for(let g in d)this[g]=d[g]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,start:this.start,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};t.exports=c,c.default=c})),vr=H(((e,t)=>{var r=Ls(),o=class{get content(){return this.css}constructor(c,h,d){this.processor=c,this.messages=[],this.root=h,this.opts=d,this.css="",this.map=void 0}toString(){return this.css}warn(c,h={}){h.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(h.plugin=this.lastPlugin.postcssPlugin);let d=new r(c,h);return this.messages.push(d),d}warnings(){return this.messages.filter(c=>c.type==="warning")}};t.exports=o,o.default=o})),Ps=H(((e,t)=>{var r={};t.exports=function(c){r[c]||(r[c]=!0,typeof console<"u"&&console.warn&&console.warn(c))}})),Fs=H(((e,t)=>{var r=Ae(),o=mr(),c=ks(),h=yr(),d=vr(),g=at(),p=Et(),{isClean:m,my:v}=Mt(),u=Ps(),n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},i={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},l={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function a(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let C=!1,S=n[x.type];return x.type==="decl"?C=x.prop.toLowerCase():x.type==="atrule"&&(C=x.name.toLowerCase()),C&&x.append?[S,S+"-"+C,s,S+"Exit",S+"Exit-"+C]:C?[S,S+"-"+C,S+"Exit",S+"Exit-"+C]:x.append?[S,s,S+"Exit"]:[S,S+"Exit"]}function y(x){let C;return x.type==="document"?C=["Document",s,"DocumentExit"]:x.type==="root"?C=["Root",s,"RootExit"]:C=f(x),{eventIndex:0,events:C,iterator:0,node:x,visitorIndex:0,visitors:[]}}function b(x){let C=[x];for(;C.length>0;){let S=C.pop();if(S[m]=!1,S.nodes)for(let E of S.nodes)C.push(E)}return x}var w={},M=class Us{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"}constructor(C,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 Us||S instanceof d)R=b(S.root),S.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=h;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[v]&&r.rebuild(R)}this.result=new d(C,R,E),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...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(C){return this.async().catch(C)}finally(C){return this.async().finally(C)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(C,S){let E=this.result.lastPlugin;try{S&&S.addToError(C),this.error=C,C.name==="CssSyntaxError"&&!C.plugin?(C.plugin=E.postcssPlugin,C.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return C}prepareVisitors(){this.listeners={};let C=(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(!i[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?C(S,E,S[E][R]):C(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&C(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let C=0;C<this.plugins.length;C++){let S=this.plugins[C],E=this.runOnRoot(S);if(a(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[m];){C[m]=!0;let S=[y(C)];for(;S.length>0;){let E=this.visitTick(S);if(a(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(C.type==="document"){let R=C.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(C,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(C){this.result.lastPlugin=C;try{if(typeof C=="object"&&C.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>C.Once(E,this.helpers));return a(S[0])?Promise.all(S):S}return C.Once(this.result.root,this.helpers)}else if(typeof C=="function")return C(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 C=this.result.opts,S=p;C.syntax&&(S=C.syntax.stringify),C.stringifier&&(S=C.stringifier),S.stringify&&(S=S.stringify);let E=this.result.root.source;if(C.map===void 0&&!(E&&E.input&&E.input.map)){let I="";return S(this.result.root,N=>{I+=N}),this.result.css=I,this.result}let R=new c(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 C of this.plugins)if(a(this.runOnRoot(C)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[m];)C[m]=!0,this.walkSync(C);if(this.listeners.OnceExit)if(C.type==="document")for(let S of C.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,C)}return this.result}then(C,S){return this.async().then(C,S)}toString(){return this.css}visitSync(C,S){for(let[E,R]of C){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(a(I))throw this.getAsyncError()}}visitTick(C){let S=C[C.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){C.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,D]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return D(E.toProxy(),this.helpers)}catch(k){throw this.handleError(k,E)}}if(S.iterator!==0){let N=S.iterator;S.descending&&(S.descending=!1,E.indexes[N]+=1);let D;for(;D=E.nodes[E.indexes[N]];){if(!D[m]){D[m]=!0,S.descending=!0,C.push(y(D));return}E.indexes[N]+=1}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===s){E.nodes&&E.nodes.length&&(E[m]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}C.pop()}walkSync(C){C[m]=!0;let S=[{eventIndex:0,events:f(C),iterator:0,node:C}];for(;S.length>0;){let E=S[S.length-1],R=E.node;if(E.iterator!==0){let I=E.iterator;E.descending&&(E.descending=!1,R.indexes[I]+=1);let N,D=!1;for(;N=R.nodes[R.indexes[I]];){if(!N[m]){N[m]=!0,E.descending=!0,S.push({eventIndex:0,events:f(N),iterator:0,node:N}),D=!0;break}R.indexes[I]+=1}if(D)continue;E.iterator=0,delete R.indexes[I]}if(E.eventIndex<E.events.length){let I=E.events[E.eventIndex];if(E.eventIndex+=1,I===s)R.nodes&&R.nodes.length&&(E.iterator=R.getIterator());else{let N=this.listeners[I];N&&this.visitSync(N,R.toProxy())&&S.pop()}continue}S.pop()}}warnings(){return this.sync().warnings()}};M.registerPostcss=x=>{w=x},t.exports=M,M.default=M,g.registerLazyResult(M),o.registerLazyResult(M)})),Zn=H(((e,t)=>{var r=ks(),o=yr(),c=vr(),h=Et(),d=Ps(),g=class{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 p,m=o;try{p=m(this._css,this._opts)}catch(v){this.error=v}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(p,m,v){m=m.toString(),this.stringified=!1,this._processor=p,this._css=m,this._opts=v,this._map=void 0;let u=h;this.result=new c(this._processor,void 0,this._opts),this.result.css=m;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let i=new r(u,void 0,this._opts,m);if(i.isMap()){let[l,s]=i.generate();l&&(this.result.css=l),s&&(this.result.map=s)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().finally(p)}sync(){if(this.error)throw this.error;return this.result}then(p,m){return this.async().then(p,m)}toString(){return this._css}warnings(){return[]}};t.exports=g,g.default=g})),Kn=H(((e,t)=>{var r=mr(),o=Fs(),c=Zn(),h=at(),d=class{constructor(g=[]){this.version="8.5.32",this.plugins=this.normalize(g)}normalize(g){let p=[];for(let m of g)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))p=p.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)p.push(m);else if(typeof m=="function")p.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return p}process(g,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new c(this,g,p):new o(this,g,p)}use(g){return this.plugins=this.plugins.concat(this.normalize([g])),this}};t.exports=d,d.default=d,h.registerProcessor(d),r.registerProcessor(d)})),X=Hi(H(((e,t)=>{var r=pr(),o=Nt(),c=Ae(),h=dr(),d=Ot(),g=mr(),p=Jn(),m=It(),v=Fs(),u=_s(),n=Rt(),i=yr(),l=Kn(),s=vr(),a=at(),f=gr(),y=Et(),b=Ls();function w(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new l(M)}w.plugin=function(x,C){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
30
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
31
|
+
https://www.w3ctech.com/topic/2226`));let N=C(...I);return N.postcssPlugin=x,N.postcssVersion=new l().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,D){return w([E(D)]).process(I,N)},E},w.stringify=y,w.parse=i,w.fromJSON=p,w.list=u,w.comment=M=>new o(M),w.atRule=M=>new r(M),w.decl=M=>new d(M),w.rule=M=>new f(M),w.root=M=>new a(M),w.document=M=>new g(M),w.CssSyntaxError=h,w.Declaration=d,w.Container=c,w.Processor=l,w.Document=g,w.Comment=o,w.Warning=b,w.AtRule=r,w.Result=s,w.Input=m,w.Rule=f,w.Root=a,w.Node=n,v.registerPostcss(w),t.exports=w,w.default=w}))(),1),eo=X.default;X.default.stringify;X.default.fromJSON;X.default.plugin;X.default.parse;X.default.list;X.default.document;X.default.comment;X.default.atRule;X.default.rule;X.default.decl;X.default.root;X.default.CssSyntaxError;X.default.Declaration;X.default.Container;X.default.Processor;X.default.Document;X.default.Comment;X.default.Warning;X.default.AtRule;X.default.Result;X.default.Input;X.default.Rule;X.default.Root;X.default.Node;var Ur={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 to(e){let t=Ur[e.tagName]?Ur[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function At(e,t){let r=t?.stylesWithHoverClass.get(e);if(r)return r;let o=e;try{o=eo([Gn,Hn]).process(e).css}catch(c){console.warn("Failed to adapt css for replay",c)}return t?.stylesWithHoverClass.set(e,o),o}function Br(){return{stylesWithHoverClass:new Map}}var ro="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",Wr="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Bs=new WeakSet;function so(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;let t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function io(e){if(e.UNSAFE_allowUnprotectedRebuild)return;let t=e.doc.defaultView;if(t&&!(Bs.has(e.doc)&&so(t.frameElement)))throw new Error(ro)}function no(e,t,r,o){let c=[];for(let m of e.childNodes)m.type===B.Text&&c.push(m);let h=t.split("/* rr_split */");for(;h.length>1&&h.length>c.length;)h.splice(-2,2,h.slice(-2).join(""));let d="";r&&(d=At(h.join(""),o));let g=0,p=-1;for(let m=0;m<c.length&&m!==h.length;m++){let v=c[m],u=h[m],n=m<h.length-1?h[m+1]:null;if(r&&n){let i=g,l=n.length;l=Math.min(l,30);let s=!1;for(;l>2;l--){let a=n.substring(0,l),f=d.substring(g).indexOf(a);if(s=f!==-1,s){i+=f;break}}s||(i+=u.length),u=d.substring(g,i),g=i}else r&&(u=d.substring(g));p!==-1&&(u=u.substring(p)),n&&(p!==-1||u.endsWith("0p")&&n.startsWith("x"))&&(p=n.indexOf("}"),p!==-1&&(p+=1,u+=n.substring(0,p))),v.textContent=u}}function oo(e,t,r,o){let{doc:c,hackCss:h,cache:d}=o;e.childNodes.length?no(e,r,h,d):(h&&(r=At(r,d)),t.appendChild(c.createTextNode(r)))}function ao(e,t){let{doc:r,hackCss:o,cache:c}=t;switch(e.type){case B.Document:return r.implementation.createDocument(null,"",null);case B.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case B.Element:{let h=to(e),d;e.isSVG?d=r.createElementNS("http://www.w3.org/2000/svg",h):(e.isCustom&&r.defaultView?.customElements&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,class extends r.defaultView.HTMLElement{}),d=r.createElement(h));let g={};for(let p in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,p))continue;let m=e.attributes[p];if(!(h==="option"&&p==="selected"&&m===!1)&&m!==null){if(m===!0&&(m=""),p.startsWith("rr_")){g[p]=m;continue}if(typeof m=="string"){if(h==="style"&&p==="_cssText"){oo(e,d,m,t);continue}else if(h==="textarea"&&p==="value"){d.appendChild(r.createTextNode(m)),e.childNodes=[];continue}}try{if(e.isSVG&&p==="xlink:href")d.setAttributeNS("http://www.w3.org/1999/xlink",p,m.toString());else if(p==="onload"||p==="onclick"||p.substring(0,7)==="onmouse")d.setAttribute("_"+p,m.toString());else if(h==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&p==="content"){d.setAttribute("csp-content",m.toString());continue}else h==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||h==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fr(e.attributes.href)==="js"||(h==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?d.setAttribute("rrweb-original-srcset",e.attributes.srcset):d.setAttribute(p,m.toString()))}catch{}}}for(let p in g){let m=g[p];if(h==="canvas"&&p==="rr_dataURL"){let v=r.createElement("img");v.onload=()=>{let u=d.getContext("2d");u&&u.drawImage(v,0,0,v.width,v.height)},v.src=m.toString(),d.RRNodeType&&(d.rr_dataURL=m.toString())}else if(h==="img"&&p==="rr_dataURL"){let v=d;v.currentSrc.startsWith("data:")||(v.setAttribute("rrweb-original-src",e.attributes.src),v.src=m.toString())}if(p==="rr_width")d.style.setProperty("width",m.toString());else if(p==="rr_height")d.style.setProperty("height",m.toString());else if(p==="rr_mediaCurrentTime"&&typeof m=="number")d.currentTime=m;else if(p==="rr_mediaState")switch(m){case"played":d.play().catch(v=>console.warn("media playback error",v));break;case"paused":d.pause()}else p==="rr_mediaPlaybackRate"&&typeof m=="number"?d.playbackRate=m:p==="rr_mediaMuted"&&typeof m=="boolean"?d.muted=m:p==="rr_mediaLoop"&&typeof m=="boolean"?d.loop=m:p==="rr_mediaVolume"&&typeof m=="number"?d.volume=m:p==="rr_open_mode"&&d.setAttribute("rr_open_mode",m)}if(e.isShadowHost)if(!d.shadowRoot)d.attachShadow({mode:"open"});else for(;d.shadowRoot.firstChild;)d.shadowRoot.removeChild(d.shadowRoot.firstChild);return(h==="input"||h==="textarea")&&d.setAttribute("autocomplete","off"),d}case B.Text:return e.isStyle&&o?r.createTextNode(At(e.textContent,c)):r.createTextNode(e.textContent);case B.CDATA:return r.createCDATASection(e.textContent);case B.Comment:return r.createComment(e.textContent);default:return null}}function tt(e,t){let{doc:r,mirror:o,skipChild:c=!1,hackCss:h=!0,afterAppend:d,cache:g}=t;if(o.has(e.id)){let m=o.getNode(e.id);if(wn(o.getMeta(m),e))return o.getNode(e.id)}let p=ao(e,{doc:r,hackCss:h,cache:g});if(!p)return null;if(e.rootId&&o.getNode(e.rootId)!==r&&o.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" "">')),p=r),o.add(p,e),(e.type===B.Document||e.type===B.Element)&&!c)for(let m of e.childNodes){let v=tt(m,{doc:r,mirror:o,skipChild:!1,hackCss:h,afterAppend:d,cache:g});if(!v){console.warn("Failed to rebuild",m);continue}if(m.isShadow&&ur(p)&&p.shadowRoot)p.shadowRoot.appendChild(v);else if(e.type===B.Document&&m.type==B.Element){let u=v,n=null;u.childNodes.forEach(i=>{i.nodeName==="BODY"&&(n=i)}),n?(u.removeChild(n),p.appendChild(v),u.appendChild(n)):p.appendChild(v)}else p.appendChild(v);d&&d(v,m.id)}return p}function lo(e,t){function r(o){t(o)}for(let o of e.getIds())e.has(o)&&r(e.getNode(o))}function uo(e,t){let r=t.getMeta(e);if(r?.type!==B.Element)return;let o=e;for(let c in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,c)&&c.startsWith("rr_")))continue;let h=r.attributes[c];c==="rr_scrollLeft"&&(o.scrollLeft=h),c==="rr_scrollTop"&&(o.scrollTop=h)}}function co(e,t){io(t);let{doc:r,onVisit:o,hackCss:c=!0,afterAppend:h,cache:d,mirror:g=new cr}=t,p=tt(e,{doc:r,mirror:g,skipChild:!1,hackCss:c,afterAppend:h,cache:d});return lo(g,m=>{o&&o(m),uo(m,g)}),p}function fo(e){if(!e.root.isConnected)throw new Error(Wr);let t=e.root.ownerDocument.createElement("iframe");for(let[o,c]of Object.entries(e.iframeAttributes||{}))o!=="sandbox"&&t.setAttribute(o,c);t.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(t);let r=t.contentDocument;if(!r||!t.contentWindow)throw t.parentNode?.removeChild(t),new Error(Wr);return Bs.add(r),t}var ho=Object.create,Ws=Object.defineProperty,po=Object.getOwnPropertyDescriptor,mo=Object.getOwnPropertyNames,go=Object.getPrototypeOf,$s=Object.prototype.hasOwnProperty,q=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),yo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var c=mo(t),h=0,d=c.length,g;h<d;h++)g=c[h],!$s.call(e,g)&&g!==r&&Ws(e,g,{get:(p=>t[p]).bind(null,g),enumerable:!(o=po(t,g))||o.enumerable});return e},vo=(e,t,r)=>(r=e!=null?ho(go(e)):{},yo(t||!e||!e.__esModule||!$s.call(e,"default")?Ws(r,"default",{value:e,enumerable:!0}):r,e)),$r={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},zr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Je={},Kt={},jr=0;function wo(e){let t=globalThis?.Zone?.__symbol__?.(e);if(t&&globalThis[t])return globalThis[t]}function wr(e){if(Je[e])return Je[e];let t=wo(e)||globalThis[e],r=t.prototype,o=e in $r?$r[e]:void 0,c=!!(o&&o.every(g=>!!Object.getOwnPropertyDescriptor(r,g)?.get?.toString().includes("[native code]"))),h=e in zr?zr[e]:void 0,d=!!(h&&h.every(g=>typeof r[g]=="function"&&r[g]?.toString().includes("[native code]")));if(c&&d)return Je[e]=t.prototype,t.prototype;try{let g=document.createElement("iframe");g.style.display="none",document.body.appendChild(g);let p=g.contentWindow;if(!p)return t.prototype;let m=p[e].prototype;if(!m)return g.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(g.classList.add("rr-block"),g.setAttribute("__rrwebUntaintedMutationObserver",""),Kt[e]=()=>g.remove()):g.remove(),Je[e]=m}catch{return r}}var Vr={};function de(e,t,r){let o=Vr[e]?.[r];if(o)return o.call(t);let c=wr(e),h=Object.getOwnPropertyDescriptor(c,r)?.get;return h?((Vr[e]||={})[r]=h,h.call(t)):t[r]}var jt={};function zs(e,t,r){let o=`${e}.${String(r)}`;if(jt[o])return jt[o].bind(t);let c=wr(e)[r];return typeof c!="function"?t[r]:(jt[o]=c,c.bind(t))}function bo(e){return de("Node",e,"ownerDocument")}function So(e){return de("Node",e,"childNodes")}function Co(e){return de("Node",e,"parentNode")}function xo(e){return de("Node",e,"parentElement")}function Eo(e){return de("Node",e,"textContent")}function Mo(e){return de("Node",e,"firstChild")}function Ro(e){return de("Node",e,"lastChild")}function No(e){return de("Node",e,"nextSibling")}function Oo(e){return de("Node",e,"previousSibling")}function Io(e,t){return zs("Node",e,"contains")(t)}function Ao(e){return zs("Node",e,"getRootNode")()}function Do(e){return!e||!("host"in e)?null:de("ShadowRoot",e,"host")}function To(e){return e.styleSheets}function _o(e){return!e||!("shadowRoot"in e)?null:de("Element",e,"shadowRoot")}function ko(e,t){return de("Element",e,"querySelector")(t)}function Lo(e,t){return de("Element",e,"querySelectorAll")(t)}function Po(){let e=wr("MutationObserver");jr++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--jr!==0))return;let r=Kt.MutationObserver;if(r)try{r()}finally{delete Je.MutationObserver,delete Kt.MutationObserver}}]}var js=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(js=()=>new Date().getTime());function Fo(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],c=r(o);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=c,()=>{e[t]=o}}catch{return()=>{}}}var Uo={ownerDocument:bo,childNodes:So,parentNode:Co,parentElement:xo,textContent:Eo,firstChild:Mo,lastChild:Ro,nextSibling:No,previousSibling:Oo,contains:Io,getRootNode:Ao,host:Do,styleSheets:To,shadowRoot:_o,querySelector:ko,querySelectorAll:Lo,nowTimestamp:js,mutationObserverCtor:Po,patch:Fo},Bo=class{idNodeMap=new Map;nodeMetaMap=new WeakMap;getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(o=>this.removeNodeFromMap(o));let r=Uo.shadowRoot(e);r&&this.removeNodeFromMap(r)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Wo(){return new Bo}var Vs="(?:/\\*[^*]*\\*/)|[\\s;]";new RegExp(`${Vs}|\\b(0)px?`,"g");new RegExp(Vs,"g");new RegExp(/(max|min)-device-(width|height)/.source,"g");var $o=q(((e,t)=>{var r=String,o=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};t.exports=o(),t.exports.createColors=o})),ve=q(((e,t)=>{t.exports={}})),br=q(((e,t)=>{var r=$o(),o=ve(),c=class Gs extends Error{constructor(d,g,p,m,v,u){super(d),this.name="CssSyntaxError",this.reason=d,v&&(this.file=v),m&&(this.source=m),u&&(this.plugin=u),typeof g<"u"&&typeof p<"u"&&(typeof g=="number"?(this.line=g,this.column=p):(this.line=g.line,this.column=g.column,this.endLine=p.line,this.endColumn=p.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Gs)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(d){if(!this.source)return"";let g=this.source;d==null&&(d=r.isColorSupported);let p=s=>s,m=s=>s,v=s=>s;if(d){let{bold:s,gray:a,red:f}=r.createColors(!0);m=y=>s(f(y)),p=y=>a(y),o&&(v=y=>o(y))}let u=g.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,u.length),l=String(i).length;return u.slice(n,i).map((s,a)=>{let f=n+1+a,y=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(s.length>160){let w=20,M=Math.max(0,this.column-w),x=Math.max(this.column+w,this.endColumn+w),C=s.slice(M,x),S=p(y.replace(/\d/g," "))+s.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return m(">")+p(y)+v(C)+`
|
|
32
|
+
`+S+m("^")}let b=p(y.replace(/\d/g," "))+s.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+p(y)+v(s)+`
|
|
33
|
+
`+b+m("^")}return" "+p(y)+v(s)}).join(`
|
|
34
|
+
`)}toString(){let d=this.showSourceCode();return d&&(d=`
|
|
35
|
+
|
|
36
|
+
`+d+`
|
|
37
|
+
`),this.name+": "+this.message+d}};t.exports=c,c.default=c})),Hs=q(((e,t)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/,o={after:`
|
|
38
|
+
`,beforeClose:`
|
|
39
|
+
`,beforeComment:`
|
|
40
|
+
`,beforeDecl:`
|
|
41
|
+
`,beforeOpen:" ",beforeRule:`
|
|
42
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function c(v){return v[0].toUpperCase()+v.slice(1)}function h(v,u){let n="@"+u.name,i=u.params?v.rawValue(u,"params"):"",l=u.raws.afterName;return typeof l>"u"?l=i?" ":"":l===""&&i&&!r.test(i[0])&&(l=" "),n+l+i}function d(v){if(!v.prop.startsWith("--"))return!1;let u=v.raws.before;return typeof u>"u"||!/[^\s;]$/.test(u)}function g(v,u,n){let i=n.nodes,l=i.length-1;for(;l>0&&i[l].type==="comment";)l-=1;let s=v.raw(n,"semicolon"),a=n.type==="document";for(let f=i.length-1;f>=0;f--){let y=i[f],b=l!==f||s;!b&&f<i.length-1&&(y.type==="atrule"&&!y.nodes||y.type==="decl"&&d(y))&&(b=!0),u.push({document:a,node:y,semicolon:b})}}function p(v,u,n,i){let l=v.raw(n,"between","beforeOpen");v.builder(i+l+"{",n,"start");let s=n.nodes&&n.nodes.length,a=()=>{let f=s?v.raw(n,"after"):v.raw(n,"after","emptyBody");f&&v.builder(f),v.builder("}",n,"end"),n.type==="rule"&&n.raws.ownSemicolon&&v.builder(n.raws.ownSemicolon,n,"end")};s?(u.push(a),g(v,u,n)):a()}var m=class qs{constructor(u){this.builder=u}atrule(u,n){let i=h(this,u);if(u.nodes)this.block(u,i);else{let l=(u.raws.between||"")+(n?";":"");this.builder(i+l,u)}}beforeAfter(u,n){let i;u.type==="decl"?i=this.raw(u,null,"beforeDecl"):u.type==="comment"?i=this.raw(u,null,"beforeComment"):n==="before"?i=this.raw(u,null,"beforeRule"):i=this.raw(u,null,"beforeClose");let l=u.parent,s=0;for(;l&&l.type!=="root";)s+=1,l=l.parent;if(i.includes(`
|
|
43
|
+
`)){let a=this.raw(u,null,"indent");if(a.length)for(let f=0;f<s;f++)i+=a}return i}block(u,n){let i=this.raw(u,"between","beforeOpen");this.builder(n+i+"{",u,"start");let l;u.nodes&&u.nodes.length?(this.body(u),l=this.raw(u,"after")):l=this.raw(u,"after","emptyBody"),l&&this.builder(l),this.builder("}",u,"end")}body(u){let n=qs.prototype,i=["atrule","block","body","rule","stringify"].every(s=>this[s]===n[s]),l=[];for(g(this,l,u);l.length>0;){let s=l.pop();if(typeof s=="function"){s();continue}let a=s.node,f=this.raw(a,"before");f&&this.builder(f),i&&a.type==="rule"?p(this,l,a,this.rawValue(a,"selector")):i&&a.type==="atrule"&&a.nodes?p(this,l,a,h(this,a)):this.stringify(a,s.semicolon)}}comment(u){let n=this.raw(u,"left","commentLeft"),i=this.raw(u,"right","commentRight");this.builder("/*"+n+u.text+i+"*/",u)}decl(u,n){let i=u.raws,l=this.raw(u,"between","colon"),s=u.prop+l+this.rawValue(u,"value");u.important&&(s+=i.important||" !important"),n&&(s+=";"),this.builder(s,u)}document(u){this.body(u)}raw(u,n,i){let l;if(i||(i=n),n&&(l=u.raws[n],typeof l<"u"))return l;let s=u.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===u||s&&s.type==="document"))return"";if(!s)return o[i];let a=u.root(),f=a.rawCache||(a.rawCache={});if(typeof f[i]<"u")return f[i];if(i==="before"||i==="after")return this.beforeAfter(u,i);{let y="raw"+c(i);this[y]?l=this[y](a,u):a.walk(b=>{if(l=b.raws[n],typeof l<"u")return!1})}return typeof l>"u"&&(l=o[i]),f[i]=l,l}rawBeforeClose(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return n=i.raws.after,n.includes(`
|
|
44
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(u,n){let i;return u.walkComments(l=>{if(typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
|
|
45
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(u,n){let i;return u.walkDecls(l=>{if(typeof l.raws.before<"u")return i=l.raws.before,i.includes(`
|
|
46
|
+
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(n,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(u){let n;return u.walk(i=>{if(i.type!=="decl"&&(n=i.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(u){let n;return u.walk(i=>{if(i.nodes&&(i.parent!==u||u.first!==i)&&typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
|
|
47
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(u){let n;return u.walkDecls(i=>{if(typeof i.raws.between<"u")return n=i.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length===0&&(n=i.raws.after,typeof n<"u"))return!1}),n}rawIndent(u){if(u.raws.indent)return u.raws.indent;let n;return u.walk(i=>{let l=i.parent;if(l&&l!==u&&l.parent&&l.parent===u&&typeof i.raws.before<"u"){let s=i.raws.before.split(`
|
|
48
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(u){let n;return u.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(n=i.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(u,n){let i=u[n],l=u.raws[n];return l&&l.value===i?l.raw:i}root(u){!(u.parent&&u.parent.type==="document")&&u.source&&u.source.input.hasBOM&&this.builder("\uFEFF",u,"start"),this.body(u),u.raws.after&&this.builder(u.raws.after)}rule(u){this.block(u,this.rawValue(u,"selector")),u.raws.ownSemicolon&&this.builder(u.raws.ownSemicolon,u,"end")}stringify(u,n){if(!this[u.type])throw new Error("Unknown AST node type "+u.type+". Maybe you need to change PostCSS stringifier.");this[u.type](u,n)}};t.exports=m,m.default=m})),Dt=q(((e,t)=>{var r=Hs(),o=/(<)(\/?style\b)/gi,c=/(<)(!--)/g;function h(m){return m.includes("<")?m.replace(o,"\\3c $2").replace(c,"\\3c $2"):m}function d(m,v,u){let n=[],i=0,l=0;for(let s=0;s<m.length;s+=3){let a=l,f=i+m[s].length;for(;i<f;)v[i]===u[l]?(i+=1,l+=1):(i+=1,l+=4);n.push(u.slice(a,l))}return n}var g=class extends r{escapeHTML(m){let v=this.builder,u,n;if(this.builder=(l,s,a)=>{u?(n+=l,u.push(l,s,a)):l.includes("<")?(n=l,u=[l,s,a]):v(l,s,a)},m(),this.builder=v,!u)return;let i=h(n);if(i===n)for(let l=0;l<u.length;l+=3)v(u[l],u[l+1],u[l+2]);else{let l=d(u,n,i);for(let s=0;s<u.length;s+=3)v(l[s/3],u[s+1],u[s+2])}}root(m){m.parent&&m.parent.type==="document"?(this.escapeHTML(()=>this.body(m)),m.raws.after&&this.builder(m.raws.after)):this.escapeHTML(()=>super.root(m))}};function p(m,v){let u=new g(v);m.type==="root"||m.type==="document"?u.stringify(m):u.escapeHTML(()=>u.stringify(m))}t.exports=p,p.default=p})),Tt=q(((e,t)=>{t.exports.isClean=Symbol("isClean"),t.exports.my=Symbol("my")})),_t=q(((e,t)=>{var r=br(),o=Hs(),c=Dt(),{isClean:h,my:d}=Tt();function g(v,u){let n=new v.constructor,i=[[v,n,u]];for(;i.length>0;){let[l,s,a]=i.pop();for(let f in l){if(!Object.prototype.hasOwnProperty.call(l,f)||f==="proxyCache")continue;let y=l[f],b=typeof y;if(f==="parent"&&b==="object")a&&(s[f]=a);else if(f==="source")s[f]=y;else if(Array.isArray(y)){let w=[];s[f]=w;for(let M of y){let x=new M.constructor;w.push(x),i.push([M,x,s])}}else{if(b==="object"&&y!==null){let w=new y.constructor;i.push([y,w,void 0]),y=w}s[f]=y}}}return n}function p(v,u){if(u&&typeof u.offset<"u")return u.offset;let n=1,i=1,l=0;for(let s=0;s<v.length;s++){if(i===u.line&&n===u.column){l=s;break}v[s]===`
|
|
49
|
+
`?(n=1,i+=1):n+=1}return l}var m=class er{get proxyOf(){return this}constructor(u={}){this.raws={},this[h]=!1,this[d]=!0;for(let n of Object.keys(u))if(n!=="__proto__")if(n==="nodes"){this.nodes=[];for(let i of u[n])typeof i.clone=="function"&&i.parent?this.append(i.clone()):this.append(i)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=g(this);for(let i in u)n[i]=u[i];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:i,start:l}=this.rangeBy(n);return this.source.input.error(u,{column:l.column,line:l.line},{column:i.column,line:i.line},n)}return new r(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,i){return u[n]===i||(u[n]=i,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[h]=!0}markDirty(){if(this[h]){this[h]=!1;let u=this;for(;u=u.parent;)u[h]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:p(n,this.source.start)};if(u.index)i=this.positionInside(u.index);else if(u.word){let l=n.slice(p(n,this.source.start),this.rangeBy().end.offset).indexOf(u.word);l!==-1&&(i=this.positionInside(l))}return i}positionInside(u){let n=this.source.start.column,i=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,s=p(l,this.source.start),a=s+u;for(let f=s;f<a;f++)l[f]===`
|
|
50
|
+
`?(n=1,i+=1):n+=1;return{column:n,line:i,offset:a}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u={}){let n="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:p(n,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:p(n,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(u.word){let s=n.slice(p(n,this.source.start),l.offset).indexOf(u.word);s!==-1&&(i=this.positionInside(s),l=this.positionInside(s+u.word.length))}else u.start?i={column:u.start.column,line:u.start.line,offset:p(n,u.start)}:typeof u.index=="number"&&(i=this.positionInside(u.index)),u.end?l={column:u.end.column,line:u.end.line,offset:p(n,u.end)}:typeof u.endIndex=="number"?l=this.positionInside(u.endIndex):typeof u.index=="number"&&(l=this.positionInside(u.index+1));return(l.line<i.line||l.line===i.line&&l.column<=i.column)&&(l={column:i.column+1,line:i.line,offset:i.offset+1}),{end:l,start:i}}raw(u,n){return new o().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,i=!1;for(let l of u)l===this?i=!0:i?(this.parent.insertAfter(n,l),n=l):this.parent.insertBefore(n,l);i||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let i=n==null;n=n||new Map;let l=[],s=[[this,l,0]];for(let f=0;f<s.length;f++){let[y,b,w]=s[f],M={};b[w]=M;for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x)||x==="parent"||x==="proxyCache")continue;let C=y[x];if(Array.isArray(C)){let S=[];M[x]=S;for(let E=0;E<C.length;E++){let R=C[E];typeof R=="object"&&R.toJSON?R.toJSON===er.prototype.toJSON?s.push([R,S,E]):S[E]=R.toJSON(null,n):S[E]=R}}else if(typeof C=="object"&&C.toJSON)C.toJSON===er.prototype.toJSON?s.push([C,M,x]):M[x]=C.toJSON(null,n);else if(x==="source"){if(C==null)continue;let S=n.get(C.input);S==null&&(S=n.size,n.set(C.input,S)),M[x]={end:C.end,inputId:S,start:C.start}}else M[x]=C}}let a=l[0];return i&&(a.inputs=[...n.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=c){u.stringify&&(u=u.stringify);let n="";return u(this,i=>{n+=i}),n}warn(u,n,i={}){let l={node:this};for(let s in i)l[s]=i[s];return u.warn(n,l)}};t.exports=m,m.default=m})),kt=q(((e,t)=>{var r=_t(),o=class extends r{constructor(c){super(c),this.type="comment"}};t.exports=o,o.default=o})),Lt=q(((e,t)=>{var r=_t(),o=class extends r{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(c){c&&typeof c.value<"u"&&typeof c.value!="string"&&(c={...c,value:String(c.value)}),super(c),this.type="decl"}};t.exports=o,o.default=o})),De=q(((e,t)=>{var r=kt(),o=Lt(),c=_t(),{isClean:h,my:d}=Tt(),g,p,m,v;function u(l){let s=l.slice();for(;s.length>0;){let a=s.pop();if(delete a.source,a.nodes){a.nodes=a.nodes.slice();for(let f of a.nodes)s.push(f)}}return l.slice()}function n(l){let s=[l];for(;s.length>0;){let a=s.pop();if(a[h]=!1,a.proxyOf.nodes)for(let f of a.proxyOf.nodes)s.push(f)}}var i=class tr extends c{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]}append(...s){for(let a of s){let f=this.normalize(a,this.last);for(let y of f)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(s){let a=[this];for(;a.length>0;){let f=a.pop();if(f!==this&&f.cleanRaws!==tr.prototype.cleanRaws){f.cleanRaws(s);continue}if(c.prototype.cleanRaws.call(f,s),f.nodes)for(let y of f.nodes)a.push(y)}}each(s){if(!this.proxyOf.nodes)return;let a=this.getIterator(),f,y;for(;this.indexes[a]<this.proxyOf.nodes.length&&(f=this.indexes[a],y=s(this.proxyOf.nodes[f],f),y!==!1);)this.indexes[a]+=1;return delete this.indexes[a],y}every(s){return this.nodes.every(s)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach;return this.indexes[s]=0,s}getProxyProcessor(){return{get(s,a){return a==="proxyOf"?s:s[a]?a==="each"||typeof a=="string"&&a.startsWith("walk")?(...f)=>s[a](...f.map(y=>typeof y=="function"?(b,w)=>y(b.toProxy(),w):y)):a==="every"||a==="some"?f=>s[a]((y,...b)=>f(y.toProxy(),...b)):a==="root"?()=>s.root().toProxy():a==="nodes"?s.nodes.map(f=>f.toProxy()):a==="first"||a==="last"?s[a].toProxy():s[a]:s[a]},set(s,a,f){return s[a]===f||(s[a]=f,(a==="name"||a==="params"||a==="selector")&&s.markDirty()),!0}}}index(s){return typeof s=="number"?s:(s.proxyOf&&(s=s.proxyOf),this.proxyOf.nodes.indexOf(s))}insertAfter(s,a){let f=this.index(s),y=this.normalize(a,this.proxyOf.nodes[f]).reverse();f=this.index(s);for(let w of y)this.proxyOf.nodes.splice(f+1,0,w);let b;for(let w in this.indexes)b=this.indexes[w],f<b&&(this.indexes[w]=b+y.length);return this.markDirty(),this}insertBefore(s,a){let f=this.index(s),y=f===0?"prepend":!1,b=this.normalize(a,this.proxyOf.nodes[f],y).reverse();f=this.index(s);for(let M of b)this.proxyOf.nodes.splice(f,0,M);let w;for(let M in this.indexes)w=this.indexes[M],f<=w&&(this.indexes[M]=w+b.length);return this.markDirty(),this}normalize(s,a){if(typeof s=="string")s=u(p(s).nodes);else if(typeof s>"u")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let f of s)f.parent&&f.parent.removeChild(f,"ignore")}else if(s.type==="root"&&this.type!=="document"){s=s.nodes.slice(0);for(let f of s)f.parent&&f.parent.removeChild(f,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value>"u")throw new Error("Value field is missed in node creation");typeof s.value!="string"&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector||s.selectors)s=[new v(s)];else if(s.name)s=[new g(s)];else if(s.text)s=[new r(s)];else throw new Error("Unknown node type in node creation");return s.map(f=>(f[d]||tr.rebuild(f),f=f.proxyOf,f.parent&&f.parent.removeChild(f),f[h]&&n(f),f.raws||(f.raws={}),typeof f.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(f.raws.before=a.raws.before.replace(/\S/g,"")),f.parent=this.proxyOf,f))}prepend(...s){s=s.reverse();for(let a of s){let f=this.normalize(a,this.first,"prepend").reverse();for(let y of f)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+f.length}return this.markDirty(),this}push(s){return s.parent=this,this.proxyOf.nodes.push(s),this}removeAll(){for(let s of this.proxyOf.nodes)s.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(s){s=this.index(s),this.proxyOf.nodes[s].parent=void 0,this.proxyOf.nodes.splice(s,1);let a;for(let f in this.indexes)a=this.indexes[f],a>=s&&(this.indexes[f]=a-1);return this.markDirty(),this}replaceValues(s,a,f){return f||(f=a,a={}),this.walkDecls(y=>{a.props&&!a.props.includes(y.prop)||a.fast&&!y.value.includes(a.fast)||(y.value=y.value.replace(s,f))}),this.markDirty(),this}some(s){return this.nodes.some(s)}walk(s){if(!this.proxyOf.nodes)return;let a=[{iterator:this.getIterator(),node:this.proxyOf}];for(;a.length>0;){let{iterator:f,node:y}=a[a.length-1],b=y.indexes[f];if(b>=y.proxyOf.nodes.length){delete y.indexes[f],a.pop();let x=a[a.length-1];x&&(x.node.indexes[x.iterator]+=1);continue}let w=y.proxyOf.nodes[b],M;try{M=s(w,b)}catch(x){throw w.addToError(x)}if(M===!1){for(let x of a)delete x.node.indexes[x.iterator];return!1}w.walk&&w.proxyOf.nodes?a.push({iterator:w.getIterator(),node:w}):y.indexes[f]+=1}}walkAtRules(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="atrule"&&s.test(f.name))return a(f,y)}):this.walk((f,y)=>{if(f.type==="atrule"&&f.name===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="atrule")return a(f,y)}))}walkComments(s){return this.walk((a,f)=>{if(a.type==="comment")return s(a,f)})}walkDecls(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="decl"&&s.test(f.prop))return a(f,y)}):this.walk((f,y)=>{if(f.type==="decl"&&f.prop===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="decl")return a(f,y)}))}walkRules(s,a){return a?s instanceof RegExp?this.walk((f,y)=>{if(f.type==="rule"&&s.test(f.selector))return a(f,y)}):this.walk((f,y)=>{if(f.type==="rule"&&f.selector===s)return a(f,y)}):(a=s,this.walk((f,y)=>{if(f.type==="rule")return a(f,y)}))}};i.registerParse=l=>{p=l},i.registerRule=l=>{v=l},i.registerAtRule=l=>{g=l},i.registerRoot=l=>{m=l},t.exports=i,i.default=i,i.rebuild=l=>{let s=[l];for(;s.length>0;){let a=s.pop();if(a.type==="atrule"?Object.setPrototypeOf(a,g.prototype):a.type==="rule"?Object.setPrototypeOf(a,v.prototype):a.type==="decl"?Object.setPrototypeOf(a,o.prototype):a.type==="comment"?Object.setPrototypeOf(a,r.prototype):a.type==="root"&&Object.setPrototypeOf(a,m.prototype),a[d]=!0,a.nodes)for(let f of a.nodes)s.push(f)}}})),Sr=q(((e,t)=>{var r=De(),o=class extends r{constructor(c){super(c),this.type="atrule"}append(...c){return this.proxyOf.nodes||(this.nodes=[]),super.append(...c)}prepend(...c){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...c)}};t.exports=o,o.default=o,r.registerAtRule(o)})),Cr=q(((e,t)=>{var r=De(),o,c,h=class extends r{constructor(d){super({type:"document",...d}),this.nodes||(this.nodes=[])}toResult(d={}){return new o(new c,this,d).stringify()}};h.registerLazyResult=d=>{o=d},h.registerProcessor=d=>{c=d},t.exports=h,h.default=h})),zo=q(((e,t)=>{var r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",o=(h,d=21)=>(g=d)=>{let p="",m=g|0;for(;m-- >0;)p+=h[Math.random()*h.length|0];return p},c=(h=21)=>{let d="",g=h|0;for(;g-- >0;)d+=r[Math.random()*64|0];return d};t.exports={nanoid:c,customAlphabet:o}})),Ys=q(((e,t)=>{var{existsSync:r,readFileSync:o,realpathSync:c}=ve(),{dirname:h,isAbsolute:d,join:g,relative:p,sep:m}=ve(),{SourceMapConsumer:v,SourceMapGenerator:u}=ve();function n(s){try{return c(s)}catch{return s}}function i(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var l=class{constructor(s,a){if(a.map===!1)return;a.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(s),this.inline=this.startWith(this.annotation,"data:");let f=a.map?a.map.prev:void 0,y=this.loadMap(a.from,f);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=h(this.mapFile)),y&&(this.text=y)}consumer(){return this.consumerCache||(this.consumerCache=new v(this.json||this.text)),this.consumerCache}decodeInline(s){let a=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,y=s.match(/^data:application\/json;charset=utf-?8,/)||s.match(/^data:application\/json,/);if(y)return decodeURIComponent(s.substr(y[0].length));let b=s.match(a)||s.match(f);if(b)return i(s.substr(b[0].length));let w=s.slice(22);throw w=w.slice(0,w.indexOf(",")),new Error("Unsupported source map encoding "+w)}getAnnotationURL(s){return s.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(s){return typeof s!="object"?!1:typeof s.mappings=="string"||typeof s._mappings=="string"||Array.isArray(s.sections)}loadAnnotation(s){let a=s.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let f=s.lastIndexOf(a.pop()),y=s.indexOf("*/",f);f>-1&&y>-1&&(this.annotation=this.getAnnotationURL(s.substring(f,y)))}loadFile(s,a,f){if(!f&&!this.unsafeMap){if(!/\.map$/i.test(s)||!a)return;let y=p(n(h(a)),n(s));if(y===".."||y.startsWith(".."+m)||d(y))return}if(this.root=h(s),r(s))return this.mapFile=s,o(s,"utf-8").toString().trim()}loadMap(s,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let f=a(s);if(f){let y=this.loadFile(f,s,!0);if(!y)throw new Error("Unable to load previous source map: "+f.toString());return y}}else{if(a instanceof v)return u.fromSourceMap(a).toString();if(a instanceof u)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;s&&(f=g(h(s),f));let y=this.loadFile(f,s,!1);if(y)try{this.json=JSON.parse(y.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return y}}}startWith(s,a){return s?s.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};t.exports=l,l.default=l})),Pt=q(((e,t)=>{var{nanoid:r}=zo(),{isAbsolute:o,resolve:c}=ve(),{SourceMapConsumer:h,SourceMapGenerator:d}=ve(),{fileURLToPath:g,pathToFileURL:p}=ve(),m=br(),v=Ys(),u=ve(),n=Symbol("lineToIndexCache"),i=!!(h&&d),l=!!(c&&o);function s(f){if(f[n])return f[n];let y=f.css.split(`
|
|
51
|
+
`),b=new Array(y.length),w=0;for(let M=0,x=y.length;M<x;M++)b[M]=w,w+=y[M].length+1;return f[n]=b,b}var a=class{get from(){return this.file||this.id}constructor(f,y={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.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,y.document&&(this.document=y.document.toString()),y.from&&(!l||/^\w+:\/\//.test(y.from)||o(y.from)?this.file=y.from:this.file=c(y.from)),l&&i){let b=new v(this.css,y);if(b.text){this.map=b;let w=b.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(f,y,b,w={}){let M,x,C,S,E;if(y&&typeof y=="object"){let I=y,N=b;if(typeof I.offset=="number"){S=I.offset;let D=this.fromOffset(S);y=D.line,b=D.col}else y=I.line,b=I.column,S=this.fromLineAndColumn(y,b);if(typeof N.offset=="number"){C=N.offset;let D=this.fromOffset(C);x=D.line,M=D.col}else x=N.line,M=N.column,C=this.fromLineAndColumn(N.line,N.column)}else if(b)S=this.fromLineAndColumn(y,b);else{S=y;let I=this.fromOffset(S);y=I.line,b=I.col}let R=this.origin(y,b,x,M);return R?E=new m(f,R.endLine===void 0?R.line:{column:R.column,line:R.line},R.endLine===void 0?R.column:{column:R.endColumn,line:R.endLine},R.source,R.file,w.plugin):E=new m(f,x===void 0?y:{column:b,line:y},x===void 0?b:{column:M,line:x},this.css,this.file,w.plugin),E.input={column:b,endColumn:M,endLine:x,endOffset:C,line:y,offset:S,source:this.css},this.file&&(p&&(E.input.url=p(this.file).toString()),E.input.file=this.file),E}fromLineAndColumn(f,y){return s(this)[f-1]+y-1}fromOffset(f){let y=s(this),b=y[y.length-1],w=0;if(f>=b)w=y.length-1;else{let M=y.length-2,x;for(;w<M;)if(x=w+(M-w>>1),f<y[x])M=x-1;else if(f>=y[x+1])w=x+1;else{w=x;break}}return{col:f-y[w]+1,line:w+1}}mapResolve(f){return/^\w+:\/\//.test(f)?f:c(this.map.consumer().sourceRoot||this.map.root||".",f)}origin(f,y,b,w){if(!this.map)return!1;let M=this.map.consumer(),x=M.originalPositionFor({column:y-1,line:f});if(!x.source)return!1;let C;if(typeof b=="number"){let I=M.originalPositionFor({column:w-1,line:b});I.source&&(C=I)}let S;o(x.source)?S=p(x.source):S=new URL(x.source,p(this.map.mapFile||c(".")+"/"));let E={column:x.column+1,endColumn:C&&C.column+1,endLine:C&&C.line,line:x.line,url:S.toString()};if(S.protocol==="file:")if(g)E.file=g(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=M.sourceContentFor(x.source);return R&&(E.source=R),E}toJSON(){let f={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(f[y]=this[y]);return this.map&&(f.map={...this.map},f.map.consumerCache&&(f.map.consumerCache=void 0)),f}};t.exports=a,a.default=a,u&&u.registerInput&&u.registerInput(a)})),lt=q(((e,t)=>{var r=De(),o,c,h=class extends r{constructor(d){super(d),this.type="root",this.nodes||(this.nodes=[])}normalize(d,g,p){let m=new Set;for(let u of Array.isArray(d)?d:[d])u&&typeof u=="object"&&!u.parent&&u.raws&&typeof u.raws.before<"u"&&m.add(u.raws);let v=super.normalize(d);if(g){if(p==="prepend")this.nodes.length>1?g.raws.before=this.nodes[1].raws.before:delete g.raws.before;else if(this.first!==g)for(let u of v)m.has(u.raws)||(u.raws.before=g.raws.before)}return v}removeChild(d,g){let p=this.index(d);return!g&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(d)}toResult(d={}){return new o(new c,this,d).stringify()}};h.registerLazyResult=d=>{o=d},h.registerProcessor=d=>{c=d},t.exports=h,h.default=h,r.registerRoot(h)})),Js=q(((e,t)=>{var r={comma(o){return r.split(o,[","],!0)},space(o){return r.split(o,[" ",`
|
|
52
|
+
`," "])},split(o,c,h){if(typeof o!="string")return[];let d=[],g="",p=!1,m=0,v=!1,u="",n=!1,i=!1;for(let s=0;s<o.length;s++){let a=o[s];if(i){g+=a,a==="*"&&o[s+1]==="/"&&(g+="/",s+=1,i=!1);continue}if(n)n=!1;else if(a==="\\")n=!0;else if(v)a===u&&(v=!1);else if(a==='"'||a==="'")v=!0,u=a;else if(a==="/"&&o[s+1]==="*"){g+="/*",s+=1,i=!0;continue}else a==="("?m+=1:a===")"?m>0&&(m-=1):m===0&&c.includes(a)&&(p=!0);if(p){let f=g.trim();(h||f!=="")&&d.push(f),g="",p=!1}else g+=a}let l=g.trim();return(h||l!=="")&&d.push(l),d}};t.exports=r,r.default=r})),xr=q(((e,t)=>{var r=De(),o=Js(),c=class extends r{get selectors(){return o.comma(this.selector)}set selectors(h){let d=this.selector?this.selector.match(/,\s*/):null,g=d?d[0]:","+this.raw("between","beforeOpen");this.selector=h.join(g)}constructor(h){super(h),this.type="rule",this.nodes||(this.nodes=[])}};t.exports=c,c.default=c,r.registerRule(c)})),jo=q(((e,t)=>{var r=Sr(),o=kt(),c=Lt(),h=Pt(),d=Ys(),g=lt(),p=xr();function m(n,i){return n.inputs?n.inputs.map(l=>{let s={...l,__proto__:h.prototype};return s.map&&(s.map={...s.map,__proto__:d.prototype}),s}):i}function v(n,i,l){let s={...n};if(delete s.inputs,delete s.nodes,s.source){let{inputId:f,...y}=s.source;s.source=y,f!=null&&(s.source.input=i[f])}let a;if(s.type==="root")a=new g(s);else if(s.type==="decl")a=new c(s);else if(s.type==="rule")a=new p(s);else if(s.type==="comment")a=new o(s);else if(s.type==="atrule")a=new r(s);else throw new Error("Unknown node type: "+n.type);if(l){a.nodes=l;for(let f of l)f.parent=a}return a}function u(n,i){if(Array.isArray(n))return n.map(a=>u(a));let l,s=[{childIndex:0,children:[],inputs:m(n,i),json:n}];for(;s.length>0;){let a=s[s.length-1],f=a.json.nodes;if(f&&a.childIndex<f.length){let b=f[a.childIndex];a.childIndex+=1,s.push({childIndex:0,children:[],inputs:m(b,a.inputs),json:b});continue}s.pop();let y=v(a.json,a.inputs,f?a.children:void 0);s.length>0?s[s.length-1].children.push(y):l=y}return l}t.exports=u,u.default=u})),Xs=q(((e,t)=>{var{dirname:r,relative:o,resolve:c,sep:h}=ve(),{SourceMapConsumer:d,SourceMapGenerator:g}=ve(),{pathToFileURL:p}=ve(),m=Pt(),v=!!(d&&g),u=!!(r&&c&&o&&h),n=class{constructor(i,l,s,a){this.stringify=i,this.mapOpts=s.map||{},this.root=l,this.opts=s,this.css=a,this.originalCSS=a,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let i;this.isInline()?i="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?i=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?i=this.mapOpts.annotation(this.opts.to,this.root):i=this.outputFile()+".map";let l=`
|
|
53
|
+
`;this.css.includes(`\r
|
|
54
|
+
`)&&(l=`\r
|
|
55
|
+
`),this.css+=l+"/*# sourceMappingURL="+i+" */"}applyPrevMaps(){for(let i of this.previous()){let l=this.toUrl(this.path(i.file)),s=i.root||r(i.file),a;this.mapOpts.sourcesContent===!1?(a=new d(i.text),a.sourcesContent&&(a.sourcesContent=null)):a=i.consumer(),this.map.applySourceMap(a,l,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let i;for(let l=this.root.nodes.length-1;l>=0;l--)i=this.root.nodes[l],i.type==="comment"&&i.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(l)}else if(this.css){let i="/*# sourceMappingURL=",l="",s=0,a;for(;(a=this.css.indexOf(i,s))!==-1;){let f=this.css.indexOf("*/",a+21);if(f===-1)break;for(;a>s&&this.css[a-1]===`
|
|
56
|
+
`;)a--;l+=this.css.slice(s,a),s=f+2}s>0&&(this.css=l+this.css.slice(s))}}}generate(){if(this.clearAnnotation(),u&&v&&this.isMap())return this.generateMap();{let i="";return this.stringify(this.root,l=>{i+=l}),[i]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let i=this.previous()[0].consumer();i.file=this.outputFile(),this.map=g.fromSourceMap(i,{ignoreInvalidMapping:!0})}else this.map=new g({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 g({file:this.outputFile(),ignoreInvalidMapping:!0});let i=1,l=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},f,y;this.stringify(this.root,(b,w,M)=>{if(this.css+=b,w&&M!=="end"&&(a.generated.line=i,a.generated.column=l-1,w.source&&w.source.start?(a.source=this.sourcePath(w),a.original.line=w.source.start.line,a.original.column=w.source.start.column-1,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,this.map.addMapping(a))),y=b.match(/\n/g),y?(i+=y.length,f=b.lastIndexOf(`
|
|
57
|
+
`),l=b.length-f):l+=b.length,w&&M!=="start"){let x=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==x.last||x.raws.semicolon)&&(w.source&&w.source.end?(a.source=this.sourcePath(w),a.original.line=w.source.end.line,a.original.column=w.source.end.column-1,a.generated.line=i,a.generated.column=l-2,this.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=l-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(i=>i.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let i=this.mapOpts.annotation;return typeof i<"u"&&i!==!0?!1:this.previous().length?this.previous().some(l=>l.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(i=>i.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute||i.charCodeAt(0)===60||/^\w+:\/\//.test(i))return i;let l=this.memoizedPaths.get(i);if(l)return l;let s=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=r(c(s,this.mapOpts.annotation)));let a=o(s,i);return this.memoizedPaths.set(i,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(i=>{if(i.source&&i.source.input.map){let l=i.source.input.map;this.previousMaps.includes(l)||this.previousMaps.push(l)}});else{let i=new m(this.originalCSS,this.opts);i.map&&this.previousMaps.push(i.map)}return this.previousMaps}setSourcesContent(){let i={};if(this.root)this.root.walk(l=>{if(l.source){let s=l.source.input.from;if(s&&!i[s]){i[s]=!0;let a=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(a,l.source.input.css)}}});else if(this.css){let l=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(l,this.css)}}sourcePath(i){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(i.source.input.from):this.toUrl(this.path(i.source.input.from))}toBase64(i){return Buffer?Buffer.from(i).toString("base64"):window.btoa(unescape(encodeURIComponent(i)))}toFileUrl(i){let l=this.memoizedFileURLs.get(i);if(l)return l;if(p){let s=p(i).toString();return this.memoizedFileURLs.set(i,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(i){let l=this.memoizedURLs.get(i);if(l)return l;h==="\\"&&(i=i.replace(/\\/g,"/"));let s=encodeURI(i).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(i,s),s}};t.exports=n})),Vo=q(((e,t)=>{var r=39,o=34,c=92,h=47,d=10,g=32,p=12,m=9,v=13,u=91,n=93,i=40,l=41,s=123,a=125,f=59,y=42,b=58,w=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,S=/[\da-f]/i;t.exports=function(R,I={}){let N=R.css.valueOf(),D=I.ignoreErrors,k,ae,V,O,re,F,Z,se,ee,we,be=N.length,A=0,Se=[],ie=[],le=-1;function _e(){return A}function fe(Y){throw R.error("Unclosed "+Y,A)}function z(){return ie.length===0&&A>=be}function ue(Y){if(ie.length)return ie.pop();if(A>=be)return;let te=Y?Y.ignoreUnclosed:!1;switch(k=N.charCodeAt(A),k){case d:case g:case m:case v:case p:O=A;do O+=1,k=N.charCodeAt(O);while(k===g||k===d||k===m||k===v||k===p);F=["space",N.slice(A,O)],A=O-1;break;case u:case n:case s:case a:case b:case f:case l:{let L=String.fromCharCode(k);F=[L,L,A];break}case i:if(we=Se.length?Se.pop()[1]:"",ee=N.charCodeAt(A+1),we==="url"&&ee!==r&&ee!==o&&ee!==g&&ee!==d&&ee!==m&&ee!==p&&ee!==v){O=A;do{if(Z=!1,O=N.indexOf(")",O+1),O===-1)if(D||te){O=A;break}else fe("bracket");for(se=O;N.charCodeAt(se-1)===c;)se-=1,Z=!Z}while(Z);F=["brackets",N.slice(A,O+1),A,O],A=O}else A<=le?F=["(","(",A]:(O=N.indexOf(")",A+1),ae=N.slice(A,O+1),O===-1||C.test(ae)?(le=O===-1?be:O,F=["(","(",A]):(F=["brackets",ae,A,O],A=O));break;case r:case o:re=k===r?"'":'"',O=A;do{if(Z=!1,O=N.indexOf(re,O+1),O===-1)if(D||te){O=A+1;break}else fe("string");for(se=O;N.charCodeAt(se-1)===c;)se-=1,Z=!Z}while(Z);F=["string",N.slice(A,O+1),A,O],A=O;break;case w:M.lastIndex=A+1,M.test(N),M.lastIndex===0?O=N.length-1:O=M.lastIndex-2,F=["at-word",N.slice(A,O+1),A,O],A=O;break;case c:for(O=A,V=!0;N.charCodeAt(O+1)===c;)O+=1,V=!V;if(k=N.charCodeAt(O+1),V&&k!==h&&k!==g&&k!==d&&k!==m&&k!==v&&k!==p&&(O+=1,S.test(N.charAt(O)))){for(;S.test(N.charAt(O+1));)O+=1;N.charCodeAt(O+1)===g&&(O+=1)}F=["word",N.slice(A,O+1),A,O],A=O;break;default:k===h&&N.charCodeAt(A+1)===y?(O=N.indexOf("*/",A+2)+1,O===0&&(D||te?O=N.length:fe("comment")),F=["comment",N.slice(A,O+1),A,O],A=O):(x.lastIndex=A+1,x.test(N),x.lastIndex===0?O=N.length-1:O=x.lastIndex-2,F=["word",N.slice(A,O+1),A,O],Se.push(F),A=O)}return A++,F}function U(Y){ie.push(Y)}return{back:U,endOfFile:z,nextToken:ue,position:_e}}})),Go=q(((e,t)=>{var r=Sr(),o=kt(),c=Lt(),h=lt(),d=xr(),g=Vo(),p={empty:!0,space:!0};function m(n){for(let i=n.length-1;i>=0;i--){let l=n[i],s=l[3]||l[2];if(s)return s}}function v(n,i,l){let s="";for(let a=i;a<l;a++)s+=n[a][1];return s}var u=class{constructor(n){this.input=n,this.root=new h,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 i=new r;i.name=n[1].slice(1),i.name===""&&this.unnamedAtrule(i,n),this.init(i,n[2]);let l,s,a,f=!1,y=!1,b=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),l=n[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){i.source.end=this.getPosition(n[2]),i.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){y=!0;break}else if(l==="}"){if(b.length>0){for(a=b.length-1,s=b[a];s&&s[0]==="space";)s=b[--a];s&&(i.source.end=this.getPosition(s[3]||s[2]),i.source.end.offset++)}this.end(n);break}else b.push(n);else b.push(n);if(this.tokenizer.endOfFile()){f=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(i.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(i,"params",b),f&&(n=b[b.length-1],i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),y&&(i.nodes=[],this.current=i)}checkMissedSemicolon(n){let i=this.colon(n);if(i===!1)return;let l=0,s;for(let a=i-1;a>=0&&(s=n[a],!(s[0]!=="space"&&(l+=1,l===2)));a--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(n){let i=0,l,s,a;for(let[f,y]of n.entries()){if(s=y,a=s[0],a==="("&&(i+=1),a===")"&&(i-=1),i===0&&a===":")if(!l)this.doubleColon(s);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=s}return!1}comment(n){let i=new o;this.init(i,n[2]),i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++;let l=n[1].slice(2,-2);if(!l.trim())i.text="",i.raws.left=l,i.raws.right="";else{let s=l.match(/^(\s*)([^]*\S)(\s*)$/);i.text=s[2],i.raws.left=s[1],i.raws.right=s[3]}}createTokenizer(){this.tokenizer=g(this.input)}decl(n,i){let l=new c;this.init(l,n[0][2]);let s=n[n.length-1];s[0]===";"&&(this.semicolon=!0,n.pop()),l.source.end=this.getPosition(s[3]||s[2]||m(n)),l.source.end.offset++;let a=0;for(;n[a][0]!=="word";)a===n.length-1&&this.unknownWord([n[a]]),a++;l.raws.before+=v(n,0,a),l.source.start=this.getPosition(n[a][2]);let f=a;for(;a<n.length;){let x=n[a][0];if(x===":"||x==="space"||x==="comment")break;a++}l.prop=v(n,f,a);let y=a,b;for(;a<n.length&&(b=n[a],a++,b[0]!==":");)b[0]==="word"&&/\w/.test(b[1])&&this.unknownWord([b]);l.raws.between=v(n,y,a),(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let w=a;for(;a<n.length;){let x=n[a][0];if(x!=="space"&&x!=="comment")break;a++}let M=n.slice(w,a);n=n.slice(a),this.precheckMissedSemicolon(n);for(let x=n.length-1;x>=0;x--){if(b=n[x],b[1].toLowerCase()==="!important"){l.important=!0;let C=this.stringFrom(n,x);C=this.spacesFromEnd(n)+C,C!==" !important"&&(l.raws.important=C);break}else if(b[1].toLowerCase()==="important"){let C=n.slice(0),S="";for(let E=x;E>0;E--){let R=C[E][0];if(S.trim().startsWith("!")&&R!=="space")break;S=C.pop()[1]+S}S.trim().startsWith("!")&&(l.important=!0,l.raws.important=S,n=C)}if(b[0]!=="space"&&b[0]!=="comment")break}n.some(x=>x[0]!=="space"&&x[0]!=="comment")&&(l.raws.between+=M.map(x=>x[1]).join(""),M=[]),this.raw(l,"value",M.concat(n),i),l.value.includes(":")&&!i&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let i=new d;this.init(i,n[2]),i.selector="",i.raws.between="",this.current=i}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 i=this.current.nodes[this.current.nodes.length-1];i&&i.type==="rule"&&!i.raws.ownSemicolon&&(i.raws.ownSemicolon=this.spaces,this.spaces="",i.source.end=this.getPosition(n[2]),i.source.end.offset++)}}getPosition(n){let i=this.input.fromOffset(n);return{column:i.col,line:i.line,offset:n}}init(n,i){this.current.push(n),n.source={input:this.input,start:this.getPosition(i)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let i=!1,l=null,s=!1,a=null,f=[],y=n[1].startsWith("--"),b=[],w=n;for(;w;){if(l=w[0],b.push(w),l==="("||l==="[")a||(a=w),f.push(l==="("?")":"]");else if(y&&s&&l==="{")a||(a=w),f.push("}");else if(f.length===0)if(l===";")if(s){this.decl(b,y);return}else break;else if(l==="{"){this.rule(b);return}else if(l==="}"){this.tokenizer.back(b.pop()),i=!0;break}else l===":"&&(s=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(a=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),f.length>0&&this.unclosedBracket(a),i&&s){if(!y)for(;b.length&&(w=b[b.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,y)}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)}this.endFile()}precheckMissedSemicolon(){}raw(n,i,l,s){let a,f,y=l.length,b="",w="",M=!0,x,C;for(let S=0;S<y;S+=1)a=l[S],f=a[0],f==="space"&&S===y-1&&!s?M=!1:f==="comment"?(C=l[S-1]?l[S-1][0]:"empty",x=l[S+1]?l[S+1][0]:"empty",!p[C]&&!p[x]?w===","?M=!1:(b+=a[1],w=a[1].slice(-1)):M=!1):(b+=a[1],w=a[1].slice(-1));if(!M){let S=l.reduce((E,R)=>E+R[1],"");n.raws[i]={raw:S,value:b}}n[i]=b}rule(n){n.pop();let i=new d;this.init(i,n[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(i,"selector",n),this.current=i}spacesAndCommentsFromEnd(n){let i,l="";for(;n.length&&(i=n[n.length-1][0],!(i!=="space"&&i!=="comment"));)l=n.pop()[1]+l;return l}spacesAndCommentsFromStart(n){let i,l="";for(;n.length&&(i=n[0][0],!(i!=="space"&&i!=="comment"));)l+=n.shift()[1];return l}spacesFromEnd(n){let i,l="";for(;n.length&&(i=n[n.length-1][0],i==="space");)l=n.pop()[1]+l;return l}stringFrom(n,i){let l="";for(let s=i;s<n.length;s++)l+=n[s][1];return n.splice(i,n.length-i),l}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 "+n[0][1],{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})}};t.exports=u})),Er=q(((e,t)=>{var r=De(),o=Pt(),c=Go();function h(d,g){let p=new c(new o(d,g));try{p.parse()}catch(m){throw m}return p.root}t.exports=h,h.default=h,r.registerParse(h)})),Qs=q(((e,t)=>{var r=De(),{my:o}=Tt(),c=class{constructor(h,d={}){if(this.type="warning",this.text=h,d.node&&d.node.source){d.node[o]||r.rebuild(d.node);let g=d.node.rangeBy(d);this.line=g.start.line,this.column=g.start.column,this.endLine=g.end.line,this.endColumn=g.end.column}for(let g in d)this[g]=d[g]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,start:this.start,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};t.exports=c,c.default=c})),Mr=q(((e,t)=>{var r=Qs(),o=class{get content(){return this.css}constructor(c,h,d){this.processor=c,this.messages=[],this.root=h,this.opts=d,this.css="",this.map=void 0}toString(){return this.css}warn(c,h={}){h.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(h.plugin=this.lastPlugin.postcssPlugin);let d=new r(c,h);return this.messages.push(d),d}warnings(){return this.messages.filter(c=>c.type==="warning")}};t.exports=o,o.default=o})),Zs=q(((e,t)=>{var r={};t.exports=function(c){r[c]||(r[c]=!0,typeof console<"u"&&console.warn&&console.warn(c))}})),Ks=q(((e,t)=>{var r=De(),o=Cr(),c=Xs(),h=Er(),d=Mr(),g=lt(),p=Dt(),{isClean:m,my:v}=Tt(),u=Zs(),n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},i={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},l={Once:!0,postcssPlugin:!0,prepare:!0},s=0;function a(x){return typeof x=="object"&&typeof x.then=="function"}function f(x){let C=!1,S=n[x.type];return x.type==="decl"?C=x.prop.toLowerCase():x.type==="atrule"&&(C=x.name.toLowerCase()),C&&x.append?[S,S+"-"+C,s,S+"Exit",S+"Exit-"+C]:C?[S,S+"-"+C,S+"Exit",S+"Exit-"+C]:x.append?[S,s,S+"Exit"]:[S,S+"Exit"]}function y(x){let C;return x.type==="document"?C=["Document",s,"DocumentExit"]:x.type==="root"?C=["Root",s,"RootExit"]:C=f(x),{eventIndex:0,events:C,iterator:0,node:x,visitorIndex:0,visitors:[]}}function b(x){let C=[x];for(;C.length>0;){let S=C.pop();if(S[m]=!1,S.nodes)for(let E of S.nodes)C.push(E)}return x}var w={},M=class ei{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"}constructor(C,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 ei||S instanceof d)R=b(S.root),S.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=h;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[v]&&r.rebuild(R)}this.result=new d(C,R,E),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...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(C){return this.async().catch(C)}finally(C){return this.async().finally(C)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(C,S){let E=this.result.lastPlugin;try{S&&S.addToError(C),this.error=C,C.name==="CssSyntaxError"&&!C.plugin?(C.plugin=E.postcssPlugin,C.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return C}prepareVisitors(){this.listeners={};let C=(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(!i[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?C(S,E,S[E][R]):C(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&C(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let C=0;C<this.plugins.length;C++){let S=this.plugins[C],E=this.runOnRoot(S);if(a(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[m];){C[m]=!0;let S=[y(C)];for(;S.length>0;){let E=this.visitTick(S);if(a(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(C.type==="document"){let R=C.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(C,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(C){this.result.lastPlugin=C;try{if(typeof C=="object"&&C.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>C.Once(E,this.helpers));return a(S[0])?Promise.all(S):S}return C.Once(this.result.root,this.helpers)}else if(typeof C=="function")return C(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 C=this.result.opts,S=p;C.syntax&&(S=C.syntax.stringify),C.stringifier&&(S=C.stringifier),S.stringify&&(S=S.stringify);let E=this.result.root.source;if(C.map===void 0&&!(E&&E.input&&E.input.map)){let I="";return S(this.result.root,N=>{I+=N}),this.result.css=I,this.result}let R=new c(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 C of this.plugins)if(a(this.runOnRoot(C)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let C=this.result.root;for(;!C[m];)C[m]=!0,this.walkSync(C);if(this.listeners.OnceExit)if(C.type==="document")for(let S of C.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,C)}return this.result}then(C,S){return this.async().then(C,S)}toString(){return this.css}visitSync(C,S){for(let[E,R]of C){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(a(I))throw this.getAsyncError()}}visitTick(C){let S=C[C.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){C.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,D]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return D(E.toProxy(),this.helpers)}catch(k){throw this.handleError(k,E)}}if(S.iterator!==0){let N=S.iterator;S.descending&&(S.descending=!1,E.indexes[N]+=1);let D;for(;D=E.nodes[E.indexes[N]];){if(!D[m]){D[m]=!0,S.descending=!0,C.push(y(D));return}E.indexes[N]+=1}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===s){E.nodes&&E.nodes.length&&(E[m]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}C.pop()}walkSync(C){C[m]=!0;let S=[{eventIndex:0,events:f(C),iterator:0,node:C}];for(;S.length>0;){let E=S[S.length-1],R=E.node;if(E.iterator!==0){let I=E.iterator;E.descending&&(E.descending=!1,R.indexes[I]+=1);let N,D=!1;for(;N=R.nodes[R.indexes[I]];){if(!N[m]){N[m]=!0,E.descending=!0,S.push({eventIndex:0,events:f(N),iterator:0,node:N}),D=!0;break}R.indexes[I]+=1}if(D)continue;E.iterator=0,delete R.indexes[I]}if(E.eventIndex<E.events.length){let I=E.events[E.eventIndex];if(E.eventIndex+=1,I===s)R.nodes&&R.nodes.length&&(E.iterator=R.getIterator());else{let N=this.listeners[I];N&&this.visitSync(N,R.toProxy())&&S.pop()}continue}S.pop()}}warnings(){return this.sync().warnings()}};M.registerPostcss=x=>{w=x},t.exports=M,M.default=M,g.registerLazyResult(M),o.registerLazyResult(M)})),Ho=q(((e,t)=>{var r=Xs(),o=Er(),c=Mr(),h=Dt(),d=Zs(),g=class{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 p,m=o;try{p=m(this._css,this._opts)}catch(v){this.error=v}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(p,m,v){m=m.toString(),this.stringified=!1,this._processor=p,this._css=m,this._opts=v,this._map=void 0;let u=h;this.result=new c(this._processor,void 0,this._opts),this.result.css=m;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let i=new r(u,void 0,this._opts,m);if(i.isMap()){let[l,s]=i.generate();l&&(this.result.css=l),s&&(this.result.map=s)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().finally(p)}sync(){if(this.error)throw this.error;return this.result}then(p,m){return this.async().then(p,m)}toString(){return this._css}warnings(){return[]}};t.exports=g,g.default=g})),qo=q(((e,t)=>{var r=Cr(),o=Ks(),c=Ho(),h=lt(),d=class{constructor(g=[]){this.version="8.5.32",this.plugins=this.normalize(g)}normalize(g){let p=[];for(let m of g)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))p=p.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)p.push(m);else if(typeof m=="function")p.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return p}process(g,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new c(this,g,p):new o(this,g,p)}use(g){return this.plugins=this.plugins.concat(this.normalize([g])),this}};t.exports=d,d.default=d,h.registerProcessor(d),r.registerProcessor(d)})),Q=vo(q(((e,t)=>{var r=Sr(),o=kt(),c=De(),h=br(),d=Lt(),g=Cr(),p=jo(),m=Pt(),v=Ks(),u=Js(),n=_t(),i=Er(),l=qo(),s=Mr(),a=lt(),f=xr(),y=Dt(),b=Qs();function w(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new l(M)}w.plugin=function(x,C){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
58
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("zh")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
59
|
+
https://www.w3ctech.com/topic/2226`));let N=C(...I);return N.postcssPlugin=x,N.postcssVersion=new l().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,D){return w([E(D)]).process(I,N)},E},w.stringify=y,w.parse=i,w.fromJSON=p,w.list=u,w.comment=M=>new o(M),w.atRule=M=>new r(M),w.decl=M=>new d(M),w.rule=M=>new f(M),w.root=M=>new a(M),w.document=M=>new g(M),w.CssSyntaxError=h,w.Declaration=d,w.Container=c,w.Processor=l,w.Document=g,w.Comment=o,w.Warning=b,w.AtRule=r,w.Result=s,w.Input=m,w.Rule=f,w.Root=a,w.Node=n,v.registerPostcss(w),t.exports=w,w.default=w}))(),1);Q.default;Q.default.stringify;Q.default.fromJSON;Q.default.plugin;Q.default.parse;Q.default.list;Q.default.document;Q.default.comment;Q.default.atRule;Q.default.rule;Q.default.decl;Q.default.root;Q.default.CssSyntaxError;Q.default.Declaration;Q.default.Container;Q.default.Processor;Q.default.Document;Q.default.Comment;Q.default.Warning;Q.default.AtRule;Q.default.Result;Q.default.Input;Q.default.Rule;Q.default.Root;Q.default.Node;var W=(function(e){return 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 Yo(e){let t={},r=/;(?![^(]*\))/g,o=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(r).forEach(function(c){if(c){let h=c.split(o);h.length>1&&(t[rr(h[0].trim())]=h[1].trim())}}),t}function Gr(e){let t=[];for(let r in e){let o=e[r];if(typeof o!="string")continue;let c=Zo(r);t.push(`${c}: ${o};`)}return t.join(" ")}var Jo=/-([a-z])/g,Xo=/^--[a-zA-Z0-9-]+$/,rr=e=>Xo.test(e)?e:e.replace(Jo,(t,r)=>r?r.toUpperCase():""),Qo=/\B([A-Z])/g,Zo=e=>e.replace(Qo,"-$1").toLowerCase(),xe=class ti{parentElement=null;parentNode=null;ownerDocument;firstChild=null;lastChild=null;previousSibling=null;nextSibling=null;ELEMENT_NODE=1;TEXT_NODE=3;nodeType;nodeName;RRNodeType;constructor(...t){}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ti){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"}},Ko=class ri extends xe{nodeType=9;nodeName="#document";compatMode="CSS1Compat";RRNodeType=W.Document;textContent=null;constructor(...t){super(t),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HTML")||null}get body(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="BODY")||null}get head(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HEAD")||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let r=t.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(c=>c.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let o=Rr(this,t);return o.parentElement=null,o}insertBefore(t,r){let o=t.RRNodeType;if((o===W.Element||o===W.DocumentType)&&this.childNodes.some(h=>h.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let c=ai(this,t,r);return c.parentElement=null,c}removeChild(t){return li(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){let o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(t,r,o){return new ri}createDocumentType(t,r,o){let c=new si(t,r,o);return c.ownerDocument=this,c}createElement(t){let r=new Ft(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){let r=new ii(t);return r.ownerDocument=this,r}createComment(t){let r=new ni(t);return r.ownerDocument=this,r}createCDATASection(t){let r=new oi(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}},si=class extends xe{nodeType=10;RRNodeType=W.DocumentType;name;publicId;systemId;textContent=null;constructor(e,t,r){super(),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},Ft=class extends xe{nodeType=1;RRNodeType=W.Element;tagName;attributes={};shadowRoot=null;scrollLeft;scrollTop;constructor(e){super(),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ra(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?Yo(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,o,c)=>{if(t.test(r))return;let h=rr(r);o?e[h]=o:delete e[h],c==="important"&&(e[h]+=" !important"),this.attributes.style=Gr(e)},e.removeProperty=r=>{if(t.test(r))return"";let o=rr(r),c=e[o]||"";return delete e[o],this.attributes.style=Gr(e),c},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Rr(this,e)}insertBefore(e,t){return ai(this,e,t)}removeChild(e){return li(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},ea=class extends Ft{currentTime;volume;paused;muted;playbackRate;loop;attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},ta=class extends Ft{tagName="DIALOG";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")}},ii=class extends xe{nodeType=3;nodeName="#text";RRNodeType=W.Text;data;constructor(e){super(),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},ni=class extends xe{nodeType=8;nodeName="#comment";RRNodeType=W.Comment;data;constructor(e){super(),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},oi=class extends xe{nodeName="#cdata-section";nodeType=4;RRNodeType=W.CDATA;data;constructor(e){super(),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},ra=class{onChange;classes=[];constructor(e,t){if(e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}add=(...e)=>{for(let t of e){let r=String(t);this.classes.indexOf(r)>=0||this.classes.push(r)}this.onChange&&this.onChange(this.classes.join(" "))};remove=(...e)=>{this.classes=this.classes.filter(t=>e.indexOf(t)===-1),this.onChange&&this.onChange(this.classes.join(" "))}};function Rr(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 ai(e,t,r){if(!r)return Rr(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 li(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 ge=(function(e){return 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})({}),sr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},sa={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"},Le=null;function bt(e,t,r,o=t.mirror||t.ownerDocument.mirror){e=ia(e,t,r,o),ui(e,t,r,o),na(e,t,r)}function ia(e,t,r,o){if(r.afterAppend&&!Le&&(Le=new WeakSet,setTimeout(()=>{Le=null},0)),!Nr(e,t)){let c=St(t,r.mirror,o);e.parentNode?.replaceChild(c,e),e=c}switch(t.RRNodeType){case W.Document:if(!Be(e,t,r.mirror,o)){let c=o.getMeta(t);c&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,c),Le?.add(e))}break;case W.Element:{let c=e,h=t;switch(h.tagName){case"IFRAME":{let d=e.contentDocument;if(!d)break;bt(d,t.contentDocument,r,o);break}}h.shadowRoot&&(c.shadowRoot||c.attachShadow({mode:"open"}),ui(c.shadowRoot,h.shadowRoot,r,o)),oa(c,h,o);break}}return e}function na(e,t,r){switch(t.RRNodeType){case W.Document:{let o=t.scrollData;o&&r.applyScroll(o,!0);break}case W.Element:{let o=e,c=t;switch(c.scrollData&&r.applyScroll(c.scrollData,!0),c.inputData&&r.applyInput(c.inputData),c.tagName){case"AUDIO":case"VIDEO":{let h=e,d=c;d.paused!==void 0&&(d.paused?h.pause():h.play()),d.muted!==void 0&&(h.muted=d.muted),d.volume!==void 0&&(h.volume=d.volume),d.currentTime!==void 0&&(h.currentTime=d.currentTime),d.playbackRate!==void 0&&(h.playbackRate=d.playbackRate),d.loop!==void 0&&(h.loop=d.loop);break}case"CANVAS":{let h=t;if(h.rr_dataURL!==null){let d=document.createElement("img");d.onload=()=>{let g=o.getContext("2d");g&&g.drawImage(d,0,0,d.width,d.height)},d.src=h.rr_dataURL}h.canvasMutations.forEach(d=>r.applyCanvas(d.event,d.mutation,e));break}case"STYLE":{let h=o.sheet;h&&t.rules.forEach(d=>r.applyStyleSheetMutation(d,h));break}case"DIALOG":{let h=o,d=c,g=h.open,p=h.matches("dialog:modal"),m=d.open,v=d.isModal,u=p!==v,n=g!==m;if((u||g&&n)&&h.close(),m&&(n||u))try{v?h.showModal():h.show()}catch(i){console.warn(i)}break}}break}case W.Text:case W.Comment:case W.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}Le?.has(e)&&(Le.delete(e),r.afterAppend?.(e,r.mirror.getId(e)))}function oa(e,t,r){let o=e.attributes,c=t.attributes;for(let h in c){let d=c[h];if(r.getMeta(t)?.isSVG&&sr[h])e.setAttributeNS(sr[h],h,d);else if(t.tagName==="CANVAS"&&h==="rr_dataURL"){let g=document.createElement("img");g.src=d,g.onload=()=>{let p=e.getContext("2d");p&&p.drawImage(g,0,0,g.width,g.height)}}else{if(t.tagName==="IFRAME"&&h==="srcdoc")continue;try{e.setAttribute(h,d)}catch(g){console.warn(g)}}}for(let{name:h}of Array.from(o))h in c||e.removeAttribute(h);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function ui(e,t,r,o){let c=Array.from(e.childNodes),h=t.childNodes;if(c.length===0&&h.length===0)return;let d=0,g=c.length-1,p=0,m=h.length-1,v=c[d],u=c[g],n=h[p],i=h[m],l,s;for(;d<=g&&p<=m;)if(v===void 0)v=c[++d];else if(u===void 0)u=c[--g];else if(Be(v,n,r.mirror,o))v=c[++d],n=h[++p];else if(Be(u,i,r.mirror,o))u=c[--g],i=h[--m];else if(Be(v,i,r.mirror,o)){try{e.insertBefore(v,u.nextSibling)}catch(y){console.warn(y)}v=c[++d],i=h[--m]}else if(Be(u,n,r.mirror,o)){try{e.insertBefore(u,v)}catch(y){console.warn(y)}u=c[--g],n=h[++p]}else{if(!l){l={};for(let b=d;b<=g;b++){let w=c[b];w&&r.mirror.hasNode(w)&&(l[r.mirror.getId(w)]=b)}}s=l[o.getId(n)];let y=c[s];if(s!==void 0&&y&&Be(y,n,r.mirror,o)){try{e.insertBefore(y,v)}catch(b){console.warn(b)}c[s]=void 0}else{let b=St(n,r.mirror,o);e.nodeName==="#document"&&v&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&v.nodeType===v.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&v.nodeType===v.ELEMENT_NODE)&&(e.removeChild(v),r.mirror.removeNodeFromMap(v),v=c[++d]);try{e.insertBefore(b,v||null)}catch(w){console.warn(w)}}n=h[++p]}if(d>g){let y=h[m+1],b=null;for(y&&(b=r.mirror.getNode(o.getId(y)));p<=m;++p){let w=St(h[p],r.mirror,o);try{e.insertBefore(w,b)}catch(M){console.warn(M)}}}else if(p>m)for(;d<=g;d++){let y=c[d];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(b){console.warn(b)}}let a=e.firstChild,f=t.firstChild;for(;a!==null&&f!==null;)bt(a,f,r,o),a=a.nextSibling,f=f.nextSibling}function St(e,t,r){let o=r.getId(e),c=r.getMeta(e),h=null;if(o>-1&&(h=t.getNode(o)),h!==null&&Nr(h,e))return h;switch(e.RRNodeType){case W.Document:h=new Document;break;case W.DocumentType:h=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let d=e.tagName.toLowerCase();d=sa[d]||d,c&&"isSVG"in c&&c?.isSVG?h=document.createElementNS(sr.svg,d):h=document.createElement(e.tagName);break}case W.Text:h=document.createTextNode(e.data);break;case W.Comment:h=document.createComment(e.data);break;case W.CDATA:h=document.createCDATASection(e.data)}c&&t.add(h,{...c});try{Le?.add(h)}catch{}return h}function Nr(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Be(e,t,r,o){let c=r.getId(e),h=o.getId(t);return c===-1||c!==h?!1:Nr(e,t)}var Ut=class ci extends Ko{UNSERIALIZED_STARTING_ID=-2;_unserializedId=this.UNSERIALIZED_STARTING_ID;get unserializedId(){return this._unserializedId--}mirror=va();scrollData=null;constructor(t){super(),t&&(this.mirror=t)}createDocument(t,r,o){return new ci}createDocumentType(t,r,o){let c=new aa(t,r,o);return c.ownerDocument=this,c}createElement(t){let r=t.toUpperCase(),o;switch(r){case"AUDIO":case"VIDEO":o=new la(r);break;case"IFRAME":o=new ha(r,this.mirror);break;case"CANVAS":o=new ca(r);break;case"STYLE":o=new fa(r);break;case"DIALOG":o=new ua(r);break;default:o=new Bt(r)}return o.ownerDocument=this,o}createComment(t){let r=new pa(t);return r.ownerDocument=this,r}createCDATASection(t){let r=new ma(t);return r.ownerDocument=this,r}createTextNode(t){let r=new da(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}},aa=si,Bt=class extends Ft{inputData=null;scrollData=null},la=class extends ea{},ua=class extends ta{},ca=class extends Bt{rr_dataURL=null;canvasMutations=[];getContext(){return null}},fa=class extends Bt{rules=[]},ha=class extends Bt{contentDocument=new Ut;constructor(e,t){super(e),this.contentDocument.mirror=t}},da=ii,pa=ni,ma=oi;function ga(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function fi(e,t,r,o){let c;switch(e.nodeType){case ge.DOCUMENT_NODE:o&&o.nodeName==="IFRAME"?c=o.contentDocument:(c=t,c.compatMode=e.compatMode);break;case ge.DOCUMENT_TYPE_NODE:{let d=e;c=t.createDocumentType(d.name,d.publicId,d.systemId);break}case ge.ELEMENT_NODE:{let d=e,g=ga(d);c=t.createElement(g);let p=c;for(let{name:m,value:v}of Array.from(d.attributes))p.attributes[m]=v;d.scrollLeft&&(p.scrollLeft=d.scrollLeft),d.scrollTop&&(p.scrollTop=d.scrollTop);break}case ge.TEXT_NODE:c=t.createTextNode(e.textContent||"");break;case ge.CDATA_SECTION_NODE:c=t.createCDATASection(e.data);break;case ge.COMMENT_NODE:c=t.createComment(e.textContent||"");break;case ge.DOCUMENT_FRAGMENT_NODE:c=o.attachShadow({mode:"open"});break;default:return null}let h=r.getMeta(e);return t instanceof Ut&&(h||(h=hi(c,t.unserializedId),r.add(e,h)),t.mirror.add(c,{...h})),c}function ya(e,t=Wo(),r=new Ut){function o(c,h){let d=fi(c,r,t,h);if(d!==null)if(h?.nodeName!=="IFRAME"&&c.nodeType!==ge.DOCUMENT_FRAGMENT_NODE&&(h?.appendChild(d),d.parentNode=h,d.parentElement=h),c.nodeName==="IFRAME"){let g=c.contentDocument;g&&o(g,d)}else(c.nodeType===ge.DOCUMENT_NODE||c.nodeType===ge.ELEMENT_NODE||c.nodeType===ge.DOCUMENT_FRAGMENT_NODE)&&(c.nodeType===ge.ELEMENT_NODE&&c.shadowRoot&&o(c.shadowRoot,d),c.childNodes.forEach(g=>o(g,d)))}return o(e,null),r}function va(){return new wa}var wa=class{idNodeMap=new Map;nodeMetaMap=new WeakMap;getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function hi(e,t){switch(e.RRNodeType){case W.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case W.DocumentType:{let r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case W.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}var Hr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xe={},ir={},Yr=0;function ba(e){let t=globalThis?.Zone?.__symbol__?.(e);if(t&&globalThis[t])return globalThis[t]}function Or(e){if(Xe[e])return Xe[e];let t=ba(e)||globalThis[e],r=t.prototype,o=e in Hr?Hr[e]:void 0,c=!!(o&&o.every(g=>!!Object.getOwnPropertyDescriptor(r,g)?.get?.toString().includes("[native code]"))),h=e in qr?qr[e]:void 0,d=!!(h&&h.every(g=>typeof r[g]=="function"&&r[g]?.toString().includes("[native code]")));if(c&&d)return Xe[e]=t.prototype,t.prototype;try{let g=document.createElement("iframe");g.style.display="none",document.body.appendChild(g);let p=g.contentWindow;if(!p)return t.prototype;let m=p[e].prototype;if(!m)return g.remove(),r;let v=navigator.userAgent;return v.includes("Safari")&&!v.includes("Chrome")?(g.classList.add("rr-block"),g.setAttribute("__rrwebUntaintedMutationObserver",""),ir[e]=()=>g.remove()):g.remove(),Xe[e]=m}catch{return r}}var Jr={};function pe(e,t,r){let o=Jr[e]?.[r];if(o)return o.call(t);let c=Or(e),h=Object.getOwnPropertyDescriptor(c,r)?.get;return h?((Jr[e]||={})[r]=h,h.call(t)):t[r]}var Vt={};function di(e,t,r){let o=`${e}.${String(r)}`;if(Vt[o])return Vt[o].bind(t);let c=Or(e)[r];return typeof c!="function"?t[r]:(Vt[o]=c,c.bind(t))}function Sa(e){return pe("Node",e,"ownerDocument")}function Ca(e){return pe("Node",e,"childNodes")}function xa(e){return pe("Node",e,"parentNode")}function Ea(e){return pe("Node",e,"parentElement")}function Ma(e){return pe("Node",e,"textContent")}function Ra(e){return pe("Node",e,"firstChild")}function Na(e){return pe("Node",e,"lastChild")}function Oa(e){return pe("Node",e,"nextSibling")}function Ia(e){return pe("Node",e,"previousSibling")}function Aa(e,t){return di("Node",e,"contains")(t)}function Da(e){return di("Node",e,"getRootNode")()}function Ta(e){return!e||!("host"in e)?null:pe("ShadowRoot",e,"host")}function _a(e){return e.styleSheets}function ka(e){return!e||!("shadowRoot"in e)?null:pe("Element",e,"shadowRoot")}function La(e,t){return pe("Element",e,"querySelector")(t)}function Pa(e,t){return pe("Element",e,"querySelectorAll")(t)}function pi(){let e=Or("MutationObserver");Yr++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--Yr!==0))return;let r=ir.MutationObserver;if(r)try{r()}finally{delete Xe.MutationObserver,delete ir.MutationObserver}}]}var it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Fe(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],c=r(o);return typeof c=="function"&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=c,()=>{e[t]=o}}catch{return()=>{}}}var P={ownerDocument:Sa,childNodes:Ca,parentNode:xa,parentElement:Ea,textContent:Ma,firstChild:Ra,lastChild:Na,nextSibling:Oa,previousSibling:Ia,contains:Aa,getRootNode:Da,host:Ta,styleSheets:_a,shadowRoot:ka,querySelector:La,querySelectorAll:Pa,nowTimestamp:it,mutationObserverCtor:pi,patch:Fe};function oe(e,t,r=document){let o={capture:!0,passive:!0};return r.addEventListener(e,t,o),()=>r.removeEventListener(e,t,o)}var We=`Please stop import mirror directly. Instead of that,\r
|
|
60
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
61
|
+
or you can use record.mirror to access the mirror instance during recording.`,Xr={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<"u"&&window.Proxy&&window.Reflect&&(Xr=new Proxy(Xr,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function nt(e,t,r={}){let o=null,c=0;return function(...h){let d=Date.now();!c&&r.leading===!1&&(c=d);let g=t-(d-c),p=this;g<=0||g>t?(o&&(clearTimeout(o),o=null),c=d,e.apply(p,h)):!o&&r.trailing!==!1&&(o=setTimeout(()=>{c=r.leading===!1?0:Date.now(),o=null,e.apply(p,h)},g))}}function Wt(e,t,r,o,c=window){let h=c.Object.getOwnPropertyDescriptor(e,t);return c.Object.defineProperty(e,t,o?r:{set(d){setTimeout(()=>{r.set.call(this,d)},0),h&&h.set&&h.set.call(this,d)}}),()=>Wt(e,t,h||{},!0)}function mi(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t.documentElement.scrollLeft||t?.body&&P.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body&&P.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0}}function gi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function yi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vi(e){return e?e.nodeType===e.ELEMENT_NODE?e:P.parentElement(e):null}function ce(e,t,r,o){if(!e)return!1;let c=vi(e);if(!c)return!1;try{if(typeof t=="string"){if(c.classList.contains(t)||o&&c.closest("."+t)!==null)return!0}else if(wt(c,t,o))return!0}catch{}return!!(r&&(c.matches(r)||o&&c.closest(r)!==null))}function Fa(e,t){return t.getId(e)!==-1}function Gt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===-2}function wi(e,t){if(Ke(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let o=P.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?wi(o,t):!0}function nr(e){return!!e.changedTouches}function bi(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 Ua(e){let t={},r=(c,h)=>{let d={value:c,parent:h,children:[]};return t[c.node.id]=d,d},o=[];for(let c of e){let{nextId:h,parentId:d}=c;if(h&&h in t){let g=t[h];if(g.parent){let p=g.parent.children.indexOf(g);g.parent.children.splice(p,0,r(c,g.parent))}else{let p=o.indexOf(g);o.splice(p,0,r(c,null))}continue}if(d in t){let g=t[d];g.children.push(r(c,g));continue}o.push(r(c,null))}return o}function Si(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Si(e.children[r],t)}function rt(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Ci(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xi(e,t){let r=e.ownerDocument?.defaultView?.frameElement;if(!r||r===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=r.getBoundingClientRect(),c=xi(r,t),h=o.height/r.clientHeight;return{x:o.x*c.relativeScale+c.x,y:o.y*c.relativeScale+c.y,relativeScale:h,absoluteScale:c.absoluteScale*h}}function Pe(e){return e?e instanceof xe&&"shadowRoot"in e?!!e.shadowRoot:!!P.shadowRoot(e):!1}function Qe(e,t){let r=e?.[t[0]];return r?t.length===1?r:Qe(r.cssRules,t.slice(1)):null}function Qr(e){let t=[...e];return{positions:t,index:t.pop()}}function Ba(e){let t=new Set,r=[];for(let o=e.length;o--;){let c=e[o];t.has(c.id)||(r.push(c),t.add(c.id))}return r}var Ei=class{id=1;styleIDMap=new WeakMap;idStyleMap=new Map;getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Mi(e){let t=null;return"getRootNode"in e&&P.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&P.host(P.getRootNode(e))&&(t=P.host(P.getRootNode(e))),t}function Wa(e){let t=e,r;for(;r=Mi(t);)t=r;return t}function $a(e){let t=P.ownerDocument(e);if(!t)return!1;let r=Wa(e);return P.contains(t,r)}function or(e){let t=P.ownerDocument(e);return t?P.contains(t,e)||$a(e):!1}var _=(function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e[e.Annotation=8]="Annotation",e})({}),T=(function(e){return 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})({}),G=(function(e){return 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})({}),Ee=(function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e})({}),Ie=(function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e})({}),ke=(function(e){return 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})({}),j=(function(e){return 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.Annotation="annotation",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e})({}),Me=(function(e){return 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})({}),Zr=(e,t)=>`${e}@${t}`,za=class{frozen=!1;locked=!1;texts=[];attributes=[];attributeMap=new WeakMap;removes=[];mapRemoves=[];movedMap={};addedSet=new Set;movedSet=new Set;droppedSet=new Set;removesSubTreeCache=new Set;mutationCb;blockClass;blockSelector;maskTextClass;maskTextSelector;inlineStylesheet;maskInputOptions;maskTextFn;maskInputFn;keepIframeSrcFn;recordCanvas;inlineImages;slimDOMOptions;dataURLOptions;doc;mirror;iframeManager;stylesheetManager;shadowDomManager;processedNodeManager;unattachedDoc;init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}processMutations=e=>{e.forEach(this.processMutation),this.emit()};emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let u of this.movedSet){let n=P.parentNode(u);this.removesSubTreeCache.has(n)&&!this.movedSet.has(n)||this.addedSet.add(u)}let r=null,o=null,c=-1,h=null,d=!1,g=new Set,p=this.addedSet.values(),m=p.next();for(;this.addedSet.size;){if(r!==null&&this.addedSet.has(P.previousSibling(r)))h=r,r=P.previousSibling(r);else{for(this.addedSet.has(m.value)||(m=p.next()),r=m.value;;){if(o=P.parentNode(r),this.addedSet.has(o)){r=o;continue}break}if(g.has(o))o=null;else if(o){if(or(o)?(d=Kr(this.droppedSet,o)||this.removesSubTreeCache.has(o),d&&Kr(this.movedSet,r)&&(d=!1)):d=!0,this.addedSet.has(P.lastChild(o)))r=P.lastChild(o),h=null;else for(;;){if(h=P.nextSibling(r),this.addedSet.has(h)){r=h;continue}break}if(c=Ke(o)?this.mirror.getId(Mi(r)):this.mirror.getId(o),c===-1&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let l=P.host(o);c=this.mirror.getId(l)}}}if(this.addedSet.delete(r),!o||c===-1){g.add(r);continue}else if(d){this.droppedSet.add(r);continue}let u=!1;if(r.nodeType===Node.TEXT_NODE){let l=o.tagName;if(l==="TEXTAREA")continue;l==="STYLE"&&t.has(c)&&(u=!0)}let n=h?this.mirror.getId(h):null;for(;n===-2;)h=h&&P.nextSibling(h),n=h&&this.mirror.getId(h);if(n===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",h),r=null;continue}let i=je(r,{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:l=>{rt(l,this.mirror)&&this.iframeManager.addIframe(l),Ci(l,this.mirror)&&this.stylesheetManager.trackLinkElement(l),Pe(r)&&this.shadowDomManager.addShadowRoot(P.shadowRoot(r),this.doc)},onIframeLoad:(l,s)=>{this.iframeManager.attachIframe(l,s),this.shadowDomManager.observeAttachShadow(l)},onStylesheetLoad:(l,s)=>{this.stylesheetManager.attachLinkElement(l,s)},cssCaptured:u});i&&(e.push({parentId:c,nextId:n,node:i}),t.add(i.id))}let v={texts:this.texts.map(u=>{let n=u.node,i=P.parentNode(n);return i&&i.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(n),value:u.value}}).filter(u=>!t.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{let{attributes:n}=u;if(typeof n.style=="string"){let i=JSON.stringify(u.styleDiff),l=JSON.stringify(u._unchangedStyles);i.length<n.style.length&&(i+l).split("var(").length===n.style.split("var(").length&&(n.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:n}}).filter(u=>!t.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:e};!v.texts.length&&!v.attributes.length&&!v.removes.length&&!v.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(v))};genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(P.childNodes(e),o=>P.textContent(o)||"").join("");t.attributes.value=gt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:yt(e),value:r,maskInputFn:this.maskInputFn})};processMutation=e=>{if(!Gt(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=P.textContent(e.target);!ce(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Ns(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,vi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=Ce(t.tagName),o=e.attributeName,c=e.target.getAttribute(o);if(o==="value"){let d=yt(t);c=gt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:d,value:c,maskInputFn:this.maskInputFn})}if(ce(e.target,this.blockClass,this.blockSelector,!1)||c===e.oldValue)return;let h=this.attributeMap.get(e.target);if(r==="iframe"&&o==="src"&&!this.keepIframeSrcFn(c))if(!t.contentDocument)o="rr_src";else return;if(h||(h={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(h),this.attributeMap.set(e.target,h)),o==="type"&&r==="input"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ms(r,o,c))if(h.attributes[o]=Es(this.doc,r,Ce(o),c),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let d=this.unattachedDoc.createElement("span");e.oldValue&&d.setAttribute("style",e.oldValue);for(let g of Array.from(t.style)){let p=t.style.getPropertyValue(g),m=t.style.getPropertyPriority(g);p!==d.style.getPropertyValue(g)||m!==d.style.getPropertyPriority(g)?m===""?h.styleDiff[g]=p:h.styleDiff[g]=[p,m]:h._unchangedStyles[g]=[p,m]}for(let g of Array.from(d.style))t.style.getPropertyValue(g)===""&&(h.styleDiff[g]=!1)}else o==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?h.attributes.rr_open_mode="modal":h.attributes.rr_open_mode="non-modal");break}case"childList":if(ce(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{or(t)||this.shadowDomManager.removeShadowRootsIn(t);let r=this.mirror.getId(t),o=Ke(e.target)?this.mirror.getId(P.host(e.target)):this.mirror.getId(e.target);ce(e.target,this.blockClass,this.blockSelector,!1)||Gt(t,this.mirror,this.slimDOMOptions)||!Fa(t,this.mirror)||(this.addedSet.has(t)?(ar(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||wi(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Zr(r,o)]?ar(this.movedSet,t):(this.removes.push({parentId:o,id:r,isShadow:Ke(e.target)&&et(e.target)?!0:void 0}),ja(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}};genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Gt(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Zr(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ce(e,this.blockClass,this.blockSelector,!1)||(P.childNodes(e).forEach(r=>this.genAdds(r)),Pe(e)&&P.childNodes(P.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}}};function ar(e,t){e.delete(t),P.childNodes(t).forEach(r=>ar(e,r))}function ja(e,t){let r=[e];for(;r.length;){let o=r.pop();t.has(o)||(t.add(o),P.childNodes(o).forEach(c=>r.push(c)))}}function Kr(e,t){return e.size===0?!1:Ri(e,t)}function Ri(e,t){if(e.has(t))return!0;let r=P.parentNode(t);return r?Ri(e,r):!1}var st;function Va(e){st=e}function Ga(){st=void 0}var $=e=>st?((...r)=>{try{return e(...r)}catch(o){if(st&&st(o)===!0)return;throw o}}):e,He=new Set;function ut(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ni(e,t){let r=new za;He.add(r),r.init(e);let[o,c]=pi(),h=new o($(r.processMutations.bind(r)));return h.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{h.disconnect(),He.delete(r),c()}}function Ha({mousemoveCb:e,sampling:t,doc:r,mirror:o}){if(t.mousemove===!1)return()=>{};let c=typeof t.mousemove=="number"?t.mousemove:50,h=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,d=[],g,p=nt($(u=>{let n=Date.now()-g;e(d.map(i=>(i.timeOffset-=n,i)),u),d=[],g=null}),h),m=$(nt($(u=>{let n=ut(u),{clientX:i,clientY:l}=nr(u)?u.changedTouches[0]:u;g||(g=it()),d.push({x:i,y:l,id:o.getId(n),timeOffset:it()-g}),p(typeof DragEvent<"u"&&u instanceof DragEvent?T.Drag:u instanceof MouseEvent?T.MouseMove:T.TouchMove)}),c,{trailing:!1})),v=[oe("mousemove",m,r),oe("touchmove",m,r),oe("drag",m,r)];return $(()=>{v.forEach(u=>u())})}function qa({mouseInteractionCb:e,doc:t,mirror:r,blockClass:o,blockSelector:c,sampling:h}){if(h.mouseInteraction===!1)return()=>{};let d=h.mouseInteraction===!0||h.mouseInteraction===void 0?{}:h.mouseInteraction,g=[],p=null,m=v=>u=>{let n=ut(u);if(ce(n,o,c,!0))return;let i=null,l=v;if("pointerType"in u){switch(u.pointerType){case"mouse":i=Ee.Mouse;break;case"touch":i=Ee.Touch;break;case"pen":i=Ee.Pen}i===Ee.Touch?G[v]===G.MouseDown?l="TouchStart":G[v]===G.MouseUp&&(l="TouchEnd"):Ee.Pen}else nr(u)&&(i=Ee.Touch);i!==null?(p=i,(l.startsWith("Touch")&&i===Ee.Touch||l.startsWith("Mouse")&&i===Ee.Mouse)&&(i=null)):G[v]===G.Click&&(i=p,p=null);let s=nr(u)?u.changedTouches[0]:u;if(!s)return;let a=r.getId(n),{clientX:f,clientY:y}=s;$(e)({type:G[l],id:a,x:f,y,...i!==null&&{pointerType:i}})};return Object.keys(G).filter(v=>Number.isNaN(Number(v))&&!v.endsWith("_Departed")&&d[v]!==!1).forEach(v=>{let u=Ce(v),n=m(v);if(window.PointerEvent)switch(G[v]){case G.MouseDown:case G.MouseUp:u=u.replace("mouse","pointer");break;case G.TouchStart:case G.TouchEnd:return}g.push(oe(u,n,t))}),$(()=>{g.forEach(v=>v())})}function Oi({scrollCb:e,doc:t,mirror:r,blockClass:o,blockSelector:c,sampling:h}){return oe("scroll",$(nt($(d=>{let g=ut(d);if(!g||ce(g,o,c,!0))return;let p=r.getId(g);if(g===t&&t.defaultView){let m=mi(t.defaultView);e({id:p,x:m.left,y:m.top})}else e({id:p,x:g.scrollLeft,y:g.scrollTop})}),h.scroll||100)),t)}function Ya({viewportResizeCb:e},{win:t}){let r=-1,o=-1;return oe("resize",$(nt($(()=>{let c=gi(),h=yi();(r!==c||o!==h)&&(e({width:Number(h),height:Number(c)}),r=c,o=h)}),200)),t)}var Ja=["INPUT","TEXTAREA","SELECT"],es=new WeakMap;function Xa({inputCb:e,doc:t,mirror:r,blockClass:o,blockSelector:c,ignoreClass:h,ignoreSelector:d,maskInputOptions:g,maskInputFn:p,sampling:m,userTriggeredOnInput:v}){function u(f){let y=ut(f),b=f.isTrusted,w=y&&y.tagName;if(y&&w==="OPTION"&&(y=P.parentElement(y)),!y||!w||Ja.indexOf(w)<0||ce(y,o,c,!0)||y.classList.contains(h)||d&&y.matches(d))return;let M=y.value,x=!1,C=yt(y)||"";C==="radio"||C==="checkbox"?x=y.checked:(g[w.toLowerCase()]||g[C])&&(M=gt({element:y,maskInputOptions:g,tagName:w,type:C,value:M,maskInputFn:p})),n(y,v?{text:M,isChecked:x,userTriggered:b}:{text:M,isChecked:x});let S=y.name;C==="radio"&&S&&x&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach(E=>{if(E!==y){let R=E.value;n(E,v?{text:R,isChecked:!x,userTriggered:!1}:{text:R,isChecked:!x})}})}function n(f,y){let b=es.get(f);if(!b||b.text!==y.text||b.isChecked!==y.isChecked){es.set(f,y);let w=r.getId(f);$(e)({...y,id:w})}}let i=(m.input==="last"?["change"]:["input","change"]).map(f=>oe(f,$(u),t)),l=t.defaultView;if(!l)return()=>{i.forEach(f=>f())};let s=l.Object.getOwnPropertyDescriptor(l.HTMLInputElement.prototype,"value"),a=[[l.HTMLInputElement.prototype,"value"],[l.HTMLInputElement.prototype,"checked"],[l.HTMLSelectElement.prototype,"value"],[l.HTMLTextAreaElement.prototype,"value"],[l.HTMLSelectElement.prototype,"selectedIndex"],[l.HTMLOptionElement.prototype,"selected"]];return s&&s.set&&i.push(...a.map(f=>Wt(f[0],f[1],{set(){$(u)({target:this,isTrusted:!1})}},!1,l))),$(()=>{i.forEach(f=>f())})}function Ct(e){let t=[];function r(o,c){if(ft("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||ft("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||ft("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||ft("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){let h=Array.from(o.parentRule.cssRules).indexOf(o);return c.unshift(h),r(o.parentRule,c)}else if(o.parentStyleSheet){let h=Array.from(o.parentStyleSheet.cssRules).indexOf(o);c.unshift(h)}return c}return r(e,t)}function Ne(e,t,r){let o,c;return e?(e.ownerNode?o=t.getId(e.ownerNode):c=r.getId(e),{styleId:c,id:o}):{}}function Qa({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};let c=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(c,{apply:$((v,u,n)=>{let[i,l]=n,{id:s,styleId:a}=Ne(u,t,r.styleMirror);return(s&&s!==-1||a&&a!==-1)&&e({id:s,styleId:a,adds:[{rule:i,index:l}]}),v.apply(u,n)})}),o.CSSStyleSheet.prototype.addRule=function(v,u,n=this.cssRules.length){let i=`${v} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};let h=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(h,{apply:$((v,u,n)=>{let[i]=n,{id:l,styleId:s}=Ne(u,t,r.styleMirror);return(l&&l!==-1||s&&s!==-1)&&e({id:l,styleId:s,removes:[{index:i}]}),v.apply(u,n)})}),o.CSSStyleSheet.prototype.removeRule=function(v){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[v])};let d;o.CSSStyleSheet.prototype.replace&&(d=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(d,{apply:$((v,u,n)=>{let[i]=n,{id:l,styleId:s}=Ne(u,t,r.styleMirror);return(l&&l!==-1||s&&s!==-1)&&e({id:l,styleId:s,replace:i}),v.apply(u,n)})}));let g;o.CSSStyleSheet.prototype.replaceSync&&(g=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(g,{apply:$((v,u,n)=>{let[i]=n,{id:l,styleId:s}=Ne(u,t,r.styleMirror);return(l&&l!==-1||s&&s!==-1)&&e({id:l,styleId:s,replaceSync:i}),v.apply(u,n)})}));let p={};ht("CSSGroupingRule")?p.CSSGroupingRule=o.CSSGroupingRule:(ht("CSSMediaRule")&&(p.CSSMediaRule=o.CSSMediaRule),ht("CSSConditionRule")&&(p.CSSConditionRule=o.CSSConditionRule),ht("CSSSupportsRule")&&(p.CSSSupportsRule=o.CSSSupportsRule));let m={};return Object.entries(p).forEach(([v,u])=>{m[v]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(m[v].insertRule,{apply:$((n,i,l)=>{let[s,a]=l,{id:f,styleId:y}=Ne(i.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||y&&y!==-1)&&e({id:f,styleId:y,adds:[{rule:s,index:[...Ct(i),a||0]}]}),n.apply(i,l)})}),u.prototype.deleteRule=new Proxy(m[v].deleteRule,{apply:$((n,i,l)=>{let[s]=l,{id:a,styleId:f}=Ne(i.parentStyleSheet,t,r.styleMirror);return(a&&a!==-1||f&&f!==-1)&&e({id:a,styleId:f,removes:[{index:[...Ct(i),s]}]}),n.apply(i,l)})})}),$(()=>{o.CSSStyleSheet.prototype.insertRule=c,o.CSSStyleSheet.prototype.deleteRule=h,d&&(o.CSSStyleSheet.prototype.replace=d),g&&(o.CSSStyleSheet.prototype.replaceSync=g),Object.entries(p).forEach(([v,u])=>{u.prototype.insertRule=m[v].insertRule,u.prototype.deleteRule=m[v].deleteRule})})}function Ii({mirror:e,stylesheetManager:t},r){let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId(P.host(r));let c=r.nodeName==="#document"?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,h=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!c||!h?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){return h.get?.call(this)},set(d){let g=h.set?.call(this,d);if(o!==null&&o!==-1)try{t.adoptStyleSheets(d,o)}catch{}return g}}),$(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))}function Za({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:o},{win:c}){let h=c.CSSStyleDeclaration.prototype.setProperty;c.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:$((g,p,m)=>{let[v,u,n]=m;if(r.has(v))return h.apply(p,[v,u,n]);let{id:i,styleId:l}=Ne(p.parentRule?.parentStyleSheet,t,o.styleMirror);return(i&&i!==-1||l&&l!==-1)&&e({id:i,styleId:l,set:{property:v,value:u,priority:n},index:Ct(p.parentRule)}),g.apply(p,m)})});let d=c.CSSStyleDeclaration.prototype.removeProperty;return c.CSSStyleDeclaration.prototype.removeProperty=new Proxy(d,{apply:$((g,p,m)=>{let[v]=m;if(r.has(v))return d.apply(p,[v]);let{id:u,styleId:n}=Ne(p.parentRule?.parentStyleSheet,t,o.styleMirror);return(u&&u!==-1||n&&n!==-1)&&e({id:u,styleId:n,remove:{property:v},index:Ct(p.parentRule)}),g.apply(p,m)})}),$(()=>{c.CSSStyleDeclaration.prototype.setProperty=h,c.CSSStyleDeclaration.prototype.removeProperty=d})}function Ka({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:o,sampling:c,doc:h}){let d=$(p=>nt($(m=>{let v=ut(m);if(!v||!(v instanceof HTMLMediaElement)||ce(v,t,r,!0))return;let{currentTime:u,volume:n,muted:i,playbackRate:l,loop:s}=v;e({type:p,id:o.getId(v),currentTime:u,volume:n,muted:i,playbackRate:l,loop:s})}),c.media||500)),g=[oe("play",d(ke.Play),h),oe("pause",d(ke.Pause),h),oe("seeked",d(ke.Seeked),h),oe("volumechange",d(ke.VolumeChange),h),oe("ratechange",d(ke.RateChange),h)];return $(()=>{g.forEach(p=>p())})}function el({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let o=[],c=new WeakMap,h=r.FontFace;r.FontFace=function(p,m,v){let u=new h(p,m,v);return c.set(u,{family:p,buffer:typeof m!="string",descriptors:v,fontSource:typeof m=="string"?m:JSON.stringify(Array.from(new Uint8Array(m)))}),u};let d=Fe(t.fonts,"add",function(g){return function(p){return setTimeout($(()=>{let m=c.get(p);m&&(e(m),c.delete(p))}),0),g.apply(this,[p])}});return o.push(()=>{r.FontFace=h}),o.push(d),$(()=>{o.forEach(g=>g())})}function tl(e){let{doc:t,mirror:r,blockClass:o,blockSelector:c,selectionCb:h}=e,d=!0,g=$(()=>{let p=t.getSelection();if(!p||d&&p?.isCollapsed)return;d=p.isCollapsed||!1;let m=[],v=p.rangeCount||0;for(let u=0;u<v;u++){let{startContainer:n,startOffset:i,endContainer:l,endOffset:s}=p.getRangeAt(u);ce(n,o,c,!0)||ce(l,o,c,!0)||m.push({start:r.getId(n),startOffset:i,end:r.getId(l),endOffset:s})}h({ranges:m})});return g(),oe("selectionchange",g)}function rl({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(o){return function(c,h,d){try{t({define:{name:c}})}catch{console.warn(`Custom element callback failed for ${c}`)}return o.apply(this,[c,h,d])}})}function sl(e,t){let{mutationCb:r,mousemoveCb:o,mouseInteractionCb:c,scrollCb:h,viewportResizeCb:d,inputCb:g,mediaInteractionCb:p,styleSheetRuleCb:m,styleDeclarationCb:v,canvasMutationCb:u,fontCb:n,selectionCb:i,customElementCb:l}=e;e.mutationCb=(...s)=>{t.mutation&&t.mutation(...s),r(...s)},e.mousemoveCb=(...s)=>{t.mousemove&&t.mousemove(...s),o(...s)},e.mouseInteractionCb=(...s)=>{t.mouseInteraction&&t.mouseInteraction(...s),c(...s)},e.scrollCb=(...s)=>{t.scroll&&t.scroll(...s),h(...s)},e.viewportResizeCb=(...s)=>{t.viewportResize&&t.viewportResize(...s),d(...s)},e.inputCb=(...s)=>{t.input&&t.input(...s),g(...s)},e.mediaInteractionCb=(...s)=>{t.mediaInteaction&&t.mediaInteaction(...s),p(...s)},e.styleSheetRuleCb=(...s)=>{t.styleSheetRule&&t.styleSheetRule(...s),m(...s)},e.styleDeclarationCb=(...s)=>{t.styleDeclaration&&t.styleDeclaration(...s),v(...s)},e.canvasMutationCb=(...s)=>{t.canvasMutation&&t.canvasMutation(...s),u(...s)},e.fontCb=(...s)=>{t.font&&t.font(...s),n(...s)},e.selectionCb=(...s)=>{t.selection&&t.selection(...s),i(...s)},e.customElementCb=(...s)=>{t.customElement&&t.customElement(...s),l(...s)}}function il(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};sl(e,t);let o;e.recordDOM&&(o=Ni(e,e.doc));let c=Ha(e),h=qa(e),d=Oi(e),g=Ya(e,{win:r}),p=Xa(e),m=Ka(e),v=()=>{},u=()=>{},n=()=>{},i=()=>{};e.recordDOM&&(v=Qa(e,{win:r}),u=Ii(e,e.doc),n=Za(e,{win:r}),e.collectFonts&&(i=el(e)));let l=tl(e),s=rl(e),a=[];for(let f of e.plugins)a.push(f.observer(f.callback,r,f.options));return $(()=>{o?.(),c(),h(),d(),g(),p(),m(),v(),u(),n(),i(),l(),s(),a.forEach(f=>f())})}function ft(e){return typeof window[e]<"u"}function ht(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ts=class{generateIdFn;iframeIdToRemoteIdMap=new WeakMap;iframeRemoteIdToIdMap=new WeakMap;constructor(e){this.generateIdFn=e}getId(e,t,r,o){let c=r||this.getIdToRemoteIdMap(e),h=o||this.getRemoteIdToIdMap(e),d=c.get(t);return d||(d=this.generateIdFn(),c.set(t,d),h.set(d,t)),d}getIds(e,t){let r=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return t.map(c=>this.getId(e,c,r,o))}getRemoteId(e,t,r){let o=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let c=o.get(t);return c||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(o=>this.getRemoteId(e,o,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},nl=class{iframes=new WeakMap;crossOriginIframeMap=new WeakMap;crossOriginIframeMirror=new ts(xs);crossOriginIframeStyleMirror;crossOriginIframeRootIdMap=new WeakMap;mirror;mutationCb;wrappedEmit;loadListener;unloadListener;attachedWindows=new Map;messageHandler=e=>this.handleMessage(e);stylesheetManager;recordCrossOriginIframes;constructor(e){this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ts(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addUnloadListener(e){this.unloadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(e),this.loadListener?.(e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(e=>e())}watchIframeWindow(e){let t=e.contentWindow;if(!t||this.attachedWindows.has(t))return;let r=[],o=()=>{this.attachedWindows.delete(t),r.forEach(c=>{try{c()}catch{}})};this.attachedWindows.set(t,o),this.recordCrossOriginIframes&&r.push(oe("message",this.messageHandler,t)),r.push(oe("pagehide",c=>{if(c.persisted)return;let h=t.document;o(),this.unloadListener?.(h)},t))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Annotation:case _.Plugin:return t;case _.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _.IncrementalSnapshot:switch(t.data.source){case T.Mutation:return t.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(r.node,o)}),t.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),t.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),t.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case T.Drag:case T.TouchMove:case T.MouseMove:return t.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(t.data,e,["id"]),t;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case T.Font:return t;case T.Selection:return t.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),t;case T.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),t}}return!1}replace(e,t,r,o){for(let c of o)!Array.isArray(t[c])&&typeof t[c]!="number"||(Array.isArray(t[c])?t[c]=e.getIds(r,t[c]):t[c]=e.getId(r,t[c]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Me.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},ol=class{shadowDoms=new Map;mutationCb;scrollCb;bypassOptions;mirror;restoreHandlers=[];constructor(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;let r=[];this.shadowDoms.set(e,r);let o=Ni({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);r.push(o),r.push(Oi({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(e)===r&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(P.host(e))),r.push(Ii({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRootsIn(e){if(this.shadowDoms.size===0)return;let t=P.shadowRoot(e);t&&(this.shadowDoms.has(t)&&this.removeShadowRoot(t),this.removeShadowRootsIn(t)),P.childNodes(e).forEach(r=>this.removeShadowRootsIn(r))}removeShadowRoot(e){let t=this.shadowDoms.get(e);this.shadowDoms.delete(e),t?.forEach(Ht)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Fe(e.prototype,"attachShadow",function(o){return function(c){let h=o.call(this,c),d=P.shadowRoot(this);return d&&or(this)&&r.addShadowRoot(d,t),h}}))}reset(){this.restoreHandlers.forEach(Ht),this.restoreHandlers=[];let e=this.shadowDoms;this.shadowDoms=new Map,e.forEach(t=>t.forEach(Ht))}};function Ht(e){try{e()}catch{}}var Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(qe=0;qe<Ve.length;qe++)Ze[Ve.charCodeAt(qe)]=qe;var qe,al=function(e){var t=new Uint8Array(e),r,o=t.length,c="";for(r=0;r<o;r+=3)c+=Ve[t[r]>>2],c+=Ve[(t[r]&3)<<4|t[r+1]>>4],c+=Ve[(t[r+1]&15)<<2|t[r+2]>>6],c+=Ve[t[r+2]&63];return o%3===2?c=c.substring(0,c.length-1)+"=":o%3===1&&(c=c.substring(0,c.length-2)+"=="),c},ll=function(e){var t=e.length*.75,r=e.length,o,c=0,h,d,g,p;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var m=new ArrayBuffer(t),v=new Uint8Array(m);for(o=0;o<r;o+=4)h=Ze[e.charCodeAt(o)],d=Ze[e.charCodeAt(o+1)],g=Ze[e.charCodeAt(o+2)],p=Ze[e.charCodeAt(o+3)],v[c++]=h<<2|d>>4,v[c++]=(d&15)<<4|g>>2,v[c++]=(g&3)<<6|p&63;return m},rs=new Map;function ul(e,t){let r=rs.get(e);return r||(r=new Map,rs.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Ai=(e,t,r)=>{if(!e||!(Ti(e,t)||typeof e=="object"))return;let o=e.constructor.name,c=ul(r,o),h=c.indexOf(e);return h===-1&&(h=c.length,c.push(e)),h};function pt(e,t,r){if(e instanceof Array)return e.map(o=>pt(o,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)return{rr_type:e.constructor.name,base64:al(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[pt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let o=e.constructor.name,{src:c}=e;return{rr_type:o,src:c}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[pt(e.data,t,r),e.width,e.height]};if(Ti(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:Ai(e,t,r)}}return e}var Di=(e,t,r)=>e.map(o=>pt(o,t,r)),Ti=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function cl(e,t,r,o){let c=[],h=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let d of h)try{if(typeof t.CanvasRenderingContext2D.prototype[d]!="function")continue;let g=Fe(t.CanvasRenderingContext2D.prototype,d,function(p){return function(...m){return ce(this.canvas,r,o,!0)||setTimeout(()=>{let v=Di(m,t,this);e(this.canvas,{type:Ie["2D"],property:d,args:v})},0),p.apply(this,m)}});c.push(g)}catch{let g=Wt(t.CanvasRenderingContext2D.prototype,d,{set(p){e(this.canvas,{type:Ie["2D"],property:d,args:[p],setter:!0})}});c.push(g)}return()=>{c.forEach(d=>d())}}function fl(e){return e==="experimental-webgl"?"webgl":e}function ss(e,t,r,o){let c=[];try{let h=Fe(e.HTMLCanvasElement.prototype,"getContext",function(d){return function(g,...p){if(!ce(this,t,r,!0)){let m=fl(g);if("__context"in this||(this.__context=m),o&&["webgl","webgl2"].includes(m))if(p[0]&&typeof p[0]=="object"){let v=p[0];v.preserveDrawingBuffer||(v.preserveDrawingBuffer=!0)}else p.splice(0,1,{preserveDrawingBuffer:!0})}return d.apply(this,[g,...p])}});c.push(h)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{c.forEach(h=>h())}}function is(e,t,r,o,c,h){let d=[],g=Object.getOwnPropertyNames(e);for(let p of g)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(p))try{if(typeof e[p]!="function")continue;let m=Fe(e,p,function(v){return function(...u){let n=v.apply(this,u);if(Ai(n,h,this),"tagName"in this.canvas&&!ce(this.canvas,o,c,!0)){let i=Di(u,h,this),l={type:t,property:p,args:i};r(this.canvas,l)}return n}});d.push(m)}catch{let m=Wt(e,p,{set(v){r(this.canvas,{type:t,property:p,args:[v],setter:!0})}});d.push(m)}return d}function hl(e,t,r,o){let c=[];return typeof t.WebGLRenderingContext<"u"&&c.push(...is(t.WebGLRenderingContext.prototype,Ie.WebGL,e,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&c.push(...is(t.WebGL2RenderingContext.prototype,Ie.WebGL2,e,r,o,t)),()=>{c.forEach(h=>h())}}var _i=`(function() {
|
|
62
|
+
// ../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
|
|
63
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
64
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
65
|
+
for (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;
|
|
66
|
+
var encode = function(arraybuffer) {
|
|
67
|
+
var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";
|
|
68
|
+
for (i = 0; i < len; i += 3) {
|
|
69
|
+
base64 += chars[bytes[i] >> 2];
|
|
70
|
+
base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
|
|
71
|
+
base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
|
|
72
|
+
base64 += chars[bytes[i + 2] & 63];
|
|
73
|
+
}
|
|
74
|
+
if (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";
|
|
75
|
+
else if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";
|
|
76
|
+
return base64;
|
|
77
|
+
};
|
|
78
|
+
// src/record/workers/image-bitmap-data-url-worker.ts
|
|
79
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
80
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
81
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
82
|
+
const id = \`\${width}-\${height}\`;
|
|
83
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
84
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
85
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
86
|
+
offscreen.getContext("2d");
|
|
87
|
+
const base64 = encode(await (await offscreen.convertToBlob(dataURLOptions)).arrayBuffer());
|
|
88
|
+
transparentBlobMap.set(id, base64);
|
|
89
|
+
return base64;
|
|
90
|
+
} else return "";
|
|
91
|
+
}
|
|
92
|
+
const worker = self;
|
|
93
|
+
worker.onmessage = async function(e) {
|
|
94
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
95
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
96
|
+
const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
|
|
97
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
98
|
+
offscreen.getContext("2d").drawImage(bitmap, 0, 0);
|
|
99
|
+
bitmap.close();
|
|
100
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
101
|
+
const type = blob.type;
|
|
102
|
+
const base64 = encode(await blob.arrayBuffer());
|
|
103
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
104
|
+
lastBlobMap.set(id, base64);
|
|
105
|
+
return worker.postMessage({ id });
|
|
106
|
+
}
|
|
107
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
108
|
+
worker.postMessage({
|
|
109
|
+
id,
|
|
110
|
+
type,
|
|
111
|
+
base64,
|
|
112
|
+
width,
|
|
113
|
+
height
|
|
114
|
+
});
|
|
115
|
+
lastBlobMap.set(id, base64);
|
|
116
|
+
} else return worker.postMessage({ id: e.data.id });
|
|
117
|
+
};
|
|
118
|
+
})();
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-NVDCVKXO.js.map`,ns=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",_i],{type:"text/javascript;charset=utf-8"});function dl(e){let t;try{if(t=ns&&(self.URL||self.webkitURL).createObjectURL(ns),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(_i),{name:e?.name})}}var pl=class{pendingCanvasMutations=new Map;rafStamps={latestId:0,invokeId:null};mirror;mutationCb;resetObservers;frozen=!1;locked=!1;reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){let{sampling:t="all",win:r,blockClass:o,blockSelector:c,recordCanvas:h,dataURLOptions:d}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,h&&t==="all"&&this.initCanvasMutationObserver(r,o,c),h&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,o,c,{dataURLOptions:d})}processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};initCanvasFPSObserver(e,t,r,o,c){let h=ss(t,r,o,!0),d=new Map,g=new dl;g.onmessage=i=>{let{id:l}=i.data;if(d.set(l,!1),!("base64"in i.data))return;let{base64:s,type:a,width:f,height:y}=i.data;this.mutationCb({id:l,type:Ie["2D"],commands:[{property:"clearRect",args:[0,0,f,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:a}]},0,0]}]})};let p=1e3/e,m=0,v,u=()=>{let i=[];return t.document.querySelectorAll("canvas").forEach(l=>{ce(l,r,o,!0)||i.push(l)}),i},n=i=>{if(m&&i-m<p){v=requestAnimationFrame(n);return}m=i,u().forEach(async l=>{let s=this.mirror.getId(l);if(d.get(s)||l.width===0||l.height===0)return;if(d.set(s,!0),["webgl","webgl2"].includes(l.__context)){let f=l.getContext(l.__context);f?.getContextAttributes()?.preserveDrawingBuffer===!1&&f.clear(f.COLOR_BUFFER_BIT)}let a=await createImageBitmap(l);g.postMessage({id:s,bitmap:a,width:l.width,height:l.height,dataURLOptions:c.dataURLOptions},[a])}),v=requestAnimationFrame(n)};v=requestAnimationFrame(n),this.resetObservers=()=>{h(),cancelAnimationFrame(v)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=ss(e,t,r,!1),c=cl(this.processMutation.bind(this),e,t,r),h=hl(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{o(),c(),h()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let o=r.map(h=>{let{type:d,...g}=h;return g}),{type:c}=r[0];this.mutationCb({id:t,type:c,commands:o}),this.pendingCanvasMutations.delete(e)}},ml=class{trackedLinkElements=new WeakSet;mutationCb;adoptedStyleSheetCb;styleMirror=new Ei;constructor(e){this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},o=[];for(let c of e){let h;this.styleMirror.has(c)?h=this.styleMirror.getId(c):(h=this.styleMirror.add(c),o.push({styleId:h,rules:Array.from(c.rules||CSSRule,(d,g)=>({rule:bs(d,c.href),index:g}))})),r.styleIds.push(h)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gl=class{nodeMap=new WeakMap;active=!1;inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(o=>o!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},K,mt,Re,ot=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var me=Ss();function Te(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:c="rr-block",blockSelector:h=null,ignoreClass:d="rr-ignore",ignoreSelector:g=null,maskTextClass:p="rr-mask",maskTextSelector:m=null,inlineStylesheet:v=!0,maskAllInputs:u,maskInputOptions:n,slimDOMOptions:i,maskInputFn:l,maskTextFn:s,hooks:a,packFn:f,sampling:y={},dataURLOptions:b={},mousemoveWait:w,recordDOM:M=!0,recordCanvas:x=!1,recordCrossOriginIframes:C=!1,recordAfter:S=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:E=!1,collectFonts:R=!1,inlineImages:I=!1,plugins:N,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:ae}=e;Va(ae);let V=C?window.parent===window:!0,O=!1;if(!V)try{window.parent.document&&(O=!1)}catch{O=!0}if(V&&!t)throw new Error("emit function is required");if(!V&&!O)return()=>{};w!==void 0&&y.mousemove===void 0&&(y.mousemove=w),me.reset();let re=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:n!==void 0?n:{password:!0},F=Os(i);bi();let Z,se=0,ee=z=>{for(let ue of N||[])ue.eventProcessor&&(z=ue.eventProcessor(z));return f&&!O&&(z=f(z)),z};K=(z,ue)=>{let U=z;if(U.timestamp=it(),U.type!==_.FullSnapshot&&!(U.type===_.IncrementalSnapshot&&U.data.source===T.Mutation)){Re.unfreeze();for(let Y of He)if(Y.isFrozen())Y.unfreeze();else break}if(V)t?.(ee(U),ue);else if(O){let Y={type:"rrweb",event:ee(U),origin:window.location.origin,isCheckout:ue};window.parent.postMessage(Y,"*")}if(U.type===_.FullSnapshot)Z=U,se=0;else if(U.type===_.IncrementalSnapshot){if(U.data.source===T.Mutation&&U.data.isAttachIframe)return;se++;let Y=o&&se>=o,te=r&&U.timestamp-Z.timestamp>r;(Y||te)&&mt(!0)}};let we=z=>{K({type:_.IncrementalSnapshot,data:{source:T.Mutation,...z}})},be=z=>K({type:_.IncrementalSnapshot,data:{source:T.Scroll,...z}}),A=z=>K({type:_.IncrementalSnapshot,data:{source:T.CanvasMutation,...z}}),Se=z=>K({type:_.IncrementalSnapshot,data:{source:T.AdoptedStyleSheet,...z}}),ie=new ml({mutationCb:we,adoptedStyleSheetCb:Se}),le=new nl({mirror:me,mutationCb:we,stylesheetManager:ie,recordCrossOriginIframes:C,wrappedEmit:K});for(let z of N||[])z.getMirror&&z.getMirror({nodeMirror:me,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});let _e=new gl;Re=new pl({recordCanvas:x,mutationCb:A,win:window,blockClass:c,blockSelector:h,mirror:me,sampling:y.canvas,dataURLOptions:b});let fe=new ol({mutationCb:we,scrollCb:be,bypassOptions:{blockClass:c,blockSelector:h,maskTextClass:p,maskTextSelector:m,inlineStylesheet:v,maskInputOptions:re,dataURLOptions:b,maskTextFn:s,maskInputFn:l,recordCanvas:x,inlineImages:I,sampling:y,slimDOMOptions:F,iframeManager:le,stylesheetManager:ie,canvasManager:Re,keepIframeSrcFn:D,processedNodeManager:_e},mirror:me});mt=(z=!1)=>{if(!M)return;K({type:_.Meta,data:{href:window.location.href,width:yi(),height:gi()}},z),ie.reset(),fe.init(),Re.lock(),He.forEach(U=>U.lock());let ue=Vn(document,{mirror:me,blockClass:c,blockSelector:h,maskTextClass:p,maskTextSelector:m,inlineStylesheet:v,maskAllInputs:re,maskTextFn:s,maskInputFn:l,slimDOM:F,dataURLOptions:b,recordCanvas:x,inlineImages:I,onSerialize:U=>{rt(U,me)&&le.addIframe(U),Ci(U,me)&&ie.trackLinkElement(U),Pe(U)&&fe.addShadowRoot(P.shadowRoot(U),document)},onIframeLoad:(U,Y)=>{le.attachIframe(U,Y),fe.observeAttachShadow(U)},onStylesheetLoad:(U,Y)=>{ie.attachLinkElement(U,Y)},keepIframeSrcFn:D});if(!ue)return console.warn("Failed to snapshot the document");K({type:_.FullSnapshot,data:{node:ue,initialOffset:mi(window)}},z),Re.unlock(),He.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,me.getId(document))};try{let z=[],ue=te=>$(il)({mutationCb:we,mousemoveCb:(L,$t)=>K({type:_.IncrementalSnapshot,data:{source:$t,positions:L}}),mouseInteractionCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.MouseInteraction,...L}}),scrollCb:be,viewportResizeCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.ViewportResize,...L}}),inputCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.Input,...L}}),mediaInteractionCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.MediaInteraction,...L}}),styleSheetRuleCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.StyleSheetRule,...L}}),styleDeclarationCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.StyleDeclaration,...L}}),canvasMutationCb:A,fontCb:L=>K({type:_.IncrementalSnapshot,data:{source:T.Font,...L}}),selectionCb:L=>{K({type:_.IncrementalSnapshot,data:{source:T.Selection,...L}})},customElementCb:L=>{K({type:_.IncrementalSnapshot,data:{source:T.CustomElement,...L}})},blockClass:c,ignoreClass:d,ignoreSelector:g,maskTextClass:p,maskTextSelector:m,maskInputOptions:re,inlineStylesheet:v,sampling:y,recordDOM:M,recordCanvas:x,inlineImages:I,userTriggeredOnInput:E,collectFonts:R,doc:te,maskInputFn:l,maskTextFn:s,keepIframeSrcFn:D,blockSelector:h,slimDOMOptions:F,dataURLOptions:b,mirror:me,iframeManager:le,stylesheetManager:ie,shadowDomManager:fe,processedNodeManager:_e,canvasManager:Re,ignoreCSSAttributes:k,plugins:N?.filter(L=>L.observer)?.map(L=>({observer:L.observer,options:L.options,callback:$t=>K({type:_.Plugin,data:{plugin:L.name,payload:$t}})}))||[]},a),U=new Map;le.addLoadListener(te=>{try{let L=te.contentDocument;if(U.has(L))return;U.set(L,ue(L))}catch(L){console.warn(L)}}),le.addUnloadListener(te=>{let L=U.get(te);L&&(U.delete(te),L(),fe.removeShadowRootsIn(te),me.removeNodeFromMap(te))});let Y=()=>{mt(),z.push(ue(document)),ot=!0};return["interactive","complete"].includes(document.readyState)?Y():(z.push(oe("DOMContentLoaded",()=>{K({type:_.DomContentLoaded,data:{}}),S==="DOMContentLoaded"&&Y()})),z.push(oe("load",()=>{K({type:_.Load,data:{}}),S==="load"&&Y()},window))),()=>{[...z,...U.values()].forEach(te=>{try{te()}catch(L){String(L).toLowerCase().includes("cross-origin")||console.warn(L)}}),U.clear(),le.destroy(),_e.destroy(),fe.reset(),Re.reset(),ot=!1,Ga()}}catch(z){console.warn(z)}}Te.addCustomEvent=(e,t)=>{if(!ot)throw new Error("please add custom event after start recording");K({type:_.Custom,data:{tag:e,payload:t}})};Te.addAnnotation=e=>{if(!ot)throw new Error("please add annotation after recording started");K({type:_.Annotation,data:e})};Te.freezePage=()=>{Re.freeze(),He.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!ot)throw new Error("please take full snapshot after start recording");mt(e)};Te.mirror=me;var yl=Wi({default:()=>ki});function ki(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map(function(c){c(r)}),(o=e.get("*"))&&o.slice().map(function(c){c(t,r)})}}}function vl(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let r=e.HTMLElement||e.Element,o=468,c={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||p,scrollIntoView:r.prototype.scrollIntoView},h=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function d(f){return new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(f)}let g=d(e.navigator.userAgent)?1:0;function p(f,y){this.scrollLeft=f,this.scrollTop=y}function m(f){return .5*(1-Math.cos(Math.PI*f))}function v(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(f,y){if(y==="Y")return f.clientHeight+g<f.scrollHeight;if(y==="X")return f.clientWidth+g<f.scrollWidth}function n(f,y){let b=e.getComputedStyle(f,null)["overflow"+y];return b==="auto"||b==="scroll"}function i(f){let y=u(f,"Y")&&n(f,"Y"),b=u(f,"X")&&n(f,"X");return y||b}function l(f){for(;f!==t.body&&i(f)===!1;)f=f.parentNode||f.host;return f}function s(f){let y=h(),b,w,M,x=(y-f.startTime)/o;x=x>1?1:x,b=m(x),w=f.startX+(f.x-f.startX)*b,M=f.startY+(f.y-f.startY)*b,f.method.call(f.scrollable,w,M),(w!==f.x||M!==f.y)&&e.requestAnimationFrame(s.bind(e,f))}function a(f,y,b){let w,M,x,C,S=h();f===t.body?(w=e,M=e.scrollX||e.pageXOffset,x=e.scrollY||e.pageYOffset,C=c.scroll):(w=f,M=f.scrollLeft,x=f.scrollTop,C=p),s({scrollable:w,method:C,startTime:S,startX:M,startY:x,x:y,y:b})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(v(arguments[0])===!0){c.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}a.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(v(arguments[0])){c.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}a.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(v(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");c.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}let f=arguments[0].left,y=arguments[0].top;a.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof y>"u"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(v(arguments[0])===!0){c.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(v(arguments[0])===!0){c.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let f=l(this),y=f.getBoundingClientRect(),b=this.getBoundingClientRect();f!==t.body?(a.call(this,f,f.scrollLeft+b.left-y.left,f.scrollTop+b.top-y.top),e.getComputedStyle(f).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}var wl=class{timeOffset=0;speed;actions;raf=null;lastTimestamp;constructor(e=[],t){this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){let o=Math.floor((t+r)/2);if(this.actions[o].delay<e.delay)t=o+1;else if(this.actions[o].delay>e.delay)r=o-1;else return o+1}return t}};function os(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){let r=e.data.positions[0].timeOffset,o=e.timestamp+r;return e.delay=o-t,o-t}return e.delay=e.timestamp-t,e.delay}function as(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o,c,h=r.call(e),d=[];try{for(;(t===void 0||t-- >0)&&!(o=h.next()).done;)d.push(o.value)}catch(g){c={error:g}}finally{try{o&&!o.done&&(r=h.return)&&r.call(h)}finally{if(c)throw c.error}}return d}var Ge;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ge||(Ge={}));var Li={type:"xstate.init"};function qt(e){return e===void 0?[]:[].concat(e)}function $e(e){return{type:"xstate.assign",assignment:e}}function ls(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 xt(e){return function(t){return e===t}}function Pi(e){return typeof e=="string"?{type:e}:e}function us(e,t){return{value:e,context:t,actions:[],changed:!1,matches:xt(e)}}function cs(e,t,r){var o=t,c=!1;return[e.filter((function(h){if(h.type==="xstate.assign"){c=!0;var d=Object.assign({},o);return typeof h.assignment=="function"?d=h.assignment(o,r):Object.keys(h.assignment).forEach((function(g){d[g]=typeof h.assignment[g]=="function"?h.assignment[g](o,r):h.assignment[g]})),o=d,!1}return!0})),o,c]}function Fi(e,t){t===void 0&&(t={});var r=as(cs(qt(e.states[e.initial].entry).map((function(d){return ls(d,t.actions)})),e.context,Li),2),o=r[0],c=r[1],h={config:e,_options:t,initialState:{value:e.initial,actions:o,context:c,matches:xt(e.initial)},transition:function(d,g){var p,m,v=typeof d=="string"?{value:d,context:e.context}:d,u=v.value,n=v.context,i=Pi(g),l=e.states[u];if(l.on){var s=qt(l.on[i.type]);try{for(var a=(function(O){var re=typeof Symbol=="function"&&Symbol.iterator,F=re&&O[re],Z=0;if(F)return F.call(O);if(O&&typeof O.length=="number")return{next:function(){return O&&Z>=O.length&&(O=void 0),{value:O&&O[Z++],done:!O}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")})(s),f=a.next();!f.done;f=a.next()){var y=f.value;if(y===void 0)return us(u,n);var b=typeof y=="string"?{target:y}:y,w=b.target,M=b.actions,x=M===void 0?[]:M,C=b.cond,S=C===void 0?function(){return!0}:C,E=w===void 0,R=w??u,I=e.states[R];if(S(n,i)){var N=as(cs((E?qt(x):[].concat(l.exit,x,I.entry).filter((function(O){return O}))).map((function(O){return ls(O,h._options.actions)})),n,i),3),D=N[0],k=N[1],ae=N[2],V=w??u;return{value:V,context:k,actions:D,changed:w!==u||D.length>0||ae,matches:xt(V)}}}}catch(O){p={error:O}}finally{try{f&&!f.done&&(m=a.return)&&m.call(a)}finally{if(p)throw p.error}}}return us(u,n)}};return h}var fs=function(e,t){return e.actions.forEach((function(r){var o=r.exec;return o&&o(e.context,t)}))};function Ui(e){var t=e.initialState,r=Ge.NotStarted,o=new Set,c={_machine:e,send:function(h){r===Ge.Running&&(t=e.transition(t,h),fs(t,Pi(h)),o.forEach((function(d){return d(t)})))},subscribe:function(h){return o.add(h),h(t),{unsubscribe:function(){return o.delete(h)}}},start:function(h){if(h){var d=typeof h=="object"?h:{context:e.config.context,value:h};t={value:d.value,actions:[],context:d.context,matches:xt(d.value)}}return r=Ge.Running,fs(t,Li),c},stop:function(){return r=Ge.Stopped,o.clear(),c},get state(){return t},get status(){return r}};return c}function bl(e,t){for(let r=e.length-1;r>=0;r--){let o=e[r];if(o.type===_.Meta&&o.timestamp<=t)return e.slice(r)}return e}function Sl(e,{getCastFn:t,applyEventsSynchronously:r,emitter:o}){return Ui(Fi({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:$e({lastPlayedEvent:(c,h)=>h.type==="CAST_EVENT"?h.payload.event:c.lastPlayedEvent}),recordTimeOffset:$e((c,h)=>{let d=c.timeOffset;return"payload"in h&&"timeOffset"in h.payload&&(d=h.payload.timeOffset),{...c,timeOffset:d,baselineTime:c.events[0].timestamp+d}}),play(c){let{timer:h,events:d,baselineTime:g,lastPlayedEvent:p}=c;h.clear();for(let n of d)os(n,g);let m=bl(d,g),v=p?.timestamp;p?.type===_.IncrementalSnapshot&&p.data.source===T.MouseMove&&(v=p.timestamp+p.data.positions[0]?.timeOffset),g<(v||0)&&o.emit(j.PlayBack);let u=new Array;for(let n of m)if(!(v&&v<g&&(n.timestamp<=v||n===p)))if(n.timestamp<g)u.push(n);else{let i=t(n,!1);h.addAction({doAction:()=>{i()},delay:n.delay})}r(u),o.emit(j.Flush),h.start()},pause(c){c.timer.clear()},resetLastPlayedEvent:$e(c=>({...c,lastPlayedEvent:null})),startLive:$e({baselineTime:(c,h)=>(c.timer.start(),h.type==="TO_LIVE"&&h.payload.baselineTime?h.payload.baselineTime:Date.now())}),addEvent:$e((c,h)=>{let{baselineTime:d,timer:g,events:p}=c;if(h.type==="ADD_EVENT"){let{event:m}=h.payload;os(m,d);let v=p.length-1;if(!p[v]||p[v].timestamp<=m.timestamp)p.push(m);else{let i=-1,l=0;for(;l<=v;){let s=Math.floor((l+v)/2);p[s].timestamp<=m.timestamp?l=s+1:v=s-1}i===-1&&(i=l),p.splice(i,0,m)}let u=m.timestamp<d,n=t(m,u);u?n():g.isActive()&&g.addAction({doAction:()=>{n()},delay:m.delay})}return{...c,events:p}})}}))}function Cl(e){return Ui(Fi({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:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:$e({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}}))}var xl=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],hs=new Map;function Bi(e,t){let r=hs.get(e);return r||(r=new Map,hs.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Oe(e,t,r){return async o=>{if(o&&typeof o=="object"&&"rr_type"in o)if(r&&(r.isUnchanged=!1),o.rr_type==="ImageBitmap"&&"args"in o){let c=await Oe(e,t,r)(o.args);return await createImageBitmap.apply(null,c)}else if("index"in o){if(r||t===null)return o;let{rr_type:c,index:h}=o;return Bi(t,c)[h]}else if("args"in o){let{rr_type:c,args:h}=o,d=window[c];return new d(...await Promise.all(h.map(Oe(e,t,r))))}else{if("base64"in o)return ll(o.base64);if("src"in o){let c=e.get(o.src);if(c)return c;{let h=new Image;return h.src=o.src,e.set(o.src,h),h}}else if("data"in o&&o.rr_type==="Blob"){let c=await Promise.all(o.data.map(Oe(e,t,r)));return new Blob(c,{type:o.type})}}else if(Array.isArray(o))return await Promise.all(o.map(Oe(e,t,r)));return o}}function El(e,t){try{return t===Ie.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}var Ml=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Rl(e,t){if(!t?.constructor)return;let{name:r}=t.constructor;if(!Ml.includes(r))return;let o=Bi(e,r);o.includes(t)||o.push(t)}async function Nl({mutation:e,target:t,type:r,imageMap:o,errorHandler:c}){try{let h=El(t,r);if(!h)return;if(e.setter){h[e.property]=e.args[0];return}let d=h[e.property],g=await Promise.all(e.args.map(Oe(o,h)));Rl(h,d.apply(h,g))}catch(h){c(e,h)}}async function Ol({event:e,mutations:t,target:r,imageMap:o,errorHandler:c}){let h=r.getContext("2d");if(!h){c(t[0],new Error("Canvas context is null"));return}let d=t.map(async g=>Promise.all(g.args.map(Oe(o,h))));(await Promise.all(d)).forEach((g,p)=>{let m=t[p];try{if(m.setter){h[m.property]=m.args[0];return}let v=h[m.property];m.property==="drawImage"&&typeof m.args[0]=="string"?(o.get(e),v.apply(h,m.args)):v.apply(h,g)}catch(v){c(m,v)}})}async function ds({event:e,mutation:t,target:r,imageMap:o,canvasEventMap:c,errorHandler:h}){try{let d=c.get(e)||t,g="commands"in d?d.commands:[d];if([Ie.WebGL,Ie.WebGL2].includes(t.type)){for(let p=0;p<g.length;p++){let m=g[p];await Nl({mutation:m,type:t.type,target:r,imageMap:o,errorHandler:h})}return}await Ol({event:e,mutations:g,target:r,imageMap:o,errorHandler:h})}catch(d){h(t,d)}}var Il=class{mediaMap=new Map;warn;service;speedService;emitter;getCurrentTime;metadataCallbackMap=new Map;constructor(e){this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(j.Start,this.start.bind(this)),this.emitter.on(j.SkipStart,this.start.bind(this)),this.emitter.on(j.Pause,this.pause.bind(this)),this.emitter.on(j.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{if(this.syncTargetWithState(r),e.pause)try{r.pause()}catch(o){this.warn(`Failed to sync media element: ${o.message||o}`)}})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,c="duration"in t&&t.duration;if(Number.isNaN(c)){this.waitForMetadata(t);return}let h=r.currentTimeAtLastInteraction+o;t.loop&&c!==!1&&(h=h%c),t.currentTime=h}else{try{t.pause()}catch(o){this.warn(`Failed to pause during seek: ${o.message||o}`)}t.currentTime=r.currentTimeAtLastInteraction}}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let o=this.mediaMap.get(e),{type:c,playbackRate:h,currentTime:d,muted:g,volume:p,loop:m}=r;return{isPlaying:c===ke.Play||c!==ke.Pause&&(o?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:d??o?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:h??o?.playbackRate??1,volume:p??o?.volume??1,muted:g??o?.muted??e.getAttribute("muted")===null,loop:m??o?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:o,volume:c,isPlaying:h}=t,d=this.service.state.matches("paused"),g=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==c&&(e.volume=c),e.muted=r,e.loop=o,e.playbackRate!==g&&(e.playbackRate=g),h&&!d?e.play():e.pause()}catch(p){this.warn(`Failed to replay media interactions: ${p.message||p}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let o=e,c=r.getMeta(o);if(!c||!("attributes"in c))return;let h=this.service.state.matches("paused"),d=c.attributes,g=!1;d.rr_mediaState?g=d.rr_mediaState==="played":g=o.getAttribute("autoplay")!==null,g&&h&&o.pause();let p=1;typeof d.rr_mediaPlaybackRate=="number"&&(p=d.rr_mediaPlaybackRate);let m=!1;typeof d.rr_mediaMuted=="boolean"?m=d.rr_mediaMuted:m=o.getAttribute("muted")!==null;let v=!1;typeof d.rr_mediaLoop=="boolean"?v=d.rr_mediaLoop:v=o.getAttribute("loop")!==null;let u=1;typeof d.rr_mediaVolume=="number"&&(u=d.rr_mediaVolume);let n=0;typeof d.rr_mediaCurrentTime=="number"&&(n=d.rr_mediaCurrentTime),this.mediaMap.set(o,{isPlaying:g,currentTimeAtLastInteraction:n,lastInteractionTimeOffset:t,playbackRate:p,volume:u,muted:m,loop:v}),this.syncTargetWithState(o)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function dt(e,t){if(e.nodeName!=="DIALOG"||e instanceof xe)return;let r=e,o=r.open,c=o&&r.matches("dialog:modal"),h=r.getAttribute("rr_open_mode"),d=typeof t?.attributes.open=="string"||typeof r.getAttribute("open")=="string",g=h==="modal";if(!(o&&!(c&&h==="non-modal"||!c&&g))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}o&&r.close(),d&&(g?r.showModal():r.show())}}function Al(e,t){if(e.nodeName!=="DIALOG"||e instanceof xe)return;let 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"))}var Dl=5e3,Tl=ki||yl,ps="[replayer]",Yt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ms(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==G.TouchStart)}var _l=class{wrapper;iframe;UNSAFE_replayCanvas=!1;service;speedService;get timer(){return this.service.state.context.timer}config;usingVirtualDom=!1;virtualDom=new Ut;mouse;mouseTail=null;tailPositions=[];emitter=Tl();nextUserInteractionEvent;legacy_missingNodeRetryMap={};cache=Br();imageMap=new Map;canvasEventMap=new Map;mirror=Ss();styleMirror=new Ei;mediaManager;firstFullSnapshot=null;newDocumentQueue=[];mousePos=null;touchActive=null;lastMouseDownEvent=null;lastHoveredRootNode;lastSelectionData=null;constructedStyleMutations=[];adoptedStyleSheets=[];constructor(e,t){if(!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Yt,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(j.Resize,this.handleResize),this.setupDom();for(let d of this.config.plugins||[])d.getMirror&&d.getMirror({nodeMirror:this.mirror});this.emitter.on(j.Flush,()=>{if(this.usingVirtualDom){let d={mirror:this.mirror,applyCanvas:(g,p,m)=>{ds({event:g,mutation:p,target:m,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(g,p)=>{g.source===T.StyleSheetRule?this.applyStyleSheetRule(g,p):g.source===T.StyleDeclaration&&this.applyStyleDeclaration(g,p)},afterAppend:(g,p)=>{for(let m of this.config.plugins||[])m.onBuild&&m.onBuild(g,{id:p,replayer:this})}};if(this.iframe.contentDocument)try{bt(this.iframe.contentDocument,this.virtualDom,d,this.virtualDom.mirror)}catch(g){this.warn(g)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let g in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[g],m=St(p.node,this.mirror,this.virtualDom.mirror);bt(m,p.node,d,this.virtualDom.mirror),p.node=m}catch(p){this.warn(p)}this.constructedStyleMutations.forEach(g=>{this.applyStyleSheetMutation(g)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(g=>{this.applyAdoptedStyleSheet(g)}),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){let[d,g]=this.lastMouseDownEvent;d.dispatchEvent(g)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(j.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let o=new wl([],{speed:this.config.speed});this.service=Sl({events:e.map(d=>t&&t.unpackFn?t.unpackFn(d):d).sort((d,g)=>d.timestamp-g.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(d=>{this.emitter.emit(j.StateChange,{player:d})}),this.speedService=Cl({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedService.subscribe(d=>{this.emitter.emit(j.StateChange,{speed:d})}),this.mediaManager=new Il({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let c=this.service.state.context.events.find(d=>d.type===_.Meta),h=this.service.state.context.events.find(d=>d.type===_.FullSnapshot);if(c){let{width:d,height:g}=c.data;setTimeout(()=>{this.emitter.emit(j.Resize,{width:d,height:g})},0)}h&&setTimeout(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=h,this.rebuildFullSnapshot(h),this.iframe.contentWindow?.scrollTo(h.data.initialOffset))},1),this.service.state.context.events.find(ms)&&this.mouse.classList.add("touch-device")}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.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(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),this.iframe.contentDocument?.getElementsByTagName("html")[0]?.classList.remove("rrweb-paused"),this.emitter.emit(j.Start)}pause(e){e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),this.iframe.contentDocument?.getElementsByTagName("html")[0]?.classList.add("rrweb-paused"),this.emitter.emit(j.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(j.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(j.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;ms(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Br()}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.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=fo({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(vl(this.iframe.contentWindow,this.iframe.contentDocument),bi(this.iframe.contentWindow))}handleResize=e=>{this.iframe.style.display="inherit";for(let t of[this.mouseTail,this.iframe])t&&(t.setAttribute("width",String(e.width)),t.setAttribute("height",String(e.height)))};applyEventsSynchronously=e=>{for(let t of e){switch(t.type){case _.DomContentLoaded:case _.Load:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:}this.getCastFn(t,!0)()}};getCastFn=(e,t=!1)=>{let r;switch(e.type){case _.DomContentLoaded:case _.Load:break;case _.Annotation:r=()=>this.emitter.emit(j.Annotation,e);break;case _.Custom:r=()=>{this.emitter.emit(j.CustomEvent,e)};break;case _.Meta:r=()=>this.emitter.emit(j.Resize,{width:e.data.width,height:e.data.height});break;case _.FullSnapshot:r=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===e){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),this.iframe.contentWindow?.scrollTo(e.data.initialOffset)};break;case _.IncrementalSnapshot:r=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let c of this.service.state.context.events)if(!(c.timestamp<=e.timestamp)&&this.isUserInteraction(c)){c.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=c);break}if(this.nextUserInteractionEvent){let c=this.nextUserInteractionEvent.delay-e.delay,h={speed:Math.min(Math.round(c/Dl),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(j.SkipStart,h)}}}}return()=>{r&&r();for(let h of this.config.plugins||[])h.handler&&h.handler(e,t,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:e}});let c=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[c]){let h=()=>{c<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(j.Finish))},d=50;e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions.length&&(d+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout(h,d)}this.emitter.emit(j.EventCast,e)}};rebuildFullSnapshot(e,t=!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={};let r=[],o=new Set,c=(g,p)=>{if(g.nodeName==="DIALOG"&&o.add(g),this.collectIframeAndAttachDocument(r,g),this.mediaManager.isSupportedMediaElement(g)){let{events:m}=this.service.state.context;this.mediaManager.addMediaElements(g,e.timestamp-m[0].timestamp,this.mirror)}for(let m of this.config.plugins||[])m.onBuild&&m.onBuild(g,{id:p,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),co(e.data.node,{doc:this.iframe.contentDocument,afterAppend:c,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),c(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:g,builtNode:p}of r)this.attachDocumentToIframe(g,p),this.newDocumentQueue=this.newDocumentQueue.filter(m=>m!==g);let{documentElement:h,head:d}=this.iframe.contentDocument;this.insertStyleRules(h,d),o.forEach(g=>dt(g)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(j.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){let r=xl(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,hi(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:T.StyleSheetRule,adds:r.map((c,h)=>({rule:c,index:h}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let c=0;c<r.length;c++)o.sheet?.insertRule(r[c],c)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,o=[],c=new Set,h=(d,g)=>{d.nodeName==="DIALOG"&&c.add(d),this.collectIframeAndAttachDocument(o,d);let p=r.getMeta(d);if(p?.type===Me.Element&&p?.tagName.toUpperCase()==="HTML"){let{documentElement:m,head:v}=t.contentDocument;this.insertStyleRules(m,v)}if(!this.usingVirtualDom)for(let m of this.config.plugins||[])m.onBuild&&m.onBuild(d,{id:g,replayer:this})};tt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:h,cache:this.cache}),h(t.contentDocument,e.node.id);for(let{mutationInQueue:d,builtNode:g}of o)this.attachDocumentToIframe(d,g),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==d);c.forEach(d=>dt(d))}collectIframeAndAttachDocument(e,t){if(rt(t,this.mirror)){let r=this.newDocumentQueue.find(o=>o.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){let e=this.iframe.contentDocument?.head;if(e){let t=new Set,r,o=this.service.state,c=()=>{o=this.service.state};this.emitter.on(j.Start,c),this.emitter.on(j.Pause,c);let h=()=>{this.emitter.off(j.Start,c),this.emitter.off(j.Pause,c)};e.querySelectorAll('link[rel="stylesheet"]').forEach(d=>{d.sheet||(t.add(d),d.addEventListener("load",()=>{t.delete(d),t.size===0&&r!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(j.LoadStylesheetEnd),r&&clearTimeout(r),h())}))}),t.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(j.LoadStylesheetStart),r=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),r=-1,h()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===_.IncrementalSnapshot&&t.data.source===T.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),o=r.getContext("2d"),c=o?.createImageData(r.width,r.height);o?.putImageData(c,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let o=await Promise.all(e.commands.map(async c=>{let h=await Promise.all(c.args.map(Oe(this.imageMap,null,r)));return{...c,args:h}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:o})}else{let o=await Promise.all(e.args.map(Oe(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:o})}}}applyIncremental(e,t){let{data:r}=e;switch(r.source){case T.Mutation:try{this.applyMutation(r,t)}catch(o){this.warn(`Exception in mutation ${o.message||o}`,r)}break;case T.Drag:case T.TouchMove:case T.MouseMove:if(t){let o=r.positions[r.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:r}}else r.positions.forEach(o=>{let c={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,t,r)},delay:o.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(c)}),this.timer.addAction({doAction(){},delay:e.delay-r.positions[0]?.timeOffset});break;case T.MouseInteraction:{if(r.id===-1)break;let o=new Event(Ce(G[r.type])),c=this.mirror.getNode(r.id);if(!c)return this.debugNodeNotFound(r,r.id);this.emitter.emit(j.MouseInteraction,{type:r.type,target:c});let{triggerFocus:h}=this.config;switch(r.type){case G.Blur:"blur"in c&&c.blur();break;case G.Focus:h&&c.focus&&c.focus({preventScroll:!0});break;case G.Click:case G.TouchStart:case G.TouchEnd:case G.MouseDown:case G.MouseUp:t?(r.type===G.TouchStart?this.touchActive=!0:r.type===G.TouchEnd&&(this.touchActive=!1),r.type===G.MouseDown?this.lastMouseDownEvent=[c,o]:r.type===G.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===G.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,t,r),r.type===G.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):r.type===G.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):r.type===G.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(o));break;case G.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(o)}break}case T.Scroll:if(r.id===-1)break;if(this.usingVirtualDom){let o=this.virtualDom.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);o.scrollData=r;break}this.applyScroll(r,t);break;case T.ViewportResize:this.emitter.emit(j.Resize,{width:r.width,height:r.height});break;case T.Input:if(r.id===-1)break;if(this.usingVirtualDom){let o=this.virtualDom.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);o.inputData=r;break}this.applyInput(r);break;case T.MediaInteraction:{let o=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);let c=o,{events:h}=this.service.state.context;this.mediaManager.mediaMutation({target:c,timeOffset:e.timestamp-h[0].timestamp,mutation:r});break}case T.StyleSheetRule:case T.StyleDeclaration:this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&this.virtualDom.mirror.getNode(r.id)?.rules.push(r):this.applyStyleSheetMutation(r);break;case T.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let o=this.virtualDom.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);o.canvasMutations.push({event:e,mutation:r})}else{let o=this.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);ds({event:e,mutation:r,target:o,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case T.Font:try{let o=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);this.iframe.contentDocument?.fonts.add(o)}catch(o){this.warn(o)}break;case T.Selection:if(t){this.lastSelectionData=r;break}this.applySelection(r);break;case T.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,ya(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let p in this.legacy_missingNodeRetryMap)try{let m=this.legacy_missingNodeRetryMap[p],v=fi(m.node,this.virtualDom,this.mirror);v&&(m.node=v)}catch(m){this.warn(m)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(p=>r.getNode(p.id)?!0:(this.warnNodeNotFound(e,p.id),!1)),e.removes.forEach(p=>{let m=r.getNode(p.id);if(!m)return;let v=r.getNode(p.parentId);if(!v)return this.warnNodeNotFound(e,p.parentId);if(p.isShadow&&Pe(v)&&(v=v.shadowRoot),r.removeNodeFromMap(m),v)try{v.removeChild(m),this.usingVirtualDom&&m.nodeName==="#text"&&v.nodeName==="STYLE"&&v.rules?.length>0&&(v.rules=[])}catch(u){if(u instanceof DOMException)this.warn("parent could not remove child in mutation",v,m,e);else throw u}});let o={...this.legacy_missingNodeRetryMap},c=[],h=p=>{let m=null;return p.nextId&&(m=r.getNode(p.nextId)),p.nextId!==null&&p.nextId!==void 0&&p.nextId!==-1&&!m},d=p=>{if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let m=r.getNode(p.parentId);if(!m)return p.node.type===Me.Document?this.newDocumentQueue.push(p):c.push(p);p.node.isShadow&&(Pe(m)||m.attachShadow({mode:"open"}),m=m.shadowRoot);let v=null,u=null;if(p.previousId&&(v=r.getNode(p.previousId)),p.nextId&&(u=r.getNode(p.nextId)),h(p))return c.push(p);if(p.node.rootId&&!r.getNode(p.node.rootId))return;let n=p.node.rootId?r.getNode(p.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(rt(m,r)){this.attachDocumentToIframe(p,m);return}let i=(a,f)=>{if(!this.usingVirtualDom){dt(a);for(let y of this.config.plugins||[])y.onBuild&&y.onBuild(a,{id:f,replayer:this})}},l=tt(p.node,{doc:n,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:i});if(p.previousId===-1||p.nextId===-1){o[p.node.id]={node:l,mutation:p};return}let s=r.getMeta(m);if(s&&s.type===Me.Element&&p.node.type===Me.Text){let a=Array.isArray(m.childNodes)?m.childNodes:Array.from(m.childNodes);if(s.tagName==="textarea")for(let f of a)f.nodeType===m.TEXT_NODE&&m.removeChild(f);else if(s.tagName==="style"&&a.length===1)for(let f of a)f.nodeType===m.TEXT_NODE&&!r.hasNode(f)&&(l.textContent=f.textContent,m.removeChild(f))}else if(s?.type===Me.Document){let a=m;p.node.type===Me.DocumentType&&a.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&a.removeChild(a.childNodes[0]),l.nodeName==="HTML"&&a.documentElement&&a.removeChild(a.documentElement)}if(v&&v.nextSibling&&v.nextSibling.parentNode?m.insertBefore(l,v.nextSibling):u&&u.parentNode?m.contains(u)?m.insertBefore(l,u):m.insertBefore(l,null):m.appendChild(l),i(l,p.node.id),this.usingVirtualDom&&l.nodeName==="#text"&&m.nodeName==="STYLE"&&m.rules?.length>0&&(m.rules=[]),rt(l,this.mirror)){let a=this.mirror.getId(l),f=this.newDocumentQueue.find(y=>y.parentId===a);f&&(this.attachDocumentToIframe(f,l),this.newDocumentQueue=this.newDocumentQueue.filter(y=>y!==f))}(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(o,m,l,p)};e.adds.forEach(p=>{d(p)});let g=Date.now();for(;c.length;){let p=Ua(c);if(c.length=0,Date.now()-g>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(let m of p)r.getNode(m.value.parentId)?Si(m,v=>{d(v)}):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),Ba(e.texts).forEach(p=>{let m=r.getNode(p.id);if(!m)return e.removes.find(u=>u.id===p.id)?void 0:this.warnNodeNotFound(e,p.id);let v=m.parentElement;if(p.value&&v&&v.tagName==="STYLE"?m.textContent=At(p.value,this.cache):m.textContent=p.value,this.usingVirtualDom){let u=m.parentNode;u?.rules?.length>0&&(u.rules=[])}}),e.attributes.forEach(p=>{let m=r.getNode(p.id);if(!m)return e.removes.find(v=>v.id===p.id)?void 0:this.warnNodeNotFound(e,p.id);for(let v in p.attributes)if(typeof v=="string"){let u=p.attributes[v];if(u===null)m.removeAttribute(v),v==="open"&&Al(m,p);else if(typeof u=="string")try{if(v==="_cssText"&&(m.nodeName==="LINK"||m.nodeName==="STYLE"))try{let n=r.getMeta(m),i=tt({...n,attributes:{...n.attributes,...p.attributes}},{doc:m.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(n.attributes,p.attributes);let l=m.nextSibling,s=m.parentNode;if(i&&s){s.removeChild(m),s.insertBefore(i,l),r.replace(p.id,i);break}}catch{}if(v==="value"&&m.nodeName==="TEXTAREA"){let n=m;n.childNodes.forEach(l=>n.removeChild(l));let i=m.ownerDocument?.createTextNode(u);i&&n.appendChild(i)}else m.setAttribute(v,u);v==="rr_open_mode"&&m.nodeName==="DIALOG"&&dt(m,p)}catch(n){this.warn("An error occurred may due to the checkout feature.",n)}else if(v==="style"){let n=u,i=m;for(let l in n)if(n[l]===!1)i.style.removeProperty(l);else if(n[l]instanceof Array){let s=n[l];i.style.setProperty(l,s[0],s[1])}else{let s=n[l];i.style.setProperty(l,s)}}}})}applyScroll(e,t){let r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);let o=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)this.iframe.contentWindow?.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(o?.type===Me.Document)r.defaultView?.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,r=e.ranges.map(({start:o,startOffset:c,end:h,endOffset:d})=>{let g=this.mirror.getNode(o),p=this.mirror.getNode(h);if(!g||!p)return;let m=new Range;m.setStart(g,c),m.setEnd(p,d);let v=g.ownerDocument?.getSelection();return v&&t.add(v),{range:m,selection:v}});t.forEach(o=>o.removeAllRanges()),r.forEach(o=>o&&o.selection?.addRange(o.range))}catch{}}applyStyleSheetMutation(e){let t=null;e.styleId?t=this.styleMirror.getStyle(e.styleId):e.id&&(t=this.mirror.getNode(e.id)?.sheet||null),t&&(e.source===T.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===T.StyleDeclaration&&this.applyStyleDeclaration(e,t))}applyStyleSheetRule(e,t){if(e.adds?.forEach(({rule:r,index:o})=>{try{if(Array.isArray(o)){let{positions:c,index:h}=Qr(o);Qe(t.cssRules,c)?.insertRule(r,h)}else{let c=o===void 0?void 0:Math.min(o,t.cssRules.length);t?.insertRule(r,c)}}catch{}}),e.removes?.forEach(({index:r})=>{try{if(Array.isArray(r)){let{positions:o,index:c}=Qr(r);Qe(t.cssRules,o)?.deleteRule(c||0)}else t?.deleteRule(r)}catch{}}),typeof e.replace=="string")try{t.replace?.(e.replace)}catch{}if(typeof e.replaceSync=="string")try{t.replaceSync?.(e.replaceSync)}catch{}}applyStyleDeclaration(e,t){if(e.set){let r=Qe(t.rules,e.index);r?.style&&r.style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){let r=Qe(t.rules,e.index);r?.style&&r.style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){let t=this.mirror.getNode(e.id);if(!t)return;e.styles?.forEach(h=>{let d=null,g=null;if(Pe(t)?g=t.ownerDocument?.defaultView||null:t.nodeName==="#document"&&(g=t.defaultView),!!g)try{d=new g.CSSStyleSheet,this.styleMirror.add(d,h.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:h.rules},d)}catch{}});let r=10,o=0,c=(h,d)=>{let g=d.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);Pe(h)?h.shadowRoot.adoptedStyleSheets=g:h.nodeName==="#document"&&(h.adoptedStyleSheets=g),g.length!==d.length&&o<r&&(setTimeout(()=>c(h,d),0+100*o),o++)};c(t,e.styleIds)}legacy_resolveMissingNode(e,t,r,o){let{previousId:c,nextId:h}=o,d=c&&e[c],g=h&&e[h];if(d){let{node:p,mutation:m}=d;t.insertBefore(p,r),delete e[m.node.id],delete this.legacy_missingNodeRetryMap[m.node.id],(m.previousId||m.nextId)&&this.legacy_resolveMissingNode(e,t,p,m)}if(g){let{node:p,mutation:m}=g;t.insertBefore(p,r.nextSibling),delete e[m.node.id],delete this.legacy_missingNodeRetryMap[m.node.id],(m.previousId||m.nextId)&&this.legacy_resolveMissingNode(e,t,p,m)}}moveAndHover(e,t,r,o,c){let h=this.mirror.getNode(r);if(!h)return this.debugNodeNotFound(c,r);let d=xi(h,this.iframe),g=e*d.absoluteScale+d.x,p=t*d.absoluteScale+d.y;this.mouse.style.left=`${g}px`,this.mouse.style.top=`${p}px`,o||this.drawMouseTail({x:g,y:p}),this.hoverElements(h)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:o,duration:c}=this.config.mouseTail===!0?Yt:Object.assign({},Yt,this.config.mouseTail),h=()=>{if(!this.mouseTail)return;let d=this.mouseTail.getContext("2d");!d||!this.tailPositions.length||(d.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),d.beginPath(),d.lineWidth=r,d.lineCap=t,d.strokeStyle=o,d.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(g=>d.lineTo(g.x,g.y)),d.stroke())};this.tailPositions.push(e),h(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(d=>d!==e),h()},c/this.speedService.state.context.timer.speed)}hoverElements(e){(this.lastHoveredRootNode||this.iframe.contentDocument)?.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let t=e;for(;t;)t.classList&&t.classList.add(":hover"),t=t.parentElement}isUserInteraction(e){return e.type!==_.IncrementalSnapshot?!1:e.data.source>T.Mutation&&e.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(j.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ps,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ps,...e)}},{addCustomEvent:kl,addAnnotation:Ll}=Te,{freezePage:Pl}=Te,{takeFullSnapshot:Fl}=Te;export{_l as Replayer};
|