@extn/segi-js 0.2.13 → 0.2.15
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 +48 -11
- package/dist/cdn.global.js +29 -29
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +48 -3
- package/dist/index.mjs +47 -2
- package/dist/replay/index.d.mts +7 -0
- package/dist/replay/index.d.ts +7 -0
- package/dist/replay/index.js +121 -32
- package/dist/replay/index.mjs +100 -11
- package/package.json +2 -1
package/dist/cdn.global.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";var __segiBundle=(()=>{var hu=Object.create;var jt=Object.defineProperty;var fu=Object.getOwnPropertyDescriptor;var du=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,mu=Object.prototype.hasOwnProperty;var ft=(s,e)=>()=>(s&&(e=s(s=0)),e);var hs=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Gt=(s,e)=>{for(var t in e)jt(s,t,{get:e[t],enumerable:!0})},En=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of du(e))!mu.call(s,i)&&i!==t&&jt(s,i,{get:()=>e[i],enumerable:!(r=fu(e,i))||r.enumerable});return s};var gu=(s,e,t)=>(t=s!=null?hu(pu(s)):{},En(e||!s||!s.__esModule?jt(t,"default",{value:s,enumerable:!0}):t,s)),yu=s=>En(jt({},"__esModule",{value:!0}),s);var Nn=hs(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.SEGI_DEFAULT_ADMIN_URL=le.SEGI_DEFAULT_CDN_URL=le.SEGI_DEFAULT_PM2_ENDPOINT=le.SEGI_DEFAULT_INGEST_ENDPOINT=le.SEGI_DEFAULT_API_BASE=void 0;le.SEGI_DEFAULT_API_BASE="https://segiapi.extn.ai";le.SEGI_DEFAULT_INGEST_ENDPOINT="https://segiapi.extn.ai/api/ingest/events";le.SEGI_DEFAULT_PM2_ENDPOINT="https://segiapi.extn.ai/api/ingest/pm2";le.SEGI_DEFAULT_CDN_URL="https://cdn.extn.ai/segi/segi.min.js";le.SEGI_DEFAULT_ADMIN_URL="https://segi.extn.ai"});var Rn=hs(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.scrubHeaders=Mn;dt.scrubObject=Pe;dt.scrubEvent=vu;var wu=new Set(["authorization","cookie","set-cookie","x-api-key","proxy-authorization"]),bu=[/^password$/i,/^passwd$/i,/token/i,/secret/i,/api[-_]?key/i,/^authorization$/i,/card[-_]?number/i,/^rrn$/i,/^residentnumber$/i],An="[Filtered]";function Mn(s){if(!s)return s;let e={};for(let[t,r]of Object.entries(s))wu.has(t.toLowerCase())?e[t]=An:e[t]=r;return e}function Su(s){return bu.some(e=>e.test(s))}function Pe(s,e=0){if(e>8||s==null)return s;if(Array.isArray(s))return s.map(t=>Pe(t,e+1));if(typeof s=="object"){let t={};for(let[r,i]of Object.entries(s))Su(r)?t[r]=An:t[r]=Pe(i,e+1);return t}return s}function vu(s){let e=JSON.parse(JSON.stringify(s));return e.request&&(e.request.headers=Mn(e.request.headers),e.request.body=Pe(e.request.body),e.request.query=Pe(e.request.query)),e.extra&&(e.extra=Pe(e.extra)),e.tags&&(e.tags=Pe(e.tags)),e}});var Dn=hs(Ne=>{"use strict";var Cu=Ne&&Ne.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),On=Ne&&Ne.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Cu(e,s,t)};Object.defineProperty(Ne,"__esModule",{value:!0});On(Nn(),Ne);On(Rn(),Ne)});function Yt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s==="x"?e:e&3|8).toString(16)})}function Ln(){try{if(typeof sessionStorage>"u")return null;let s=sessionStorage.getItem(kn),e=Number(sessionStorage.getItem($n)??"0");return!s||!e?null:{uid:s,at:e}}catch{return null}}function ms(s,e){try{if(typeof sessionStorage>"u")return;sessionStorage.setItem(kn,s),sessionStorage.setItem($n,String(e))}catch{}}function Pn(){let s=Date.now(),e=Ln();if(e&&s-e.at<18e5)return ms(e.uid,s),e.uid;let t=Yt();return ms(t,s),xu=t,t}function Zt(){let s=Ln();s&&ms(s.uid,Date.now())}function gs(){try{if(typeof localStorage>"u")return Ve||(Ve=Yt()),Ve;let s=localStorage.getItem(_n);if(s)return s;let e=Yt();return localStorage.setItem(_n,e),e}catch{return Ve||(Ve=Yt()),Ve}}var kn,$n,_n,xu,Ve,Fn=ft(()=>{"use strict";kn="_bd_session_uid",$n="_bd_session_at",_n="_bd_anon",xu=null,Ve=null});function Un(s){return(s&&s.trim()||Nu).replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")}async function je(s,e,t){let r=`${Un(s.endpoint)}/api/trace${e}`;try{return await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":s.projectKey},body:JSON.stringify(t)})}catch{return null}}function ys(s,e,t){try{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;let r=`${Un(s.endpoint)}/api/trace${e}?pk=${encodeURIComponent(s.projectKey)}`,i=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(r,i)}catch{return!1}}var Nu,Bn=ft(()=>{"use strict";Nu="https://segiapi.extn.ai"});var eu={};Gt(eu,{EventType:()=>x,IncrementalSource:()=>E,MouseInteractions:()=>k,Replayer:()=>ki,ReplayerEvents:()=>_,addCustomEvent:()=>Lm,canvasMutation:()=>Ti,freezePage:()=>Pm,mirror:()=>jr,record:()=>Te,takeFullSnapshot:()=>Fm,utils:()=>Kp});function $i(s){if(Xt[s])return Xt[s];let e=globalThis[s],t=e.prototype,r=s in Vn?Vn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in jn?jn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Du())return Xt[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?Xt[s]=u:t}catch{return t}}function Ee(s,e,t){var r;let i=`${s}.${String(t)}`;if(ws[i])return ws[i].call(e);let n=$i(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ws[i]=o,o.call(e)):e[t]}function ea(s,e,t){let r=`${s}.${String(t)}`;if(bs[r])return bs[r].bind(e);let n=$i(s)[t];return typeof n!="function"?e[t]:(bs[r]=n,n.bind(e))}function Tu(s){return Ee("Node",s,"ownerDocument")}function _u(s){return Ee("Node",s,"childNodes")}function ku(s){return Ee("Node",s,"parentNode")}function $u(s){return Ee("Node",s,"parentElement")}function Lu(s){return Ee("Node",s,"textContent")}function Pu(s,e){return ea("Node",s,"contains")(e)}function Fu(s){return ea("Node",s,"getRootNode")()}function Uu(s){return!s||!("host"in s)?null:Ee("ShadowRoot",s,"host")}function Bu(s){return s.styleSheets}function Wu(s){return!s||!("shadowRoot"in s)?null:Ee("Element",s,"shadowRoot")}function zu(s,e){return Ee("Element",s,"querySelector")(e)}function Vu(s,e){return Ee("Element",s,"querySelectorAll")(e)}function ju(){return $i("MutationObserver").constructor}function Gu(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function Li(s){return s.nodeType===s.ELEMENT_NODE}function St(s){let e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function vt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Hu(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Yu(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function _s(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,i=>ta(i,t)).join("");return Hu(r)}catch{return null}}function ta(s,e){if(Xu(s)){let t;try{t=_s(s.styleSheet)||Yu(s)}catch{t=s.cssText}return s.styleSheet.href?Mr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ku(s)&&s.selectorText.includes(":")&&(t=Zu(t)),e?Mr(t,e):t}}function Zu(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Xu(s){return"styleSheet"in s}function Ku(s){return"selectorText"in s}function ra(){return new It}function Nr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",a=r&&De(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function De(s){return s.toLowerCase()}function Ju(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=Gn in n?n[Gn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function qu(s,e){return!s||!e||s.type!==e.type?!1:s.type===M.Document?s.compatMode===e.compatMode:s.type===M.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===M.Comment||s.type===M.Text||s.type===M.CDATA?s.textContent===e.textContent:s.type===M.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Ar(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?De(e):null}function Pi(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function Qu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}function Mr(s,e){return(s||"").replace(ec,(t,r,i,n,o,a)=>{let l=i||o||a,u=r||n||"";if(!l)return t;if(tc.test(l)||rc.test(l))return`url(${u}${l}${u})`;if(sc.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Qu(e)+l}${u})`;let c=e.split("/"),h=l.split("/");c.pop();for(let f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Kt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ic(s,e,t=!1){let r=Array.from(e.childNodes),i=[],n=0;if(r.length>1&&s&&typeof s=="string"){let o=Kt(s,t),a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){let u=Kt(r[l].textContent,t),c=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),m=o.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")p=o.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=o.split(f),m.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(p=o.indexOf(f));if(m.length>=2&&h>c){let g=r[l-1].textContent;if(g&&typeof g=="string"){let d=Kt(g).length;p=o.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let g=Math.floor(p/a);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;let d=Kt(s.substring(0,g),t);if(d.length===p){i.push(s.substring(0,g)),s=s.substring(g),o=o.substring(p);break}else d.length<p?g+=Math.max(1,Math.floor((p-d.length)/a)):g-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function nc(s,e){return ic(s,e).join("/* rr_split */")}function sa(){return oc++}function lc(s){if(s instanceof HTMLFormElement)return"form";let e=De(s.tagName);return ac.test(e)?"div":e}function hc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}let i=[];for(;r(cc),!(t>=e.length);){let n=r(uc);if(n.slice(-1)===",")n=Xe(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Xe(s,n);let a=!1;for(;;){let l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}function Xe(s,e){return!e||e.trim()===""?e:Fi(s,e)}function fc(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Fi(s,e){let t=Yn.get(s);if(t||(t=s.createElement("a"),Yn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ia(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Xe(s,r):t==="srcset"?hc(s,r):t==="style"?Mr(r,Fi(s)):e==="object"&&t==="data"?Xe(s,r):r)}function na(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function dc(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Rr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Rr(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Rr(ee.parentNode(s),e,t):!1}function oa(s,e,t,r){let i;if(Li(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Rr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function pc(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function mc(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function gc(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:g=!1,cssCaptured:d=!1}=e,w=yc(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:M.Document,childNodes:[],compatMode:s.compatMode}:{type:M.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return bc(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:g,rootId:w});case s.TEXT_NODE:return wc(s,{doc:t,needsMask:o,maskTextFn:u,rootId:w,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return{type:M.Comment,textContent:ee.textContent(s)||"",rootId:w};default:return!1}}function yc(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function wc(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=ee.parentNode(s),a=o&&o.tagName,l="",u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":n||(l=ee.textContent(s),u&&l&&(l=Mr(l,Fi(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:M.Text,textContent:l||"",rootId:i}}function bc(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:m}=e,p=dc(s,r,i),g=lc(s),d={},w=s.attributes.length;for(let y=0;y<w;y++){let v=s.attributes[y];na(g,v.name,v.value)||(d[v.name]=ia(t,g,De(v.name),v.value))}if(g==="link"&&n){let y=Array.from(t.styleSheets).find(N=>N.href===s.href),v=null;y&&(v=_s(y)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(g==="style"&&s.sheet){let y=_s(s.sheet);y&&(s.childNodes.length>1&&(y=nc(y,s)),d._cssText=y)}if(["input","textarea","select"].includes(g)){let y=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&y?d.value=Nr({element:s,type:Ar(s),tagName:g,value:y,maskInputOptions:o,maskInputFn:a}):v&&(d.checked=v)}if(g==="option"&&(s.selected&&!o.select?d.selected=!0:delete d.selected),g==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),g==="canvas"&&c){if(s.__context==="2d")Ju(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){let y=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let N=v.toDataURL(l.type,l.quality);y!==N&&(d.rr_dataURL=y)}}if(g==="img"&&u){Ge||(Ge=t.createElement("canvas"),Hn=Ge.getContext("2d"));let y=s,v=y.currentSrc||y.getAttribute("src")||"<unknown-src>",N=y.crossOrigin,A=()=>{y.removeEventListener("load",A);try{Ge.width=y.naturalWidth,Ge.height=y.naturalHeight,Hn.drawImage(y,0,0),d.rr_dataURL=Ge.toDataURL(l.type,l.quality)}catch(W){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${v}! Error: ${W}`)}y.crossOrigin==="anonymous"&&(N?d.crossOrigin=N:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A)}if(["audio","video"].includes(g)){let y=d;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){let{width:y,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${y}px`,rr_height:`${v}px`}}g==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(g)&&(S=!0)}catch{}return{type:M.Element,tagName:g,attributes:d,childNodes:[],isSVG:fc(s)||void 0,needBlock:p,rootId:m,isCustom:S}}function z(s){return s==null?"":s.toLowerCase()}function aa(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Sc(s,e){if(e.comment&&s.type===M.Comment)return!0;if(s.type===M.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Pi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(z(s.attributes.name).match(/^msapplication-tile(image|color)$/)||z(s.attributes.name)==="application-name"||z(s.attributes.rel)==="icon"||z(s.attributes.rel)==="apple-touch-icon"||z(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&z(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(z(s.attributes.property).match(/^(og|twitter|fb):/)||z(s.attributes.name).match(/^(og|twitter):/)||z(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(z(s.attributes.name)==="robots"||z(s.attributes.name)==="googlebot"||z(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(z(s.attributes.name)==="author"||z(s.attributes.name)==="generator"||z(s.attributes.name)==="framework"||z(s.attributes.name)==="publisher"||z(s.attributes.name)==="progid"||z(s.attributes.property).match(/^article:/)||z(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(z(s.attributes.name)==="google-site-verification"||z(s.attributes.name)==="yandex-verification"||z(s.attributes.name)==="csrf-token"||z(s.attributes.name)==="p:domain_verify"||z(s.attributes.name)==="verify-v1"||z(s.attributes.name)==="verification"||z(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ke(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:m,dataURLOptions:p={},inlineImages:g=!1,recordCanvas:d=!1,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:W=!1,cssCaptured:U=!1}=e,{needsMask:Y}=e,{preserveWhiteSpace:Q=!0}=e;Y||(Y=oa(s,o,a,Y===void 0));let se=gc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:g,recordCanvas:d,keepIframeSrcFn:A,newlyAddedElement:W,cssCaptured:U});if(!se)return console.warn(s,"not serialized"),null;let ie;r.hasNode(s)?ie=r.getId(s):Sc(se,m)||!Q&&se.type===M.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?ie=xt:ie=sa();let O=Object.assign(se,{id:ie});if(r.add(s,O),ie===xt)return null;w&&w(s);let _e=!l;if(O.type===M.Element){_e=_e&&!O.needBlock,delete O.needBlock;let Z=ee.shadowRoot(s);Z&&vt(Z)&&(O.isShadowHost=!0)}if((O.type===M.Document||O.type===M.Element)&&_e){m.headWhitespace&&O.type===M.Element&&O.tagName==="head"&&(Q=!1);let Z={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:m,dataURLOptions:p,inlineImages:g,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:N,keepIframeSrcFn:A,cssCaptured:!1};if(!(O.type===M.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===M.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(let ue of Array.from(ee.childNodes(s))){let ne=Ke(ue,Z);ne&&O.childNodes.push(ne)}}let L=null;if(Li(s)&&(L=ee.shadowRoot(s)))for(let ue of Array.from(ee.childNodes(L))){let ne=Ke(ue,Z);ne&&(vt(L)&&(ne.isShadow=!0),O.childNodes.push(ne))}}let ke=ee.parentNode(s);return ke&&St(ke)&&vt(ke)&&(O.isShadow=!0),O.type===M.Element&&O.tagName==="iframe"&&pc(s,()=>{let Z=s.contentDocument;if(Z&&S){let L=Ke(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:m,dataURLOptions:p,inlineImages:g,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:N,keepIframeSrcFn:A});L&&S(s,L)}},y),O.type===M.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Pi(O.attributes.href)==="css")&&mc(s,()=>{if(v){let Z=Ke(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:m,dataURLOptions:p,inlineImages:g,recordCanvas:d,preserveWhiteSpace:Q,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:N,keepIframeSrcFn:A});Z&&v(s,Z)}},N),O}function vc(s,e){let{mirror:t=new It,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:m=!1,dataURLOptions:p,preserveWhiteSpace:g,onSerialize:d,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:N=()=>!1}=e||{},A=c===!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}:c===!1?{password:!0}:c,W=aa(m);return Ke(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:A,maskTextFn:h,maskInputFn:f,slimDOMOptions:W,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:g,onSerialize:d,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:N,newlyAddedElement:!1})}function xc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Nc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Oc(s){return s[0].toUpperCase()+s.slice(1)}function Ls(s,e){new Dc(e).stringify(s)}function Ps(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Ps(o,t)):(n==="object"&&i!==null&&(i=Ps(i)),t[r]=i)}return t}function jc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function Ea(s){return s.map(e=>(e.nodes&&(e.nodes=Ea(e.nodes)),delete e.source,e))}function Ia(s){if(s[ya]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ia(e)}function Ch(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function _r(s,e){let t=new Ah(s,e),r=new Nh(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
1
|
+
"use strict";var __segiBundle=(()=>{var xu=Object.create;var Kt=Object.defineProperty;var Au=Object.getOwnPropertyDescriptor;var Nu=Object.getOwnPropertyNames;var Mu=Object.getPrototypeOf,Ru=Object.prototype.hasOwnProperty;var yt=(s,e)=>()=>(s&&(e=s(s=0)),e);var ys=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Jt=(s,e)=>{for(var t in e)Kt(s,t,{get:e[t],enumerable:!0})},kn=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nu(e))!Ru.call(s,i)&&i!==t&&Kt(s,i,{get:()=>e[i],enumerable:!(r=Au(e,i))||r.enumerable});return s};var Ou=(s,e,t)=>(t=s!=null?xu(Mu(s)):{},kn(e||!s||!s.__esModule?Kt(t,"default",{value:s,enumerable:!0}):t,s)),Du=s=>kn(Kt({},"__esModule",{value:!0}),s);var $n=ys(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.SEGI_DEFAULT_ADMIN_URL=ue.SEGI_DEFAULT_CDN_URL=ue.SEGI_DEFAULT_PM2_ENDPOINT=ue.SEGI_DEFAULT_INGEST_ENDPOINT=ue.SEGI_DEFAULT_API_BASE=void 0;ue.SEGI_DEFAULT_API_BASE="https://segiapi.extn.ai";ue.SEGI_DEFAULT_INGEST_ENDPOINT="https://segiapi.extn.ai/api/ingest/events";ue.SEGI_DEFAULT_PM2_ENDPOINT="https://segiapi.extn.ai/api/ingest/pm2";ue.SEGI_DEFAULT_CDN_URL="https://cdn.extn.ai/segi/segi.min.js";ue.SEGI_DEFAULT_ADMIN_URL="https://segi.extn.ai"});var Bn=ys(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.scrubHeaders=Un;wt.scrubObject=$e;wt.scrubEvent=Pu;var Tu=new Set(["authorization","cookie","set-cookie","x-api-key","proxy-authorization"]),_u=[/^password$/i,/^passwd$/i,/token/i,/secret/i,/api[-_]?key/i,/^authorization$/i,/card[-_]?number/i,/^rrn$/i,/^residentnumber$/i],Fn="[Filtered]";function Un(s){if(!s)return s;let e={};for(let[t,r]of Object.entries(s))Tu.has(t.toLowerCase())?e[t]=Fn:e[t]=r;return e}function ku(s){return _u.some(e=>e.test(s))}function $e(s,e=0){if(e>8||s==null)return s;if(Array.isArray(s))return s.map(t=>$e(t,e+1));if(typeof s=="object"){let t={};for(let[r,i]of Object.entries(s))ku(r)?t[r]=Fn:t[r]=$e(i,e+1);return t}return s}function Pu(s){let e=JSON.parse(JSON.stringify(s));return e.request&&(e.request.headers=Un(e.request.headers),e.request.body=$e(e.request.body),e.request.query=$e(e.request.query)),e.extra&&(e.extra=$e(e.extra)),e.tags&&(e.tags=$e(e.tags)),e}});var zn=ys(Ae=>{"use strict";var Lu=Ae&&Ae.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),Wn=Ae&&Ae.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Lu(e,s,t)};Object.defineProperty(Ae,"__esModule",{value:!0});Wn($n(),Ae);Wn(Bn(),Ae)});function Cs(s){try{let e=JSON.parse(sessionStorage.getItem(Yn)||"null");if(e?.sessionUid===s&&Number.isFinite(Date.parse(e.startedAt))&&[e.clickCount,e.pagesVisited].every(t=>Number.isSafeInteger(t)&&t>=0))return e}catch{}return{sessionUid:s,startedAt:new Date().toISOString(),clickCount:0,pagesVisited:0}}function Zn(s){try{sessionStorage.setItem(Yn,JSON.stringify(s))}catch{}}function Qt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s==="x"?e:e&3|8).toString(16)})}function Xn(){try{if(typeof sessionStorage>"u")return null;let s=sessionStorage.getItem(Gn),e=Number(sessionStorage.getItem(Hn)??"0");return!s||!e?null:{uid:s,at:e}}catch{return null}}function vs(s,e){try{if(typeof sessionStorage>"u")return;sessionStorage.setItem(Gn,s),sessionStorage.setItem(Hn,String(e))}catch{}}function Kn(){let s=Date.now(),e=Xn();if(e&&s-e.at<18e5&&s-Date.parse(Cs(e.uid).startedAt)<18e5)return vs(e.uid,s),e.uid;let t=Qt();return vs(t,s),Uu=t,t}function St(){let s=Xn();s&&vs(s.uid,Date.now())}function Es(){try{if(typeof localStorage>"u")return Ge||(Ge=Qt()),Ge;let s=localStorage.getItem(jn);if(s)return s;let e=Qt();return localStorage.setItem(jn,e),e}catch{return Ge||(Ge=Qt()),Ge}}var Gn,Hn,jn,Yn,Uu,Ge,Jn=yt(()=>{"use strict";Gn="_bd_session_uid",Hn="_bd_session_at",jn="_bd_anon",Yn="_segi_replay_progress",Uu=null,Ge=null});function qn(s){return(s&&s.trim()||Bu).replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")}async function Fe(s,e,t){let r=`${qn(s.endpoint)}/api/trace${e}`;try{return await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-Segi-Project-Key":s.projectKey},body:JSON.stringify(t)})}catch{return null}}function Is(s,e,t){try{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;let r=`${qn(s.endpoint)}/api/trace${e}?pk=${encodeURIComponent(s.projectKey)}`,i=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(r,i)}catch{return!1}}var Bu,Qn=yt(()=>{"use strict";Bu="https://segiapi.extn.ai"});var du={};Jt(du,{EventType:()=>A,IncrementalSource:()=>I,MouseInteractions:()=>P,Replayer:()=>Wi,ReplayerEvents:()=>k,addCustomEvent:()=>Km,canvasMutation:()=>Ui,freezePage:()=>Jm,mirror:()=>Xr,record:()=>Te,takeFullSnapshot:()=>qm,utils:()=>cm});function zi(s){if(er[s])return er[s];let e=globalThis[s],t=e.prototype,r=s in ro?ro[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in so?so[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Gu())return er[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?er[s]=u:t}catch{return t}}function Ie(s,e,t){var r;let i=`${s}.${String(t)}`;if(xs[i])return xs[i].call(e);let o=zi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(xs[i]=n,n.call(e)):e[t]}function da(s,e,t){let r=`${s}.${String(t)}`;if(As[r])return As[r].bind(e);let o=zi(s)[t];return typeof o!="function"?e[t]:(As[r]=o,o.bind(e))}function Hu(s){return Ie("Node",s,"ownerDocument")}function Yu(s){return Ie("Node",s,"childNodes")}function Zu(s){return Ie("Node",s,"parentNode")}function Xu(s){return Ie("Node",s,"parentElement")}function Ku(s){return Ie("Node",s,"textContent")}function Ju(s,e){return da("Node",s,"contains")(e)}function qu(s){return da("Node",s,"getRootNode")()}function Qu(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function ec(s){return s.styleSheets}function tc(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function rc(s,e){return Ie("Element",s,"querySelector")(e)}function sc(s,e){return Ie("Element",s,"querySelectorAll")(e)}function ic(){return zi("MutationObserver").constructor}function nc(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function Vi(s){return s.nodeType===s.ELEMENT_NODE}function At(s){let e=s&&"host"in s&&"mode"in s&&te.host(s)||null;return!!(e&&"shadowRoot"in e&&te.shadowRoot(e)===s)}function Nt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function oc(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ac(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Bs(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,i=>pa(i,t)).join("");return oc(r)}catch{return null}}function pa(s,e){if(uc(s)){let t;try{t=Bs(s.styleSheet)||ac(s)}catch{t=s.cssText}return s.styleSheet.href?_r(t,s.styleSheet.href):t}else{let t=s.cssText;return cc(s)&&s.selectorText.includes(":")&&(t=lc(t)),e?_r(t,e):t}}function lc(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function uc(s){return"styleSheet"in s}function cc(s){return"selectorText"in s}function ma(){return new Ot}function Dr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"",a=r&&De(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function De(s){return s.toLowerCase()}function hc(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let o=e.getImageData,n=io in o?o[io]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function fc(s,e){return!s||!e||s.type!==e.type?!1:s.type===M.Document?s.compatMode===e.compatMode:s.type===M.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===M.Comment||s.type===M.Text||s.type===M.CDATA?s.textContent===e.textContent:s.type===M.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Tr(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?De(e):null}function ji(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function dc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}function _r(s,e){return(s||"").replace(pc,(t,r,i,o,n,a)=>{let l=i||n||a,u=r||o||"";if(!l)return t;if(mc.test(l)||gc.test(l))return`url(${u}${l}${u})`;if(yc.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${dc(e)+l}${u})`;let c=e.split("/"),h=l.split("/");c.pop();for(let f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function tr(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function wc(s,e,t=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&s&&typeof s=="string"){let n=tr(s,t),a=n.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){let u=tr(r[l].textContent,t),c=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=n.split(f),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")m=n.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=n.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=n.indexOf(f));if(g.length>=2&&h>c){let p=r[l-1].textContent;if(p&&typeof p=="string"){let d=tr(p).length;m=n.indexOf(f,d)}m===-1&&(m=g[0].length)}if(m!==-1){let p=Math.floor(m/a);for(;p>0&&p<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;let d=tr(s.substring(0,p),t);if(d.length===m){i.push(s.substring(0,p)),s=s.substring(p),n=n.substring(m);break}else d.length<m?p+=Math.max(1,Math.floor((m-d.length)/a)):p-=Math.max(1,Math.floor((d.length-m)*a))}break}}}}return i.push(s),i}function Sc(s,e){return wc(s,e).join("/* rr_split */")}function ga(){return bc++}function Cc(s){if(s instanceof HTMLFormElement)return"form";let e=De(s.tagName);return vc.test(e)?"div":e}function xc(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n,a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}let i=[];for(;r(Ic),!(t>=e.length);){let o=r(Ec);if(o.slice(-1)===",")o=Ke(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ke(s,o);let a=!1;for(;;){let l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}function Ke(s,e){return!e||e.trim()===""?e:Gi(s,e)}function Ac(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Gi(s,e){let t=oo.get(s);if(t||(t=s.createElement("a"),oo.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ya(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Ke(s,r):t==="srcset"?xc(s,r):t==="style"?_r(r,Gi(s)):e==="object"&&t==="data"?Ke(s,r):r)}function wa(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Nc(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function kr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?kr(te.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?kr(te.parentNode(s),e,t):!1}function Sa(s,e,t,r){let i;if(Vi(s)){if(i=s,!te.childNodes(i).length)return!1}else{if(te.parentElement(s)===null)return!1;i=te.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(kr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function Mc(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}let n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Rc(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Oc(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:d=!1}=e,w=Dc(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:M.Document,childNodes:[],compatMode:s.compatMode}:{type:M.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return _c(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:w});case s.TEXT_NODE:return Tc(s,{doc:t,needsMask:n,maskTextFn:u,rootId:w,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return{type:M.Comment,textContent:te.textContent(s)||"",rootId:w};default:return!1}}function Dc(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Tc(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=te.parentNode(s),a=n&&n.tagName,l="",u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=te.textContent(s),u&&l&&(l=_r(l,Gi(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,te.parentElement(s)):l.replace(/[\S]/g,"*")),{type:M.Text,textContent:l||"",rootId:i}}function _c(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,m=Nc(s,r,i),p=Cc(s),d={},w=s.attributes.length;for(let y=0;y<w;y++){let v=s.attributes[y];wa(p,v.name,v.value)||(d[v.name]=ya(t,p,De(v.name),v.value))}if(p==="link"&&o){let y=Array.from(t.styleSheets).find(x=>x.href===s.href),v=null;y&&(v=Bs(y)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(p==="style"&&s.sheet){let y=Bs(s.sheet);y&&(s.childNodes.length>1&&(y=Sc(y,s)),d._cssText=y)}if(["input","textarea","select"].includes(p)){let y=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&y?d.value=Dr({element:s,type:Tr(s),tagName:p,value:y,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(p==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),p==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&c){if(s.__context==="2d")hc(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){let y=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let x=v.toDataURL(l.type,l.quality);y!==x&&(d.rr_dataURL=y)}}if(p==="img"&&u){He||(He=t.createElement("canvas"),no=He.getContext("2d"));let y=s,v=y.currentSrc||y.getAttribute("src")||"<unknown-src>",x=y.crossOrigin,N=()=>{y.removeEventListener("load",N);try{He.width=y.naturalWidth,He.height=y.naturalHeight,no.drawImage(y,0,0),d.rr_dataURL=He.toDataURL(l.type,l.quality)}catch($){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?N():y.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${v}! Error: ${$}`)}y.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?N():y.addEventListener("load",N)}if(["audio","video"].includes(p)){let y=d;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),m){let{width:y,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${y}px`,rr_height:`${v}px`}}p==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(p)&&(S=!0)}catch{}return{type:M.Element,tagName:p,attributes:d,childNodes:[],isSVG:Ac(s)||void 0,needBlock:m,rootId:g,isCustom:S}}function z(s){return s==null?"":s.toLowerCase()}function ba(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function kc(s,e){if(e.comment&&s.type===M.Comment)return!0;if(s.type===M.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&ji(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(z(s.attributes.name).match(/^msapplication-tile(image|color)$/)||z(s.attributes.name)==="application-name"||z(s.attributes.rel)==="icon"||z(s.attributes.rel)==="apple-touch-icon"||z(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&z(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(z(s.attributes.property).match(/^(og|twitter|fb):/)||z(s.attributes.name).match(/^(og|twitter):/)||z(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(z(s.attributes.name)==="robots"||z(s.attributes.name)==="googlebot"||z(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(z(s.attributes.name)==="author"||z(s.attributes.name)==="generator"||z(s.attributes.name)==="framework"||z(s.attributes.name)==="publisher"||z(s.attributes.name)==="progid"||z(s.attributes.property).match(/^article:/)||z(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(z(s.attributes.name)==="google-site-verification"||z(s.attributes.name)==="yandex-verification"||z(s.attributes.name)==="csrf-token"||z(s.attributes.name)==="p:domain_verify"||z(s.attributes.name)==="verify-v1"||z(s.attributes.name)==="verification"||z(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Je(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:d=!1,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:$=!1,cssCaptured:_=!1}=e,{needsMask:V}=e,{preserveWhiteSpace:ee=!0}=e;V||(V=Sa(s,n,a,V===void 0));let ie=Oc(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:p,recordCanvas:d,keepIframeSrcFn:N,newlyAddedElement:$,cssCaptured:_});if(!ie)return console.warn(s,"not serialized"),null;let ne;r.hasNode(s)?ne=r.getId(s):kc(ie,g)||!ee&&ie.type===M.Text&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Dt:ne=ga();let O=Object.assign(ie,{id:ne});if(r.add(s,O),ne===Dt)return null;w&&w(s);let _e=!l;if(O.type===M.Element){_e=_e&&!O.needBlock,delete O.needBlock;let X=te.shadowRoot(s);X&&Nt(X)&&(O.isShadowHost=!0)}if((O.type===M.Document||O.type===M.Element)&&_e){g.headWhitespace&&O.type===M.Element&&O.tagName==="head"&&(ee=!1);let X={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:ee,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N,cssCaptured:!1};if(!(O.type===M.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===M.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(X.cssCaptured=!0);for(let ce of Array.from(te.childNodes(s))){let oe=Je(ce,X);oe&&O.childNodes.push(oe)}}let F=null;if(Vi(s)&&(F=te.shadowRoot(s)))for(let ce of Array.from(te.childNodes(F))){let oe=Je(ce,X);oe&&(Nt(F)&&(oe.isShadow=!0),O.childNodes.push(oe))}}let ke=te.parentNode(s);return ke&&At(ke)&&Nt(ke)&&(O.isShadow=!0),O.type===M.Element&&O.tagName==="iframe"&&Mc(s,()=>{let X=s.contentDocument;if(X&&S){let F=Je(X,{doc:X,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:ee,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});F&&S(s,F)}},y),O.type===M.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&ji(O.attributes.href)==="css")&&Rc(s,()=>{if(v){let X=Je(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:V,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:ee,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:N});X&&v(s,X)}},x),O}function Pc(s,e){let{mirror:t=new Ot,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{},N=c===!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}:c===!1?{password:!0}:c,$=ba(g);return Je(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:N,maskTextFn:h,maskInputFn:f,slimDOMOptions:$,dataURLOptions:m,inlineImages:l,recordCanvas:u,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}function Uc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Bc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function jc(s){return s[0].toUpperCase()+s.slice(1)}function Vs(s,e){new Gc(e).stringify(s)}function js(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>js(n,t)):(o==="object"&&i!==null&&(i=js(i)),t[r]=i)}return t}function ih(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function La(s){return s.map(e=>(e.nodes&&(e.nodes=La(e.nodes)),delete e.source,e))}function $a(s){if(s[Oa]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)$a(e)}function Lh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function Fr(s,e){let t=new Wh(s,e),r=new Bh(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
2
2
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
3
3
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
4
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function
|
|
4
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function vt(s){return typeof s=="object"&&typeof s.then=="function"}function Xa(s){let e=!1,t=Kh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,st,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,st,t+"Exit"]:[t,t+"Exit"]}function xo(s){let e;return s.type==="document"?e=["Document",st,"DocumentExit"]:s.type==="root"?e=["Root",st,"RootExit"]:e=Xa(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Qs(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>Qs(e)),s}function Pt(s,e){if(Array.isArray(s))return s.map(i=>Pt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let o={...i,__proto__:mf.prototype};o.map&&(o.map={...o.map,__proto__:ff.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>Pt(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new gf(r);if(r.type==="decl")return new hf(r);if(r.type==="rule")return new yf(r);if(r.type==="comment")return new df(r);if(r.type==="atrule")return new pf(r);throw new Error("Unknown node type: "+s.type)}function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new tn(s)}function Df(s){let e=Ao[s.tagName]?Ao[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function os(s,e){let t=e?.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=H([$c,Fc]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(s,r),r}function No(){return{stylesWithHoverClass:new Map}}function Tf(s,e,t,r){let i=[];for(let l of s.childNodes)l.type===M.Text&&i.push(l);let o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=os(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){let u=i[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){let g=o[l+1].substring(0,h),m=n.substring(a).indexOf(g);if(f=m!==-1,f){c+=m;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function _f(s,e,t,r){let{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?Tf(s,t,o,n):(o&&(t=os(t,n)),e.appendChild(i.createTextNode(t)))}function kf(s,e){var t;let{doc:r,hackCss:i,cache:o}=e;switch(s.type){case M.Document:return r.implementation.createDocument(null,"",null);case M.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case M.Element:{let n=Df(s),a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));let l={};for(let u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){_f(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&ji(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch{}}}for(let u in l){let c=l[u];if(n==="canvas"&&u==="rr_dataURL"){let h=r.createElement("img");h.onload=()=>{let f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){let h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case M.Text:return s.isStyle&&i?r.createTextNode(os(s.textContent,o)):r.createTextNode(s.textContent);case M.CDATA:return r.createCDATASection(s.textContent);case M.Comment:return r.createComment(s.textContent);default:return null}}function Mt(s,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){let u=r.getNode(s.id),c=r.getMeta(u);if(fc(c,s))return r.getNode(s.id)}let l=kf(s,{doc:t,hackCss:o,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===M.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==M.DocumentType&&(s.childNodes[0].type===M.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===M.Document||s.type===M.Element)&&!i)for(let u of s.childNodes){let c=Mt(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Vi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===M.Document&&u.type==M.Element){let h=c,f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function Pf(s,e){function t(r){e(r)}for(let r of s.getIds())s.has(r)&&t(s.getNode(r))}function Lf(s,e){let t=e.getMeta(s);if(t?.type!==M.Element)return;let r=s;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function $f(s,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new Ot}=e,l=Mt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return Pf(a,u=>{r&&r(u),Lf(u,a)}),l}function Vf(){return new zf}function jf(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Gf(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}function Xf(s){return s[0].toUpperCase()+s.slice(1)}function ii(s,e){new Kf(e).stringify(s)}function ni(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>ni(n,t)):(o==="object"&&i!==null&&(i=ni(i)),t[r]=i)}return t}function ud(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}function Sl(s){return s.map(e=>(e.nodes&&(e.nodes=Sl(e.nodes)),delete e.source,e))}function bl(s){if(s[dl]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)bl(e)}function Wd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function zr(s,e){let t=new Hd(s,e),r=new Gd(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
5
5
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
6
6
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
7
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function yt(s){return typeof s=="object"&&typeof s.then=="function"}function bl(s){let e=!1,t=Wd[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,nt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,nt,t+"Exit"]:[t,t+"Exit"]}function To(s){let e;return s.type==="document"?e=["Document",nt,"DocumentExit"]:s.type==="root"?e=["Root",nt,"RootExit"]:e=bl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ai(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>ai(e)),s}function _t(s,e){if(Array.isArray(s))return s.map(i=>_t(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:np.prototype};n.map&&(n.map={...n.map,__proto__:rp.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>_t(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new op(r);if(r.type==="decl")return new tp(r);if(r.type==="rule")return new ap(r);if(r.type==="comment")return new sp(r);if(r.type==="atrule")return new ip(r);throw new Error("Unknown node type: "+s.type)}function F(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new nn(s)}function vp(s){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){let o=n.split(r);o.length>1&&(e[ci(o[0].trim())]=o[1].trim())}}),e}function _o(s){let e=[];for(let t in s){let r=s[t];if(typeof r!="string")continue;let i=xp(t);e.push(`${i}: ${r};`)}return e.join(" ")}function on(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Ml(s,e,t){if(!t)return on(s,e);if(t.parentNode!==s)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Rl(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}function zr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Ap(s,e,t,r),Ol(s,e,t,r),Mp(s,e,t)}function Ap(s,e,t,r){var i;if(t.afterAppend&&!ye&&(ye=new WeakSet,setTimeout(()=>{ye=null},0)),!an(s,e)){let n=Vr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case D.Document:{if(!He(s,e,t.mirror,r)){let n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),ye?.add(s))}break}case D.Element:{let n=s,o=e;switch(o.tagName){case"IFRAME":{let a=s.contentDocument;if(!a)break;zr(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Ol(n.shadowRoot,o.shadowRoot,t,r)),Rp(n,o,r);break}}return s}function Mp(s,e,t){var r;switch(e.RRNodeType){case D.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case D.Element:{let i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{let o=s,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{let o=e;if(o.rr_dataURL!==null){let a=document.createElement("img");a.onload=()=>{let l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{let o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{let o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,m=l!==c;if((f||l&&m)&&o.close(),c&&(m||f))try{h?o.showModal():o.show()}catch(p){console.warn(p)}break}}break}case D.Text:case D.Comment:case D.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ye?.has(s)&&(ye.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Rp(s,e,t){let r=s.attributes,i=e.attributes;for(let n in i){let o=i[n],a=t.getMeta(e);if(a?.isSVG&&mi[n])s.setAttributeNS(mi[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}for(let{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Ol(s,e,t,r){let i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],m=n[u],p,g;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(He(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(He(h,m,t.mirror,r))h=i[--a],m=n[--u];else if(He(c,m,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=i[++o],m=n[--u]}else if(He(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(S){console.warn(S)}h=i[--a],f=n[++l]}else{if(!p){p={};for(let y=o;y<=a;y++){let v=i[y];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=y)}}g=p[r.getId(f)];let S=i[g];if(g!==void 0&&S&&He(S,f,t.mirror,r)){try{s.insertBefore(S,c)}catch(y){console.warn(y)}i[g]=void 0}else{let y=Vr(f,t.mirror,r);s.nodeName==="#document"&&c&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(y,c||null)}catch(v){console.warn(v)}}f=n[++l]}if(o>a){let S=n[u+1],y=null;for(S&&(y=t.mirror.getNode(r.getId(S)));l<=u;++l){let v=Vr(n[l],t.mirror,r);try{s.insertBefore(v,y)}catch(N){console.warn(N)}}}else if(l>u)for(;o<=a;o++){let S=i[o];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(y){console.warn(y)}}let d=s.firstChild,w=e.firstChild;for(;d!==null&&w!==null;)zr(d,w,t,r),d=d.nextSibling,w=w.nextSibling}function Vr(s,e,t){let r=t.getId(s),i=t.getMeta(s),n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&an(n,s))return n;switch(s.RRNodeType){case D.Document:n=new Document;break;case D.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case D.Element:{let o=s.tagName.toLowerCase();o=Np[o]||o,i&&"isSVG"in i&&i?.isSVG?n=document.createElementNS(mi.svg,o):n=document.createElement(s.tagName);break}case D.Text:n=document.createTextNode(s.data);break;case D.Comment:n=document.createComment(s.data);break;case D.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,{...i});try{ye?.add(n)}catch{}return n}function an(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function He(s,e,t,r){let i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:an(s,e)}function kp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Dl(s,e,t,r){let i;switch(s.nodeType){case ae.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ae.DOCUMENT_TYPE_NODE:{let o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ae.ELEMENT_NODE:{let o=s,a=kp(o);i=e.createElement(a);let l=i;for(let{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case ae.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ae.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ae.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ae.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof lt&&(n||(n=Tl(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,{...n})),i}function $p(s,e=Rf(),t=new lt){function r(i,n){let o=Dl(i,t,e,n);if(o!==null)if(n?.nodeName!=="IFRAME"&&i.nodeType!==ae.DOCUMENT_FRAGMENT_NODE&&(n?.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){let a=i.contentDocument;a&&r(a,o)}else(i.nodeType===ae.DOCUMENT_NODE||i.nodeType===ae.ELEMENT_NODE||i.nodeType===ae.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ae.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function Lp(){return new vi}function Tl(s,e){switch(s.RRNodeType){case D.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case D.DocumentType:{let t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case D.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case D.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}function ln(s){if(mr[s])return mr[s];let e=globalThis[s],t=e.prototype,r=s in ko?ko[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in $o?$o[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Pp())return mr[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?mr[s]=u:t}catch{return t}}function Ie(s,e,t){var r;let i=`${s}.${String(t)}`;if(Ms[i])return Ms[i].call(e);let n=ln(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Ms[i]=o,o.call(e)):e[t]}function _l(s,e,t){let r=`${s}.${String(t)}`;if(Rs[r])return Rs[r].bind(e);let n=ln(s)[t];return typeof n!="function"?e[t]:(Rs[r]=n,n.bind(e))}function Fp(s){return Ie("Node",s,"ownerDocument")}function Up(s){return Ie("Node",s,"childNodes")}function Bp(s){return Ie("Node",s,"parentNode")}function Wp(s){return Ie("Node",s,"parentElement")}function zp(s){return Ie("Node",s,"textContent")}function Vp(s,e){return _l("Node",s,"contains")(e)}function jp(s){return _l("Node",s,"getRootNode")()}function Gp(s){return!s||!("host"in s)?null:Ie("ShadowRoot",s,"host")}function Hp(s){return s.styleSheets}function Yp(s){return!s||!("shadowRoot"in s)?null:Ie("Element",s,"shadowRoot")}function Zp(s,e){return Ie("Element",s,"querySelector")(e)}function Xp(s,e){return Ie("Element",s,"querySelectorAll")(e)}function kl(){return ln("MutationObserver").constructor}function We(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function te(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}function ct(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Bt(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Bt(s,e,n||{},!0)}function un(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=R.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=R.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function cn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function hn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function fn(s){return s?s.nodeType===s.ELEMENT_NODE?s:R.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;let i=fn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Rr(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function $l(s,e){return e.getId(s)!==-1}function Er(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===xt}function dn(s,e){if(St(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=R.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?dn(r,e):!0}function Gr(s){return!!s.changedTouches}function pn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ll(s){let e={},t=(i,n)=>{let o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(let i of s){let{nextId:n,parentId:o}=i;if(n&&n in e){let a=e[n];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){let a=e[o];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function mn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)mn(s.children[t],e)}function et(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function gn(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function yn(s,e){var t,r;let i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let n=i.getBoundingClientRect(),o=yn(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function Re(s){return s?s instanceof fe&&"shadowRoot"in s?!!s.shadowRoot:!!R.shadowRoot(s):!1}function Je(s,e){let t=s[e[0]];return e.length===1?t:Je(t.cssRules[e[1]].cssRules,e.slice(2))}function Ci(s){let e=[...s],t=e.pop();return{positions:e,index:t}}function Pl(s){let e=new Set,t=[];for(let r=s.length;r--;){let i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}function wn(s){var e;let t=null;return"getRootNode"in s&&((e=R.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R.host(R.getRootNode(s))&&(t=R.host(R.getRootNode(s))),t}function Fl(s){let e=s,t;for(;t=wn(e);)e=t;return e}function Ul(s){let e=R.ownerDocument(s);if(!e)return!1;let t=Fl(s);return R.contains(e,t)}function bn(s){let e=R.ownerDocument(s);return e?R.contains(e,s)||Ul(s):!1}function Lo(s){return"__ln"in s}function xi(s,e){s.delete(e),R.childNodes(e).forEach(t=>xi(s,t))}function Jp(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),R.childNodes(r).forEach(i=>t.push(i)))}}function Fo(s,e,t){return s.size===0?!1:qp(s,e)}function qp(s,e,t){let r=R.parentNode(e);return r?s.has(r):!1}function Uo(s,e){return s.size===0?!1:Bl(s,e)}function Bl(s,e){let t=R.parentNode(e);return t?s.has(t)?!0:Bl(s,t):!1}function Qp(s){Et=s}function em(){Et=void 0}function Wt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Wl(s,e){let t=new Ii;Fe.push(t),t.init(s);let r=new(kl())(T(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function tm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],a,l=ct(T(h=>{let f=Date.now()-a;s(o.map(m=>(m.timeOffset-=f,m)),h),o=[],a=null}),n),u=T(ct(T(h=>{let f=Wt(h),{clientX:m,clientY:p}=Gr(h)?h.changedTouches[0]:h;a||(a=kt()),o.push({x:m,y:p,id:r.getId(f),timeOffset:kt()-a}),l(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return T(()=>{c.forEach(h=>h())})}function rm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,a=[],l=null,u=c=>h=>{let f=Wt(h);if(re(f,r,i,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=we.Mouse;break;case"touch":m=we.Touch;break;case"pen":m=we.Pen;break}m===we.Touch?k[c]===k.MouseDown?p="TouchStart":k[c]===k.MouseUp&&(p="TouchEnd"):we.Pen}else Gr(h)&&(m=we.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===we.Touch||p.startsWith("Mouse")&&m===we.Mouse)&&(m=null)):k[c]===k.Click&&(m=l,l=null);let g=Gr(h)?h.changedTouches[0]:h;if(!g)return;let d=t.getId(f),{clientX:w,clientY:S}=g;T(s)({type:k[p],id:d,x:w,y:S,...m!==null&&{pointerType:m}})};return Object.keys(k).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=De(c),f=u(c);if(window.PointerEvent)switch(k[c]){case k.MouseDown:case k.MouseUp:h=h.replace("mouse","pointer");break;case k.TouchStart:case k.TouchEnd:return}a.push(te(h,f,e))}),T(()=>{a.forEach(c=>c())})}function zl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=T(ct(T(a=>{let l=Wt(a);if(!l||re(l,r,i,!0))return;let u=t.getId(l);if(l===e&&e.defaultView){let c=un(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return te("scroll",o,e)}function sm({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=T(ct(T(()=>{let n=cn(),o=hn();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return te("resize",i,e)}function nm({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(S){let y=Wt(S),v=S.isTrusted,N=y&&y.tagName;if(y&&N==="OPTION"&&(y=R.parentElement(y)),!y||!N||im.indexOf(N)<0||re(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let A=y.value,W=!1,U=Ar(y)||"";U==="radio"||U==="checkbox"?W=y.checked:(a[N.toLowerCase()]||a[U])&&(A=Nr({element:y,maskInputOptions:a,tagName:N,type:U,value:A,maskInputFn:l})),f(y,c?{text:A,isChecked:W,userTriggered:v}:{text:A,isChecked:W});let Y=y.name;U==="radio"&&Y&&W&&e.querySelectorAll(`input[type="radio"][name="${Y}"]`).forEach(Q=>{if(Q!==y){let se=Q.value;f(Q,c?{text:se,isChecked:!W,userTriggered:!1}:{text:se,isChecked:!W})}})}function f(S,y){let v=Bo.get(S);if(!v||v.text!==y.text||v.isChecked!==y.isChecked){Bo.set(S,y);let N=t.getId(S);T(s)({...y,id:N})}}let p=(u.input==="last"?["change"]:["input","change"]).map(S=>te(S,T(h),e)),g=e.defaultView;if(!g)return()=>{p.forEach(S=>S())};let d=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),w=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&p.push(...w.map(S=>Bt(S[0],S[1],{set(){T(h)({target:this,isTrusted:!1})}},!1,g))),T(()=>{p.forEach(S=>S())})}function Hr(s){let e=[];function t(r,i){if(gr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||gr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||gr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||gr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ae(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function om({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:T((c,h,f)=>{let[m,p]=f,{id:g,styleId:d}=Ae(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,adds:[{rule:m,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:T((c,h,f)=>{let[m]=f,{id:p,styleId:g}=Ae(h,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:T((c,h,f)=>{let[m]=f,{id:p,styleId:g}=Ae(h,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replace:m}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:T((c,h,f)=>{let[m]=f,{id:p,styleId:g}=Ae(h,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replaceSync:m}),c.apply(h,f)})}));let l={};yr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(yr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),yr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),yr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:T((f,m,p)=>{let[g,d]=p,{id:w,styleId:S}=Ae(m.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||S&&S!==-1)&&s({id:w,styleId:S,adds:[{rule:g,index:[...Hr(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:T((f,m,p)=>{let[g]=p,{id:d,styleId:w}=Ae(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||w&&w!==-1)&&s({id:d,styleId:w,removes:[{index:[...Hr(m),g]}]}),f.apply(m,p)})})}),T(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Vl({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(R.host(t));let a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,l=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),T(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function am({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:T((a,l,u)=>{var c;let[h,f,m]=u;if(t.has(h))return n.apply(l,[h,f,m]);let{id:p,styleId:g}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,set:{property:h,value:f,priority:m},index:Hr(l.parentRule)}),a.apply(l,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:T((a,l,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(l,[h]);let{id:f,styleId:m}=Ae((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&s({id:f,styleId:m,remove:{property:h},index:Hr(l.parentRule)}),a.apply(l,u)})}),T(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function lm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=T(l=>ct(T(u=>{let c=Wt(u);if(!c||re(c,e,t,!0))return;let{currentTime:h,volume:f,muted:m,playbackRate:p,loop:g}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:g})}),i.media||500)),a=[te("play",o(Me.Play),n),te("pause",o(Me.Pause),n),te("seeked",o(Me.Seeked),n),te("volumechange",o(Me.VolumeChange),n),te("ratechange",o(Me.RateChange),n)];return T(()=>{a.forEach(l=>l())})}function um({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){let h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=We(e.fonts,"add",function(a){return function(l){return setTimeout(T(()=>{let u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),T(()=>{r.forEach(a=>a())})}function cm(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,a=T(()=>{let l=e.getSelection();if(!l||o&&l?.isCollapsed)return;o=l.isCollapsed||!1;let u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){let f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:g,endOffset:d}=f;re(m,r,i,!0)||re(g,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(g),endOffset:d})}n({ranges:u})});return a(),te("selectionchange",a)}function hm({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:We(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function fm(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:m,customElementCb:p}=s;s.mutationCb=(...g)=>{e.mutation&&e.mutation(...g),t(...g)},s.mousemoveCb=(...g)=>{e.mousemove&&e.mousemove(...g),r(...g)},s.mouseInteractionCb=(...g)=>{e.mouseInteraction&&e.mouseInteraction(...g),i(...g)},s.scrollCb=(...g)=>{e.scroll&&e.scroll(...g),n(...g)},s.viewportResizeCb=(...g)=>{e.viewportResize&&e.viewportResize(...g),o(...g)},s.inputCb=(...g)=>{e.input&&e.input(...g),a(...g)},s.mediaInteractionCb=(...g)=>{e.mediaInteaction&&e.mediaInteaction(...g),l(...g)},s.styleSheetRuleCb=(...g)=>{e.styleSheetRule&&e.styleSheetRule(...g),u(...g)},s.styleDeclarationCb=(...g)=>{e.styleDeclaration&&e.styleDeclaration(...g),c(...g)},s.canvasMutationCb=(...g)=>{e.canvasMutation&&e.canvasMutation(...g),h(...g)},s.fontCb=(...g)=>{e.font&&e.font(...g),f(...g)},s.selectionCb=(...g)=>{e.selection&&e.selection(...g),m(...g)},s.customElementCb=(...g)=>{e.customElement&&e.customElement(...g),p(...g)}}function dm(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};fm(s,e);let r;s.recordDOM&&(r=Wl(s,s.doc));let i=tm(s),n=rm(s),o=zl(s),a=sm(s,{win:t}),l=nm(s),u=lm(s),c=()=>{},h=()=>{},f=()=>{},m=()=>{};s.recordDOM&&(c=om(s,{win:t}),h=Vl(s,s.doc),f=am(s,{win:t}),s.collectFonts&&(m=um(s)));let p=cm(s),g=hm(s),d=[];for(let w of s.plugins)d.push(w.observer(w.callback,t,w.options));return T(()=>{Fe.forEach(w=>w.reset()),r?.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),m(),p(),g(),d.forEach(w=>w())})}function gr(s){return typeof window[s]<"u"}function yr(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}function gm(s,e){let t=Wo.get(s);return t||(t=new Map,Wo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ir(s,e,t){if(s instanceof Array)return s.map(r=>Ir(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,i=pm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Ir(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Ir(s.data,e,t),s.width,s.height]};if(Hl(s,e)||typeof s=="object"){let r=s.constructor.name,i=jl(s,e,t);return{rr_type:r,index:i}}}}return s}function ym(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let a=We(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{let c=Gl(u,e,this);s(this.canvas,{type:Ce["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch{let a=Bt(e.CanvasRenderingContext2D.prototype,o,{set(l){s(this.canvas,{type:Ce["2D"],property:o,args:[l],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function wm(s){return s==="experimental-webgl"?"webgl":s}function zo(s,e,t,r){let i=[];try{let n=We(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!re(this,e,t,!0)){let u=wm(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Vo(s,e,t,r,i,n){let o=[],a=Object.getOwnPropertyNames(s);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;let u=We(s,l,function(c){return function(...h){let f=c.apply(this,h);if(jl(f,n,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){let m=Gl(h,n,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});o.push(u)}catch{let u=Bt(s,l,{set(c){t(this.canvas,{type:e,property:l,args:[c],setter:!0})}});o.push(u)}return o}function bm(s,e,t,r){let i=[];return i.push(...Vo(e.WebGLRenderingContext.prototype,Ce.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Vo(e.WebGL2RenderingContext.prototype,Ce.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}function vm(s){let e;try{if(e=jo&&(window.URL||window.webkitURL).createObjectURL(jo),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Yl,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function Te(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:m,maskInputFn:p,maskTextFn:g,hooks:d,packFn:w,sampling:S={},dataURLOptions:y={},mousemoveWait:v,recordDOM:N=!0,recordCanvas:A=!1,recordCrossOriginIframes:W=!1,recordAfter:U=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:Y=!1,collectFonts:Q=!1,inlineImages:se=!1,plugins:ie,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:_e=new Set([]),errorHandler:ke}=s;Qp(ke);let Z=W?window.parent===window:!0,L=!1;if(!Z)try{window.parent.document&&(L=!1)}catch{L=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!L)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),he.reset();let ue=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f!==void 0?f:{password:!0},ne=aa(m);pn();let ht,ls=0,Sn=$=>{for(let ce of ie||[])ce.eventProcessor&&($=ce.eventProcessor($));return w&&!L&&($=w($)),$};J=($,ce)=>{var X;let K=$;if(K.timestamp=kt(),(X=Fe[0])!=null&&X.isFrozen()&&K.type!==x.FullSnapshot&&!(K.type===x.IncrementalSnapshot&&K.data.source===E.Mutation)&&Fe.forEach(oe=>oe.unfreeze()),Z)e?.(Sn(K),ce);else if(L){let oe={type:"rrweb",event:Sn(K),origin:window.location.origin,isCheckout:ce};window.parent.postMessage(oe,"*")}if(K.type===x.FullSnapshot)ht=K,ls=0;else if(K.type===x.IncrementalSnapshot){if(K.data.source===E.Mutation&&K.data.isAttachIframe)return;ls++;let oe=r&&ls>=r,B=t&&K.timestamp-ht.timestamp>t;(oe||B)&&xr(!0)}};let zt=$=>{J({type:x.IncrementalSnapshot,data:{source:E.Mutation,...$}})},vn=$=>J({type:x.IncrementalSnapshot,data:{source:E.Scroll,...$}}),Cn=$=>J({type:x.IncrementalSnapshot,data:{source:E.CanvasMutation,...$}}),cu=$=>J({type:x.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...$}}),$e=new Ri({mutationCb:zt,adoptedStyleSheetCb:cu}),Le=new Ni({mirror:he,mutationCb:zt,stylesheetManager:$e,recordCrossOriginIframes:W,wrappedEmit:J});for(let $ of ie||[])$.getMirror&&$.getMirror({nodeMirror:he,crossOriginIframeMirror:Le.crossOriginIframeMirror,crossOriginIframeStyleMirror:Le.crossOriginIframeStyleMirror});let us=new Oi;Os=new Mi({recordCanvas:A,mutationCb:Cn,win:window,blockClass:i,blockSelector:n,mirror:he,sampling:S.canvas,dataURLOptions:y});let Vt=new Ai({mutationCb:zt,scrollCb:vn,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ue,dataURLOptions:y,maskTextFn:g,maskInputFn:p,recordCanvas:A,inlineImages:se,sampling:S,slimDOMOptions:ne,iframeManager:Le,stylesheetManager:$e,canvasManager:Os,keepIframeSrcFn:O,processedNodeManager:us},mirror:he});xr=($=!1)=>{if(!N)return;J({type:x.Meta,data:{href:window.location.href,width:hn(),height:cn()}},$),$e.reset(),Vt.init(),Fe.forEach(X=>X.lock());let ce=vc(document,{mirror:he,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ue,maskTextFn:g,maskInputFn:p,slimDOM:ne,dataURLOptions:y,recordCanvas:A,inlineImages:se,onSerialize:X=>{et(X,he)&&Le.addIframe(X),gn(X,he)&&$e.trackLinkElement(X),Re(X)&&Vt.addShadowRoot(R.shadowRoot(X),document)},onIframeLoad:(X,K)=>{Le.attachIframe(X,K),Vt.observeAttachShadow(X)},onStylesheetLoad:(X,K)=>{$e.attachLinkElement(X,K)},keepIframeSrcFn:O});if(!ce)return console.warn("Failed to snapshot the document");J({type:x.FullSnapshot,data:{node:ce,initialOffset:un(window)}},$),Fe.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$e.adoptStyleSheets(document.adoptedStyleSheets,he.getId(document))};try{let $=[],ce=K=>{var oe;return T(dm)({mutationCb:zt,mousemoveCb:(B,cs)=>J({type:x.IncrementalSnapshot,data:{source:cs,positions:B}}),mouseInteractionCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.MouseInteraction,...B}}),scrollCb:vn,viewportResizeCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.ViewportResize,...B}}),inputCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.Input,...B}}),mediaInteractionCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.MediaInteraction,...B}}),styleSheetRuleCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.StyleSheetRule,...B}}),styleDeclarationCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.StyleDeclaration,...B}}),canvasMutationCb:Cn,fontCb:B=>J({type:x.IncrementalSnapshot,data:{source:E.Font,...B}}),selectionCb:B=>{J({type:x.IncrementalSnapshot,data:{source:E.Selection,...B}})},customElementCb:B=>{J({type:x.IncrementalSnapshot,data:{source:E.CustomElement,...B}})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:ue,inlineStylesheet:c,sampling:S,recordDOM:N,recordCanvas:A,inlineImages:se,userTriggeredOnInput:Y,collectFonts:Q,doc:K,maskInputFn:p,maskTextFn:g,keepIframeSrcFn:O,blockSelector:n,slimDOMOptions:ne,dataURLOptions:y,mirror:he,iframeManager:Le,stylesheetManager:$e,shadowDomManager:Vt,processedNodeManager:us,canvasManager:Os,ignoreCSSAttributes:_e,plugins:((oe=ie?.filter(B=>B.observer))==null?void 0:oe.map(B=>({observer:B.observer,options:B.options,callback:cs=>J({type:x.Plugin,data:{plugin:B.name,payload:cs}})})))||[]},d)};Le.addLoadListener(K=>{try{$.push(ce(K.contentDocument))}catch(oe){console.warn(oe)}});let X=()=>{xr(),$.push(ce(document)),Zr=!0};return["interactive","complete"].includes(document.readyState)?X():($.push(te("DOMContentLoaded",()=>{J({type:x.DomContentLoaded,data:{}}),U==="DOMContentLoaded"&&X()})),$.push(te("load",()=>{J({type:x.Load,data:{}}),U==="load"&&X()},window))),()=>{$.forEach(K=>{try{K()}catch(oe){String(oe).toLowerCase().includes("cross-origin")||console.warn(oe)}}),us.destroy(),Zr=!1,em()}}catch($){console.warn($)}}function Zl(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}function Em(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;let t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(w){let S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(w)}let a=o(s.navigator.userAgent)?1:0;function l(w,S){this.scrollLeft=w,this.scrollTop=S}function u(w){return .5*(1-Math.cos(Math.PI*w))}function c(w){if(w===null||typeof w!="object"||w.behavior===void 0||w.behavior==="auto"||w.behavior==="instant")return!0;if(typeof w=="object"&&w.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+w.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(w,S){if(S==="Y")return w.clientHeight+a<w.scrollHeight;if(S==="X")return w.clientWidth+a<w.scrollWidth}function f(w,S){let y=s.getComputedStyle(w,null)["overflow"+S];return y==="auto"||y==="scroll"}function m(w){let S=h(w,"Y")&&f(w,"Y"),y=h(w,"X")&&f(w,"X");return S||y}function p(w){for(;w!==e.body&&m(w)===!1;)w=w.parentNode||w.host;return w}function g(w){let S=n(),y,v,N,A=(S-w.startTime)/r;A=A>1?1:A,y=u(A),v=w.startX+(w.x-w.startX)*y,N=w.startY+(w.y-w.startY)*y,w.method.call(w.scrollable,v,N),(v!==w.x||N!==w.y)&&s.requestAnimationFrame(g.bind(s,w))}function d(w,S,y){let v,N,A,W,U=n();w===e.body?(v=s,N=s.scrollX||s.pageXOffset,A=s.scrollY||s.pageYOffset,W=i.scroll):(v=w,N=w.scrollLeft,A=w.scrollTop,W=l),g({scrollable:v,method:W,startTime:U,startX:N,startY:A,x:S,y})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,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}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let w=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof w>"u"?this.scrollLeft:~~w,typeof S>"u"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let w=p(this),S=w.getBoundingClientRect(),y=this.getBoundingClientRect();w!==e.body?(d.call(this,w,w.scrollLeft+y.left-S.left,w.scrollTop+y.top-S.top),s.getComputedStyle(w).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}function Go(s,e){if(s.type===x.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){let t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}function Ho(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}function Ds(s){return s===void 0?[]:[].concat(s)}function Ze(s){return{type:"xstate.assign",assignment:s}}function Yo(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Xr(s){return function(e){return s===e}}function Kl(s){return typeof s=="string"?{type:s}:s}function Zo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Xr(s)}}function Xo(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function Jl(s,e){e===void 0&&(e={});var t=Ho(Xo(Ds(s.states[s.initial].entry).map(function(o){return Yo(o,e.actions)}),s.context,Xl),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Xr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,m=Kl(a),p=s.states[h];if(p.on){var g=Ds(p.on[m.type]);try{for(var d=(function(L){var ue=typeof Symbol=="function"&&Symbol.iterator,ne=ue&&L[ue],ht=0;if(ne)return ne.call(L);if(L&&typeof L.length=="number")return{next:function(){return L&&ht>=L.length&&(L=void 0),{value:L&&L[ht++],done:!L}}};throw new TypeError(ue?"Object is not iterable.":"Symbol.iterator is not defined.")})(g),w=d.next();!w.done;w=d.next()){var S=w.value;if(S===void 0)return Zo(h,f);var y=typeof S=="string"?{target:S}:S,v=y.target,N=y.actions,A=N===void 0?[]:N,W=y.cond,U=W===void 0?function(){return!0}:W,Y=v===void 0,Q=v??h,se=s.states[Q];if(U(f,m)){var ie=Ho(Xo((Y?Ds(A):[].concat(p.exit,A,se.entry).filter(function(L){return L})).map(function(L){return Yo(L,n._options.actions)}),f,m),3),O=ie[0],_e=ie[1],ke=ie[2],Z=v??h;return{value:Z,context:_e,actions:O,changed:v!==h||O.length>0||ke,matches:Xr(Z)}}}}catch(L){l={error:L}}finally{try{w&&!w.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return Zo(h,f)}};return n}function ql(s){var e=s.initialState,t=Qe.NotStarted,r=new Set,i={_machine:s,send:function(n){t===Qe.Running&&(e=s.transition(e,n),Ko(e,Kl(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Xr(o.value)}}return t=Qe.Running,Ko(e,Xl),i},stop:function(){return t=Qe.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Im(s,e){for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.type===x.Meta&&r.timestamp<=e)return s.slice(t)}return s}function xm(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=Jl({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ze({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:Ze((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...n,timeOffset:a,baselineTime:n.events[0].timestamp+a}}),play(n){var o;let{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(let p of l)Go(p,u);let h=Im(l,u),f=c?.timestamp;c?.type===x.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(_.PlayBack);let m=new Array;for(let p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)m.push(p);else{let g=e(p,!1);a.addAction({doAction:()=>{g()},delay:p.delay})}t(m),r.emit(_.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:Ze(n=>({...n,lastPlayedEvent:null})),startLive:Ze({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ze((n,o)=>{let{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){let{event:c}=o.payload;Go(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,g=0;for(;g<=h;){let d=Math.floor((g+h)/2);u[d].timestamp<=c.timestamp?g=d+1:h=d-1}p===-1&&(p=g),u.splice(p,0,c)}let f=c.timestamp<a,m=e(c,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:c.delay})}return{...n,events:u}})}});return ql(i)}function Nm(s){let e=Jl({id:"speed",context:s,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:Ze({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return ql(e)}function Ql(s,e){let t=Jo.get(s);return t||(t=new Map,Jo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Oe(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await Oe(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:n}=r;return Ql(e,i)[n]}else if("args"in r){let{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(Oe(s,e,t))))}else{if("base64"in r)return mm(r.base64);if("src"in r){let i=s.get(r.src);if(i)return i;{let n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(Oe(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Oe(s,e,t)));return r}}function Mm(s,e){try{return e===Ce.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch{return null}}function Om(s,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Rm.includes(t))return;let r=Ql(s,t);r.includes(e)||r.push(e)}async function Dm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{let n=Mm(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}let o=n[s.property],a=await Promise.all(s.args.map(Oe(r,n))),l=o.apply(n,a);Om(n,l);let u=!1}catch(n){i(s,n)}}async function Tm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){let n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}let o=e.map(async l=>Promise.all(l.args.map(Oe(r,n))));(await Promise.all(o)).forEach((l,u)=>{let c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}let h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,l)}catch(h){i(c,h)}})}async function Ti({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{let o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){let u=a[l];await Dm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await Tm({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}function wr(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function _m(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;let t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}function Qo(s){return s.type==x.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==k.TouchStart)}var Au,Mu,b,Wn,Ru,Ou,zn,M,Vn,jn,Xt,Du,ws,bs,ee,It,Gn,ec,tc,rc,sc,oc,ac,xt,Ge,Hn,uc,cc,Yn,Cc,Zn,Ec,Ic,Ui,V,la,Ac,Mc,Rc,de,Xn,Kn,ks,Bi,Lt,Jn,$s,ca,Dc,Kr,Jt,Tc,_c,kc,$c,Fs,Jr,Lc,Us,qr,Pc,Fc,Uc,Bc,qn,Qn,Wc,zc,Ss,Vc,Bs,ha,Gc,Hc,eo,qt,Ws,zs,Yc,vs,to,Zc,Cs,Xc,ro,Or,Qr,fa,br,Sr,da,pa,ma,so,Kc,Jc,qc,Qc,ga,eh,Vs,es,ya,wa,ba,Sa,th,va,Wi,zi,Ca,Se,Ue,rh,Na,Aa,Nt,Vi,io,Ma,js,Ra,sh,Gs,ji,Es,no,Qt,oo,er,pt,tr,rr,sr,ih,nh,oh,ah,lh,uh,ch,hh,fh,dh,ir,nr,ph,ao,mh,Oa,Dr,Gi,Da,Ta,_a,tt,Pt,At,ka,$a,gh,Tr,Hi,yh,wh,bh,Sh,vh,lo,uo,Eh,Ih,xh,Nh,Ah,Yi,me,Mh,Rh,Oh,Dh,Th,_h,co,kh,$h,Lh,Ph,Fh,rt,Ys,st,Fa,Uh,Bh,Wh,zh,Vh,Zs,jh,Gh,Hh,Yh,Zh,Mt,Xh,Kh,Jh,qh,Qh,ef,tf,rf,sf,nf,Ua,of,af,Zi,lf,uf,Ba,cf,Wa,za,hf,ff,df,pf,Va,ja,mf,gf,G,fo,If,xf,C,Nf,Af,mo,Mf,Xi,j,Ga,Tf,_f,kf,pe,go,yo,Xs,Ki,Ft,wo,Ks,Ya,Lf,rs,or,Pf,Ff,Uf,Bf,Qs,ss,Wf,ei,is,zf,Vf,jf,Gf,bo,So,Hf,Yf,Is,Zf,ti,Za,Kf,Jf,vo,ar,ri,si,qf,xs,Co,Qf,Ns,ed,Eo,kr,ns,Xa,vr,Cr,Ka,Ja,qa,Io,td,rd,sd,id,Qa,nd,ii,os,el,tl,rl,sl,od,il,Ji,qi,nl,ve,Be,ad,ul,cl,Ot,Qi,xo,hl,ni,fl,ld,oi,en,As,No,lr,Ao,ur,gt,cr,hr,fr,ud,cd,hd,fd,dd,pd,md,gd,yd,wd,dr,pr,bd,Mo,Sd,dl,$r,tn,pl,ml,gl,it,Ut,Dt,yl,wl,vd,Lr,rn,Cd,Ed,Id,xd,Nd,Ro,Oo,Md,Rd,Od,Dd,Td,sn,ge,_d,kd,$d,Ld,Pd,Fd,Do,Ud,Bd,Wd,zd,Vd,nt,li,ot,vl,jd,Gd,Hd,Yd,Zd,ui,Xd,Kd,Jd,qd,Qd,Tt,ep,tp,rp,sp,ip,np,op,ap,lp,up,Cl,cp,hp,nn,fp,dp,El,pp,Il,xl,mp,gp,yp,wp,Nl,Al,bp,Sp,H,D,Cp,Ep,ci,Ip,xp,fe,hi,Fr,at,fi,di,Ur,Br,Wr,pi,ae,mi,Np,ye,lt,Op,ut,gi,yi,wi,bi,Si,Dp,Tp,_p,vi,ko,$o,mr,Pp,Ms,Rs,R,Ye,jr,kt,$t,Kp,x,E,k,we,Ce,Me,_,be,Ei,Po,Ii,Et,T,Fe,im,Bo,Yr,Ni,Ai,qe,bt,wt,pm,mm,Wo,jl,Gl,Hl,Yl,Sm,jo,Mi,Ri,Oi,J,xr,Os,Zr,he,Cm,Di,Qe,Xl,Ko,Am,Jo,Rm,_i,km,$m,qo,Ts,ki,Lm,Pm,Fm,tu=ft(()=>{"use strict";Au=Object.defineProperty,Mu=(s,e,t)=>e in s?Au(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>Mu(s,typeof e!="symbol"?e+"":e,t),Ru=Object.defineProperty,Ou=(s,e,t)=>e in s?Ru(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,zn=(s,e,t)=>Ou(s,typeof e!="symbol"?e+"":e,t),M=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(M||{}),Vn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xt={},Du=()=>!!globalThis.Zone;ws={};bs={};ee={ownerDocument:Tu,childNodes:_u,parentNode:ku,parentElement:$u,textContent:Lu,contains:Pu,getRootNode:Fu,host:Uu,styleSheets:Bu,shadowRoot:Wu,querySelector:zu,querySelectorAll:Vu,mutationObserver:ju,patch:Gu};It=class{constructor(){zn(this,"idNodeMap",new Map),zn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Gn="__rrweb_original__";ec=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,tc=/^(?:[a-z+]+:)?\/\//i,rc=/^www\..*/i,sc=/^(data:)([^,]*),(.*)/i;oc=1,ac=new RegExp("[^a-z0-9-_:]"),xt=-2;uc=/^[^ \t\n\r\u000c]+/,cc=/^[, \t\n\r\u000c]+/;Yn=new WeakMap;Cc=/(max|min)-device-(width|height)/,Zn=new RegExp(Cc.source,"g"),Ec={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Zn)&&(s.params=s.params.replace(Zn,"$1-$2"))}}}},Ic={postcssPlugin:"postcss-hover-classes",prepare:function(){let s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
8
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}};
|
|
9
|
-
`+
|
|
7
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}function Et(s){return typeof s=="object"&&typeof s.then=="function"}function Tl(s){let e=!1,t=tp[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ot,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ot,t+"Exit"]:[t,t+"Exit"]}function Go(s){let e;return s.type==="document"?e=["Document",ot,"DocumentExit"]:s.type==="root"?e=["Root",ot,"RootExit"]:e=Tl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function pi(s){return s[ye]=!1,s.nodes&&s.nodes.forEach(e=>pi(e)),s}function Ut(s,e){if(Array.isArray(s))return s.map(i=>Ut(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let o={...i,__proto__:Sp.prototype};o.map&&(o.map={...o.map,__proto__:gp.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>Ut(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new bp(r);if(r.type==="decl")return new mp(r);if(r.type==="rule")return new vp(r);if(r.type==="comment")return new yp(r);if(r.type==="atrule")return new wp(r);throw new Error("Unknown node type: "+s.type)}function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new fn(s)}function Pp(s){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(o){if(o){let n=o.split(r);n.length>1&&(e[yi(n[0].trim())]=n[1].trim())}}),e}function Ho(s){let e=[];for(let t in s){let r=s[t];if(typeof r!="string")continue;let i=Up(t);e.push(`${i}: ${r};`)}return e.join(" ")}function dn(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Wl(s,e,t){if(!t)return dn(s,e);if(t.parentNode!==s)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function zl(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}function Yr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Wp(s,e,t,r),Vl(s,e,t,r),zp(s,e,t)}function Wp(s,e,t,r){var i;if(t.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!pn(s,e)){let o=Zr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case D.Document:{if(!Ye(s,e,t.mirror,r)){let o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),we?.add(s))}break}case D.Element:{let o=s,n=e;switch(n.tagName){case"IFRAME":{let a=s.contentDocument;if(!a)break;Yr(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Vl(o.shadowRoot,n.shadowRoot,t,r)),Vp(o,n,r);break}}return s}function zp(s,e,t){var r;switch(e.RRNodeType){case D.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case D.Element:{let i=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{let n=s,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{let n=e;if(n.rr_dataURL!==null){let a=document.createElement("img");a.onload=()=>{let l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{let n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{let n=i,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&n.close(),c&&(g||f))try{h?n.showModal():n.show()}catch(m){console.warn(m)}break}}break}case D.Text:case D.Comment:case D.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}we?.has(s)&&(we.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Vp(s,e,t){let r=s.attributes,i=e.attributes;for(let o in i){let n=i[o],a=t.getMeta(e);if(a?.isSVG&&Ci[o])s.setAttributeNS(Ci[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){let l=document.createElement("img");l.src=n,l.onload=()=>{let u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(l){console.warn(l)}}}for(let{name:o}of Array.from(r))o in i||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Vl(s,e,t,r){let i=Array.from(s.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,u=o.length-1,c=i[n],h=i[a],f=o[l],g=o[u],m,p;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(Ye(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(Ye(h,g,t.mirror,r))h=i[--a],g=o[--u];else if(Ye(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=i[++n],g=o[--u]}else if(Ye(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(S){console.warn(S)}h=i[--a],f=o[++l]}else{if(!m){m={};for(let y=n;y<=a;y++){let v=i[y];v&&t.mirror.hasNode(v)&&(m[t.mirror.getId(v)]=y)}}p=m[r.getId(f)];let S=i[p];if(p!==void 0&&S&&Ye(S,f,t.mirror,r)){try{s.insertBefore(S,c)}catch(y){console.warn(y)}i[p]=void 0}else{let y=Zr(f,t.mirror,r);s.nodeName==="#document"&&c&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(y,c||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){let S=o[u+1],y=null;for(S&&(y=t.mirror.getNode(r.getId(S)));l<=u;++l){let v=Zr(o[l],t.mirror,r);try{s.insertBefore(v,y)}catch(x){console.warn(x)}}}else if(l>u)for(;n<=a;n++){let S=i[n];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(y){console.warn(y)}}let d=s.firstChild,w=e.firstChild;for(;d!==null&&w!==null;)Yr(d,w,t,r),d=d.nextSibling,w=w.nextSibling}function Zr(s,e,t){let r=t.getId(s),i=t.getMeta(s),o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&pn(o,s))return o;switch(s.RRNodeType){case D.Document:o=new Document;break;case D.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case D.Element:{let n=s.tagName.toLowerCase();n=Bp[n]||n,i&&"isSVG"in i&&i?.isSVG?o=document.createElementNS(Ci.svg,n):o=document.createElement(s.tagName);break}case D.Text:o=document.createTextNode(s.data);break;case D.Comment:o=document.createComment(s.data);break;case D.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,{...i});try{we?.add(o)}catch{}return o}function pn(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ye(s,e,t,r){let i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:pn(s,e)}function Zp(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function jl(s,e,t,r){let i;switch(s.nodeType){case le.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case le.DOCUMENT_TYPE_NODE:{let n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case le.ELEMENT_NODE:{let n=s,a=Zp(n);i=e.createElement(a);let l=i;for(let{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case le.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case le.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case le.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case le.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof ut&&(o||(o=Gl(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,{...o})),i}function Xp(s,e=Vf(),t=new ut){function r(i,o){let n=jl(i,t,e,o);if(n!==null)if(o?.nodeName!=="IFRAME"&&i.nodeType!==le.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){let a=i.contentDocument;a&&r(a,n)}else(i.nodeType===le.DOCUMENT_NODE||i.nodeType===le.ELEMENT_NODE||i.nodeType===le.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===le.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function Kp(){return new Mi}function Gl(s,e){switch(s.RRNodeType){case D.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case D.DocumentType:{let t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case D.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case D.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case D.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}function mn(s){if(br[s])return br[s];let e=globalThis[s],t=e.prototype,r=s in Yo?Yo[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Zo?Zo[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Jp())return br[s]=e.prototype,e.prototype;try{let a=document.createElement("iframe");document.body.appendChild(a);let l=a.contentWindow;if(!l)return e.prototype;let u=l[s].prototype;return document.body.removeChild(a),u?br[s]=u:t}catch{return t}}function xe(s,e,t){var r;let i=`${s}.${String(t)}`;if(Ps[i])return Ps[i].call(e);let o=mn(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Ps[i]=n,n.call(e)):e[t]}function Hl(s,e,t){let r=`${s}.${String(t)}`;if(Ls[r])return Ls[r].bind(e);let o=mn(s)[t];return typeof o!="function"?e[t]:(Ls[r]=o,o.bind(e))}function qp(s){return xe("Node",s,"ownerDocument")}function Qp(s){return xe("Node",s,"childNodes")}function em(s){return xe("Node",s,"parentNode")}function tm(s){return xe("Node",s,"parentElement")}function rm(s){return xe("Node",s,"textContent")}function sm(s,e){return Hl("Node",s,"contains")(e)}function im(s){return Hl("Node",s,"getRootNode")()}function nm(s){return!s||!("host"in s)?null:xe("ShadowRoot",s,"host")}function om(s){return s.styleSheets}function am(s){return!s||!("shadowRoot"in s)?null:xe("Element",s,"shadowRoot")}function lm(s,e){return xe("Element",s,"querySelector")(e)}function um(s,e){return xe("Element",s,"querySelectorAll")(e)}function Yl(){return mn("MutationObserver").constructor}function ze(s,e,t){try{if(!(e in s))return()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}function re(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}function ht(s,e,t={}){let r=null,i=0;return function(...o){let n=Date.now();!i&&t.leading===!1&&(i=n);let a=e-(n-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,o)},a))}}function Ht(s,e,t,r,i=window){let o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>Ht(s,e,o||{},!0)}function gn(s){var e,t,r,i;let o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=R.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o?.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=R.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}function yn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function wn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Sn(s){return s?s.nodeType===s.ELEMENT_NODE?s:R.parentElement(s):null}function se(s,e,t,r){if(!s)return!1;let i=Sn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(kr(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Zl(s,e){return e.getId(s)!==-1}function Mr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Dt}function bn(s,e){if(At(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=R.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?bn(r,e):!0}function Kr(s){return!!s.changedTouches}function vn(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Xl(s){let e={},t=(i,o)=>{let n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},r=[];for(let i of s){let{nextId:o,parentId:n}=i;if(o&&o in e){let a=e[o];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(n in e){let a=e[n];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function Cn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)Cn(s.children[t],e)}function tt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function En(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function In(s,e){var t,r;let i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),n=In(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Re(s){return s?s instanceof de&&"shadowRoot"in s?!!s.shadowRoot:!!R.shadowRoot(s):!1}function qe(s,e){let t=s[e[0]];return e.length===1?t:qe(t.cssRules[e[1]].cssRules,e.slice(2))}function Ri(s){let e=[...s],t=e.pop();return{positions:e,index:t}}function Kl(s){let e=new Set,t=[];for(let r=s.length;r--;){let i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}function xn(s){var e;let t=null;return"getRootNode"in s&&((e=R.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R.host(R.getRootNode(s))&&(t=R.host(R.getRootNode(s))),t}function Jl(s){let e=s,t;for(;t=xn(e);)e=t;return e}function ql(s){let e=R.ownerDocument(s);if(!e)return!1;let t=Jl(s);return R.contains(e,t)}function An(s){let e=R.ownerDocument(s);return e?R.contains(e,s)||ql(s):!1}function Xo(s){return"__ln"in s}function Ti(s,e){s.delete(e),R.childNodes(e).forEach(t=>Ti(s,t))}function hm(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),R.childNodes(r).forEach(i=>t.push(i)))}}function Jo(s,e,t){return s.size===0?!1:fm(s,e)}function fm(s,e,t){let r=R.parentNode(e);return r?s.has(r):!1}function qo(s,e){return s.size===0?!1:Ql(s,e)}function Ql(s,e){let t=R.parentNode(e);return t?s.has(t)?!0:Ql(s,t):!1}function dm(s){Rt=s}function pm(){Rt=void 0}function Yt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function eu(s,e){let t=new Di;Ue.push(t),t.init(s);let r=new(Yl())(T(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function mm({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,n=[],a,l=ht(T(h=>{let f=Date.now()-a;s(n.map(g=>(g.timeOffset-=f,g)),h),n=[],a=null}),o),u=T(ht(T(h=>{let f=Yt(h),{clientX:g,clientY:m}=Kr(h)?h.changedTouches[0]:h;a||(a=Bt()),n.push({x:g,y:m,id:r.getId(f),timeOffset:Bt()-a}),l(typeof DragEvent<"u"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),c=[re("mousemove",u,t),re("touchmove",u,t),re("drag",u,t)];return T(()=>{c.forEach(h=>h())})}function gm({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=null,u=c=>h=>{let f=Yt(h);if(se(f,r,i,!0))return;let g=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=Se.Mouse;break;case"touch":g=Se.Touch;break;case"pen":g=Se.Pen;break}g===Se.Touch?P[c]===P.MouseDown?m="TouchStart":P[c]===P.MouseUp&&(m="TouchEnd"):Se.Pen}else Kr(h)&&(g=Se.Touch);g!==null?(l=g,(m.startsWith("Touch")&&g===Se.Touch||m.startsWith("Mouse")&&g===Se.Mouse)&&(g=null)):P[c]===P.Click&&(g=l,l=null);let p=Kr(h)?h.changedTouches[0]:h;if(!p)return;let d=t.getId(f),{clientX:w,clientY:S}=p;T(s)({type:P[m],id:d,x:w,y:S,...g!==null&&{pointerType:g}})};return Object.keys(P).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=De(c),f=u(c);if(window.PointerEvent)switch(P[c]){case P.MouseDown:case P.MouseUp:h=h.replace("mouse","pointer");break;case P.TouchStart:case P.TouchEnd:return}a.push(re(h,f,e))}),T(()=>{a.forEach(c=>c())})}function tu({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){let n=T(ht(T(a=>{let l=Yt(a);if(!l||se(l,r,i,!0))return;let u=t.getId(l);if(l===e&&e.defaultView){let c=gn(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return re("scroll",n,e)}function ym({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=T(ht(T(()=>{let o=yn(),n=wn();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return re("resize",i,e)}function Sm({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(S){let y=Yt(S),v=S.isTrusted,x=y&&y.tagName;if(y&&x==="OPTION"&&(y=R.parentElement(y)),!y||!x||wm.indexOf(x)<0||se(y,r,i,!0)||y.classList.contains(o)||n&&y.matches(n))return;let N=y.value,$=!1,_=Tr(y)||"";_==="radio"||_==="checkbox"?$=y.checked:(a[x.toLowerCase()]||a[_])&&(N=Dr({element:y,maskInputOptions:a,tagName:x,type:_,value:N,maskInputFn:l})),f(y,c?{text:N,isChecked:$,userTriggered:v}:{text:N,isChecked:$});let V=y.name;_==="radio"&&V&&$&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(ee=>{if(ee!==y){let ie=ee.value;f(ee,c?{text:ie,isChecked:!$,userTriggered:!1}:{text:ie,isChecked:!$})}})}function f(S,y){let v=Qo.get(S);if(!v||v.text!==y.text||v.isChecked!==y.isChecked){Qo.set(S,y);let x=t.getId(S);T(s)({...y,id:x})}}let m=(u.input==="last"?["change"]:["input","change"]).map(S=>re(S,T(h),e)),p=e.defaultView;if(!p)return()=>{m.forEach(S=>S())};let d=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&m.push(...w.map(S=>Ht(S[0],S[1],{set(){T(h)({target:this,isTrusted:!1})}},!1,p))),T(()=>{m.forEach(S=>S())})}function Jr(s){let e=[];function t(r,i){if(vr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||vr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||vr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||vr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){let n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function Ne(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function bm({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:T((c,h,f)=>{let[g,m]=f,{id:p,styleId:d}=Ne(h,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,adds:[{rule:g,index:m}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){let g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ne(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,removes:[{index:g}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ne(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:T((c,h,f)=>{let[g]=f,{id:m,styleId:p}=Ne(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replaceSync:g}),c.apply(h,f)})}));let l={};Cr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Cr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Cr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Cr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:T((f,g,m)=>{let[p,d]=m,{id:w,styleId:S}=Ne(g.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||S&&S!==-1)&&s({id:w,styleId:S,adds:[{rule:p,index:[...Jr(g),d||0]}]}),f.apply(g,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:T((f,g,m)=>{let[p]=m,{id:d,styleId:w}=Ne(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||w&&w!==-1)&&s({id:d,styleId:w,removes:[{index:[...Jr(g),p]}]}),f.apply(g,m)})})}),T(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ru({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(R.host(t));let a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=l.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch{}return h}}),T(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function vm({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:T((a,l,u)=>{var c;let[h,f,g]=u;if(t.has(h))return o.apply(l,[h,f,g]);let{id:m,styleId:p}=Ne((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,set:{property:h,value:f,priority:g},index:Jr(l.parentRule)}),a.apply(l,u)})});let n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:T((a,l,u)=>{var c;let[h]=u;if(t.has(h))return n.apply(l,[h]);let{id:f,styleId:g}=Ne((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:Jr(l.parentRule)}),a.apply(l,u)})}),T(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function Cm({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){let n=T(l=>ht(T(u=>{let c=Yt(u);if(!c||se(c,e,t,!0))return;let{currentTime:h,volume:f,muted:g,playbackRate:m,loop:p}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:m,loop:p})}),i.media||500)),a=[re("play",n(Me.Play),o),re("pause",n(Me.Pause),o),re("seeked",n(Me.Seeked),o),re("volumechange",n(Me.VolumeChange),o),re("ratechange",n(Me.RateChange),o)];return T(()=>{a.forEach(l=>l())})}function Em({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){let h=new o(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let n=ze(e.fonts,"add",function(a){return function(l){return setTimeout(T(()=>{let u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),T(()=>{r.forEach(a=>a())})}function Im(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s,n=!0,a=T(()=>{let l=e.getSelection();if(!l||n&&l?.isCollapsed)return;n=l.isCollapsed||!1;let u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){let f=l.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:p,endOffset:d}=f;se(g,r,i,!0)||se(p,r,i,!0)||u.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:d})}o({ranges:u})});return a(),re("selectionchange",a)}function xm({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:ze(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function Am(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),o(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),n(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),a(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),l(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),f(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p)}}function Nm(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Am(s,e);let r;s.recordDOM&&(r=eu(s,s.doc));let i=mm(s),o=gm(s),n=tu(s),a=ym(s,{win:t}),l=Sm(s),u=Cm(s),c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=bm(s,{win:t}),h=ru(s,s.doc),f=vm(s,{win:t}),s.collectFonts&&(g=Em(s)));let m=Im(s),p=xm(s),d=[];for(let w of s.plugins)d.push(w.observer(w.callback,t,w.options));return T(()=>{Ue.forEach(w=>w.reset()),r?.disconnect(),i(),o(),n(),a(),l(),u(),c(),h(),f(),g(),m(),p(),d.forEach(w=>w())})}function vr(s){return typeof window[s]<"u"}function Cr(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}function Om(s,e){let t=ea.get(s);return t||(t=new Map,ea.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Rr(s,e,t){if(s instanceof Array)return s.map(r=>Rr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,i=Mm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Rr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Rr(s.data,e,t),s.width,s.height]};if(nu(s,e)||typeof s=="object"){let r=s.constructor.name,i=su(s,e,t);return{rr_type:r,index:i}}}}return s}function Dm(s,e,t,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;let a=ze(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return se(this.canvas,t,r,!0)||setTimeout(()=>{let c=iu(u,e,this);s(this.canvas,{type:Ee["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch{let a=Ht(e.CanvasRenderingContext2D.prototype,n,{set(l){s(this.canvas,{type:Ee["2D"],property:n,args:[l],setter:!0})}});i.push(a)}return()=>{i.forEach(n=>n())}}function Tm(s){return s==="experimental-webgl"?"webgl":s}function ta(s,e,t,r){let i=[];try{let o=ze(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!se(this,e,t,!0)){let u=Tm(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function ra(s,e,t,r,i,o){let n=[],a=Object.getOwnPropertyNames(s);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;let u=ze(s,l,function(c){return function(...h){let f=c.apply(this,h);if(su(f,o,this),"tagName"in this.canvas&&!se(this.canvas,r,i,!0)){let g=iu(h,o,this),m={type:e,property:l,args:g};t(this.canvas,m)}return f}});n.push(u)}catch{let u=Ht(s,l,{set(c){t(this.canvas,{type:e,property:l,args:[c],setter:!0})}});n.push(u)}return n}function _m(s,e,t,r){let i=[];return i.push(...ra(e.WebGLRenderingContext.prototype,Ee.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...ra(e.WebGL2RenderingContext.prototype,Ee.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}function Pm(s){let e;try{if(e=sa&&(window.URL||window.webkitURL).createObjectURL(sa),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ou,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}function Te(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:n="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:d,packFn:w,sampling:S={},dataURLOptions:y={},mousemoveWait:v,recordDOM:x=!0,recordCanvas:N=!1,recordCrossOriginIframes:$=!1,recordAfter:_=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:ee=!1,inlineImages:ie=!1,plugins:ne,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:_e=new Set([]),errorHandler:ke}=s;dm(ke);let X=$?window.parent===window:!0,F=!1;if(!X)try{window.parent.document&&(F=!1)}catch{F=!0}if(X&&!e)throw new Error("emit function is required");if(!X&&!F)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),fe.reset();let ce=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f!==void 0?f:{password:!0},oe=ba(g);vn();let gt,ps=0,Dn=L=>{for(let he of ne||[])he.eventProcessor&&(L=he.eventProcessor(L));return w&&!F&&(L=w(L)),L};q=(L,he)=>{var K;let J=L;if(J.timestamp=Bt(),(K=Ue[0])!=null&&K.isFrozen()&&J.type!==A.FullSnapshot&&!(J.type===A.IncrementalSnapshot&&J.data.source===I.Mutation)&&Ue.forEach(ae=>ae.unfreeze()),X)e?.(Dn(J),he);else if(F){let ae={type:"rrweb",event:Dn(J),origin:window.location.origin,isCheckout:he};window.parent.postMessage(ae,"*")}if(J.type===A.FullSnapshot)gt=J,ps=0;else if(J.type===A.IncrementalSnapshot){if(J.data.source===I.Mutation&&J.data.isAttachIframe)return;ps++;let ae=r&&ps>=r,W=t&&J.timestamp-gt.timestamp>t;(ae||W)&&Or(!0)}};let Zt=L=>{q({type:A.IncrementalSnapshot,data:{source:I.Mutation,...L}})},Tn=L=>q({type:A.IncrementalSnapshot,data:{source:I.Scroll,...L}}),_n=L=>q({type:A.IncrementalSnapshot,data:{source:I.CanvasMutation,...L}}),Iu=L=>q({type:A.IncrementalSnapshot,data:{source:I.AdoptedStyleSheet,...L}}),Pe=new Li({mutationCb:Zt,adoptedStyleSheetCb:Iu}),Le=new _i({mirror:fe,mutationCb:Zt,stylesheetManager:Pe,recordCrossOriginIframes:$,wrappedEmit:q});for(let L of ne||[])L.getMirror&&L.getMirror({nodeMirror:fe,crossOriginIframeMirror:Le.crossOriginIframeMirror,crossOriginIframeStyleMirror:Le.crossOriginIframeStyleMirror});let ms=new $i;$s=new Pi({recordCanvas:N,mutationCb:_n,win:window,blockClass:i,blockSelector:o,mirror:fe,sampling:S.canvas,dataURLOptions:y});let Xt=new ki({mutationCb:Zt,scrollCb:Tn,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ce,dataURLOptions:y,maskTextFn:p,maskInputFn:m,recordCanvas:N,inlineImages:ie,sampling:S,slimDOMOptions:oe,iframeManager:Le,stylesheetManager:Pe,canvasManager:$s,keepIframeSrcFn:O,processedNodeManager:ms},mirror:fe});Or=(L=!1)=>{if(!x)return;q({type:A.Meta,data:{href:window.location.href,width:wn(),height:yn()}},L),Pe.reset(),Xt.init(),Ue.forEach(K=>K.lock());let he=Pc(document,{mirror:fe,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ce,maskTextFn:p,maskInputFn:m,slimDOM:oe,dataURLOptions:y,recordCanvas:N,inlineImages:ie,onSerialize:K=>{tt(K,fe)&&Le.addIframe(K),En(K,fe)&&Pe.trackLinkElement(K),Re(K)&&Xt.addShadowRoot(R.shadowRoot(K),document)},onIframeLoad:(K,J)=>{Le.attachIframe(K,J),Xt.observeAttachShadow(K)},onStylesheetLoad:(K,J)=>{Pe.attachLinkElement(K,J)},keepIframeSrcFn:O});if(!he)return console.warn("Failed to snapshot the document");q({type:A.FullSnapshot,data:{node:he,initialOffset:gn(window)}},L),Ue.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{let L=[],he=J=>{var ae;return T(Nm)({mutationCb:Zt,mousemoveCb:(W,gs)=>q({type:A.IncrementalSnapshot,data:{source:gs,positions:W}}),mouseInteractionCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.MouseInteraction,...W}}),scrollCb:Tn,viewportResizeCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.ViewportResize,...W}}),inputCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.Input,...W}}),mediaInteractionCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.MediaInteraction,...W}}),styleSheetRuleCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.StyleSheetRule,...W}}),styleDeclarationCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.StyleDeclaration,...W}}),canvasMutationCb:_n,fontCb:W=>q({type:A.IncrementalSnapshot,data:{source:I.Font,...W}}),selectionCb:W=>{q({type:A.IncrementalSnapshot,data:{source:I.Selection,...W}})},customElementCb:W=>{q({type:A.IncrementalSnapshot,data:{source:I.CustomElement,...W}})},blockClass:i,ignoreClass:n,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:ce,inlineStylesheet:c,sampling:S,recordDOM:x,recordCanvas:N,inlineImages:ie,userTriggeredOnInput:V,collectFonts:ee,doc:J,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:O,blockSelector:o,slimDOMOptions:oe,dataURLOptions:y,mirror:fe,iframeManager:Le,stylesheetManager:Pe,shadowDomManager:Xt,processedNodeManager:ms,canvasManager:$s,ignoreCSSAttributes:_e,plugins:((ae=ne?.filter(W=>W.observer))==null?void 0:ae.map(W=>({observer:W.observer,options:W.options,callback:gs=>q({type:A.Plugin,data:{plugin:W.name,payload:gs}})})))||[]},d)};Le.addLoadListener(J=>{try{L.push(he(J.contentDocument))}catch(ae){console.warn(ae)}});let K=()=>{Or(),L.push(he(document)),Qr=!0};return["interactive","complete"].includes(document.readyState)?K():(L.push(re("DOMContentLoaded",()=>{q({type:A.DomContentLoaded,data:{}}),_==="DOMContentLoaded"&&K()})),L.push(re("load",()=>{q({type:A.Load,data:{}}),_==="load"&&K()},window))),()=>{L.forEach(J=>{try{J()}catch(ae){String(ae).toLowerCase().includes("cross-origin")||console.warn(ae)}}),ms.destroy(),Qr=!1,pm()}}catch(L){console.warn(L)}}function au(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}function $m(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;let t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(w){let S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(w)}let a=n(s.navigator.userAgent)?1:0;function l(w,S){this.scrollLeft=w,this.scrollTop=S}function u(w){return .5*(1-Math.cos(Math.PI*w))}function c(w){if(w===null||typeof w!="object"||w.behavior===void 0||w.behavior==="auto"||w.behavior==="instant")return!0;if(typeof w=="object"&&w.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+w.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(w,S){if(S==="Y")return w.clientHeight+a<w.scrollHeight;if(S==="X")return w.clientWidth+a<w.scrollWidth}function f(w,S){let y=s.getComputedStyle(w,null)["overflow"+S];return y==="auto"||y==="scroll"}function g(w){let S=h(w,"Y")&&f(w,"Y"),y=h(w,"X")&&f(w,"X");return S||y}function m(w){for(;w!==e.body&&g(w)===!1;)w=w.parentNode||w.host;return w}function p(w){let S=o(),y,v,x,N=(S-w.startTime)/r;N=N>1?1:N,y=u(N),v=w.startX+(w.x-w.startX)*y,x=w.startY+(w.y-w.startY)*y,w.method.call(w.scrollable,v,x),(v!==w.x||x!==w.y)&&s.requestAnimationFrame(p.bind(s,w))}function d(w,S,y){let v,x,N,$,_=o();w===e.body?(v=s,x=s.scrollX||s.pageXOffset,N=s.scrollY||s.pageYOffset,$=i.scroll):(v=w,x=w.scrollLeft,N=w.scrollTop,$=l),p({scrollable:v,method:$,startTime:_,startX:x,startY:N,x:S,y})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,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}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let w=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof w>"u"?this.scrollLeft:~~w,typeof S>"u"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let w=m(this),S=w.getBoundingClientRect(),y=this.getBoundingClientRect();w!==e.body?(d.call(this,w,w.scrollLeft+y.left-S.left,w.scrollTop+y.top-S.top),s.getComputedStyle(w).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}function ia(s,e){if(s.type===A.IncrementalSnapshot&&s.data.source===I.MouseMove&&s.data.positions&&s.data.positions.length){let t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}function na(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}function Fs(s){return s===void 0?[]:[].concat(s)}function Xe(s){return{type:"xstate.assign",assignment:s}}function oa(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function es(s){return function(e){return s===e}}function uu(s){return typeof s=="string"?{type:s}:s}function aa(s,e){return{value:s,context:e,actions:[],changed:!1,matches:es(s)}}function la(s,e,t){var r=e,i=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,i]}function cu(s,e){e===void 0&&(e={});var t=na(la(Fs(s.states[s.initial].entry).map(function(n){return oa(n,e.actions)}),s.context,lu),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:es(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,g=uu(a),m=s.states[h];if(m.on){var p=Fs(m.on[g.type]);try{for(var d=(function(F){var ce=typeof Symbol=="function"&&Symbol.iterator,oe=ce&&F[ce],gt=0;if(oe)return oe.call(F);if(F&&typeof F.length=="number")return{next:function(){return F&>>=F.length&&(F=void 0),{value:F&&F[gt++],done:!F}}};throw new TypeError(ce?"Object is not iterable.":"Symbol.iterator is not defined.")})(p),w=d.next();!w.done;w=d.next()){var S=w.value;if(S===void 0)return aa(h,f);var y=typeof S=="string"?{target:S}:S,v=y.target,x=y.actions,N=x===void 0?[]:x,$=y.cond,_=$===void 0?function(){return!0}:$,V=v===void 0,ee=v??h,ie=s.states[ee];if(_(f,g)){var ne=na(la((V?Fs(N):[].concat(m.exit,N,ie.entry).filter(function(F){return F})).map(function(F){return oa(F,o._options.actions)}),f,g),3),O=ne[0],_e=ne[1],ke=ne[2],X=v??h;return{value:X,context:_e,actions:O,changed:v!==h||O.length>0||ke,matches:es(X)}}}}catch(F){l={error:F}}finally{try{w&&!w.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return aa(h,f)}};return o}function hu(s){var e=s.initialState,t=et.NotStarted,r=new Set,i={_machine:s,send:function(o){t===et.Running&&(e=s.transition(e,o),ua(e,uu(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:es(n.value)}}return t=et.Running,ua(e,lu),i},stop:function(){return t=et.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Fm(s,e){for(let t=s.length-1;t>=0;t--){let r=s[t];if(r.type===A.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Um(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=cu({id:"player",context:s,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:Xe({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Xe((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),{...o,timeOffset:a,baselineTime:o.events[0].timestamp+a}}),play(o){var n;let{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(let m of l)ia(m,u);let h=Fm(l,u),f=c?.timestamp;c?.type===A.IncrementalSnapshot&&c.data.source===I.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(k.PlayBack);let g=new Array;for(let m of h)if(!(f&&f<u&&(m.timestamp<=f||m===c)))if(m.timestamp<u)g.push(m);else{let p=e(m,!1);a.addAction({doAction:()=>{p()},delay:m.delay})}t(g),r.emit(k.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Xe(o=>({...o,lastPlayedEvent:null})),startLive:Xe({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Xe((o,n)=>{let{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){let{event:c}=n.payload;ia(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let m=-1,p=0;for(;p<=h;){let d=Math.floor((p+h)/2);u[d].timestamp<=c.timestamp?p=d+1:h=d-1}m===-1&&(m=p),u.splice(m,0,c)}let f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return{...o,events:u}})}});return hu(i)}function Bm(s){let e=cu({id:"speed",context:s,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:Xe({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return hu(e)}function fu(s,e){let t=ca.get(s);return t||(t=new Map,ca.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Oe(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await Oe(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:o}=r;return fu(e,i)[o]}else if("args"in r){let{rr_type:i,args:o}=r,n=window[i];return new n(...await Promise.all(o.map(Oe(s,e,t))))}else{if("base64"in r)return Rm(r.base64);if("src"in r){let i=s.get(r.src);if(i)return i;{let o=new Image;return o.src=r.src,s.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(Oe(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Oe(s,e,t)));return r}}function zm(s,e){try{return e===Ee.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch{return null}}function jm(s,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Vm.includes(t))return;let r=fu(s,t);r.includes(e)||r.push(e)}async function Gm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{let o=zm(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}let n=o[s.property],a=await Promise.all(s.args.map(Oe(r,o))),l=n.apply(o,a);jm(o,l);let u=!1}catch(o){i(s,o)}}async function Hm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){let o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}let n=e.map(async l=>Promise.all(l.args.map(Oe(r,o))));(await Promise.all(n)).forEach((l,u)=>{let c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}let h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Ui({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{let n=i.get(s)||e,a="commands"in n?n.commands:[n];if([Ee.WebGL,Ee.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){let u=a[l];await Gm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Hm({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}function Er(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)return;let t=s,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function Ym(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)return;let t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}function fa(s){return s.type==A.IncrementalSnapshot&&(s.data.source==I.TouchMove||s.data.source==I.MouseInteraction&&s.data.type==P.TouchStart)}var Wu,zu,b,eo,Vu,ju,to,M,ro,so,er,Gu,xs,As,te,Ot,io,pc,mc,gc,yc,bc,vc,Dt,He,no,Ec,Ic,oo,Lc,ao,$c,Fc,Hi,j,va,Wc,zc,Vc,pe,lo,uo,Ws,Yi,zt,co,zs,Ea,Gc,ts,rr,Hc,Yc,Zc,Xc,Gs,rs,Kc,Hs,ss,Jc,qc,Qc,eh,ho,fo,th,rh,Ns,sh,Ys,Ia,nh,oh,po,sr,Zs,Xs,ah,Ms,mo,lh,Rs,uh,go,Pr,is,xa,Ir,xr,Aa,Na,Ma,yo,ch,hh,fh,dh,Ra,ph,Ks,ns,Oa,Da,Ta,_a,mh,ka,Zi,Xi,Pa,ve,Be,gh,Ua,Ba,Tt,Ki,wo,Wa,Js,za,yh,qs,Ji,Os,So,ir,bo,nr,bt,or,ar,lr,wh,Sh,bh,vh,Ch,Eh,Ih,xh,Ah,Nh,ur,cr,Mh,vo,Rh,Va,Lr,qi,ja,Ga,Ha,rt,Vt,_t,Ya,Za,Oh,$r,Qi,Dh,Th,_h,kh,Ph,Co,Eo,$h,Fh,Uh,Bh,Wh,en,ge,zh,Vh,jh,Gh,Hh,Yh,Io,Zh,Xh,Kh,Jh,qh,st,ei,it,Ja,Qh,ef,tf,rf,sf,ti,nf,of,af,lf,uf,kt,cf,hf,ff,df,pf,mf,gf,yf,wf,Sf,qa,bf,vf,tn,Cf,Ef,Qa,If,el,tl,xf,Af,Nf,Mf,rl,sl,Rf,Of,H,Ao,Ff,Uf,E,Bf,Wf,Mo,zf,rn,G,il,Hf,Yf,Zf,me,Ro,Oo,ri,sn,jt,Do,si,ol,Kf,as,hr,Jf,qf,Qf,ed,oi,ls,td,ai,us,rd,sd,id,nd,To,_o,od,ad,Ds,ld,li,al,cd,hd,ko,fr,ui,ci,fd,Ts,Po,dd,_s,pd,Lo,Ur,cs,ll,Ar,Nr,ul,cl,hl,$o,md,gd,yd,wd,fl,Sd,hi,hs,dl,pl,ml,gl,bd,yl,nn,on,wl,Ce,We,vd,Cl,El,Lt,an,Fo,Il,fi,xl,Cd,di,ln,ks,Uo,dr,Bo,pr,Ct,mr,gr,yr,Ed,Id,xd,Ad,Nd,Md,Rd,Od,Dd,Td,wr,Sr,_d,Wo,kd,Al,Br,un,Nl,Ml,Rl,nt,Gt,$t,Ol,Dl,Pd,Wr,cn,Ld,$d,Fd,Ud,Bd,zo,Vo,zd,Vd,jd,Gd,Hd,hn,ye,Yd,Zd,Xd,Kd,Jd,qd,jo,Qd,ep,tp,rp,sp,ot,mi,at,kl,ip,np,op,ap,lp,gi,up,cp,hp,fp,dp,Ft,pp,mp,gp,yp,wp,Sp,bp,vp,Cp,Ep,Pl,Ip,xp,fn,Ap,Np,Ll,Mp,$l,Fl,Rp,Op,Dp,Tp,Ul,Bl,_p,kp,Z,D,Lp,$p,yi,Fp,Up,de,wi,Vr,lt,Si,bi,jr,Gr,Hr,vi,le,Ci,Bp,we,ut,jp,ct,Ei,Ii,xi,Ai,Ni,Gp,Hp,Yp,Mi,Yo,Zo,br,Jp,Ps,Ls,R,Ze,Xr,Bt,Wt,cm,A,I,P,Se,Ee,Me,k,be,Oi,Ko,Di,Rt,T,Ue,wm,Qo,qr,_i,ki,Qe,xt,It,Mm,Rm,ea,su,iu,nu,ou,km,sa,Pi,Li,$i,q,Or,$s,Qr,fe,Lm,Fi,et,lu,ua,Wm,ca,Vm,Bi,Zm,Xm,ha,Us,Wi,Km,Jm,qm,pu=yt(()=>{"use strict";Wu=Object.defineProperty,zu=(s,e,t)=>e in s?Wu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>zu(s,typeof e!="symbol"?e+"":e,t),Vu=Object.defineProperty,ju=(s,e,t)=>e in s?Vu(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,to=(s,e,t)=>ju(s,typeof e!="symbol"?e+"":e,t),M=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(M||{}),ro={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},so={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},er={},Gu=()=>!!globalThis.Zone;xs={};As={};te={ownerDocument:Hu,childNodes:Yu,parentNode:Zu,parentElement:Xu,textContent:Ku,contains:Ju,getRootNode:qu,host:Qu,styleSheets:ec,shadowRoot:tc,querySelector:rc,querySelectorAll:sc,mutationObserver:ic,patch:nc};Ot=class{constructor(){to(this,"idNodeMap",new Map),to(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};io="__rrweb_original__";pc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,mc=/^(?:[a-z+]+:)?\/\//i,gc=/^www\..*/i,yc=/^(data:)([^,]*),(.*)/i;bc=1,vc=new RegExp("[^a-z0-9-_:]"),Dt=-2;Ec=/^[^ \t\n\r\u000c]+/,Ic=/^[, \t\n\r\u000c]+/;oo=new WeakMap;Lc=/(max|min)-device-(width|height)/,ao=new RegExp(Lc.source,"g"),$c={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(ao)&&(s.params=s.params.replace(ao,"$1-$2"))}}}},Fc={postcssPlugin:"postcss-hover-classes",prepare:function(){let s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
8
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}};Hi={exports:{}},j=String,va=function(){return{isColorSupported:!1,reset:j,bold:j,dim:j,italic:j,underline:j,inverse:j,hidden:j,strikethrough:j,black:j,red:j,green:j,yellow:j,blue:j,magenta:j,cyan:j,white:j,gray:j,bgBlack:j,bgRed:j,bgGreen:j,bgYellow:j,bgBlue:j,bgMagenta:j,bgCyan:j,bgWhite:j}};Hi.exports=va();Hi.exports.createColors=va;Wc=Hi.exports,zc={},Vc=Object.freeze(Object.defineProperty({__proto__:null,default:zc},Symbol.toStringTag,{value:"Module"})),pe=Bc(Vc),lo=Wc,uo=pe,Ws=class Ca extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ca)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=lo.isColorSupported),uo&&e&&(t=uo(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=lo.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
9
|
+
`+g+a("^")}return" "+l(f)+u}).join(`
|
|
10
10
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
11
11
|
|
|
12
12
|
`+e+`
|
|
13
|
-
`),this.name+": "+this.message+e}},
|
|
13
|
+
`),this.name+": "+this.message+e}},Yi=Ws;Ws.default=Ws;zt={};zt.isClean=Symbol("isClean");zt.my=Symbol("my");co={after:`
|
|
14
14
|
`,beforeClose:`
|
|
15
15
|
`,beforeComment:`
|
|
16
16
|
`,beforeDecl:`
|
|
17
17
|
`,beforeOpen:" ",beforeRule:`
|
|
18
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1}
|
|
19
|
-
`)){let
|
|
18
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};zs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
19
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return co[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]<"u")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+jc(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=co[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
20
20
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
21
21
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
22
22
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
23
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let
|
|
24
|
-
`);return t=
|
|
25
|
-
`?(i=1,
|
|
26
|
-
`);r=new Array(
|
|
23
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
24
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Ea=zs;zs.default=zs;Gc=Ea;ts=Vs;Vs.default=Vs;({isClean:rr,my:Hc}=zt),Yc=Yi,Zc=Ea,Xc=ts;Gs=class{constructor(e={}){this.raws={},this[rr]=!1,this[Hc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=js(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Yc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[rr]){this[rr]=!1;let e=this;for(;e=e.parent;)e[rr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
25
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Zc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},rs=Gs;Gs.default=Gs;Kc=rs,Hs=class extends Kc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},ss=Hs;Hs.default=Hs;Jc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",qc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Qc=(s=21)=>{let e="",t=s;for(;t--;)e+=Jc[Math.random()*64|0];return e},eh={nanoid:Qc,customAlphabet:qc},{SourceMapConsumer:ho,SourceMapGenerator:fo}=pe,{existsSync:th,readFileSync:rh}=pe,{dirname:Ns,join:sh}=pe;Ys=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ns(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ho(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ih(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ns(e),th(e))return this.mapFile=e,rh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ho)return fo.fromSourceMap(t).toString();if(t instanceof fo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=sh(Ns(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ia=Ys;Ys.default=Ys;({SourceMapConsumer:nh,SourceMapGenerator:oh}=pe),{fileURLToPath:po,pathToFileURL:sr}=pe,{isAbsolute:Zs,resolve:Xs}=pe,{nanoid:ah}=eh,Ms=pe,mo=Yi,lh=Ia,Rs=Symbol("fromOffsetCache"),uh=!!(nh&&oh),go=!!(Xs&&Zs),Pr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!go||/^\w+:\/\//.test(t.from)||Zs(t.from)?this.file=t.from:this.file=Xs(t.from)),go&&uh){let r=new lh(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ah(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new mo(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new mo(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(sr&&(o.input.url=sr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Rs])r=this[Rs];else{let o=this.css.split(`
|
|
26
|
+
`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Rs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Xs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;Zs(n.source)?l=sr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||sr(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(po)u.file=po(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},is=Pr;Pr.default=Pr;Ms&&Ms.registerInput&&Ms.registerInput(Pr);({SourceMapConsumer:xa,SourceMapGenerator:Ir}=pe),{dirname:xr,relative:Aa,resolve:Na,sep:Ma}=pe,{pathToFileURL:yo}=pe,ch=is,hh=!!(xa&&Ir),fh=!!(xr&&Na&&Aa&&Ma),dh=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
27
27
|
`;this.css.includes(`\r
|
|
28
28
|
`)&&(t=`\r
|
|
29
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
30
|
-
`),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Sr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Sr(pa(r,this.mapOpts.annotation)));let i=da(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Kc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(so){let r=so(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ma==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},ga=Qc,eh=Jr,Vs=class extends eh{constructor(e){super(e),this.type="comment"}},es=Vs;Vs.default=Vs;({isClean:ya,my:wa}=Lt),ba=qr,Sa=es,th=Jr;Se=class xa extends th{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ea(va(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ba(e)]}else if(e.selector)e=[new Wi(e)];else if(e.name)e=[new zi(e)];else if(e.text)e=[new Sa(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[wa]||xa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ya]&&Ia(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Se.registerParse=s=>{va=s};Se.registerRule=s=>{Wi=s};Se.registerAtRule=s=>{zi=s};Se.registerRoot=s=>{Ca=s};Ue=Se;Se.default=Se;Se.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,zi.prototype):s.type==="rule"?Object.setPrototypeOf(s,Wi.prototype):s.type==="decl"?Object.setPrototypeOf(s,ba.prototype):s.type==="comment"?Object.setPrototypeOf(s,Sa.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ca.prototype),s[wa]=!0,s.nodes&&s.nodes.forEach(e=>{Se.rebuild(e)})};rh=Ue,Nt=class extends rh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Na(new Aa,this,e).stringify()}};Nt.registerLazyResult=s=>{Na=s};Nt.registerProcessor=s=>{Aa=s};Vi=Nt;Nt.default=Nt;io={},Ma=function(e){io[e]||(io[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},js=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Ra=js;js.default=js;sh=Ra,Gs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new sh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ji=Gs;Gs.default=Gs;Es=39,no=34,Qt=92,oo=47,er=10,pt=32,tr=12,rr=9,sr=13,ih=91,nh=93,oh=40,ah=41,lh=123,uh=125,ch=59,hh=42,fh=58,dh=64,ir=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ph=/.[\r\n"'(/\\]/,ao=/[\da-f]/i,mh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,m,p,g=r.length,d=0,w=[],S=[];function y(){return d}function v(U){throw e.error("Unclosed "+U,d)}function N(){return S.length===0&&d>=g}function A(U){if(S.length)return S.pop();if(d>=g)return;let Y=U?U.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case er:case pt:case rr:case sr:case tr:{o=d;do o+=1,n=r.charCodeAt(o);while(n===pt||n===er||n===rr||n===sr||n===tr);p=["space",r.slice(d,o)],d=o-1;break}case ih:case nh:case lh:case uh:case fh:case ch:case ah:{let Q=String.fromCharCode(n);p=[Q,Q,d];break}case oh:{if(f=w.length?w.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Es&&m!==no&&m!==pt&&m!==er&&m!==rr&&m!==tr&&m!==sr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||Y){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===Qt;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||ph.test(l)?p=["(","(",d]:(p=["brackets",l,d,o],d=o);break}case Es:case no:{a=n===Es?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||Y){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===Qt;)h-=1,c=!c}while(c);p=["string",r.slice(d,o+1),d,o],d=o;break}case dh:{ir.lastIndex=d+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,p=["at-word",r.slice(d,o+1),d,o],d=o;break}case Qt:{for(o=d,u=!0;r.charCodeAt(o+1)===Qt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==oo&&n!==pt&&n!==er&&n!==rr&&n!==sr&&n!==tr&&(o+=1,ao.test(r.charAt(o)))){for(;ao.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===pt&&(o+=1)}p=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===oo&&r.charCodeAt(d+1)===hh?(o=r.indexOf("*/",d+2)+1,o===0&&(i||Y?o=r.length:v("comment")),p=["comment",r.slice(d,o+1),d,o],d=o):(nr.lastIndex=d+1,nr.test(r),nr.lastIndex===0?o=r.length-1:o=nr.lastIndex-2,p=["word",r.slice(d,o+1),d,o],w.push(p),d=o);break}}return d++,p}function W(U){S.push(U)}return{back:W,endOfFile:N,nextToken:A,position:y}},Oa=Ue,Dr=class extends Oa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Gi=Dr;Dr.default=Dr;Oa.registerAtRule(Dr);Da=Ue,tt=class extends Da{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ta(new _a,this,e).stringify()}};tt.registerLazyResult=s=>{Ta=s};tt.registerProcessor=s=>{_a=s};Pt=tt;tt.default=tt;Da.registerRoot(tt);At={comma(s){return At.split(s,[","],!0)},space(s){let e=[" ",`
|
|
31
|
-
`," "];return At.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},ka=At;At.default=At;$a=Ue,gh=ka,Tr=class extends $a{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return gh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Hi=Tr;Tr.default=Tr;$a.registerRule(Tr);yh=qr,wh=mh,bh=es,Sh=Gi,vh=Pt,lo=Hi,uo={empty:!0,space:!0};Eh=class{constructor(e){this.input=e,this.root=new vh,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Sh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new bh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=wh(this.input)}decl(e,t){let r=new yh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Ch(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new lo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!uo[h]&&!uo[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new lo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Ih=Eh,xh=Ue,Nh=Ih,Ah=Qr;Yi=_r;_r.default=_r;xh.registerParse(_r);({isClean:me,my:Mh}=Lt),Rh=ga,Oh=Kr,Dh=Ue,Th=Vi,_h=Ma,co=ji,kh=Yi,$h=Pt,Lh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ph={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},Fh={Once:!0,postcssPlugin:!0,prepare:!0},rt=0;Ys={},st=class Pa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Hs(t);else if(t instanceof Pa||t instanceof co)i=Hs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=kh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Mh]&&Dh.rebuild(i)}this.result=new co(e,i,r),this.helpers={...Ys,postcss:Ys,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ph[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Fh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(mt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[ho(e)];for(;t.length>0;){let r=this.visitTick(t);if(mt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return mt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Oh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Rh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(mt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||_h("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(mt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[me]){a[me]=!0,e.push(ho(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===rt){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[me]=!0;let t=La(e);for(let r of t)if(r===rt)e.nodes&&e.each(i=>{i[me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};st.registerPostcss=s=>{Ys=s};Fa=st;st.default=st;$h.registerLazyResult(st);Th.registerLazyResult(st);Uh=ga,Bh=Kr,Wh=Ma,zh=Yi,Vh=ji,Zs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Bh;this.result=new Vh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Uh(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Wh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=zh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},jh=Zs;Zs.default=Zs;Gh=jh,Hh=Fa,Yh=Vi,Zh=Pt,Mt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Gh(this,e,t):new Hh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Xh=Mt;Mt.default=Mt;Zh.registerProcessor(Mt);Yh.registerProcessor(Mt);Kh=qr,Jh=ha,qh=es,Qh=Gi,ef=Qr,tf=Pt,rf=Hi;sf=Rt;Rt.default=Rt;nf=Bi,Ua=qr,of=Fa,af=Ue,Zi=Xh,lf=Kr,uf=sf,Ba=Vi,cf=Ra,Wa=es,za=Gi,hf=ji,ff=Qr,df=Yi,pf=ka,Va=Hi,ja=Pt,mf=Jr;P.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
29
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||xr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new xa(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),fh&&hh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ir.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ir({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 Ir({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
30
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?xr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=xr(Na(r,this.mapOpts.annotation)));let i=Aa(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ch(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(yo){let r=yo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ma==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Ra=dh,ph=rs,Ks=class extends ph{constructor(e){super(e),this.type="comment"}},ns=Ks;Ks.default=Ks;({isClean:Oa,my:Da}=zt),Ta=ss,_a=ns,mh=rs;ve=class Fa extends mh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=La(ka(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ta(e)]}else if(e.selector)e=[new Zi(e)];else if(e.name)e=[new Xi(e)];else if(e.text)e=[new _a(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Da]||Fa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Oa]&&$a(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ve.registerParse=s=>{ka=s};ve.registerRule=s=>{Zi=s};ve.registerAtRule=s=>{Xi=s};ve.registerRoot=s=>{Pa=s};Be=ve;ve.default=ve;ve.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Xi.prototype):s.type==="rule"?Object.setPrototypeOf(s,Zi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ta.prototype):s.type==="comment"?Object.setPrototypeOf(s,_a.prototype):s.type==="root"&&Object.setPrototypeOf(s,Pa.prototype),s[Da]=!0,s.nodes&&s.nodes.forEach(e=>{ve.rebuild(e)})};gh=Be,Tt=class extends gh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ua(new Ba,this,e).stringify()}};Tt.registerLazyResult=s=>{Ua=s};Tt.registerProcessor=s=>{Ba=s};Ki=Tt;Tt.default=Tt;wo={},Wa=function(e){wo[e]||(wo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},Js=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},za=Js;Js.default=Js;yh=za,qs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new yh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ji=qs;qs.default=qs;Os=39,So=34,ir=92,bo=47,nr=10,bt=32,or=12,ar=9,lr=13,wh=91,Sh=93,bh=40,vh=41,Ch=123,Eh=125,Ih=59,xh=42,Ah=58,Nh=64,ur=/[\t\n\f\r "#'()/;[\\\]{}]/g,cr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mh=/.[\r\n"'(/\\]/,vo=/[\da-f]/i,Rh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,m,p=r.length,d=0,w=[],S=[];function y(){return d}function v(_){throw e.error("Unclosed "+_,d)}function x(){return S.length===0&&d>=p}function N(_){if(S.length)return S.pop();if(d>=p)return;let V=_?_.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case nr:case bt:case ar:case lr:case or:{n=d;do n+=1,o=r.charCodeAt(n);while(o===bt||o===nr||o===ar||o===lr||o===or);m=["space",r.slice(d,n)],d=n-1;break}case wh:case Sh:case Ch:case Eh:case Ah:case Ih:case vh:{let ee=String.fromCharCode(o);m=[ee,ee,d];break}case bh:{if(f=w.length?w.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==Os&&g!==So&&g!==bt&&g!==nr&&g!==ar&&g!==or&&g!==lr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||V){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===ir;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Mh.test(l)?m=["(","(",d]:(m=["brackets",l,d,n],d=n);break}case Os:case So:{a=o===Os?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||V){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===ir;)h-=1,c=!c}while(c);m=["string",r.slice(d,n+1),d,n],d=n;break}case Nh:{ur.lastIndex=d+1,ur.test(r),ur.lastIndex===0?n=r.length-1:n=ur.lastIndex-2,m=["at-word",r.slice(d,n+1),d,n],d=n;break}case ir:{for(n=d,u=!0;r.charCodeAt(n+1)===ir;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==bo&&o!==bt&&o!==nr&&o!==ar&&o!==lr&&o!==or&&(n+=1,vo.test(r.charAt(n)))){for(;vo.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===bt&&(n+=1)}m=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===bo&&r.charCodeAt(d+1)===xh?(n=r.indexOf("*/",d+2)+1,n===0&&(i||V?n=r.length:v("comment")),m=["comment",r.slice(d,n+1),d,n],d=n):(cr.lastIndex=d+1,cr.test(r),cr.lastIndex===0?n=r.length-1:n=cr.lastIndex-2,m=["word",r.slice(d,n+1),d,n],w.push(m),d=n);break}}return d++,m}function $(_){S.push(_)}return{back:$,endOfFile:x,nextToken:N,position:y}},Va=Be,Lr=class extends Va{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},qi=Lr;Lr.default=Lr;Va.registerAtRule(Lr);ja=Be,rt=class extends ja{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ga(new Ha,this,e).stringify()}};rt.registerLazyResult=s=>{Ga=s};rt.registerProcessor=s=>{Ha=s};Vt=rt;rt.default=rt;ja.registerRoot(rt);_t={comma(s){return _t.split(s,[","],!0)},space(s){let e=[" ",`
|
|
31
|
+
`," "];return _t.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Ya=_t;_t.default=_t;Za=Be,Oh=Ya,$r=class extends Za{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Oh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Qi=$r;$r.default=$r;Za.registerRule($r);Dh=ss,Th=Rh,_h=ns,kh=qi,Ph=Vt,Co=Qi,Eo={empty:!0,space:!0};$h=class{constructor(e){this.input=e,this.root=new Ph,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new kh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new _h;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Th(this.input)}decl(e,t){let r=new Dh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Lh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Co;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Eo[h]&&!Eo[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Co;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Fh=$h,Uh=Be,Bh=Fh,Wh=is;en=Fr;Fr.default=Fr;Uh.registerParse(Fr);({isClean:ge,my:zh}=zt),Vh=Ra,jh=ts,Gh=Be,Hh=Ki,Yh=Wa,Io=Ji,Zh=en,Xh=Vt,Kh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jh={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},qh={Once:!0,postcssPlugin:!0,prepare:!0},st=0;ei={},it=class Ka{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Qs(t);else if(t instanceof Ka||t instanceof Io)i=Qs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Zh;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[zh]&&Gh.rebuild(i)}this.result=new Io(e,i,r),this.helpers={...ei,postcss:ei,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,n=this.result.processor.version,a=o.split("."),l=n.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Jh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(vt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[xo(e)];for(;t.length>0;){let r=this.visitTick(t);if(vt(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return vt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=jh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Vh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(vt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Yh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(vt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[ge]){a[ge]=!0,e.push(xo(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===st){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ge]=!0;let t=Xa(e);for(let r of t)if(r===st)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};it.registerPostcss=s=>{ei=s};Ja=it;it.default=it;Xh.registerLazyResult(it);Hh.registerLazyResult(it);Qh=Ra,ef=ts,tf=Wa,rf=en,sf=Ji,ti=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=ef;this.result=new sf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Qh(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||tf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=rf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},nf=ti;ti.default=ti;of=nf,af=Ja,lf=Ki,uf=Vt,kt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new of(this,e,t):new af(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},cf=kt;kt.default=kt;uf.registerProcessor(kt);lf.registerProcessor(kt);hf=ss,ff=Ia,df=ns,pf=qi,mf=is,gf=Vt,yf=Qi;wf=Pt;Pt.default=Pt;Sf=Yi,qa=ss,bf=Ja,vf=Be,tn=cf,Cf=ts,Ef=wf,Qa=Ki,If=za,el=ns,tl=qi,xf=Ji,Af=is,Nf=en,Mf=Ya,rl=Qi,sl=Vt,Rf=rs;U.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
32
32
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
33
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...
|
|
34
|
-
`+
|
|
33
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new tn().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return U([i(l)]).process(n,a)},i};U.stringify=Cf;U.parse=Nf;U.fromJSON=Ef;U.list=Mf;U.comment=s=>new el(s);U.atRule=s=>new tl(s);U.decl=s=>new qa(s);U.rule=s=>new rl(s);U.root=s=>new sl(s);U.document=s=>new Qa(s);U.CssSyntaxError=Sf;U.Declaration=qa;U.Container=vf;U.Processor=tn;U.Document=Qa;U.Comment=el;U.Warning=If;U.AtRule=tl;U.Result=xf;U.Input=Af;U.Rule=rl;U.Root=sl;U.Node=Rf;bf.registerPostcss(U);Of=U;U.default=U;H=Uc(Of);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;Ao={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"};Ff=Object.defineProperty,Uf=(s,e,t)=>e in s?Ff(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,E=(s,e,t)=>Uf(s,typeof e!="symbol"?e+"":e,t),Bf=Object.defineProperty,Wf=(s,e,t)=>e in s?Bf(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Mo=(s,e,t)=>Wf(s,typeof e!="symbol"?e+"":e,t),zf=class{constructor(){Mo(this,"idNodeMap",new Map),Mo(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};rn={exports:{}},G=String,il=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};rn.exports=il();rn.exports.createColors=il;Hf=rn.exports,Yf={},Zf=Object.freeze(Object.defineProperty({__proto__:null,default:Yf},Symbol.toStringTag,{value:"Module"})),me=Gf(Zf),Ro=Hf,Oo=me,ri=class nl extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,nl)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ro.isColorSupported),Oo&&e&&(t=Oo(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Ro.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
34
|
+
`+g+a("^")}return" "+l(f)+u}).join(`
|
|
35
35
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
36
36
|
|
|
37
37
|
`+e+`
|
|
38
|
-
`),this.name+": "+this.message+e}},
|
|
38
|
+
`),this.name+": "+this.message+e}},sn=ri;ri.default=ri;jt={};jt.isClean=Symbol("isClean");jt.my=Symbol("my");Do={after:`
|
|
39
39
|
`,beforeClose:`
|
|
40
40
|
`,beforeComment:`
|
|
41
41
|
`,beforeDecl:`
|
|
42
42
|
`,beforeOpen:" ",beforeRule:`
|
|
43
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};
|
|
44
|
-
`)){let
|
|
43
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};si=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
44
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Do[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]<"u")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Xf(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Do[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
45
45
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
46
46
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
47
47
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
48
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let
|
|
49
|
-
`);return t=
|
|
50
|
-
`?(i=1,
|
|
51
|
-
`);r=new Array(
|
|
48
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
49
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},ol=si;si.default=si;Kf=ol;as=ii;ii.default=ii;({isClean:hr,my:Jf}=jt),qf=sn,Qf=ol,ed=as;oi=class{constructor(e={}){this.raws={},this[hr]=!1,this[Jf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ni(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new qf(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[hr]){this[hr]=!1;let e=this;for(;e=e.parent;)e[hr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
50
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Qf().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ed){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},ls=oi;oi.default=oi;td=ls,ai=class extends td{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},us=ai;ai.default=ai;rd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sd=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},id=(s=21)=>{let e="",t=s;for(;t--;)e+=rd[Math.random()*64|0];return e},nd={nanoid:id,customAlphabet:sd},{SourceMapConsumer:To,SourceMapGenerator:_o}=me,{existsSync:od,readFileSync:ad}=me,{dirname:Ds,join:ld}=me;li=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ds(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new To(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ud(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ds(e),od(e))return this.mapFile=e,ad(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof To)return _o.fromSourceMap(t).toString();if(t instanceof _o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=ld(Ds(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},al=li;li.default=li;({SourceMapConsumer:cd,SourceMapGenerator:hd}=me),{fileURLToPath:ko,pathToFileURL:fr}=me,{isAbsolute:ui,resolve:ci}=me,{nanoid:fd}=nd,Ts=me,Po=sn,dd=al,_s=Symbol("fromOffsetCache"),pd=!!(cd&&hd),Lo=!!(ci&&ui),Ur=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Lo||/^\w+:\/\//.test(t.from)||ui(t.from)?this.file=t.from:this.file=ci(t.from)),Lo&&pd){let r=new dd(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+fd(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new Po(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new Po(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(fr&&(o.input.url=fr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[_s])r=this[_s];else{let o=this.css.split(`
|
|
51
|
+
`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[_s]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ci(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;ui(n.source)?l=fr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||fr(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(ko)u.file=ko(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},cs=Ur;Ur.default=Ur;Ts&&Ts.registerInput&&Ts.registerInput(Ur);({SourceMapConsumer:ll,SourceMapGenerator:Ar}=me),{dirname:Nr,relative:ul,resolve:cl,sep:hl}=me,{pathToFileURL:$o}=me,md=cs,gd=!!(ll&&Ar),yd=!!(Nr&&cl&&ul&&hl),wd=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
52
52
|
`;this.css.includes(`\r
|
|
53
53
|
`)&&(t=`\r
|
|
54
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
55
|
-
`),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Cr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Cr(Ja(r,this.mapOpts.annotation)));let i=Ka(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new td(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Io){let r=Io(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;qa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Qa=id,nd=ss,ii=class extends nd{constructor(e){super(e),this.type="comment"}},os=ii;ii.default=ii;({isClean:el,my:tl}=Ft),rl=is,sl=os,od=ss;ve=class ll extends od{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ol(il(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new rl(e)]}else if(e.selector)e=[new Ji(e)];else if(e.name)e=[new qi(e)];else if(e.text)e=[new sl(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[tl]||ll.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[el]&&al(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ve.registerParse=s=>{il=s};ve.registerRule=s=>{Ji=s};ve.registerAtRule=s=>{qi=s};ve.registerRoot=s=>{nl=s};Be=ve;ve.default=ve;ve.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,qi.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ji.prototype):s.type==="decl"?Object.setPrototypeOf(s,rl.prototype):s.type==="comment"?Object.setPrototypeOf(s,sl.prototype):s.type==="root"&&Object.setPrototypeOf(s,nl.prototype),s[tl]=!0,s.nodes&&s.nodes.forEach(e=>{ve.rebuild(e)})};ad=Be,Ot=class extends ad{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ul(new cl,this,e).stringify()}};Ot.registerLazyResult=s=>{ul=s};Ot.registerProcessor=s=>{cl=s};Qi=Ot;Ot.default=Ot;xo={},hl=function(e){xo[e]||(xo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},ni=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},fl=ni;ni.default=ni;ld=fl,oi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ld(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},en=oi;oi.default=oi;As=39,No=34,lr=92,Ao=47,ur=10,gt=32,cr=12,hr=9,fr=13,ud=91,cd=93,hd=40,fd=41,dd=123,pd=125,md=59,gd=42,yd=58,wd=64,dr=/[\t\n\f\r "#'()/;[\\\]{}]/g,pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bd=/.[\r\n"'(/\\]/,Mo=/[\da-f]/i,Sd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,m,p,g=r.length,d=0,w=[],S=[];function y(){return d}function v(U){throw e.error("Unclosed "+U,d)}function N(){return S.length===0&&d>=g}function A(U){if(S.length)return S.pop();if(d>=g)return;let Y=U?U.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case ur:case gt:case hr:case fr:case cr:{o=d;do o+=1,n=r.charCodeAt(o);while(n===gt||n===ur||n===hr||n===fr||n===cr);p=["space",r.slice(d,o)],d=o-1;break}case ud:case cd:case dd:case pd:case yd:case md:case fd:{let Q=String.fromCharCode(n);p=[Q,Q,d];break}case hd:{if(f=w.length?w.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==As&&m!==No&&m!==gt&&m!==ur&&m!==hr&&m!==cr&&m!==fr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||Y){o=d;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===lr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||bd.test(l)?p=["(","(",d]:(p=["brackets",l,d,o],d=o);break}case As:case No:{a=n===As?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||Y){o=d+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===lr;)h-=1,c=!c}while(c);p=["string",r.slice(d,o+1),d,o],d=o;break}case wd:{dr.lastIndex=d+1,dr.test(r),dr.lastIndex===0?o=r.length-1:o=dr.lastIndex-2,p=["at-word",r.slice(d,o+1),d,o],d=o;break}case lr:{for(o=d,u=!0;r.charCodeAt(o+1)===lr;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ao&&n!==gt&&n!==ur&&n!==hr&&n!==fr&&n!==cr&&(o+=1,Mo.test(r.charAt(o)))){for(;Mo.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===gt&&(o+=1)}p=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===Ao&&r.charCodeAt(d+1)===gd?(o=r.indexOf("*/",d+2)+1,o===0&&(i||Y?o=r.length:v("comment")),p=["comment",r.slice(d,o+1),d,o],d=o):(pr.lastIndex=d+1,pr.test(r),pr.lastIndex===0?o=r.length-1:o=pr.lastIndex-2,p=["word",r.slice(d,o+1),d,o],w.push(p),d=o);break}}return d++,p}function W(U){S.push(U)}return{back:W,endOfFile:N,nextToken:A,position:y}},dl=Be,$r=class extends dl{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},tn=$r;$r.default=$r;dl.registerAtRule($r);pl=Be,it=class extends pl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ml(new gl,this,e).stringify()}};it.registerLazyResult=s=>{ml=s};it.registerProcessor=s=>{gl=s};Ut=it;it.default=it;pl.registerRoot(it);Dt={comma(s){return Dt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
56
|
-
`," "];return Dt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},yl=Dt;Dt.default=Dt;wl=Be,vd=yl,Lr=class extends wl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},rn=Lr;Lr.default=Lr;wl.registerRule(Lr);Cd=is,Ed=Sd,Id=os,xd=tn,Nd=Ut,Ro=rn,Oo={empty:!0,space:!0};Md=class{constructor(e){this.input=e,this.root=new Nd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new xd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Id;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ed(this.input)}decl(e,t){let r=new Cd;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Ad(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Ro;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Oo[h]&&!Oo[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Ro;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Rd=Md,Od=Be,Dd=Rd,Td=ns;sn=Pr;Pr.default=Pr;Od.registerParse(Pr);({isClean:ge,my:_d}=Ft),kd=Qa,$d=rs,Ld=Be,Pd=Qi,Fd=hl,Do=en,Ud=sn,Bd=Ut,Wd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zd={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},Vd={Once:!0,postcssPlugin:!0,prepare:!0},nt=0;li={},ot=class Sl{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ai(t);else if(t instanceof Sl||t instanceof Do)i=ai(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ud;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[_d]&&Ld.rebuild(i)}this.result=new Do(e,i,r),this.helpers={...li,postcss:li,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,a=n.split("."),l=o.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!zd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Vd[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(yt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[To(e)];for(;t.length>0;){let r=this.visitTick(t);if(yt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return yt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=$d;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new kd(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(yt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Fd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(yt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[ge]){a[ge]=!0,e.push(To(a));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===nt){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ge]=!0;let t=bl(e);for(let r of t)if(r===nt)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ot.registerPostcss=s=>{li=s};vl=ot;ot.default=ot;Bd.registerLazyResult(ot);Pd.registerLazyResult(ot);jd=Qa,Gd=rs,Hd=hl,Yd=sn,Zd=en,ui=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Gd;this.result=new Zd(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new jd(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Hd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Yd;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Xd=ui;ui.default=ui;Kd=Xd,Jd=vl,qd=Qi,Qd=Ut,Tt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Kd(this,e,t):new Jd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ep=Tt;Tt.default=Tt;Qd.registerProcessor(Tt);qd.registerProcessor(Tt);tp=is,rp=Za,sp=os,ip=tn,np=ns,op=Ut,ap=rn;lp=_t;_t.default=_t;up=Ki,Cl=is,cp=vl,hp=Be,nn=ep,fp=rs,dp=lp,El=Qi,pp=fl,Il=os,xl=tn,mp=en,gp=ns,yp=sn,wp=yl,Nl=rn,Al=Ut,bp=ss;F.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
54
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new ll(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),yd&&gd&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ar.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ar({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 Ar({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
55
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Nr(cl(r,this.mapOpts.annotation)));let i=ul(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new md(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($o){let r=$o(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;hl==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},fl=wd,Sd=ls,hi=class extends Sd{constructor(e){super(e),this.type="comment"}},hs=hi;hi.default=hi;({isClean:dl,my:pl}=jt),ml=us,gl=hs,bd=ls;Ce=class vl extends bd{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Sl(yl(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ml(e)]}else if(e.selector)e=[new nn(e)];else if(e.name)e=[new on(e)];else if(e.text)e=[new gl(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[pl]||vl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[dl]&&bl(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};Ce.registerParse=s=>{yl=s};Ce.registerRule=s=>{nn=s};Ce.registerAtRule=s=>{on=s};Ce.registerRoot=s=>{wl=s};We=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,on.prototype):s.type==="rule"?Object.setPrototypeOf(s,nn.prototype):s.type==="decl"?Object.setPrototypeOf(s,ml.prototype):s.type==="comment"?Object.setPrototypeOf(s,gl.prototype):s.type==="root"&&Object.setPrototypeOf(s,wl.prototype),s[pl]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};vd=We,Lt=class extends vd{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Cl(new El,this,e).stringify()}};Lt.registerLazyResult=s=>{Cl=s};Lt.registerProcessor=s=>{El=s};an=Lt;Lt.default=Lt;Fo={},Il=function(e){Fo[e]||(Fo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))},fi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},xl=fi;fi.default=fi;Cd=xl,di=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Cd(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ln=di;di.default=di;ks=39,Uo=34,dr=92,Bo=47,pr=10,Ct=32,mr=12,gr=9,yr=13,Ed=91,Id=93,xd=40,Ad=41,Nd=123,Md=125,Rd=59,Od=42,Dd=58,Td=64,wr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_d=/.[\r\n"'(/\\]/,Wo=/[\da-f]/i,kd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,g,m,p=r.length,d=0,w=[],S=[];function y(){return d}function v(_){throw e.error("Unclosed "+_,d)}function x(){return S.length===0&&d>=p}function N(_){if(S.length)return S.pop();if(d>=p)return;let V=_?_.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case pr:case Ct:case gr:case yr:case mr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Ct||o===pr||o===gr||o===yr||o===mr);m=["space",r.slice(d,n)],d=n-1;break}case Ed:case Id:case Nd:case Md:case Dd:case Rd:case Ad:{let ee=String.fromCharCode(o);m=[ee,ee,d];break}case xd:{if(f=w.length?w.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==ks&&g!==Uo&&g!==Ct&&g!==pr&&g!==gr&&g!==mr&&g!==yr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||V){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===dr;)h-=1,c=!c}while(c);m=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||_d.test(l)?m=["(","(",d]:(m=["brackets",l,d,n],d=n);break}case ks:case Uo:{a=o===ks?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||V){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===dr;)h-=1,c=!c}while(c);m=["string",r.slice(d,n+1),d,n],d=n;break}case Td:{wr.lastIndex=d+1,wr.test(r),wr.lastIndex===0?n=r.length-1:n=wr.lastIndex-2,m=["at-word",r.slice(d,n+1),d,n],d=n;break}case dr:{for(n=d,u=!0;r.charCodeAt(n+1)===dr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Bo&&o!==Ct&&o!==pr&&o!==gr&&o!==yr&&o!==mr&&(n+=1,Wo.test(r.charAt(n)))){for(;Wo.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Ct&&(n+=1)}m=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Bo&&r.charCodeAt(d+1)===Od?(n=r.indexOf("*/",d+2)+1,n===0&&(i||V?n=r.length:v("comment")),m=["comment",r.slice(d,n+1),d,n],d=n):(Sr.lastIndex=d+1,Sr.test(r),Sr.lastIndex===0?n=r.length-1:n=Sr.lastIndex-2,m=["word",r.slice(d,n+1),d,n],w.push(m),d=n);break}}return d++,m}function $(_){S.push(_)}return{back:$,endOfFile:x,nextToken:N,position:y}},Al=We,Br=class extends Al{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},un=Br;Br.default=Br;Al.registerAtRule(Br);Nl=We,nt=class extends Nl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ml(new Rl,this,e).stringify()}};nt.registerLazyResult=s=>{Ml=s};nt.registerProcessor=s=>{Rl=s};Gt=nt;nt.default=nt;Nl.registerRoot(nt);$t={comma(s){return $t.split(s,[","],!0)},space(s){let e=[" ",`
|
|
56
|
+
`," "];return $t.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Ol=$t;$t.default=$t;Dl=We,Pd=Ol,Wr=class extends Dl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Pd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},cn=Wr;Wr.default=Wr;Dl.registerRule(Wr);Ld=us,$d=kd,Fd=hs,Ud=un,Bd=Gt,zo=cn,Vo={empty:!0,space:!0};zd=class{constructor(e){this.input=e,this.root=new Bd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Ud;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new Fd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=$d(this.input)}decl(e,t){let r=new Ld;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Wd(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new zo;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){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(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}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(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Vo[h]&&!Vo[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new zo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Vd=zd,jd=We,Gd=Vd,Hd=cs;hn=zr;zr.default=zr;jd.registerParse(zr);({isClean:ye,my:Yd}=jt),Zd=fl,Xd=as,Kd=We,Jd=an,qd=Il,jo=ln,Qd=hn,ep=Gt,tp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},rp={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},sp={Once:!0,postcssPlugin:!0,prepare:!0},ot=0;mi={},at=class _l{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=pi(t);else if(t instanceof _l||t instanceof jo)i=pi(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Qd;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[Yd]&&Kd.rebuild(i)}this.result=new jo(e,i,r),this.helpers={...mi,postcss:mi,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,n=this.result.processor.version,a=o.split("."),l=n.split(".");(a[0]!==l[0]||parseInt(a[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!rp[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!sp[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];){e[ye]=!0;let t=[Go(e)];for(;t.length>0;){let r=this.visitTick(t);if(Et(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Et(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Xd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Zd(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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 e of this.plugins){let t=this.runOnRoot(e);if(Et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];)e[ye]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||qd("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Et(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[ye]){a[ye]=!0,e.push(Go(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===ot){r.nodes&&r.nodes.length&&(r[ye]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ye]=!0;let t=Tl(e);for(let r of t)if(r===ot)e.nodes&&e.each(i=>{i[ye]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};at.registerPostcss=s=>{mi=s};kl=at;at.default=at;ep.registerLazyResult(at);Jd.registerLazyResult(at);ip=fl,np=as,op=Il,ap=hn,lp=ln,gi=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=np;this.result=new lp(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new ip(o,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||op("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ap;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},up=gi;gi.default=gi;cp=up,hp=kl,fp=an,dp=Gt,Ft=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new cp(this,e,t):new hp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},pp=Ft;Ft.default=Ft;dp.registerProcessor(Ft);fp.registerProcessor(Ft);mp=us,gp=al,yp=hs,wp=un,Sp=cs,bp=Gt,vp=cn;Cp=Ut;Ut.default=Ut;Ep=sn,Pl=us,Ip=kl,xp=We,fn=pp,Ap=as,Np=Cp,Ll=an,Mp=xl,$l=hs,Fl=un,Rp=ln,Op=cs,Dp=hn,Tp=Ol,Ul=cn,Bl=Gt,_p=ls;B.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
57
57
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
58
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new nn().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return F([i(l)]).process(o,a)},i};F.stringify=fp;F.parse=yp;F.fromJSON=dp;F.list=wp;F.comment=s=>new Il(s);F.atRule=s=>new xl(s);F.decl=s=>new Cl(s);F.rule=s=>new Nl(s);F.root=s=>new Al(s);F.document=s=>new El(s);F.CssSyntaxError=up;F.Declaration=Cl;F.Container=hp;F.Processor=nn;F.Document=El;F.Comment=Il;F.Warning=pp;F.AtRule=xl;F.Result=mp;F.Input=gp;F.Rule=Nl;F.Root=Al;F.Node=bp;cp.registerPostcss(F);Sp=F;F.default=F;H=Of(Sp);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;D=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(D||{});Cp=/-([a-z])/g,Ep=/^--[a-zA-Z0-9-]+$/,ci=s=>Ep.test(s)?s:s.replace(Cp,(e,t)=>t?t.toUpperCase():""),Ip=/\B([A-Z])/g,xp=s=>s.replace(Ip,"-$1").toLowerCase(),fe=class s{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},hi=class s extends fe{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",D.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===D.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===D.Element||t===D.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=on(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===D.Element||r===D.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=Ml(this,e,t);return i.parentElement=null,i}removeChild(e){return Rl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Fr(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new at(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new Ur(e);return t.ownerDocument=this,t}createComment(e){let t=new Br(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Wr(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},Fr=class extends fe{constructor(e,t,r){super(),C(this,"nodeType",10),C(this,"RRNodeType",D.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},at=class extends fe{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",D.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),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 pi(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?vp(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;let o=ci(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=_o(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=ci(r),n=e[i]||"";return delete e[i],this.attributes.style=_o(e),n},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 on(this,e)}insertBefore(e,t){return Ml(this,e,t)}removeChild(e){return Rl(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}`}},fi=class extends at{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"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}},di=class extends at{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},Ur=class extends fe{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",D.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Br=class extends fe{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",D.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Wr=class extends fe{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",D.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},pi=class{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...r)=>{for(let i of r){let n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};ae=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(ae||{}),mi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Np={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"},ye=null;lt=class s extends hi{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",Lp()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Op(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new gi(t);break;case"IFRAME":r=new Si(t,this.mirror);break;case"CANVAS":r=new wi(t);break;case"STYLE":r=new bi(t);break;case"DIALOG":r=new yi(t);break;default:r=new ut(t);break}return r.ownerDocument=this,r}createComment(e){let t=new Tp(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new _p(e);return t.ownerDocument=this,t}createTextNode(e){let t=new Dp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Op=Fr,ut=class extends at{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}},gi=class extends fi{},yi=class extends di{},wi=class extends ut{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}},bi=class extends ut{constructor(){super(...arguments),C(this,"rules",[])}},Si=class extends ut{constructor(e,t){super(e),C(this,"contentDocument",new lt),this.contentDocument.mirror=t}},Dp=Ur,Tp=Br,_p=Wr;vi=class{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};ko={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$o={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mr={},Pp=()=>!!globalThis.Zone;Ms={};Rs={};R={ownerDocument:Fp,childNodes:Up,parentNode:Bp,parentElement:Wp,textContent:zp,contains:Vp,getRootNode:jp,host:Gp,styleSheets:Hp,shadowRoot:Yp,querySelector:Zp,querySelectorAll:Xp,mutationObserver:kl,patch:We};Ye=`Please stop import mirror directly. Instead of that,\r
|
|
58
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new fn().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return B([i(l)]).process(n,a)},i};B.stringify=Ap;B.parse=Dp;B.fromJSON=Np;B.list=Tp;B.comment=s=>new $l(s);B.atRule=s=>new Fl(s);B.decl=s=>new Pl(s);B.rule=s=>new Ul(s);B.root=s=>new Bl(s);B.document=s=>new Ll(s);B.CssSyntaxError=Ep;B.Declaration=Pl;B.Container=xp;B.Processor=fn;B.Document=Ll;B.Comment=$l;B.Warning=Mp;B.AtRule=Fl;B.Result=Rp;B.Input=Op;B.Rule=Ul;B.Root=Bl;B.Node=_p;Ip.registerPostcss(B);kp=B;B.default=B;Z=jf(kp);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;D=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(D||{});Lp=/-([a-z])/g,$p=/^--[a-zA-Z0-9-]+$/,yi=s=>$p.test(s)?s:s.replace(Lp,(e,t)=>t?t.toUpperCase():""),Fp=/\B([A-Z])/g,Up=s=>s.replace(Fp,"-$1").toLowerCase(),de=class s{constructor(...e){E(this,"parentElement",null),E(this,"parentNode",null),E(this,"ownerDocument"),E(this,"firstChild",null),E(this,"lastChild",null),E(this,"previousSibling",null),E(this,"nextSibling",null),E(this,"ELEMENT_NODE",1),E(this,"TEXT_NODE",3),E(this,"nodeType"),E(this,"nodeName"),E(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},wi=class s extends de{constructor(...e){super(e),E(this,"nodeType",9),E(this,"nodeName","#document"),E(this,"compatMode","CSS1Compat"),E(this,"RRNodeType",D.Document),E(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===D.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===D.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===D.Element||t===D.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=dn(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===D.Element||r===D.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===D.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=Wl(this,e,t);return i.parentElement=null,i}removeChild(e){return zl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new Vr(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new lt(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new jr(e);return t.ownerDocument=this,t}createComment(e){let t=new Gr(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Hr(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},Vr=class extends de{constructor(e,t,r){super(),E(this,"nodeType",10),E(this,"RRNodeType",D.DocumentType),E(this,"name"),E(this,"publicId"),E(this,"systemId"),E(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},lt=class extends de{constructor(e){super(),E(this,"nodeType",1),E(this,"RRNodeType",D.Element),E(this,"tagName"),E(this,"attributes",{}),E(this,"shadowRoot",null),E(this,"scrollLeft"),E(this,"scrollTop"),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 vi(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?Pp(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;let n=yi(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Ho(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=yi(r),o=e[i]||"";return delete e[i],this.attributes.style=Ho(e),o},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 dn(this,e)}insertBefore(e,t){return Wl(this,e,t)}removeChild(e){return zl(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}`}},Si=class extends lt{constructor(){super(...arguments),E(this,"currentTime"),E(this,"volume"),E(this,"paused"),E(this,"muted"),E(this,"playbackRate"),E(this,"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}},bi=class extends lt{constructor(){super(...arguments),E(this,"tagName","DIALOG"),E(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},jr=class extends de{constructor(e){super(),E(this,"nodeType",3),E(this,"nodeName","#text"),E(this,"RRNodeType",D.Text),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Gr=class extends de{constructor(e){super(),E(this,"nodeType",8),E(this,"nodeName","#comment"),E(this,"RRNodeType",D.Comment),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Hr=class extends de{constructor(e){super(),E(this,"nodeName","#cdata-section"),E(this,"nodeType",4),E(this,"RRNodeType",D.CDATA),E(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},vi=class{constructor(e,t){if(E(this,"onChange"),E(this,"classes",[]),E(this,"add",(...r)=>{for(let i of r){let o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),E(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};le=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(le||{}),Ci={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Bp={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"},we=null;ut=class s extends wi{constructor(e){super(),E(this,"UNSERIALIZED_STARTING_ID",-2),E(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),E(this,"mirror",Kp()),E(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new s}createDocumentType(e,t,r){let i=new jp(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new Ei(t);break;case"IFRAME":r=new Ni(t,this.mirror);break;case"CANVAS":r=new xi(t);break;case"STYLE":r=new Ai(t);break;case"DIALOG":r=new Ii(t);break;default:r=new ct(t);break}return r.ownerDocument=this,r}createComment(e){let t=new Hp(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Yp(e);return t.ownerDocument=this,t}createTextNode(e){let t=new Gp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},jp=Vr,ct=class extends lt{constructor(){super(...arguments),E(this,"inputData",null),E(this,"scrollData",null)}},Ei=class extends Si{},Ii=class extends bi{},xi=class extends ct{constructor(){super(...arguments),E(this,"rr_dataURL",null),E(this,"canvasMutations",[])}getContext(){return null}},Ai=class extends ct{constructor(){super(...arguments),E(this,"rules",[])}},Ni=class extends ct{constructor(e,t){super(e),E(this,"contentDocument",new ut),this.contentDocument.mirror=t}},Gp=jr,Hp=Gr,Yp=Hr;Mi=class{constructor(){E(this,"idNodeMap",new Map),E(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};Yo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},br={},Jp=()=>!!globalThis.Zone;Ps={};Ls={};R={ownerDocument:qp,childNodes:Qp,parentNode:em,parentElement:tm,textContent:rm,contains:sm,getRootNode:im,host:nm,styleSheets:om,shadowRoot:am,querySelector:lm,querySelectorAll:um,mutationObserver:Yl,patch:ze};Ze=`Please stop import mirror directly. Instead of that,\r
|
|
59
59
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
60
|
-
or you can use record.mirror to access the mirror instance during recording.`,jr={map:{},getId(){return console.error(Ye),-1},getNode(){return console.error(Ye),null},removeNodeFromMap(){console.error(Ye)},has(){return console.error(Ye),!1},reset(){console.error(Ye)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(jr=new Proxy(jr,{get(s,e,t){return e==="map"&&console.error(Ye),Reflect.get(s,e,t)}}));kt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(kt=()=>new Date().getTime());$t=class{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"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++}};Kp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:$t,get _mirror(){return jr},closestElementOfNode:fn,getBaseDimension:yn,getNestedRule:Je,getPositionsAndIndex:Ci,getRootShadowHost:Fl,getShadowHost:wn,getWindowHeight:cn,getWindowScroll:un,getWindowWidth:hn,hasShadowRoot:Re,hookSetter:Bt,inDom:bn,isAncestorRemoved:dn,isBlocked:re,isIgnored:Er,isSerialized:$l,isSerializedIframe:et,isSerializedStylesheet:gn,iterateResolveTree:mn,legacy_isTouchEvent:Gr,get nowTimestamp(){return kt},on:te,polyfill:pn,queueToResolveTrees:Ll,shadowHostInDom:Ul,throttle:ct,uniqueTextMutations:Pl},Symbol.toStringTag,{value:"Module"})),x=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(x||{}),E=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(E||{}),k=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(k||{}),we=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(we||{}),Ce=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ce||{}),Me=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Me||{}),_=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(_||{}),be=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(be||{});Ei=class{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Lo(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Lo(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Po=(s,e)=>`${s}@${e}`,Ii=class{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Ei,i=l=>{let u=l,c=xt;for(;c===xt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{let u=R.parentNode(l);if(!u||!bn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=St(u)?this.mirror.getId(wn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);let m=Ke(l,{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:p=>{et(p,this.mirror)&&this.iframeManager.addIframe(p),gn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Re(l)&&this.shadowDomManager.addShadowRoot(R.shadowRoot(l),this.doc)},onIframeLoad:(p,g)=>{this.iframeManager.attachIframe(p,g),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,g)=>{this.stylesheetManager.attachLinkElement(p,g)},cssCaptured:c});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)Fo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(R.parentNode(l))||n(l);for(let l of this.addedSet)!Uo(this.droppedSet,l)&&!Fo(this.removesSubTreeCache,l,this.mirror)||Uo(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){let u=this.mirror.getId(R.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(R.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{let m=c.value,p=R.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let g=R.host(p);if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}let a={texts:this.texts.map(l=>{let u=l.node,c=R.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(this,"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(R.childNodes(e),i=>R.textContent(i)||"").join("");t.attributes.value=Nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ar(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Er(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=R.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:oa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,fn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Ar(t);i=Nr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!na(t.tagName,r))if(n.attributes[r]=ia(this.doc,De(t.tagName),De(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let a of Array.from(t.style)){let l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?n.styleDiff[a]=l:n.styleDiff[a]=[l,u]:n._unchangedStyles[a]=[l,u]}for(let a of Array.from(o.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(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=>{let r=this.mirror.getId(t),i=St(e.target)?this.mirror.getId(R.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||Er(t,this.mirror,this.slimDOMOptions)||!$l(t,this.mirror)||(this.addedSet.has(t)?(xi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||dn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Po(r,i)]?xi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:St(e.target)&&vt(e.target)?!0:void 0}),Jp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Er(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[Po(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(R.childNodes(e).forEach(r=>this.genAdds(r)),Re(e)&&R.childNodes(R.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};T=s=>Et?(...t)=>{try{return s(...t)}catch(r){if(Et&&Et(r)===!0)return;throw r}}:s,Fe=[];im=["INPUT","TEXTAREA","SELECT"],Bo=new WeakMap;Yr=class{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,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}},Ni=class{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Yr(sa)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));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!==be.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Ai=class{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(this,"restoreHandlers",[]),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(!vt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Wl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(zl({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(R.host(e))),this.restoreHandlers.push(Vl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(We(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),a=R.shadowRoot(this);return a&&bn(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(wt=0;wt<qe.length;wt++)bt[qe.charCodeAt(wt)]=wt;pm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=qe[e[t]>>2],i+=qe[(e[t]&3)<<4|e[t+1]>>4],i+=qe[(e[t+1]&15)<<2|e[t+2]>>6],i+=qe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},mm=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=bt[s.charCodeAt(r)],o=bt[s.charCodeAt(r+1)],a=bt[s.charCodeAt(r+2)],l=bt[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},Wo=new Map;jl=(s,e,t)=>{if(!s||!(Hl(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=gm(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};Gl=(s,e,t)=>s.map(r=>Ir(r,e,t)),Hl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);Yl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Sm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),jo=typeof window<"u"&&window.Blob&&new Blob([Sm(Yl)],{type:"text/javascript;charset=utf-8"});Mi=class{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){let o=zo(t,r,i,!0),a=new Map,l=new vm;l.onmessage=p=>{let{id:g}=p.data;if(a.set(g,!1),!("base64"in p.data))return;let{base64:d,type:w,width:S,height:y}=p.data;this.mutationCb({id:g,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:w}]},0,0]}]})};let u=1e3/e,c=0,h,f=()=>{let p=[];return t.document.querySelectorAll("canvas").forEach(g=>{re(g,r,i,!0)||p.push(g)}),p},m=p=>{if(c&&p-c<u){h=requestAnimationFrame(m);return}c=p,f().forEach(async g=>{var d;let w=this.mirror.getId(g);if(a.get(w)||g.width===0||g.height===0)return;if(a.set(w,!0),["webgl","webgl2"].includes(g.__context)){let y=g.getContext(g.__context);((d=y?.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let S=await createImageBitmap(g);l.postMessage({id:w,bitmap:S,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=zo(e,t,r,!1),n=ym(this.processMutation.bind(this),e,t,r),o=bm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}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 i=r.map(o=>{let{type:a,...l}=o;return l}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Ri=class{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new $t),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:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(a,l)=>({rule:ta(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Oi=class{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==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(){}},Zr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Wn=s.contentWindow)==null?void 0:Wn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}he=ra();Te.addCustomEvent=(s,e)=>{if(!Zr)throw new Error("please add custom event after start recording");J({type:x.Custom,data:{tag:s,payload:e}})};Te.freezePage=()=>{Fe.forEach(s=>s.freeze())};Te.takeFullSnapshot=s=>{if(!Zr)throw new Error("please take full snapshot after start recording");xr(s)};Te.mirror=he;Cm=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"}));Di=class{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),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))}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 i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Qe||(Qe={}));Xl={type:"xstate.init"};Ko=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};Am=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Jo=new Map;Rm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];_i=class{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(_.Start,this.start.bind(this)),this.emitter.on(_.SkipStart,this.start.bind(this)),this.emitter.on(_.Pause,this.pause.bind(this)),this.emitter.on(_.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),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 i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Me.Play||n!==Me.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:a??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:o??i?.playbackRate??1,volume:u??i?.volume??1,muted:l??i?.muted??e.getAttribute("muted")===null,loop:c??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;let o=this.service.state.matches("paused"),a=n.attributes,l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}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()}};km=5*1e3,$m=Zl||Cm,qo="[replayer]",Ts={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};ki=class{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new lt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",$m()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",po()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",ra()),b(this,"styleMirror",new $t),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(let l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(let l of a){switch(l.type){case x.DomContentLoaded:case x.Load:case x.Custom:continue;case x.FullSnapshot:case x.Meta:case x.Plugin:case x.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case x.DomContentLoaded:case x.Load:break;case x.Custom:u=()=>{this.emitter.emit(_.CustomEvent,a)};break;case x.Meta:u=()=>this.emitter.emit(_.Resize,{width:a.data.width,height:a.data.height});break;case x.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case x.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){let h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/km),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(_.SkipStart,f)}}};break}return()=>{u&&u();for(let f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){let f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(_.Finish))},m=50;a.type===x.IncrementalSnapshot&&a.data.source===E.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(_.EventCast,a)}}),!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:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ts,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(_.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(_.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Ti({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===E.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===E.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{zr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let l in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[l],c=Vr(u.node,this.mirror,this.virtualDom.mirror);zr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(_.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Di([],{speed:this.config.speed});this.service=xm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(_.StateChange,{player:a})}),this.speedService=Nm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(_.StateChange,{speed:a})}),this.mediaManager=new _i({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let n=this.service.state.context.events.find(a=>a.type===x.Meta),o=this.service.state.context.events.find(a=>a.type===x.FullSnapshot);if(n){let{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(_.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Qo)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}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.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){var t,r;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}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(_.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(_.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(_.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(_.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;Qo(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=po()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Em(this.iframe.contentWindow,this.iframe.contentDocument),pn(this.iframe.contentWindow))}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=[],i=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){let{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Ef(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);let{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>wr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(_.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=Am(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){let n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Tl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}else{let n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);let u=r.getMeta(a);if(u?.type===be.Element&&u?.tagName.toUpperCase()==="HTML"){let{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Ct(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(let{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>wr(a))}collectIframeAndAttachDocument(e,t){if(et(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,n=this.service.state,o=()=>{n=this.service.state};this.emitter.on(_.Start,o),this.emitter.on(_.Pause,o);let a=()=>{this.emitter.off(_.Start,o),this.emitter.off(_.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(_.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(_.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===x.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,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"),i=r.getContext("2d"),n=i?.createImageData(r.width,r.height);i?.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async n=>{let o=await Promise.all(n.args.map(Oe(this.imageMap,null,r)));return{...n,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(Oe(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,n;let{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){let a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{let l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;let a=new Event(De(k[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(_.MouseInteraction,{type:o.type,target:l});let{triggerFocus:u}=this.config;switch(o.type){case k.Blur:"blur"in l&&l.blur();break;case k.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case k.Click:case k.TouchStart:case k.TouchEnd:case k.MouseDown:case k.MouseUp:t?(o.type===k.TouchStart?this.touchActive=!0:o.type===k.TouchEnd&&(this.touchActive=!1),o.type===k.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===k.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===k.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===k.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===k.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===k.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case k.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(_.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);let l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{let a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);Ti({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{let a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,$p(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let u in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[u],h=Dl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Re(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});let i={...this.legacy_missingNodeRetryMap},n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===be.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Re(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(u.previousId&&(m=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;let g=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(et(f,r)){this.attachDocumentToIframe(u,f);return}let d=(y,v)=>{if(!this.usingVirtualDom){wr(y);for(let N of this.config.plugins||[])N.onBuild&&N.onBuild(y,{id:v,replayer:this})}},w=Ct(u.node,{doc:g,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:w,mutation:u};return}let S=r.getMeta(f);if(S&&S.type===be.Element&&u.node.type===be.Text){let y=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(let v of y)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&y.length===1)for(let v of y)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(w.textContent=v.textContent,f.removeChild(v))}else if(S?.type===be.Document){let y=f;u.node.type===be.DocumentType&&((c=y.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),w.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(w,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(w,p):f.insertBefore(w,null):f.appendChild(w),d(w,u.node.id),this.usingVirtualDom&&w.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),et(w,this.mirror)){let y=this.mirror.getId(w),v=this.newDocumentQueue.find(N=>N.parentId===y);v&&(this.attachDocumentToIframe(v,w),this.newDocumentQueue=this.newDocumentQueue.filter(N=>N!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,w,u)};e.adds.forEach(u=>{a(u)});let l=Date.now();for(;n.length;){let u=Ll(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(let c of u)r.getNode(c.value.parentId)?mn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Pl(e.texts).forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(m=>m.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);let f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=ts(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){let m=h.parentNode;((c=m?.rules)==null?void 0:c.length)>0&&(m.rules=[])}}),e.attributes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(let f in u.attributes)if(typeof f=="string"){let m=u.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&_m(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{let p=r.getMeta(h),g=Ct({...p,attributes:{...p.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);let d=h.nextSibling,w=h.parentNode;if(g&&w){w.removeChild(h),w.insertBefore(g,d),r.replace(u.id,g);break}}catch{}if(f==="value"&&h.nodeName==="TEXTAREA"){let p=h;p.childNodes.forEach(d=>p.removeChild(d));let g=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);g&&p.appendChild(g)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&wr(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){let p=m,g=h;for(let d in p)if(p[d]===!1)g.style.removeProperty(d);else if(p[d]instanceof Array){let w=p[d];g.style.setProperty(d,w[0],w[1])}else{let w=p[d];g.style.setProperty(d,w)}}}})}applyScroll(e,t){var r,i;let n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);let o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(o?.type===be.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.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:i,startOffset:n,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;let c=new Range;c.setStart(l,n),c.setEnd(u,a);let h=l.ownerDocument,f=h?.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){let{positions:u,index:c}=Ci(l);Je(t.cssRules,u).insertRule(a,c)}else{let u=l===void 0?void 0:Math.min(l,t.cssRules.length);t?.insertRule(a,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:l,index:u}=Ci(a);Je(t.cssRules,l).deleteRule(u||0)}else t?.deleteRule(a)}catch{}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch{}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&Je(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Je(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Re(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:a.rules},u)}catch{}});let i=10,n=0,o=(a,l)=>{let u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Re(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){let{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){let{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){let o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);let a=yn(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?Ts:Object.assign({},Ts,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==x.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(_.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(qo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(qo,...e)}},{addCustomEvent:Lm}=Te,{freezePage:Pm}=Te,{takeFullSnapshot:Fm}=Te});var su={};Gt(su,{startRrweb:()=>Um});async function Um(s){if(typeof window>"u")return null;let e;try{e=await Promise.resolve().then(()=>(tu(),eu))}catch{return null}let t=s.options.mask?.class??"segi-mask",r=s.options.mask?.inputs??"all",i=r==="all"?{password:!0,email:!0,tel:!0,number:!0,text:!0,textarea:!0}:r==="sensitive"?{password:!0,email:!0,tel:!0,number:!0}:{password:!0},n=[],o=0,a=null,l=Date.now(),u=!1,c=!1,h=setInterval(()=>{u||c||g()},1e4),f=setInterval(()=>{u||c||Date.now()-l>=18e4&&p()},15e3);function m(){if(a)return;let y=e.record({emit(N){if(u||c)return;let A;try{A=JSON.stringify(N)}catch{return}n.push(A),o+=A.length,o>=102400&&g()},sampling:{mousemove:20,scroll:150,input:"last"},maskAllInputs:r==="all",maskInputOptions:i,blockClass:t,ignoreClass:t,maskTextClass:t,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e4});a=typeof y=="function"?y:null;let v=()=>{if(!(c||u))try{let N=e;typeof N.record.takeFullSnapshot=="function"?N.record.takeFullSnapshot(!0):typeof N.takeFullSnapshot=="function"&&N.takeFullSnapshot(!0)}catch{}};setTimeout(v,100),setTimeout(v,500),setTimeout(v,2e3)}function p(){try{a?.()}finally{a=null}g()}function g(y=!1){if(n.length===0)return;let v=n;n=[],o=0;try{s.sendChunk(v,y)}catch{}}function d(){l=Date.now(),!a&&!u&&!c&&m()}for(let y of ru)window.addEventListener(y,d,{passive:!0,capture:!0});let w=()=>g(!0),S=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&g(!0)};return window.addEventListener("pagehide",w),typeof document<"u"&&document.addEventListener("visibilitychange",S),m(),{pause(){u=!0,p()},resume(){u=!1,l=Date.now(),m()},stop(){c=!0,p(),clearInterval(h),clearInterval(f);for(let y of ru)window.removeEventListener(y,d,{capture:!0});window.removeEventListener("pagehide",w),typeof document<"u"&&document.removeEventListener("visibilitychange",S)},flush:g,takeFullSnapshot(){if(!(c||u))try{e.record.takeFullSnapshot?.()}catch{}}}}var ru,iu=ft(()=>{"use strict";ru=["mousemove","mousedown","keydown","touchstart","scroll","wheel"]});var au={};Gt(au,{activateReplay:()=>zm,replayApi:()=>Vm,withReplay:()=>Bm});function Bm(s={}){return{__segi_replay:!0,options:s}}async function Wm(s){try{if(typeof CompressionStream>"u")return null;let e=new CompressionStream("gzip"),t=e.writable.getWriter();t.write(new TextEncoder().encode(s)),t.close();let r=await new Response(e.readable).arrayBuffer();return new Uint8Array(r)}catch{return null}}function nu(){if(typeof window>"u")return"desktop";let s=window.innerWidth;return s<640?"mobile":s<1024?"tablet":"desktop"}function ze(s){if(!(typeof location>"u"))try{return new URLSearchParams(location.search).get(s)??void 0}catch{return}}function ou(s,e){return(s.blockRoutes??[]).some(r=>e.startsWith(r))}async function zm(s){if(I||typeof window>"u")return;let e=s.config.options;if(e.enabled===!1)return;let t=Math.max(0,Math.min(100,e.sample??100));if(Math.random()*100>=t||ou(e,location.pathname))return;let r=Pn(),i=gs(),n={endpoint:e.endpoint??s.endpoint,projectKey:s.projectKey},o={sessionUid:r,anonId:i,startedAt:new Date().toISOString(),device:nu(),viewportW:window.innerWidth,viewportH:window.innerHeight,ua:navigator.userAgent?.slice(0,512),referrer:document.referrer||void 0,landingUrl:location.href.slice(0,512),utmSource:ze("utm_source"),utmMedium:ze("utm_medium"),utmCampaign:ze("utm_campaign"),utmContent:ze("utm_content"),utmTerm:ze("utm_term"),fbclid:ze("fbclid"),gclid:ze("gclid")},a=!0;try{let m=await je(n,"/session/start",o);m&&m.ok&&(await m.json().catch(()=>({}))).recordingEnabled===!1&&(a=!1)}catch{}if(!a){I={sessionUid:r,config:n,options:e,rrweb:null,replayBlocked:!1,paused:!0,userId:null,startedAt:o.startedAt,pagesVisited:0,clickCount:0,recordingEnabled:!1};return}I={sessionUid:r,config:n,options:e,rrweb:null,replayBlocked:!1,paused:!1,userId:null,startedAt:o.startedAt,pagesVisited:1,clickCount:0,recordingEnabled:!0};let l=Date.now(),u=()=>{let m=Date.now();m-l<6e4||(l=m,Zt())};for(let m of["mousedown","keydown","scroll","touchstart"])window.addEventListener(m,u,{passive:!0,capture:!0});let c=window,h=m=>{let p=!1,g=()=>{p||(p=!0,typeof c.requestIdleCallback=="function"?c.requestIdleCallback(m,{timeout:2e3}):setTimeout(m,1e3))};typeof document<"u"&&document.readyState==="complete"?g():(window.addEventListener("load",g,{once:!0}),setTimeout(g,5e3))};Promise.resolve().then(()=>(iu(),su)).then(({startRrweb:m})=>new Promise(p=>{h(()=>{m({sessionUid:r,options:e,sendChunk:async(g,d)=>{if(!I||I.replayBlocked)return;let w=`{"sessionUid":${JSON.stringify(r)},"chunk":[${g.join(",")}]}`,S=(n.endpoint||"https://segiapi.extn.ai").replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"");if(d){try{let y=`${S}/api/trace/replay?pk=${encodeURIComponent(n.projectKey)}`,v=new Blob([w],{type:"application/json"});typeof navigator<"u"&&typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(y,v)}catch{}return}try{let y=await Wm(w);(await fetch(`${S}/api/trace/replay`,{method:"POST",headers:y?{"Content-Type":"application/json","Content-Encoding":"gzip","X-Segi-Project-Key":n.projectKey}:{"Content-Type":"application/json","X-Segi-Project-Key":n.projectKey},body:y??w})).status===429&&I&&(I.replayBlocked=!0,I.rrweb?.stop(),I.rrweb=null)}catch{}}}).then(p,()=>p(null))})})).then(m=>{m&&I&&(I.rrweb=m)}).catch(()=>{}),je(n,"/events",{events:[{sessionUid:r,ts:new Date().toISOString(),type:"page_view",url:location.href,title:document.title}]}),window.addEventListener("pagehide",()=>{I&&(I.rrweb?.flush(!0),ys(I.config,"/session/end",{sessionUid:I.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(I.startedAt).getTime(),pagesVisited:I.pagesVisited,clickCount:I.clickCount}))});let f=30*6e4;setTimeout(()=>{I&&(I.rrweb?.flush(!0),I.rrweb?.stop(),I.rrweb=null,ys(I.config,"/session/end",{sessionUid:I.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(I.startedAt).getTime(),pagesVisited:I.pagesVisited,clickCount:I.clickCount}),I.paused=!0,I.replayBlocked=!0)},f)}var I,Vm,lu=ft(()=>{"use strict";Fn();Bn();I=null;Vm={pause(){I?.rrweb?.pause(),I&&(I.paused=!0)},resume(){I?.rrweb?.resume(),I&&(I.paused=!1),Zt()},setUser(s){I&&(I.userId=s?.id??null,je(I.config,"/session/start",{sessionUid:I.sessionUid,anonId:gs(),userId:I.userId,startedAt:I.startedAt,device:nu(),viewportW:window.innerWidth,viewportH:window.innerHeight}))},event(s,e){!I||I.paused||je(I.config,"/events",{events:[{sessionUid:I.sessionUid,ts:new Date().toISOString(),type:"custom",name:s.slice(0,64),url:location.href,meta:e}]})},notifyRouteChange(s,e){if(!I)return;if(Zt(),ou(I.options,location.pathname)){I.paused||(I.rrweb?.pause(),I.paused=!0);return}I.paused&&(I.rrweb?.resume(),I.paused=!1),I.pagesVisited+=1,I.rrweb?.takeFullSnapshot(),je(I.config,"/events",{events:[{sessionUid:I.sessionUid,ts:new Date().toISOString(),type:"page_view",url:s??location.href,title:e??document.title}]})},_sessionUid(){return I?.sessionUid??null}}});var Zm={};Gt(Zm,{Segi:()=>xe,default:()=>Ym});function In(){return{options:{projectKey:"",endpoint:""},user:null,tags:{},breadcrumbs:[],initialized:!1}}function xn(s,e){let t=s.options.maxBreadcrumbs??50;s.breadcrumbs.push(e),s.breadcrumbs.length>t&&s.breadcrumbs.splice(0,s.breadcrumbs.length-t)}function fs(s,e){let t={type:e.type??"error",level:e.level??"error",message:e.message??"",errorName:e.errorName,stack:e.stack,platform:e.platform,runtime:e.runtime,environment:e.environment??s.options.environment,release:e.release??s.options.release,transaction:e.transaction,url:e.url,userAgent:e.userAgent,user:e.user??s.user??void 0,tags:{...s.tags,...e.tags??{}},extra:e.extra,breadcrumbs:s.breadcrumbs.slice(),request:e.request,timestamp:e.timestamp??new Date().toISOString()};if(s.options.beforeSend)try{let r=s.options.beforeSend(t);return r||{...t,_drop:!0}}catch{return t}return t}var Ht=gu(Dn());function Eu(s){let e=s&&s.trim()||Ht.SEGI_DEFAULT_INGEST_ENDPOINT;return/\/api\/ingest\/events\/?$/.test(e)?e.replace(/\/+$/,""):`${e.replace(/\/+$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")||Ht.SEGI_DEFAULT_API_BASE}/api/ingest/events`}var Tn=new Set;function ds(s,e){Tn.has(s)||(Tn.add(s),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[segi] ${e}`))}function Iu(s){return s===401||s===403?"ingest rejected the project key (check projectKey + endpoint region)":s===404?"ingest endpoint not found (check endpoint URL)":s===413?"event payload too large; dropped by ingest":s===429?"ingest rate-limited (over plan quota or burst)":s>=500?"ingest is returning 5xx \u2014 events may be lost":"ingest returned a non-2xx response"}function ps(s,e,t){let r=Eu(s);if(!r||!e){ds("missing-config",e?"init() called without a valid endpoint \u2014 events will not be sent":"init() called without a projectKey \u2014 events will not be sent");return}if(!t._drop)try{let i=JSON.stringify(t),n={"Content-Type":"application/json","X-Segi-Project-Key":e};if(typeof fetch=="function"){fetch(r,{method:"POST",headers:n,body:i,keepalive:!0,mode:"cors",credentials:"omit"}).then(o=>{o.ok||ds(`status-${o.status}`,`${Iu(o.status)} (HTTP ${o.status} from ${r})`)}).catch(o=>{ds("network-error",`network error reaching ${r} \u2014 events not delivered (${o instanceof Error?o.message:String(o)})`)});return}if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"){let o=`${r}${r.includes("?")?"&":"?"}pk=${encodeURIComponent(e)}`,a=new Blob([i],{type:"application/json"});navigator.sendBeacon(o,a)}}catch{}}var q=In();function jm(s){try{if(s&&typeof s=="object"&&"stack"in s)return String(s.stack??"")}catch{}}function as(s){if(q.initialized)try{if(s instanceof ErrorEvent){let e=s.error,t=e?.message??s.message??"Error";if(s.error==null&&(!s.message||/^Script error\.?$/i.test(s.message))&&!s.filename)return;xe.captureException(e??new Error(t),{message:t,url:typeof location<"u"?location.href:void 0})}else if("reason"in s){let e=s.reason,t=e instanceof Error?e.message:typeof e=="string"?e:"Unhandled promise rejection";xe.captureException(e,{message:t,url:typeof location<"u"?location.href:void 0})}}catch{}}function Gm(){typeof window>"u"||(window.addEventListener("error",as,!0),window.addEventListener("unhandledrejection",as,!0))}function uu(){typeof window>"u"||(window.removeEventListener("error",as,!0),window.removeEventListener("unhandledrejection",as,!0))}var Hm={pause(){},resume(){},setUser(){},event(){},notifyRouteChange(){}},xe={replay:Hm,init(s,e={}){try{let t=typeof window<"u"?window:null;if((q.initialized||t?.__segiInitialized===!0)&&!e.force){!e.silent&&typeof console<"u"&&console.warn("[segi] init() called more than once; ignoring. Pass { force: true } to override.");return}q.initialized&&uu();let{replay:i,...n}=s;q.options={...n},q.initialized=!0,t&&(t.__segiInitialized=!0),Gm(),i?.__segi_replay&&Promise.resolve().then(()=>(lu(),au)).then(o=>(xe.replay=o.replayApi,o.activateReplay({projectKey:n.projectKey,endpoint:n.endpoint,config:i}))).catch(()=>{})}catch{}},isInitialized(){return q.initialized},close(){try{if(uu(),q.initialized=!1,q.user=null,q.tags={},q.breadcrumbs=[],typeof window<"u"){let s=window;s.__segiInitialized=!1}}catch{}},captureException(s,e={}){try{if(!q.initialized)return;let t=s instanceof Error?s:new Error(typeof s=="string"?s:JSON.stringify(s)),r=fs(q,{type:"error",level:"error",message:t.message,errorName:t.name,stack:jm(t),platform:"javascript",runtime:"browser",url:e.url??(typeof location<"u"?location.href:void 0),userAgent:e.userAgent??(typeof navigator<"u"?navigator.userAgent:void 0),...e});ps(q.options.endpoint,q.options.projectKey,r)}catch{}},captureMessage(s,e={}){try{if(!q.initialized)return;let t=fs(q,{type:"message",level:e.level??"info",message:s,platform:"javascript",runtime:"browser",url:typeof location<"u"?location.href:void 0,userAgent:typeof navigator<"u"?navigator.userAgent:void 0,...e});ps(q.options.endpoint,q.options.projectKey,t)}catch{}},setUser(s){try{q.user=s}catch{}},setTag(s,e){try{q.tags[s]=e}catch{}},addBreadcrumb(s){try{xn(q,{...s,timestamp:s.timestamp??new Date().toISOString()})}catch{}}};(function(){try{let e=window;if(e.__segiBundleLoaded){typeof console<"u"&&console.warn("[segi] segi.min.js loaded more than once; ignoring this load.");return}e.__segiBundleLoaded=!0;let t=e.SegiConfig??{},r={},i=document.getElementsByTagName("script");for(let a=i.length-1;a>=0;a--){let l=i[a];if(l.src&&/segi(\.min)?\.js/.test(l.src)){r={projectKey:l.dataset.projectKey,endpoint:l.dataset.endpoint,environment:l.dataset.environment,release:l.dataset.release};break}}let n=t.projectKey??r.projectKey,o=t.endpoint??r.endpoint;if(!n){e.Segi=xe;return}xe.init({projectKey:n,endpoint:o,environment:t.environment??r.environment,release:t.release??r.release}),e.Segi=xe}catch{}})();var Ym=xe;return yu(Zm);})();
|
|
60
|
+
or you can use record.mirror to access the mirror instance during recording.`,Xr={map:{},getId(){return console.error(Ze),-1},getNode(){return console.error(Ze),null},removeNodeFromMap(){console.error(Ze)},has(){return console.error(Ze),!1},reset(){console.error(Ze)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Xr=new Proxy(Xr,{get(s,e,t){return e==="map"&&console.error(Ze),Reflect.get(s,e,t)}}));Bt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Bt=()=>new Date().getTime());Wt=class{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"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++}};cm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Wt,get _mirror(){return Xr},closestElementOfNode:Sn,getBaseDimension:In,getNestedRule:qe,getPositionsAndIndex:Ri,getRootShadowHost:Jl,getShadowHost:xn,getWindowHeight:yn,getWindowScroll:gn,getWindowWidth:wn,hasShadowRoot:Re,hookSetter:Ht,inDom:An,isAncestorRemoved:bn,isBlocked:se,isIgnored:Mr,isSerialized:Zl,isSerializedIframe:tt,isSerializedStylesheet:En,iterateResolveTree:Cn,legacy_isTouchEvent:Kr,get nowTimestamp(){return Bt},on:re,polyfill:vn,queueToResolveTrees:Xl,shadowHostInDom:ql,throttle:ht,uniqueTextMutations:Kl},Symbol.toStringTag,{value:"Module"})),A=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(A||{}),I=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(I||{}),P=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(P||{}),Se=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Se||{}),Ee=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ee||{}),Me=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Me||{}),k=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(k||{}),be=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(be||{});Oi=class{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xo(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Xo(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Ko=(s,e)=>`${s}@${e}`,Di=class{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Oi,i=l=>{let u=l,c=Dt;for(;c===Dt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{let u=R.parentNode(l);if(!u||!An(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){let m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=At(u)?this.mirror.getId(xn(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);let g=Je(l,{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:m=>{tt(m,this.mirror)&&this.iframeManager.addIframe(m),En(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Re(l)&&this.shadowDomManager.addShadowRoot(R.shadowRoot(l),this.doc)},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)Jo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(R.parentNode(l))||o(l);for(let l of this.addedSet)!qo(this.droppedSet,l)&&!Jo(this.removesSubTreeCache,l,this.mirror)||qo(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){let u=this.mirror.getId(R.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(l=n)}if(!l){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(R.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{let g=c.value,m=R.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=R.host(m);if(this.mirror.getId(p)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}let a={texts:this.texts.map(l=>{let u=l.node,c=R.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(this,"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(R.childNodes(e),i=>R.textContent(i)||"").join("");t.attributes.value=Dr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Tr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Mr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=R.textContent(e.target);!se(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Sa(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Sn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let n=Tr(t);i=Dr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!wa(t.tagName,r))if(o.attributes[r]=ya(this.doc,De(t.tagName),De(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(let a of Array.from(t.style)){let l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==n.style.getPropertyValue(a)||u!==n.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,u]:o._unchangedStyles[a]=[l,u]}for(let a of Array.from(n.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(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=>{let r=this.mirror.getId(t),i=At(e.target)?this.mirror.getId(R.host(e.target)):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,!1)||Mr(t,this.mirror,this.slimDOMOptions)||!Zl(t,this.mirror)||(this.addedSet.has(t)?(Ti(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||bn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ko(r,i)]?Ti(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:At(e.target)&&Nt(e.target)?!0:void 0}),hm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Mr(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[Ko(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,!1)||(R.childNodes(e).forEach(r=>this.genAdds(r)),Re(e)&&R.childNodes(R.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};T=s=>Rt?(...t)=>{try{return s(...t)}catch(r){if(Rt&&Rt(r)===!0)return;throw r}}:s,Ue=[];wm=["INPUT","TEXTAREA","SELECT"],Qo=new WeakMap;qr=class{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e),a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let o=i.get(t);return o||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,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}},_i=class{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new qr(ga)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new qr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:A.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return t;case A.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case A.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case I.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));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!==be.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},ki=class{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(this,"restoreHandlers",[]),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(!Nt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=eu({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(tu({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(R.host(e))),this.restoreHandlers.push(ru({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(ze(e.prototype,"attachShadow",function(i){return function(o){let n=i.call(this,o),a=R.shadowRoot(this);return a&&An(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(It=0;It<Qe.length;It++)xt[Qe.charCodeAt(It)]=It;Mm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Qe[e[t]>>2],i+=Qe[(e[t]&3)<<4|e[t+1]>>4],i+=Qe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Qe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Rm=function(s){var e=s.length*.75,t=s.length,r,i=0,o,n,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=xt[s.charCodeAt(r)],n=xt[s.charCodeAt(r+1)],a=xt[s.charCodeAt(r+2)],l=xt[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},ea=new Map;su=(s,e,t)=>{if(!s||!(nu(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Om(t,r),o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};iu=(s,e,t)=>s.map(r=>Rr(r,e,t)),nu=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);ou="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",km=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),sa=typeof window<"u"&&window.Blob&&new Blob([km(ou)],{type:"text/javascript;charset=utf-8"});Pi=class{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){let n=ta(t,r,i,!0),a=new Map,l=new Pm;l.onmessage=m=>{let{id:p}=m.data;if(a.set(p,!1),!("base64"in m.data))return;let{base64:d,type:w,width:S,height:y}=m.data;this.mutationCb({id:p,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:w}]},0,0]}]})};let u=1e3/e,c=0,h,f=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{se(p,r,i,!0)||m.push(p)}),m},g=m=>{if(c&&m-c<u){h=requestAnimationFrame(g);return}c=m,f().forEach(async p=>{var d;let w=this.mirror.getId(p);if(a.get(w)||p.width===0||p.height===0)return;if(a.set(w,!0),["webgl","webgl2"].includes(p.__context)){let y=p.getContext(p.__context);((d=y?.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let S=await createImageBitmap(p);l.postMessage({id:w,bitmap:S,width:p.width,height:p.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=ta(e,t,r,!1),o=Dm(this.processMutation.bind(this),e,t,r),n=_m(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}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 i=r.map(n=>{let{type:a,...l}=n;return l}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},Li=class{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Wt),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:[]},i=[];for(let o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:pa(a,o.href),index:l}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},$i=class{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==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(){}},Qr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((eo=s.contentWindow)==null?void 0:eo.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}fe=ma();Te.addCustomEvent=(s,e)=>{if(!Qr)throw new Error("please add custom event after start recording");q({type:A.Custom,data:{tag:s,payload:e}})};Te.freezePage=()=>{Ue.forEach(s=>s.freeze())};Te.takeFullSnapshot=s=>{if(!Qr)throw new Error("please take full snapshot after start recording");Or(s)};Te.mirror=fe;Lm=Object.freeze(Object.defineProperty({__proto__:null,default:au},Symbol.toStringTag,{value:"Module"}));Fi=class{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),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))}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 i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(et||(et={}));lu={type:"xstate.init"};ua=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};Wm=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],ca=new Map;Vm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];Bi=class{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(k.Start,this.start.bind(this)),this.emitter.on(k.SkipStart,this.start.bind(this)),this.emitter.on(k.Pause,this.pause.bind(this)),this.emitter.on(k.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}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,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),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 i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Me.Play||o!==Me.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:a??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:n??i?.playbackRate??1,volume:u??i?.volume??1,muted:l??i?.muted??e.getAttribute("muted")===null,loop:c??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;let n=this.service.state.matches("paused"),a=o.attributes,l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}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()}};Zm=5*1e3,Xm=au||Lm,ha="[replayer]",Us={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};Wi=class{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new ut),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Xm()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",No()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",ma()),b(this,"styleMirror",new Wt),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(let l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(let l of a){switch(l.type){case A.DomContentLoaded:case A.Load:case A.Custom:continue;case A.FullSnapshot:case A.Meta:case A.Plugin:case A.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case A.DomContentLoaded:case A.Load:break;case A.Custom:u=()=>{this.emitter.emit(k.CustomEvent,a)};break;case A.Meta:u=()=>this.emitter.emit(k.Resize,{width:a.data.width,height:a.data.height});break;case A.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case A.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){let h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Zm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(k.SkipStart,f)}}};break}return()=>{u&&u();for(let f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){let f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(k.Finish))},g=50;a.type===A.IncrementalSnapshot&&a.data.source===I.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(k.EventCast,a)}}),!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:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Us,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(k.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(k.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Ui({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===I.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===I.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Yr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let l in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[l],c=Zr(u.node,this.mirror,this.virtualDom.mirror);Yr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(k.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Fi([],{speed:this.config.speed});this.service=Um({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(k.StateChange,{player:a})}),this.speedService=Bm({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(k.StateChange,{speed:a})}),this.mediaManager=new Bi({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let o=this.service.state.context.events.find(a=>a.type===A.Meta),n=this.service.state.context.events.find(a=>a.type===A.FullSnapshot);if(o){let{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(k.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(fa)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}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.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){var t,r;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}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(k.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(k.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(k.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(k.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;fa(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=No()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&($m(this.iframe.contentWindow,this.iframe.contentDocument),vn(this.iframe.contentWindow))}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=[],i=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){let{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),$f(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);let{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>Er(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(k.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=Wm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Gl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:I.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(r=o.sheet)==null||r.insertRule(i[n],n)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);let u=r.getMeta(a);if(u?.type===be.Element&&u?.tagName.toUpperCase()==="HTML"){let{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Mt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(let{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>Er(a))}collectIframeAndAttachDocument(e,t){if(tt(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,o=this.service.state,n=()=>{o=this.service.state};this.emitter.on(k.Start,n),this.emitter.on(k.Pause,n);let a=()=>{this.emitter.off(k.Start,n),this.emitter.off(k.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(k.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(k.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===A.IncrementalSnapshot&&t.data.source===I.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,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"),i=r.getContext("2d"),o=i?.createImageData(r.width,r.height);i?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async o=>{let n=await Promise.all(o.args.map(Oe(this.imageMap,null,r)));return{...o,args:n}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(Oe(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,o;let{data:n}=e;switch(n.source){case I.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case I.Drag:case I.TouchMove:case I.MouseMove:if(t){let a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{let l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case I.MouseInteraction:{if(n.id===-1)break;let a=new Event(De(P[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(k.MouseInteraction,{type:n.type,target:l});let{triggerFocus:u}=this.config;switch(n.type){case P.Blur:"blur"in l&&l.blur();break;case P.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case P.Click:case P.TouchStart:case P.TouchEnd:case P.MouseDown:case P.MouseUp:t?(n.type===P.TouchStart?this.touchActive=!0:n.type===P.TouchEnd&&(this.touchActive=!1),n.type===P.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===P.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===P.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===P.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===P.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===P.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case P.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case I.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case I.ViewportResize:this.emitter.emit(k.Resize,{width:n.width,height:n.height});break;case I.Input:{if(n.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case I.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);let l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case I.StyleSheetRule:case I.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case I.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{let a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Ui({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case I.Font:{try{let a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case I.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case I.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Xp(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let u in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[u],h=jl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Re(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});let i={...this.legacy_missingNodeRetryMap},o=[],n=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===be.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Re(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,m=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(m=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;let p=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(tt(f,r)){this.attachDocumentToIframe(u,f);return}let d=(y,v)=>{if(!this.usingVirtualDom){Er(y);for(let x of this.config.plugins||[])x.onBuild&&x.onBuild(y,{id:v,replayer:this})}},w=Mt(u.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:w,mutation:u};return}let S=r.getMeta(f);if(S&&S.type===be.Element&&u.node.type===be.Text){let y=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(let v of y)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&y.length===1)for(let v of y)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(w.textContent=v.textContent,f.removeChild(v))}else if(S?.type===be.Document){let y=f;u.node.type===be.DocumentType&&((c=y.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),w.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(w,g.nextSibling):m&&m.parentNode?f.contains(m)?f.insertBefore(w,m):f.insertBefore(w,null):f.appendChild(w),d(w,u.node.id),this.usingVirtualDom&&w.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),tt(w,this.mirror)){let y=this.mirror.getId(w),v=this.newDocumentQueue.find(x=>x.parentId===y);v&&(this.attachDocumentToIframe(v,w),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,w,u)};e.adds.forEach(u=>{a(u)});let l=Date.now();for(;o.length;){let u=Xl(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(let c of u)r.getNode(c.value.parentId)?Cn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Kl(e.texts).forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);let f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=os(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){let g=h.parentNode;((c=g?.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;let h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(let f in u.attributes)if(typeof f=="string"){let g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&Ym(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{let m=r.getMeta(h),p=Mt({...m,attributes:{...m.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);let d=h.nextSibling,w=h.parentNode;if(p&&w){w.removeChild(h),w.insertBefore(p,d),r.replace(u.id,p);break}}catch{}if(f==="value"&&h.nodeName==="TEXTAREA"){let m=h;m.childNodes.forEach(d=>m.removeChild(d));let p=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);p&&m.appendChild(p)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Er(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(f==="style"){let m=g,p=h;for(let d in m)if(m[d]===!1)p.style.removeProperty(d);else if(m[d]instanceof Array){let w=m[d];p.style.setProperty(d,w[0],w[1])}else{let w=m[d];p.style.setProperty(d,w)}}}})}applyScroll(e,t){var r,i;let o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);let n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(n?.type===be.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.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:i,startOffset:o,end:n,endOffset:a})=>{let l=this.mirror.getNode(i),u=this.mirror.getNode(n);if(!l||!u)return;let c=new Range;c.setStart(l,o),c.setEnd(u,a);let h=l.ownerDocument,f=h?.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===I.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===I.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){let{positions:u,index:c}=Ri(l);qe(t.cssRules,u).insertRule(a,c)}else{let u=l===void 0?void 0:Math.min(l,t.cssRules.length);t?.insertRule(a,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:l,index:u}=Ri(a);qe(t.cssRules,l).deleteRule(u||0)}else t?.deleteRule(a)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&qe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&qe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(Re(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:I.StyleSheetRule,adds:a.rules},u)}catch{}});let i=10,o=0,n=(a,l)=>{let u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Re(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){let{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){let{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,o){let n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);let a=In(n,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?Us:Object.assign({},Us,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==A.IncrementalSnapshot?!1:e.data.source>I.Mutation&&e.data.source<=I.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(k.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(ha,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ha,...e)}},{addCustomEvent:Km}=Te,{freezePage:Jm}=Te,{takeFullSnapshot:qm}=Te});var gu={};Jt(gu,{startRrweb:()=>Qm});async function Qm(s){if(typeof window>"u")return null;let e;try{e=await Promise.resolve().then(()=>(pu(),du))}catch{return null}let t=s.options.mask?.class??"segi-mask",r=s.options.mask?.inputs??"all",i=r==="all"?{password:!0,email:!0,tel:!0,number:!0,text:!0,textarea:!0}:r==="sensitive"?{password:!0,email:!0,tel:!0,number:!0}:{password:!0},o=[],n=0,a=null,l=Date.now(),u=!1,c=!1,h=setInterval(()=>{u||c||p()},1e4),f=setInterval(()=>{u||c||Date.now()-l>=18e4&&m()},15e3);function g(){if(a)return;let y=e.record({emit(x){if(u||c)return;let N;try{N=JSON.stringify(x)}catch{return}o.push(N),n+=N.length,n>=102400&&p()},sampling:{mousemove:20,scroll:150,input:"last"},maskAllInputs:r==="all",maskInputOptions:i,blockClass:t,ignoreClass:t,maskTextClass:t,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e4});a=typeof y=="function"?y:null;let v=()=>{if(!(c||u))try{let x=e;typeof x.record.takeFullSnapshot=="function"?x.record.takeFullSnapshot(!0):typeof x.takeFullSnapshot=="function"&&x.takeFullSnapshot(!0)}catch{}};setTimeout(v,100),setTimeout(v,500),setTimeout(v,2e3)}function m(){try{a?.()}finally{a=null}p()}function p(y=!1){if(o.length===0)return;let v=o;o=[],n=0;try{s.sendChunk(v,y)}catch{}}function d(){l=Date.now(),!a&&!u&&!c&&g()}for(let y of mu)window.addEventListener(y,d,{passive:!0,capture:!0});let w=()=>p(!0),S=()=>{typeof document<"u"&&document.visibilityState==="hidden"&&p(!0)};return window.addEventListener("pagehide",w),typeof document<"u"&&document.addEventListener("visibilitychange",S),g(),{pause(){u=!0,m()},resume(){u=!1,l=Date.now(),g()},stop(){c=!0,m(),clearInterval(h),clearInterval(f);for(let y of mu)window.removeEventListener(y,d,{capture:!0});window.removeEventListener("pagehide",w),typeof document<"u"&&document.removeEventListener("visibilitychange",S)},flush:p,takeFullSnapshot(){if(!(c||u))try{e.record.takeFullSnapshot?.()}catch{}}}}var mu,yu=yt(()=>{"use strict";mu=["mousemove","mousedown","keydown","touchstart","scroll","wheel"]});var vu={};Jt(vu,{activateReplay:()=>rg,replayApi:()=>Mn,withReplay:()=>eg});function eg(s={}){return{__segi_replay:!0,options:s}}async function tg(s){try{if(typeof CompressionStream>"u")return null;let e=new CompressionStream("gzip"),t=e.writable.getWriter();t.write(new TextEncoder().encode(s)),t.close();let r=await new Response(e.readable).arrayBuffer();return new Uint8Array(r)}catch{return null}}function Nn(){C&&Zn({sessionUid:C.sessionUid,startedAt:C.startedAt,clickCount:C.clickCount,pagesVisited:C.pagesVisited})}function wu(s){!C||!C.recordingEnabled||C.paused||Fe(C.config,"/events",{events:[{sessionUid:C.sessionUid,ts:s.ts,url:s.url,type:"error",name:"sdk_error"}]})}function Su(){if(typeof window>"u")return"desktop";let s=window.innerWidth;return s<640?"mobile":s<1024?"tablet":"desktop"}function Ve(s){if(!(typeof location>"u"))try{return new URLSearchParams(location.search).get(s)??void 0}catch{return}}function bu(s,e){return(s.blockRoutes??[]).some(r=>e.startsWith(r))}async function rg(s){if(C||typeof window>"u")return;let e=++je,t=s.config.options;if(t.enabled===!1)return;let r=Math.max(0,Math.min(100,t.sample??100));if(Math.random()*100>=r||bu(t,location.pathname))return;let i=Kn(),o=Es(),n=Cs(i),a={endpoint:t.endpoint??s.endpoint,projectKey:s.projectKey},l={sessionUid:i,anonId:o,startedAt:n.startedAt,device:Su(),viewportW:window.innerWidth,viewportH:window.innerHeight,ua:navigator.userAgent?.slice(0,512),referrer:document.referrer||void 0,landingUrl:location.href.slice(0,512),utmSource:Ve("utm_source"),utmMedium:Ve("utm_medium"),utmCampaign:Ve("utm_campaign"),utmContent:Ve("utm_content"),utmTerm:Ve("utm_term"),fbclid:Ve("fbclid"),gclid:Ve("gclid")},u=S=>{if(!(!S.isTrusted||e!==je)){if(!C){n.clickCount++;return}C.paused||C.replayBlocked||!C.recordingEnabled||(C.clickCount++,Nn(),St())}};window.addEventListener("click",u,!0),ft.push(()=>window.removeEventListener("click",u,!0));let c=!0;try{let S=await Fe(a,"/session/start",l);S&&S.ok&&(await S.json().catch(()=>({}))).recordingEnabled===!1&&(c=!1)}catch{}if(e!==je)return;if(!c){window.removeEventListener("click",u,!0),pt=[],C={sessionUid:i,config:a,options:t,rrweb:null,replayBlocked:!1,paused:!0,userId:null,startedAt:l.startedAt,pagesVisited:0,clickCount:0,recordingEnabled:!1},dt!==void 0&&Mn.setUser(dt);return}C={sessionUid:i,config:a,options:t,rrweb:null,replayBlocked:!1,paused:!1,userId:null,startedAt:l.startedAt,pagesVisited:n.pagesVisited+1,clickCount:n.clickCount,recordingEnabled:!0},Nn();for(let S of pt)wu(S);pt=[],dt!==void 0&&Mn.setUser(dt);let h=Date.now(),f=()=>{let S=Date.now();S-h<6e4||(h=S,St())};for(let S of["mousedown","keydown","scroll","touchstart"])window.addEventListener(S,f,{passive:!0,capture:!0}),ft.push(()=>window.removeEventListener(S,f,!0));let g=window,m=S=>{let y=!1,v=()=>{y||(y=!0,typeof g.requestIdleCallback=="function"?g.requestIdleCallback(S,{timeout:2e3}):setTimeout(S,1e3))};typeof document<"u"&&document.readyState==="complete"?v():(window.addEventListener("load",v,{once:!0}),setTimeout(v,5e3))};Promise.resolve().then(()=>(yu(),gu)).then(({startRrweb:S})=>new Promise(y=>{m(()=>{if(e!==je){y(null);return}S({sessionUid:i,options:t,sendChunk:async(v,x)=>{if(e!==je||!C||C.replayBlocked)return;let N=`{"sessionUid":${JSON.stringify(i)},"chunk":[${v.join(",")}]}`,$=(a.endpoint||"https://segiapi.extn.ai").replace(/\/+$/,"").replace(/\/api\/ingest\/events$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"");if(x){try{let _=`${$}/api/trace/replay?pk=${encodeURIComponent(a.projectKey)}`,V=new Blob([N],{type:"application/json"});typeof navigator<"u"&&typeof navigator.sendBeacon=="function"&&navigator.sendBeacon(_,V)}catch{}return}try{let _=await tg(N);(await fetch(`${$}/api/trace/replay`,{method:"POST",headers:_?{"Content-Type":"application/json","Content-Encoding":"gzip","X-Segi-Project-Key":a.projectKey}:{"Content-Type":"application/json","X-Segi-Project-Key":a.projectKey},body:_??N})).status===429&&C&&(C.replayBlocked=!0,C.rrweb?.stop(),C.rrweb=null)}catch{}}}).then(y,()=>y(null))})})).then(S=>{S&&C&&e===je?C.rrweb=S:S?.stop()}).catch(()=>{}),Fe(a,"/events",{events:[{sessionUid:i,ts:new Date().toISOString(),type:"page_view",url:location.href,title:document.title}]});let p=()=>{C&&(C.rrweb?.flush(!0),Is(C.config,"/session/end",{sessionUid:C.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(C.startedAt).getTime(),pagesVisited:C.pagesVisited,clickCount:C.clickCount}))};window.addEventListener("pagehide",p),ft.push(()=>window.removeEventListener("pagehide",p));let d=30*6e4,w=setTimeout(()=>{C&&(C.rrweb?.flush(!0),C.rrweb?.stop(),C.rrweb=null,Is(C.config,"/session/end",{sessionUid:C.sessionUid,endedAt:new Date().toISOString(),durationMs:Date.now()-new Date(C.startedAt).getTime(),pagesVisited:C.pagesVisited,clickCount:C.clickCount}),C.paused=!0,C.replayBlocked=!0)},Math.max(0,d-(Date.now()-Date.parse(n.startedAt))));ft.push(()=>clearTimeout(w))}var C,je,ft,pt,dt,Mn,Cu=yt(()=>{"use strict";Jn();Qn();C=null,je=0,ft=[],pt=[];Mn={_captureError(s){if(!C){pt.length<20&&pt.push(s);return}wu(s)},_stop(){je++,C?.rrweb?.stop();for(let s of ft)s();ft=[],C=null,pt=[],dt=void 0},pause(){C?.rrweb?.pause(),C&&(C.paused=!0)},resume(){C?.rrweb?.resume(),C&&(C.paused=!1),St()},setUser(s){dt=s,C&&(C.userId=s?.id?.slice(0,128)??null,Fe(C.config,"/session/start",{sessionUid:C.sessionUid,anonId:Es(),userId:C.userId,startedAt:C.startedAt,device:Su(),viewportW:window.innerWidth,viewportH:window.innerHeight}))},event(s,e){!C||C.paused||Fe(C.config,"/events",{events:[{sessionUid:C.sessionUid,ts:new Date().toISOString(),type:"custom",name:s.slice(0,64),url:location.href,meta:e}]})},notifyRouteChange(s,e){if(!C)return;if(St(),bu(C.options,location.pathname)){C.paused||(C.rrweb?.pause(),C.paused=!0);return}C.paused&&(C.rrweb?.resume(),C.paused=!1),C.pagesVisited+=1,Nn(),C.rrweb?.takeFullSnapshot(),Fe(C.config,"/events",{events:[{sessionUid:C.sessionUid,ts:new Date().toISOString(),type:"page_view",url:s??location.href,title:e??document.title}]})},_sessionUid(){return C?.sessionUid??null}}});var og={};Jt(og,{Segi:()=>Q,default:()=>ng});function Pn(){return{options:{projectKey:"",endpoint:""},user:null,tags:{},breadcrumbs:[],initialized:!1}}function Ln(s,e){let t=s.options.maxBreadcrumbs??50;s.breadcrumbs.push(e),s.breadcrumbs.length>t&&s.breadcrumbs.splice(0,s.breadcrumbs.length-t)}function ws(s,e){let t={type:e.type??"error",level:e.level??"error",message:e.message??"",errorName:e.errorName,stack:e.stack,platform:e.platform,runtime:e.runtime,environment:e.environment??s.options.environment,release:e.release??s.options.release,transaction:e.transaction,url:e.url,userAgent:e.userAgent,user:e.user??s.user??void 0,tags:{...s.tags,...e.tags??{}},extra:e.extra,breadcrumbs:s.breadcrumbs.slice(),request:e.request,timestamp:e.timestamp??new Date().toISOString()};if(s.options.beforeSend)try{let r=s.options.beforeSend(t);return r||{...t,_drop:!0}}catch{return t}return t}var qt=Ou(zn());function $u(s){let e=s&&s.trim()||qt.SEGI_DEFAULT_INGEST_ENDPOINT;return/\/api\/ingest\/events\/?$/.test(e)?e.replace(/\/+$/,""):`${e.replace(/\/+$/,"").replace(/\/api\/ingest$/,"").replace(/\/api$/,"")||qt.SEGI_DEFAULT_API_BASE}/api/ingest/events`}var Vn=new Set;function Ss(s,e){Vn.has(s)||(Vn.add(s),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[segi] ${e}`))}function Fu(s){return s===401||s===403?"ingest rejected the project key (check projectKey + endpoint region)":s===404?"ingest endpoint not found (check endpoint URL)":s===413?"event payload too large; dropped by ingest":s===429?"ingest rate-limited (over plan quota or burst)":s>=500?"ingest is returning 5xx \u2014 events may be lost":"ingest returned a non-2xx response"}function bs(s,e,t){let r=$u(s);if(!r||!e){Ss("missing-config",e?"init() called without a valid endpoint \u2014 events will not be sent":"init() called without a projectKey \u2014 events will not be sent");return}if(!t._drop)try{let i=JSON.stringify(t),o={"Content-Type":"application/json","X-Segi-Project-Key":e};if(typeof fetch=="function"){fetch(r,{method:"POST",headers:o,body:i,keepalive:!0,mode:"cors",credentials:"omit"}).then(n=>{n.ok||Ss(`status-${n.status}`,`${Fu(n.status)} (HTTP ${n.status} from ${r})`)}).catch(n=>{Ss("network-error",`network error reaching ${r} \u2014 events not delivered (${n instanceof Error?n.message:String(n)})`)});return}if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"){let n=`${r}${r.includes("?")?"&":"?"}pk=${encodeURIComponent(e)}`,a=new Blob([i],{type:"application/json"});navigator.sendBeacon(n,a)}}catch{}}var Y=Pn();function sg(s){try{if(s&&typeof s=="object"&&"stack"in s)return String(s.stack??"")}catch{}}function ds(s){if(Y.initialized)try{if(s instanceof ErrorEvent){let e=s.error,t=e?.message??s.message??"Error";if(s.error==null&&(!s.message||/^Script error\.?$/i.test(s.message))&&!s.filename)return;Q.captureException(e??new Error(t),{message:t,url:typeof location<"u"?location.href:void 0})}else if("reason"in s){let e=s.reason,t=e instanceof Error?e.message:typeof e=="string"?e:"Unhandled promise rejection";Q.captureException(e,{message:t,url:typeof location<"u"?location.href:void 0})}}catch{}}function ig(){typeof window>"u"||(window.addEventListener("error",ds,!0),window.addEventListener("unhandledrejection",ds,!0))}function Eu(){typeof window>"u"||(window.removeEventListener("error",ds,!0),window.removeEventListener("unhandledrejection",ds,!0))}var mt=[],fs=!1,Rn=0,On={_captureError(s){mt.length<20&&mt.push(s)},_sessionUid(){return null},_stop(){},pause(){},resume(){},setUser(){},event(){},notifyRouteChange(){}},Q={replay:On,init(s,e={}){try{let t=typeof window<"u"?window:null;if((Y.initialized||t?.__segiInitialized===!0)&&!e.force){!e.silent&&typeof console<"u"&&console.warn("[segi] init() called more than once; ignoring. Pass { force: true } to override.");return}Y.initialized&&Eu(),Q.replay._stop(),Q.replay=On,mt=[];let i=++Rn,{replay:o,...n}=s;fs=!!o?.__segi_replay&&o.options.enabled!==!1,Y.options={...n},Y.initialized=!0,t&&(t.__segiInitialized=!0),ig(),o?.__segi_replay&&Promise.resolve().then(()=>(Cu(),vu)).then(a=>{if(!(i!==Rn||!Y.initialized)){Q.replay=a.replayApi;for(let l of mt)a.replayApi._captureError(l);return mt=[],Y.user&&a.replayApi.setUser({id:Y.user.id,email:Y.user.email}),a.activateReplay({projectKey:n.projectKey,endpoint:n.endpoint,config:o})}}).catch(()=>{})}catch{}},isInitialized(){return Y.initialized},close(){try{if(Eu(),Rn++,fs=!1,Q.replay._stop(),Q.replay=On,mt=[],Y.initialized=!1,Y.user=null,Y.tags={},Y.breadcrumbs=[],typeof window<"u"){let s=window;s.__segiInitialized=!1}}catch{}},captureException(s,e={}){try{if(!Y.initialized)return;let t=s instanceof Error?s:new Error(typeof s=="string"?s:JSON.stringify(s)),r=ws(Y,{type:"error",level:"error",message:t.message,errorName:t.name,stack:sg(t),platform:"javascript",runtime:"browser",url:e.url??(typeof location<"u"?location.href:void 0),userAgent:e.userAgent??(typeof navigator<"u"?navigator.userAgent:void 0),...e,extra:{...e.extra,...Q.replay._sessionUid()?{sessionUid:Q.replay._sessionUid()}:{}}});fs&&!r._drop&&Q.replay._captureError({ts:r.timestamp||new Date().toISOString(),url:r.url}),bs(Y.options.endpoint,Y.options.projectKey,r)}catch{}},captureMessage(s,e={}){try{if(!Y.initialized)return;let t=ws(Y,{type:"message",level:e.level??"info",message:s,platform:"javascript",runtime:"browser",url:typeof location<"u"?location.href:void 0,userAgent:typeof navigator<"u"?navigator.userAgent:void 0,...e,extra:{...e.extra,...Q.replay._sessionUid()?{sessionUid:Q.replay._sessionUid()}:{}}});fs&&(t.level==="error"||t.level==="fatal")&&!t._drop&&Q.replay._captureError({ts:t.timestamp||new Date().toISOString(),url:t.url}),bs(Y.options.endpoint,Y.options.projectKey,t)}catch{}},setUser(s){try{Y.user=s,Q.replay.setUser(s?{id:s.id,email:s.email}:null)}catch{}},setTag(s,e){try{Y.tags[s]=e}catch{}},addBreadcrumb(s){try{Ln(Y,{...s,timestamp:s.timestamp??new Date().toISOString()})}catch{}}};(function(){try{let e=window;if(e.__segiBundleLoaded){typeof console<"u"&&console.warn("[segi] segi.min.js loaded more than once; ignoring this load.");return}e.__segiBundleLoaded=!0;let t=e.SegiConfig??{},r={},i=document.getElementsByTagName("script");for(let a=i.length-1;a>=0;a--){let l=i[a];if(l.src&&/segi(\.min)?\.js/.test(l.src)){r={projectKey:l.dataset.projectKey,endpoint:l.dataset.endpoint,environment:l.dataset.environment,release:l.dataset.release};break}}let o=t.projectKey??r.projectKey,n=t.endpoint??r.endpoint;if(!o){e.Segi=Q;return}Q.init({projectKey:o,endpoint:n,environment:t.environment??r.environment,release:t.release??r.release}),e.Segi=Q}catch{}})();var ng=Q;return Du(og);})();
|
|
61
61
|
/*! Bundled license information:
|
|
62
62
|
|
|
63
63
|
rrweb/dist/rrweb.js:
|