blocfeed 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/script.js CHANGED
@@ -1,56 +1,57 @@
1
- var BlocFeedScript=(function(exports){'use strict';var Pa={enabled:true,sampling:1,ignoreSelectors:["[data-blocfeed-ui]","[data-blocfeed-ignore]"],rageClick:{enabled:true,threshold:3,windowMs:1e3,streakIdleMs:1500},httpFail:{enabled:true,statusCodes:[400,401,403,404,408,409,422,429,500,502,503,504],ignoreUrls:["/api/behavioral-events","/api/feedback"],treatJsonErrorAsFail:false},redirectLoop:{enabled:true,threshold:3,windowMs:2e3},formDataLoss:{enabled:true},deadClick:{enabled:true,observationWindowMs:300,rateLimitPerSelector:5}};function bn(s){var t,r,n,i,o,l,a,c;let e=Pa;return {enabled:(t=s==null?void 0:s.enabled)!=null?t:e.enabled,sampling:(r=s==null?void 0:s.sampling)!=null?r:e.sampling,ignoreSelectors:(n=s==null?void 0:s.ignoreSelectors)!=null?n:e.ignoreSelectors,rageClick:{...e.rageClick,...(i=s==null?void 0:s.rageClick)!=null?i:{}},httpFail:{...e.httpFail,...(o=s==null?void 0:s.httpFail)!=null?o:{}},redirectLoop:{...e.redirectLoop,...(l=s==null?void 0:s.redirectLoop)!=null?l:{}},formDataLoss:{...e.formDataLoss,...(a=s==null?void 0:s.formDataLoss)!=null?a:{}},deadClick:{...e.deadClick,...(c=s==null?void 0:s.deadClick)!=null?c:{}}}}function wn(s){let e=[];async function t(){if(e.length===0)return;let n=e.splice(0,50);try{await fetch(s.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-blocfeed-id":s.blocfeedId},body:JSON.stringify({events:n}),keepalive:!0});}catch(i){}}function r(){if(e.length===0)return;if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function"){t();return}let n=e.splice(0,50),i=new Blob([JSON.stringify({events:n})],{type:"application/json"}),o=`${s.endpoint}?_bfid=${encodeURIComponent(s.blocfeedId)}`;try{navigator.sendBeacon(o,i);}catch(l){}}return {enqueue(n){e.push(n);},flush:t,flushBeacon:r,size(){return e.length}}}function vn(s){let e=globalThis.CSS;return typeof(e==null?void 0:e.escape)=="function"?e.escape(s):s.replace(/[^a-zA-Z0-9_-]/g,t=>{let r=t.codePointAt(0);return r===void 0?"":`\\${r.toString(16)} `})}function $a(s){return s.replace(/\s+/g," ").trim()}function Ae(s,e=140){let t=s.textContent;if(!t)return;let r=$a(t);if(r)return r.length<=e?r:`${r.slice(0,e-1)}\u2026`}function Fa(s){let e=1;for(let t=s.previousElementSibling;t;t=t.previousElementSibling)t.tagName===s.tagName&&(e+=1);return e}var Sn=["data-testid","data-test-id","data-test","data-qa","data-cy"],Pr="data-blocfeed-component";function je(s){let e=s.closest(`[${Pr}]`);if(!e)return;let t=e.getAttribute(Pr),r=t==null?void 0:t.trim();return r||void 0}function Te(s,e=5){let t=[],r=s,n=0;for(;r&&n<e*4;){let i=je(r);if(i&&t[t.length-1]!==i&&(t.push(i),t.length>=e))break;r=r.parentElement,n++;}return t}function _e(s,e=4){let t=s,r=0;for(;t&&r<e;){let n=t.getAttribute(Pr),i=n==null?void 0:n.trim();if(i)return `bf:component:${i}`;for(let a of Sn){let c=t.getAttribute(a),u=c==null?void 0:c.trim();if(u)return `bf:testid:${u}`}let o=t.getAttribute("id"),l=o==null?void 0:o.trim();if(l&&!/^\d/.test(l))return `bf:id:${l}`;t=t.parentElement,r+=1;}return null}function Ba(s){let e=s.tagName.toLowerCase(),t=s.getAttribute("id");if(t)return `#${vn(t)}`;for(let r of Sn){let n=s.getAttribute(r);if(n)return `${e}[${r}="${vn(n)}"]`}return `${e}:nth-of-type(${Fa(s)})`}function Oe(s,e=10){let t=[],r=s;for(;r&&t.length<e;){let n=Ba(r);if(t.unshift(n),n.startsWith("#"))break;r=r.parentElement;}return t.join(" > ")}var Ua=new Set(["button","link","tab","menuitem"]);function Cn(s){var t;if(s.tagName==="BUTTON")return s.disabled?null:"button";if(s.tagName==="A"||s.tagName==="a"){let r=(t=s.getAttribute("href"))==null?void 0:t.trim();return !r||r==="#"||r.toLowerCase().startsWith("javascript:")?null:"link"}let e=s.getAttribute("role");if(e&&Ua.has(e))return "role";try{if(window.getComputedStyle(s).cursor==="pointer")return "cursor_pointer"}catch(r){}return null}function bt(s,e){if(e.length===0)return false;for(let t of e)try{if(s.matches(t)||s.closest(t))return !0}catch(r){}return false}var En="bf_behavioral_session",wt=null;function X(){try{let s=sessionStorage.getItem(En);if(s)return s;let e=In();return sessionStorage.setItem(En,e),e}catch(s){return wt||(wt=In(),wt)}}function In(){let s=Math.random().toString(36).slice(2,10).padEnd(8,"0");return `bf_${Date.now()}_${s}`}function vt(s){let e=0;for(let t=0;t<s.length;t++)e=e*31+s.charCodeAt(t)|0;return Math.abs(e)}function xn(s,e){if(!s.rageClick.enabled)return ()=>{};let{threshold:t,windowMs:r,streakIdleMs:n}=s.rageClick,i=new Map;function o(f){var b,S;let d=f.target,g=d?Wa(d):false,m=d&&(b=Ae(d,200))!=null?b:null,p=d?d.tagName.toLowerCase():"",h=d&&d.id||null,y=d&&(S=je(d))!=null?S:null,v=d?Te(d,5):[];return {session_id:X(),event_type:"rage_click",page_url:typeof window=="undefined"?"":window.location.href,selector:f.selector,element_text:m,event_data:{click_count:f.timestamps.length,window_ms:r,final:true,...g?{disabled:true}:{},tag_name:p,...h?{element_id:h}:{},...y?{component_name:y}:{},...v.length>0?{parent_components:v}:{}},created_at:new Date().toISOString(),stable_key:f.stableKey}}function l(f){let d=i.get(f);d&&(d.idleTimer&&(clearTimeout(d.idleTimer),d.idleTimer=null),d.reached&&e(o(d)),i.delete(f));}function a(f){let d=i.get(f);d&&(d.idleTimer&&clearTimeout(d.idleTimer),d.idleTimer=setTimeout(()=>{l(f);},n));}function c(f){try{let d=f.target;if(!d||!(d instanceof Element)||bt(d,s.ignoreSelectors))return;let g=Oe(d,4);if(!g)return;let m=_e(d),p=m!=null?m:g,h=Date.now(),y=i.get(p);y?(y.target=d,y.selector=g):(y={selector:g,stableKey:m,timestamps:[],reached:!1,idleTimer:null,target:d},i.set(p,y)),y.reached||(y.timestamps=y.timestamps.filter(v=>h-v<=r)),y.timestamps.push(h),a(p),!y.reached&&y.timestamps.length>=t&&(y.reached=!0);}catch(d){}}function u(){for(let f of Array.from(i.keys()))l(f);}return document.addEventListener("click",c,{capture:true,passive:true}),typeof window!="undefined"&&window.addEventListener("pagehide",u),()=>{document.removeEventListener("click",c,{capture:true}),typeof window!="undefined"&&window.removeEventListener("pagehide",u);for(let f of i.values())f.idleTimer&&clearTimeout(f.idleTimer);i.clear();}}function Wa(s){if(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true")return true;try{if(window.getComputedStyle(s).pointerEvents==="none")return !0}catch(e){}return false}var Mn=0,Nn=null,Ct=null,Et=[],za=1500;function Ha(){function s(e){var t;try{let r=e.target;if(!r)return;let n=r.closest('button[type="submit"], input[type="submit"], [data-blocfeed-submit]');if(!n)return;Mn=Date.now();let i=n.closest("form");Nn=(i?Oe(i,3):"")||null,Ct=(t=Ae(n,100))!=null?t:null,Et=Te(n,5);}catch(r){}}return document.addEventListener("click",s,{capture:true,passive:true}),()=>document.removeEventListener("click",s,{capture:true})}function Rn(s,e){if(!s.httpFail.enabled)return ()=>{};let{statusCodes:t,ignoreUrls:r,treatJsonErrorAsFail:n}=s.httpFail,i=new Set(t),o=Ha(),l=globalThis.fetch,a=async(d,g)=>{var y,v,b;let m=typeof d=="string"?d:d instanceof URL?d.toString():d.url,p=((v=(y=g==null?void 0:g.method)!=null?y:d.method)!=null?v:"GET").toUpperCase(),h;try{h=await l.call(globalThis,d,g);}catch(S){try{if(!St(m,r)){let E=S&&typeof S=="object"&&S.name==="AbortError"?"abort":"network";e(f(0,m,p,E));}}catch(E){}throw S}try{if(!St(m,r)&&i.has(h.status))e(f(h.status,m,p));else if(n&&!St(m,r)&&h.status>=200&&h.status<300){let S=(b=h.headers.get("content-type"))!=null?b:"";(S.includes("application/json")||S.includes("+json"))&&h.clone().json().then(E=>{if(Va(E))try{e(f(h.status,m,p,"json_error"));}catch(I){}}).catch(()=>{});}}catch(S){}return h};globalThis.fetch=a;let c=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.open=function(d,g,...m){return this.__bf_url=g,this.__bf_method=d.toUpperCase(),c.call(this,d,g,...m)},XMLHttpRequest.prototype.send=function(d){let g=()=>{var m,p;try{let h=(m=this.__bf_url)!=null?m:"",y=(p=this.__bf_method)!=null?p:"GET";!St(h,r)&&i.has(this.status)&&e(f(this.status,h,y));}catch(h){}};return this.__bf_handler=g,this.addEventListener("loadend",g),u.call(this,d!=null?d:null)},()=>{globalThis.fetch=l,XMLHttpRequest.prototype.open=c,XMLHttpRequest.prototype.send=u,o(),Ct=null,Et=[];};function f(d,g,m,p){let y=Date.now()-Mn<za;return {session_id:X(),event_type:"error",page_url:typeof window=="undefined"?"":window.location.href,selector:null,element_text:null,event_data:{http_status:d,request_url:g,method:m,...p?{error_kind:p}:{},form_selector:y?Nn:null,...y&&Ct?{button_text:Ct}:{},...y&&Et.length>0?{parent_components:Et}:{}},created_at:new Date().toISOString(),stable_key:null}}}function Va(s){if(!s||typeof s!="object")return false;let e=s;return e.ok===false||e.success===false||"error"in e&&e.error!=null&&e.error!==false}function St(s,e){if(e.length===0)return false;for(let t of e)if(s.includes(t))return true;return false}var Ga=3e4;function An(s,e){if(!s.redirectLoop.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{threshold:t,windowMs:r}=s.redirectLoop,n=new Map,i=new Map,o=history.pushState,l=history.replaceState;function a(u){var f,d;try{let g=Date.now(),m=(f=i.get(u))!=null?f:0;if(g<m)return;let h=((d=n.get(u))!=null?d:[]).filter(y=>g-y<=r);if(h.push(g),n.set(u,h),h.length>=t){let y={session_id:X(),event_type:"thrashing",page_url:window.location.href,selector:null,element_text:null,event_data:{count:h.length,url:u,window_ms:r},created_at:new Date().toISOString(),stable_key:null};e(y),i.set(u,g+Ga),n.set(u,[]);}}catch(g){}}function c(){let u=window.location.pathname+window.location.search;a(u);}return history.pushState=function(...u){let f=o.apply(this,u);return c(),f},history.replaceState=function(...u){let f=l.apply(this,u);return c(),f},window.addEventListener("popstate",c),()=>{history.pushState=o,history.replaceState=l,window.removeEventListener("popstate",c);}}var ja=6e4;function Tn(s,e){if(!s.formDataLoss.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let t=new Set,r=new Map,n=new Map,i=new Map;function o(p){let h=p.closest("form");return h?h.id?`#${h.id}`:"form":null}function l(){let p=0;for(let h of r.values())p+=h;return p}function a(p){t.delete(p),r.delete(p),i.delete(p);}function c(p){var h;try{let y=p.target;if(!y||!(y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||y instanceof HTMLSelectElement))return;let v=o(y);if(!v)return;t.add(v),r.set(v,((h=r.get(v))!=null?h:0)+1);let b=y.closest("form");b&&i.set(v,b);}catch(y){}}function u(p){try{let h=p.target;if(!h||!(h instanceof HTMLFormElement))return;let y=h.id?`#${h.id}`:"form";n.set(y,Date.now()),a(y);}catch(h){}}function f(p){try{let h=p.target;if(!h||!(h instanceof HTMLFormElement))return;let y=h.id?`#${h.id}`:"form";a(y);}catch(h){}}function d(p){var E,I;if(t.size===0)return;let h=Array.from(t),y=(E=h[0])!=null?E:null,v=y&&(I=i.get(y))!=null?I:null,b=v?_e(v):null,S={session_id:X(),event_type:"form_abandonment",page_url:window.location.href,selector:y,element_text:null,event_data:{cause:p,field_count:l(),forms:h},created_at:new Date().toISOString(),stable_key:b};e(S);}function g(p){if(!p.persisted||t.size===0)return;let h=Date.now();for(let[,y]of n)if(h-y<ja)return;d("bfcache_restore");}function m(){d("beforeunload_after_edit");}return document.addEventListener("input",c,{capture:true,passive:true}),document.addEventListener("submit",u,{capture:true}),document.addEventListener("reset",f,{capture:true}),window.addEventListener("pageshow",g),window.addEventListener("beforeunload",m),()=>{document.removeEventListener("input",c,{capture:true}),document.removeEventListener("submit",u,{capture:true}),document.removeEventListener("reset",f,{capture:true}),window.removeEventListener("pageshow",g),window.removeEventListener("beforeunload",m);}}function Ya(){let s={urlChangeCount:0,networkCount:0,filePickerCount:0,uninstall:()=>{}},e=history.pushState,t=history.replaceState;history.pushState=function(...l){return s.urlChangeCount+=1,e.apply(this,l)},history.replaceState=function(...l){return s.urlChangeCount+=1,t.apply(this,l)};let r=()=>{s.urlChangeCount+=1;};window.addEventListener("popstate",r);let n=globalThis.fetch;if(n){let l=(a,c)=>(s.networkCount+=1,n.call(globalThis,a,c));globalThis.fetch=l;}let i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(l,a,...c){return s.networkCount+=1,i.call(this,l,a,...c)};let o=HTMLInputElement.prototype.click;return HTMLInputElement.prototype.click=function(){return this.type==="file"&&(s.filePickerCount+=1),o.call(this)},s.uninstall=()=>{history.pushState=e,history.replaceState=t,window.removeEventListener("popstate",r),n&&(globalThis.fetch=n),XMLHttpRequest.prototype.open=i,HTMLInputElement.prototype.click=o;},s}function _n(s,e){if(!s.deadClick.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{observationWindowMs:t,rateLimitPerSelector:r}=s.deadClick,n=new Map,i=Ya();function o(l){var a,c;try{let u=l.target;if(!u||!(u instanceof Element)||l.button!==0||l.metaKey||l.ctrlKey||l.altKey||l.shiftKey||bt(u,s.ignoreSelectors)||u.closest("label"))return;if(u instanceof HTMLInputElement){let D=u.type;if(D==="checkbox"||D==="radio"||D==="file")return}if(u instanceof HTMLSelectElement||u.closest("a[target='_blank'], a[download]")||u.closest('[contenteditable="true"]'))return;try{let D=window.getSelection();if(D&&D.toString().length>0)return}catch(D){}let f=Cn(u);if(!f)return;let d=Oe(u,4);if(!d)return;let g=_e(u),m=g!=null?g:d,p=i.urlChangeCount,h=i.networkCount,y=i.filePickerCount,v=new Date().toISOString(),b=(a=Ae(u,200))!=null?a:null,S=u.tagName.toLowerCase(),E=u.id||null,I=(c=je(u))!=null?c:null,P=Te(u,5),A=Xa(u),$=0,F=null;if(A){F=new MutationObserver(()=>{$+=1;});try{F.observe(A,{childList:!0,attributes:!0,characterData:!0,subtree:!0});}catch(D){F=null;}}setTimeout(()=>{var C;if(F)try{F.disconnect();}catch(ee){}if($>0||i.urlChangeCount!==p||i.networkCount!==h||i.filePickerCount!==y)return;let D=(C=n.get(m))!=null?C:0;if(D>=r)return;n.set(m,D+1);let J={session_id:X(),event_type:"dead_click",page_url:typeof window=="undefined"?"":window.location.href,selector:d,element_text:b,event_data:{tag_name:S,...E?{element_id:E}:{},...I?{component_name:I}:{},...P.length>0?{parent_components:P}:{},clickable_reason:f},created_at:v,stable_key:g};e(J);},t);}catch(u){}}return document.addEventListener("click",o,{capture:true,passive:true}),()=>{document.removeEventListener("click",o,{capture:true}),i.uninstall();}}function Xa(s){let e=s.closest('button, a, form, [role="button"]');return e||s.parentElement}var Za=Object.defineProperty,Ja=(s,e,t)=>e in s?Za(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,w=(s,e,t)=>Ja(s,typeof e!="symbol"?e+"":e,t),On,Ka=Object.defineProperty,qa=(s,e,t)=>e in s?Ka(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,kn=(s,e,t)=>qa(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{}),Dn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},It={},Qa=()=>!!globalThis.Zone;function Us(s){if(It[s])return It[s];let e=globalThis[s],t=e.prototype,r=s in Dn?Dn[s]:void 0,n=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=s in Ln?Ln[s]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(n&&o&&!Qa())return It[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?It[s]=c:t}catch(l){return t}}var $r={};function ge(s,e,t){var r;let n=`${s}.${String(t)}`;if($r[n])return $r[n].call(e);let i=Us(s),o=(r=Object.getOwnPropertyDescriptor(i,t))==null?void 0:r.get;return o?($r[n]=o,o.call(e)):e[t]}var Fr={};function Ti(s,e,t){let r=`${s}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);let i=Us(s)[t];return typeof i!="function"?e[t]:(Fr[r]=i,i.bind(e))}function el(s){return ge("Node",s,"ownerDocument")}function tl(s){return ge("Node",s,"childNodes")}function rl(s){return ge("Node",s,"parentNode")}function sl(s){return ge("Node",s,"parentElement")}function nl(s){return ge("Node",s,"textContent")}function il(s,e){return Ti("Node",s,"contains")(e)}function ol(s){return Ti("Node",s,"getRootNode")()}function al(s){return !s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function ll(s){return s.styleSheets}function cl(s){return !s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function ul(s,e){return ge("Element",s,"querySelector")(e)}function fl(s,e){return ge("Element",s,"querySelectorAll")(e)}function hl(){return Us("MutationObserver").constructor}function dl(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],n=t(r);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=n,()=>{s[e]=r;}}catch(r){return ()=>{}}}var Z={ownerDocument:el,childNodes:tl,parentNode:rl,parentElement:sl,textContent:nl,contains:il,getRootNode:ol,host:al,styleSheets:ll,shadowRoot:cl,querySelector:ul,querySelectorAll:fl,mutationObserver:hl,patch:dl};function _i(s){return s.nodeType===s.ELEMENT_NODE}function qe(s){let e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return !!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Qe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function pl(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 ml(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 Kr(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,n=>Oi(n,t)).join("");return pl(r)}catch(e){return null}}function Oi(s,e){if(yl(s)){let t;try{t=Kr(s.styleSheet)||ml(s);}catch(r){t=s.cssText;}return s.styleSheet.href?rr(t,s.styleSheet.href):t}else {let t=s.cssText;return bl(s)&&s.selectorText.includes(":")&&(t=gl(t)),e?rr(t,e):t}}function gl(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function yl(s){return "styleSheet"in s}function bl(s){return "selectorText"in s}var Qt=class{constructor(){kn(this,"idNodeMap",new Map),kn(this,"nodeMetaMap",new WeakMap);}getId(e){var t;if(!e)return -1;let r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-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 n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function wl(){return new Qt}function er({element:s,maskInputOptions:e,tagName:t,type:r,value:n,maskInputFn:i}){let o=n||"",l=r&&xe(r);return (e[t.toLowerCase()]||l&&e[l])&&(i?o=i(o,s):o="*".repeat(o.length)),o}function xe(s){return s.toLowerCase()}var Pn="__rrweb_original__";function vl(s){let e=s.getContext("2d");if(!e)return true;let t=50;for(let r=0;r<s.width;r+=t)for(let n=0;n<s.height;n+=t){let i=e.getImageData,o=Pn in i?i[Pn]:i;if(new Uint32Array(o.call(e,r,n,Math.min(t,s.width-r),Math.min(t,s.height-n)).data.buffer).some(a=>a!==0))return false}return true}function tr(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function ki(s,e){var i;let t;try{t=new URL(s,e!=null?e:window.location.href);}catch(o){return null}let r=/\.([0-9a-z]+)(?:$)/i,n=t.pathname.match(r);return (i=n==null?void 0:n[1])!=null?i:null}function Sl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var Cl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,El=/^(?:[a-z+]+:)?\/\//i,Il=/^www\..*/i,xl=/^(data:)([^,]*),(.*)/i;function rr(s,e){return (s||"").replace(Cl,(t,r,n,i,o,l)=>{let a=n||o||l,c=r||i||"";if(!a)return t;if(El.test(a)||Il.test(a))return `url(${c}${a}${c})`;if(xl.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${Sl(e)+a}${c})`;let u=e.split("/"),f=a.split("/");u.pop();for(let d of f)d!=="."&&(d===".."?u.pop():u.push(d));return `url(${c}${u.join("/")}${c})`})}function xt(s,e=false){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ml(s,e,t=false){let r=Array.from(e.childNodes),n=[],i=0;if(r.length>1&&s&&typeof s=="string"){let o=xt(s,t),l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){let c=xt(r[a].textContent,t),u=100,f=3;for(;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){let d=c.substring(0,f),g=o.split(d),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")m=o.indexOf(d,1);else if(g.length===1){if(d=d.substring(0,d.length-1),g=o.split(d),g.length<=1)return n.push(s),n;f=u+1;}else f===c.length-1&&(m=o.indexOf(d));if(g.length>=2&&f>u){let p=r[a-1].textContent;if(p&&typeof p=="string"){let h=xt(p).length;m=o.indexOf(d,h);}m===-1&&(m=g[0].length);}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<s.length;){if(i+=1,i>50*r.length)return n.push(s),n;let h=xt(s.substring(0,p),t);if(h.length===m){n.push(s.substring(0,p)),s=s.substring(p),o=o.substring(m);break}else h.length<m?p+=Math.max(1,Math.floor((m-h.length)/l)):p-=Math.max(1,Math.floor((h.length-m)*l));}break}}}}return n.push(s),n}function Nl(s,e){return Ml(s,e).join("/* rr_split */")}var Rl=1,Al=new RegExp("[^a-z0-9-_:]"),tt=-2;function Di(){return Rl++}function Tl(s){if(s instanceof HTMLFormElement)return "form";let e=xe(s.tagName);return Al.test(e)?"div":e}var ke,$n,_l=/^[^ \t\n\r\u000c]+/,Ol=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(i){let o,l=i.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let n=[];for(;r(Ol),!(t>=e.length);){let i=r(_l);if(i.slice(-1)===",")i=Pe(s,i.substring(0,i.length-1)),n.push(i);else {let o="";i=Pe(s,i);let l=false;for(;;){let a=e.charAt(t);if(a===""){n.push((i+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,n.push((i+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return n.join(", ")}var Fn=new WeakMap;function Pe(s,e){return !e||e.trim()===""?e:Ws(s,e)}function Dl(s){return !!(s.tagName==="svg"||s.ownerSVGElement)}function Ws(s,e){let t=Fn.get(s);if(t||(t=s.createElement("a"),Fn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Li(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)?Pe(s,r):t==="srcset"?kl(s,r):t==="style"?rr(r,Ws(s)):e==="object"&&t==="data"?Pe(s,r):r)}function Pi(s,e,t){return ["video","audio"].includes(s)&&e==="autoplay"}function Ll(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return !0}else for(let r=s.classList.length;r--;){let n=s.classList[r];if(e.test(n))return !0}if(t)return s.matches(t)}catch(r){}return false}function sr(s,e,t){if(!s)return false;if(s.nodeType!==s.ELEMENT_NODE)return t?sr(Z.parentNode(s),e,t):false;for(let r=s.classList.length;r--;){let n=s.classList[r];if(e.test(n))return true}return t?sr(Z.parentNode(s),e,t):false}function $i(s,e,t,r){let n;if(_i(s)){if(n=s,!Z.childNodes(n).length)return false}else {if(Z.parentElement(s)===null)return false;n=Z.parentElement(s);}try{if(typeof e=="string"){if(r){if(n.closest(`.${e}`))return !0}else if(n.classList.contains(e))return !0}else if(sr(n,e,r))return !0;if(t){if(r){if(n.closest(t))return !0}else if(n.matches(t))return !0}}catch(i){}return false}function Pl(s,e,t){let r=s.contentWindow;if(!r)return;let n=false,i;try{i=r.document.readyState;}catch(l){return}if(i!=="complete"){let l=setTimeout(()=>{n||(e(),n=true);},t);s.addEventListener("load",()=>{clearTimeout(l),n=true,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 $l(s,e,t){let r=false,n;try{n=s.sheet;}catch(o){return}if(n)return;let i=setTimeout(()=>{r||(e(),r=true);},t);s.addEventListener("load",()=>{clearTimeout(i),r=true,e();});}function Fl(s,e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=false,cssCaptured:h=false}=e,y=Bl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return {type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Wl(s,{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:d,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case s.TEXT_NODE:return Ul(s,{doc:t,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:h});case s.CDATA_SECTION_NODE:return {type:Y.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return {type:Y.Comment,textContent:Z.textContent(s)||"",rootId:y};default:return false}}function Bl(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Ul(s,e){let{needsMask:t,maskTextFn:r,rootId:n,cssCaptured:i}=e,o=Z.parentNode(s),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":i||(a=Z.textContent(s),c&&a&&(a=rr(a,Ws(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:n}}function Wl(s,e){let{doc:t,blockClass:r,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:d=false,rootId:g}=e,m=Ll(s,r,n),p=Tl(s),h={},y=s.attributes.length;for(let b=0;b<y;b++){let S=s.attributes[b];Pi(p,S.name,S.value)||(h[S.name]=Li(t,p,xe(S.name),S.value));}if(p==="link"&&i){let b=Array.from(t.styleSheets).find(E=>E.href===s.href),S=null;b&&(S=Kr(b)),S&&(delete h.rel,delete h.href,h._cssText=S);}if(p==="style"&&s.sheet){let b=Kr(s.sheet);b&&(s.childNodes.length>1&&(b=Nl(b,s)),h._cssText=b);}if(["input","textarea","select"].includes(p)){let b=s.value,S=s.checked;h.type!=="radio"&&h.type!=="checkbox"&&h.type!=="submit"&&h.type!=="button"&&b?h.value=er({element:s,type:tr(s),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):S&&(h.checked=S);}if(p==="option"&&(s.selected&&!o.select?h.selected=true:delete h.selected),p==="dialog"&&s.open&&(h.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){if(s.__context==="2d")vl(s)||(h.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let b=s.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;let E=S.toDataURL(a.type,a.quality);b!==E&&(h.rr_dataURL=b);}}if(p==="img"&&c){ke||(ke=t.createElement("canvas"),$n=ke.getContext("2d"));let b=s,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,I=()=>{b.removeEventListener("load",I);try{ke.width=b.naturalWidth,ke.height=b.naturalHeight,$n.drawImage(b,0,0),h.rr_dataURL=ke.toDataURL(a.type,a.quality);}catch(P){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${S}! Error: ${P}`);}b.crossOrigin==="anonymous"&&(E?h.crossOrigin=E:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);}if(["audio","video"].includes(p)){let b=h;b.rr_mediaState=s.paused?"paused":"played",b.rr_mediaCurrentTime=s.currentTime,b.rr_mediaPlaybackRate=s.playbackRate,b.rr_mediaMuted=s.muted,b.rr_mediaLoop=s.loop,b.rr_mediaVolume=s.volume;}if(d||(s.scrollLeft&&(h.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(h.rr_scrollTop=s.scrollTop)),m){let{width:b,height:S}=s.getBoundingClientRect();h={class:h.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(h.src)&&(s.contentDocument||(h.rr_src=h.src),delete h.src);let v;try{customElements.get(p)&&(v=!0);}catch(b){}return {type:Y.Element,tagName:p,attributes:h,childNodes:[],isSVG:Dl(s)||void 0,needBlock:m,rootId:g,isCustom:v}}function L(s){return s==null?"":s.toLowerCase()}function Fi(s){return s===true||s==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function zl(s,e){if(e.comment&&s.type===Y.Comment)return true;if(s.type===Y.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"&&ki(s.attributes.href)==="js"))return true;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return true;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function $e(s,e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:c=true,maskInputOptions:u={},maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=false,recordCanvas:h=false,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:I=()=>false,newlyAddedElement:P=false,cssCaptured:A=false}=e,{needsMask:$}=e,{preserveWhiteSpace:F=true}=e;$||($=$i(s,o,l,$===void 0));let D=Fl(s,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:h,keepIframeSrcFn:I,newlyAddedElement:P,cssCaptured:A});if(!D)return console.warn(s,"not serialized"),null;let J;r.hasNode(s)?J=r.getId(s):zl(D,g)||!F&&D.type===Y.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?J=tt:J=Di();let C=Object.assign(D,{id:J});if(r.add(s,C),J===tt)return null;y&&y(s);let ee=!a;if(C.type===Y.Element){ee=ee&&!C.needBlock,delete C.needBlock;let j=Z.shadowRoot(s);j&&Qe(j)&&(C.isShadowHost=true);}if((C.type===Y.Document||C.type===Y.Element)&&ee){g.headWhitespace&&C.type===Y.Element&&C.tagName==="head"&&(F=false);let j={doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I,cssCaptured:false};if(!(C.type===Y.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===Y.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(j.cssCaptured=true);for(let Se of Array.from(Z.childNodes(s))){let ce=$e(Se,j);ce&&C.childNodes.push(ce);}}let re=null;if(_i(s)&&(re=Z.shadowRoot(s)))for(let Se of Array.from(Z.childNodes(re))){let ce=$e(Se,j);ce&&(Qe(re)&&(ce.isShadow=true),C.childNodes.push(ce));}}let ve=Z.parentNode(s);return ve&&qe(ve)&&Qe(ve)&&(C.isShadow=true),C.type===Y.Element&&C.tagName==="iframe"&&Pl(s,()=>{let j=s.contentDocument;if(j&&v){let re=$e(j,{doc:j,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});re&&v(s,re);}},b),C.type===Y.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&ki(C.attributes.href)==="css")&&$l(s,()=>{if(S){let j=$e(s,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:d,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:h,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});j&&S(s,j);}},E),C}function Hl(s,e){let{mirror:t=new Qt,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:c=false,maskAllInputs:u=false,maskTextFn:f,maskInputFn:d,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>false}=e||{},I=u===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u===false?{password:true}:u,P=Fi(g);return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:d,slimDOMOptions:P,dataURLOptions:m,inlineImages:a,recordCanvas:c,preserveWhiteSpace:p,onSerialize:h,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:false})}function Gl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function jl(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:true}),Object.keys(s).forEach(function(r){var n=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return s[r]}});}),t}var zs={exports:{}},B=String,Bi=function(){return {isColorSupported:false,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};zs.exports=Bi();zs.exports.createColors=Bi;var Yl=zs.exports,Xl={},Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ae=jl(Zl),Bn=Yl,Un=ae,qr=class Ui extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(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,Ui);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=Bn.isColorSupported),Un&&e&&(t=Un(t));let r=t.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=Bn.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return r.slice(n,i).map((c,u)=>{let f=n+1+u,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+c+`
2
- `+g+l("^")}return " "+a(d)+c}).join(`
1
+ var BlocFeedScript=(function(exports){'use strict';var Ul=Object.defineProperty;var de=(r,e)=>()=>(r&&(e=r(r=0)),e);var Wl=(r,e)=>{for(var t in e)Ul(r,t,{get:e[t],enumerable:true});};function al(r,e){if(r.match(/^[a-z]+:\/\//i))return r;if(r.match(/^\/\//))return window.location.protocol+r;if(r.match(/^[a-z]+:/i))return r;let t=document.implementation.createHTMLDocument(),n=t.createElement("base"),s=t.createElement("a");return t.head.appendChild(n),t.body.appendChild(s),e&&(n.href=e),s.href=r,s.href}function fe(r){let e=[];for(let t=0,n=r.length;t<n;t++)e.push(r[t]);return e}function Yr(r={}){return Ke||(r.includeStyleProperties?(Ke=r.includeStyleProperties,Ke):(Ke=fe(window.getComputedStyle(document.documentElement)),Ke))}function jr(r,e){let n=(r.ownerDocument.defaultView||window).getComputedStyle(r).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function Vp(r){let e=jr(r,"border-left-width"),t=jr(r,"border-right-width");return r.clientWidth+e+t}function Gp(r){let e=jr(r,"border-top-width"),t=jr(r,"border-bottom-width");return r.clientHeight+e+t}function Xr(r,e={}){let t=e.width||Vp(r),n=e.height||Gp(r);return {width:t,height:n}}function cl(){let r,e;try{e=process;}catch(n){}let t=e&&e.env?e.env.devicePixelRatio:null;return t&&(r=parseInt(t,10),Number.isNaN(r)&&(r=1)),r||window.devicePixelRatio||1}function ul(r){(r.width>ne||r.height>ne)&&(r.width>ne&&r.height>ne?r.width>r.height?(r.height*=ne/r.width,r.width=ne):(r.width*=ne/r.height,r.height=ne):r.width>ne?(r.height*=ne/r.width,r.width=ne):(r.width*=ne/r.height,r.height=ne));}function fl(r,e={}){return r.toBlob?new Promise(t=>{r.toBlob(t,e.type?e.type:"image/png",e.quality?e.quality:1);}):new Promise(t=>{let n=window.atob(r.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),s=n.length,i=new Uint8Array(s);for(let o=0;o<s;o+=1)i[o]=n.charCodeAt(o);t(new Blob([i],{type:e.type?e.type:"image/png"}));})}function qe(r){return new Promise((e,t)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n));});},n.onerror=t,n.crossOrigin="anonymous",n.decoding="async",n.src=r;})}async function jp(r){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(r)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function hl(r,e,t){let n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),i=document.createElementNS(n,"foreignObject");return s.setAttribute("width",`${e}`),s.setAttribute("height",`${t}`),s.setAttribute("viewBox",`0 0 ${e} ${t}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),s.appendChild(i),i.appendChild(r),jp(s)}var ll,Ke,ne,J,ke=de(()=>{ll=(()=>{let r=0,e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return ()=>(r+=1,`u${e()}${r}`)})();Ke=null;ne=16384;J=(r,e)=>{if(r instanceof e)return true;let t=Object.getPrototypeOf(r);return t===null?false:t.constructor.name===e.name||J(t,e)};});function Yp(r){let e=r.getPropertyValue("content");return `${r.cssText} content: '${e.replace(/'|"/g,"")}';`}function Xp(r,e){return Yr(e).map(t=>{let n=r.getPropertyValue(t),s=r.getPropertyPriority(t);return `${t}: ${n}${s?" !important":""};`}).join(" ")}function Zp(r,e,t,n){let s=`.${r}:${e}`,i=t.cssText?Yp(t):Xp(t,n);return document.createTextNode(`${s}{${i}}`)}function dl(r,e,t,n){let s=window.getComputedStyle(r,t),i=s.getPropertyValue("content");if(i===""||i==="none")return;let o=ll();try{e.className=`${e.className} ${o}`;}catch(a){return}let l=document.createElement("style");l.appendChild(Zp(o,t,s,n)),e.appendChild(l);}function pl(r,e,t){dl(r,e,":before",t),dl(r,e,":after",t);}var ml=de(()=>{ke();});function Kp(r){let e=/\.([^./]*?)$/g.exec(r);return e?e[1]:""}function Qe(r){let e=Kp(r).toLowerCase();return Jp[e]||""}var gl,yl,Jp,Zr=de(()=>{gl="application/font-woff",yl="image/jpeg",Jp={woff:gl,woff2:gl,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:yl,jpeg:yl,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};});function qp(r){return r.split(/,/)[1]}function Rt(r){return r.search(/^(data:)/)!==-1}function Ls(r,e){return `data:${e};base64,${r}`}async function Ps(r,e,t){let n=await fetch(r,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);let s=await n.blob();return new Promise((i,o)=>{let l=new FileReader;l.onerror=o,l.onloadend=()=>{try{i(t({res:n,result:l.result}));}catch(a){o(a);}},l.readAsDataURL(s);})}function Qp(r,e,t){let n=r.replace(/\?.*/,"");return t&&(n=r),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function et(r,e,t){let n=Qp(r,e,t.includeQueryParams);if(Ds[n]!=null)return Ds[n];t.cacheBust&&(r+=(/\?/.test(r)?"&":"?")+new Date().getTime());let s;try{let i=await Ps(r,t.fetchRequestInit,({res:o,result:l})=>(e||(e=o.headers.get("Content-Type")||""),qp(l)));s=Ls(i,e);}catch(i){s=t.imagePlaceholder||"";let o=`Failed to fetch resource: ${r}`;i&&(o=typeof i=="string"?i:i.message),o&&console.warn(o);}return Ds[n]=s,s}var Ds,Mt=de(()=>{Ds={};});async function em(r){let e=r.toDataURL();return e==="data:,"?r.cloneNode(false):qe(e)}async function tm(r,e){if(r.currentSrc){let i=document.createElement("canvas"),o=i.getContext("2d");i.width=r.clientWidth,i.height=r.clientHeight,o==null||o.drawImage(r,0,0,i.width,i.height);let l=i.toDataURL();return qe(l)}let t=r.poster,n=Qe(t),s=await et(t,n,e);return qe(s)}async function rm(r,e){var t;try{if(!((t=r==null?void 0:r.contentDocument)===null||t===void 0)&&t.body)return await At(r.contentDocument.body,e,!0)}catch(n){}return r.cloneNode(false)}async function nm(r,e){return J(r,HTMLCanvasElement)?em(r):J(r,HTMLVideoElement)?tm(r,e):J(r,HTMLIFrameElement)?rm(r,e):r.cloneNode(bl(r))}async function im(r,e,t){var n,s;if(bl(e))return e;let i=[];return sm(r)&&r.assignedNodes?i=fe(r.assignedNodes()):J(r,HTMLIFrameElement)&&(!((n=r.contentDocument)===null||n===void 0)&&n.body)?i=fe(r.contentDocument.body.childNodes):i=fe(((s=r.shadowRoot)!==null&&s!==void 0?s:r).childNodes),i.length===0||J(r,HTMLVideoElement)||await i.reduce((o,l)=>o.then(()=>At(l,t)).then(a=>{a&&e.appendChild(a);}),Promise.resolve()),e}function om(r,e,t){let n=e.style;if(!n)return;let s=window.getComputedStyle(r);s.cssText?(n.cssText=s.cssText,n.transformOrigin=s.transformOrigin):Yr(t).forEach(i=>{let o=s.getPropertyValue(i);i==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),J(r,HTMLIFrameElement)&&i==="display"&&o==="inline"&&(o="block"),i==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(i,o,s.getPropertyPriority(i));});}function am(r,e){J(r,HTMLTextAreaElement)&&(e.innerHTML=r.value),J(r,HTMLInputElement)&&e.setAttribute("value",r.value);}function lm(r,e){if(J(r,HTMLSelectElement)){let n=Array.from(e.children).find(s=>r.value===s.getAttribute("value"));n&&n.setAttribute("selected","");}}function cm(r,e,t){return J(e,Element)&&(om(r,e,t),pl(r,e,t),am(r,e),lm(r,e)),e}async function um(r,e){let t=r.querySelectorAll?r.querySelectorAll("use"):[];if(t.length===0)return r;let n={};for(let i=0;i<t.length;i++){let l=t[i].getAttribute("xlink:href");if(l){let a=r.querySelector(l),c=document.querySelector(l);!a&&c&&!n[l]&&(n[l]=await At(c,e,true));}}let s=Object.values(n);if(s.length){let i="http://www.w3.org/1999/xhtml",o=document.createElementNS(i,"svg");o.setAttribute("xmlns",i),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";let l=document.createElementNS(i,"defs");o.appendChild(l);for(let a=0;a<s.length;a++)l.appendChild(s[a]);r.appendChild(o);}return r}async function At(r,e,t){return !t&&e.filter&&!e.filter(r)?null:Promise.resolve(r).then(n=>nm(n,e)).then(n=>im(r,n,e)).then(n=>cm(r,n,e)).then(n=>um(n,e))}var sm,bl,wl=de(()=>{ml();ke();Zr();Mt();sm=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SLOT",bl=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SVG";});function dm(r){let e=r.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function pm(r){let e=[];return r.replace(vl,(t,n,s)=>(e.push(s),t)),e.filter(t=>!Rt(t))}async function mm(r,e,t,n,s){try{let i=t?al(e,t):e,o=Qe(e),l;if(s);else l=await et(i,o,n);return r.replace(dm(e),`$1${l}$3`)}catch(i){}return r}function gm(r,{preferredFontFormat:e}){return e?r.replace(hm,t=>{for(;;){let[n,,s]=fm.exec(t)||[];if(!s)return "";if(s===e)return `src: ${n};`}}):r}function $s(r){return r.search(vl)!==-1}async function Jr(r,e,t){if(!$s(r))return r;let n=gm(r,t);return pm(n).reduce((i,o)=>i.then(l=>mm(l,o,e,t)),Promise.resolve(n))}var vl,fm,hm,Fs=de(()=>{ke();Zr();Mt();vl=/url\((['"]?)([^'"]+?)\1\)/g,fm=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,hm=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;});async function tt(r,e,t){var n;let s=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(r);if(s){let i=await Jr(s,null,t);return e.style.setProperty(r,i,e.style.getPropertyPriority(r)),true}return false}async function ym(r,e){await tt("background",r,e)||await tt("background-image",r,e),await tt("mask",r,e)||await tt("-webkit-mask",r,e)||await tt("mask-image",r,e)||await tt("-webkit-mask-image",r,e);}async function bm(r,e){let t=J(r,HTMLImageElement);if(!(t&&!Rt(r.src))&&!(J(r,SVGImageElement)&&!Rt(r.href.baseVal)))return;let n=t?r.src:r.href.baseVal,s=await et(n,Qe(n),e);await new Promise((i,o)=>{r.onload=i,r.onerror=e.onImageErrorHandler?(...a)=>{try{i(e.onImageErrorHandler(...a));}catch(c){o(c);}}:o;let l=r;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),t?(r.srcset="",r.src=s):r.href.baseVal=s;});}async function wm(r,e){let n=fe(r.childNodes).map(s=>Bs(s,e));await Promise.all(n).then(()=>r);}async function Bs(r,e){J(r,Element)&&(await ym(r,e),await bm(r,e),await wm(r,e));}var Sl=de(()=>{Fs();ke();Mt();Zr();});function Cl(r,e){let{style:t}=r;e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.width&&(t.width=`${e.width}px`),e.height&&(t.height=`${e.height}px`);let n=e.style;return n!=null&&Object.keys(n).forEach(s=>{t[s]=n[s];}),r}var El=de(()=>{});async function xl(r){let e=Il[r];if(e!=null)return e;let n=await(await fetch(r)).text();return e={url:r,cssText:n},Il[r]=e,e}async function Rl(r,e){let t=r.cssText,n=/url\(["']?([^"')]+)["']?\)/g,i=(t.match(/url\([^)]+\)/g)||[]).map(async o=>{let l=o.replace(n,"$1");return l.startsWith("https://")||(l=new URL(l,r.url).href),Ps(l,e.fetchRequestInit,({result:a})=>(t=t.replace(o,`url(${a})`),[o,a]))});return Promise.all(i).then(()=>t)}function Ml(r){if(r==null)return [];let e=[],t=/(\/\*[\s\S]*?\*\/)/gi,n=r.replace(t,""),s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=s.exec(n);if(a===null)break;e.push(a[0]);}n=n.replace(s,"");let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(o,"gi");for(;;){let a=i.exec(n);if(a===null){if(a=l.exec(n),a===null)break;i.lastIndex=l.lastIndex;}else l.lastIndex=i.lastIndex;e.push(a[0]);}return e}async function vm(r,e){let t=[],n=[];return r.forEach(s=>{if("cssRules"in s)try{fe(s.cssRules||[]).forEach((i,o)=>{if(i.type===CSSRule.IMPORT_RULE){let l=o+1,a=i.href,c=xl(a).then(u=>Rl(u,e)).then(u=>Ml(u).forEach(f=>{try{s.insertRule(f,f.startsWith("@import")?l+=1:s.cssRules.length);}catch(h){console.error("Error inserting rule from remote css",{rule:f,error:h});}})).catch(u=>{console.error("Error loading remote css",u.toString());});n.push(c);}});}catch(i){let o=r.find(l=>l.href==null)||document.styleSheets[0];s.href!=null&&n.push(xl(s.href).then(l=>Rl(l,e)).then(l=>Ml(l).forEach(a=>{o.insertRule(a,o.cssRules.length);})).catch(l=>{console.error("Error loading remote stylesheet",l);})),console.error("Error inlining remote css file",i);}}),Promise.all(n).then(()=>(r.forEach(s=>{if("cssRules"in s)try{fe(s.cssRules||[]).forEach(i=>{t.push(i);});}catch(i){console.error(`Error while reading CSS rules from ${s.href}`,i);}}),t))}function Sm(r){return r.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>$s(e.style.getPropertyValue("src")))}async function Cm(r,e){if(r.ownerDocument==null)throw new Error("Provided element is not within a Document");let t=fe(r.ownerDocument.styleSheets),n=await vm(t,e);return Sm(n)}function Al(r){return r.trim().replace(/["']/g,"")}function Em(r){let e=new Set;function t(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(i=>{e.add(Al(i));}),Array.from(n.children).forEach(i=>{i instanceof HTMLElement&&t(i);});}return t(r),e}async function Us(r,e){let t=await Cm(r,e),n=Em(r);return (await Promise.all(t.filter(i=>n.has(Al(i.style.fontFamily))).map(i=>{let o=i.parentStyleSheet?i.parentStyleSheet.href:null;return Jr(i.cssText,o,e)}))).join(`
2
+ `)}async function Tl(r,e){let t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Us(r,e);if(t){let n=document.createElement("style"),s=document.createTextNode(t);n.appendChild(s),r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n);}}var Il,Nl=de(()=>{ke();Mt();Fs();Il={};});var Ol={};Wl(Ol,{getFontEmbedCSS:()=>Am,toBlob:()=>Mm,toCanvas:()=>Tt,toJpeg:()=>Rm,toPixelData:()=>Im,toPng:()=>xm,toSvg:()=>_l});async function _l(r,e={}){let{width:t,height:n}=Xr(r,e),s=await At(r,e,true);return await Tl(s,e),await Bs(s,e),Cl(s,e),await hl(s,t,n)}async function Tt(r,e={}){let{width:t,height:n}=Xr(r,e),s=await _l(r,e),i=await qe(s),o=document.createElement("canvas"),l=o.getContext("2d"),a=e.pixelRatio||cl(),c=e.canvasWidth||t,u=e.canvasHeight||n;return o.width=c*a,o.height=u*a,e.skipAutoScale||ul(o),o.style.width=`${c}`,o.style.height=`${u}`,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(i,0,0,o.width,o.height),o}async function Im(r,e={}){let{width:t,height:n}=Xr(r,e);return (await Tt(r,e)).getContext("2d").getImageData(0,0,t,n).data}async function xm(r,e={}){return (await Tt(r,e)).toDataURL()}async function Rm(r,e={}){return (await Tt(r,e)).toDataURL("image/jpeg",e.quality||1)}async function Mm(r,e={}){let t=await Tt(r,e);return await fl(t)}async function Am(r,e={}){return Us(r,e)}var kl=de(()=>{wl();Sl();El();Nl();ke();});var Hl={enabled:true,sampling:1,ignoreSelectors:["[data-blocfeed-ui]","[data-blocfeed-ignore]"],rageClick:{enabled:true,threshold:3,windowMs:1e3,streakIdleMs:1500},httpFail:{enabled:true,statusCodes:[400,401,403,404,408,409,422,429,500,502,503,504],ignoreUrls:["/api/behavioral-events","/api/feedback"],treatJsonErrorAsFail:false},redirectLoop:{enabled:true,threshold:3,windowMs:2e3},formDataLoss:{enabled:true},deadClick:{enabled:true,observationWindowMs:300,rateLimitPerSelector:5}};function js(r){var t,n,s,i,o,l,a,c;let e=Hl;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,sampling:(n=r==null?void 0:r.sampling)!=null?n:e.sampling,ignoreSelectors:(s=r==null?void 0:r.ignoreSelectors)!=null?s:e.ignoreSelectors,rageClick:{...e.rageClick,...(i=r==null?void 0:r.rageClick)!=null?i:{}},httpFail:{...e.httpFail,...(o=r==null?void 0:r.httpFail)!=null?o:{}},redirectLoop:{...e.redirectLoop,...(l=r==null?void 0:r.redirectLoop)!=null?l:{}},formDataLoss:{...e.formDataLoss,...(a=r==null?void 0:r.formDataLoss)!=null?a:{}},deadClick:{...e.deadClick,...(c=r==null?void 0:r.deadClick)!=null?c:{}}}}function Ys(r){let e=[];async function t(){if(e.length===0)return;let s=e.splice(0,50);try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json","x-blocfeed-id":r.blocfeedId},body:JSON.stringify({events:s}),keepalive:!0});}catch(i){}}function n(){if(e.length===0)return;if(typeof navigator=="undefined"||typeof navigator.sendBeacon!="function"){t();return}let s=e.splice(0,50),i=new Blob([JSON.stringify({events:s})],{type:"application/json"}),o=`${r.endpoint}?_bfid=${encodeURIComponent(r.blocfeedId)}`;try{navigator.sendBeacon(o,i);}catch(l){}}return {enqueue(s){e.push(s);},flush:t,flushBeacon:n,size(){return e.length}}}function Xs(r){let e=globalThis.CSS;return typeof(e==null?void 0:e.escape)=="function"?e.escape(r):r.replace(/[^a-zA-Z0-9_-]/g,t=>{let n=t.codePointAt(0);return n===void 0?"":`\\${n.toString(16)} `})}function zl(r){return r.replace(/\s+/g," ").trim()}function De(r,e=140){let t=r.textContent;if(!t)return;let n=zl(t);if(n)return n.length<=e?n:`${n.slice(0,e-1)}\u2026`}function Vl(r){let e=1;for(let t=r.previousElementSibling;t;t=t.previousElementSibling)t.tagName===r.tagName&&(e+=1);return e}var Zs=["data-testid","data-test-id","data-test","data-qa","data-cy"],rn="data-blocfeed-component";function rt(r){let e=r.closest(`[${rn}]`);if(!e)return;let t=e.getAttribute(rn),n=t==null?void 0:t.trim();return n||void 0}function Le(r,e=5){let t=[],n=r,s=0;for(;n&&s<e*4;){let i=rt(n);if(i&&t[t.length-1]!==i&&(t.push(i),t.length>=e))break;n=n.parentElement,s++;}return t}function Pe(r,e=4){let t=r,n=0;for(;t&&n<e;){let s=t.getAttribute(rn),i=s==null?void 0:s.trim();if(i)return `bf:component:${i}`;for(let a of Zs){let c=t.getAttribute(a),u=c==null?void 0:c.trim();if(u)return `bf:testid:${u}`}let o=t.getAttribute("id"),l=o==null?void 0:o.trim();if(l&&!/^\d/.test(l))return `bf:id:${l}`;t=t.parentElement,n+=1;}return null}function Gl(r){let e=r.tagName.toLowerCase(),t=r.getAttribute("id");if(t)return `#${Xs(t)}`;for(let n of Zs){let s=r.getAttribute(n);if(s)return `${e}[${n}="${Xs(s)}"]`}return `${e}:nth-of-type(${Vl(r)})`}function $e(r,e=10){let t=[],n=r;for(;n&&t.length<e;){let s=Gl(n);if(t.unshift(s),s.startsWith("#"))break;n=n.parentElement;}return t.join(" > ")}var jl=new Set(["button","link","tab","menuitem"]);function Js(r){var t;if(r.tagName==="BUTTON")return r.disabled?null:"button";if(r.tagName==="A"||r.tagName==="a"){let n=(t=r.getAttribute("href"))==null?void 0:t.trim();return !n||n==="#"||n.toLowerCase().startsWith("javascript:")?null:"link"}let e=r.getAttribute("role");if(e&&jl.has(e))return "role";try{if(window.getComputedStyle(r).cursor==="pointer")return "cursor_pointer"}catch(n){}return null}function Ot(r,e){if(e.length===0)return false;for(let t of e)try{if(r.matches(t)||r.closest(t))return !0}catch(n){}return false}var Ks="bf_behavioral_session",kt=null;function Y(){try{let r=sessionStorage.getItem(Ks);if(r)return r;let e=qs();return sessionStorage.setItem(Ks,e),e}catch(r){return kt||(kt=qs(),kt)}}function qs(){let r=Math.random().toString(36).slice(2,10).padEnd(8,"0");return `bf_${Date.now()}_${r}`}function Dt(r){let e=0;for(let t=0;t<r.length;t++)e=e*31+r.charCodeAt(t)|0;return Math.abs(e)}function Qs(r,e){if(!r.rageClick.enabled)return ()=>{};let{threshold:t,windowMs:n,streakIdleMs:s}=r.rageClick,i=new Map;function o(f){var b,S;let h=f.target,g=h?Yl(h):false,m=h&&(b=De(h,200))!=null?b:null,p=h?h.tagName.toLowerCase():"",d=h&&h.id||null,y=h&&(S=rt(h))!=null?S:null,v=h?Le(h,5):[];return {session_id:Y(),event_type:"rage_click",page_url:typeof window=="undefined"?"":window.location.href,selector:f.selector,element_text:m,event_data:{click_count:f.timestamps.length,window_ms:n,final:true,...g?{disabled:true}:{},tag_name:p,...d?{element_id:d}:{},...y?{component_name:y}:{},...v.length>0?{parent_components:v}:{}},created_at:new Date().toISOString(),stable_key:f.stableKey}}function l(f){let h=i.get(f);h&&(h.idleTimer&&(clearTimeout(h.idleTimer),h.idleTimer=null),h.reached&&e(o(h)),i.delete(f));}function a(f){let h=i.get(f);h&&(h.idleTimer&&clearTimeout(h.idleTimer),h.idleTimer=setTimeout(()=>{l(f);},s));}function c(f){try{let h=f.target;if(!h||!(h instanceof Element)||Ot(h,r.ignoreSelectors))return;let g=$e(h,4);if(!g)return;let m=Pe(h),p=m!=null?m:g,d=Date.now(),y=i.get(p);y?(y.target=h,y.selector=g):(y={selector:g,stableKey:m,timestamps:[],reached:!1,idleTimer:null,target:h},i.set(p,y)),y.reached||(y.timestamps=y.timestamps.filter(v=>d-v<=n)),y.timestamps.push(d),a(p),!y.reached&&y.timestamps.length>=t&&(y.reached=!0);}catch(h){}}function u(){for(let f of Array.from(i.keys()))l(f);}return document.addEventListener("click",c,{capture:true,passive:true}),typeof window!="undefined"&&window.addEventListener("pagehide",u),()=>{document.removeEventListener("click",c,{capture:true}),typeof window!="undefined"&&window.removeEventListener("pagehide",u);for(let f of i.values())f.idleTimer&&clearTimeout(f.idleTimer);i.clear();}}function Yl(r){if(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true")return true;try{if(window.getComputedStyle(r).pointerEvents==="none")return !0}catch(e){}return false}var ei=0,ti=null,Pt=null,$t=[],Xl=1500;function Zl(){function r(e){var t;try{let n=e.target;if(!n)return;let s=n.closest('button[type="submit"], input[type="submit"], [data-blocfeed-submit]');if(!s)return;ei=Date.now();let i=s.closest("form");ti=(i?$e(i,3):"")||null,Pt=(t=De(s,100))!=null?t:null,$t=Le(s,5);}catch(n){}}return document.addEventListener("click",r,{capture:true,passive:true}),()=>document.removeEventListener("click",r,{capture:true})}function ri(r,e){if(!r.httpFail.enabled)return ()=>{};let{statusCodes:t,ignoreUrls:n,treatJsonErrorAsFail:s}=r.httpFail,i=new Set(t),o=Zl(),l=globalThis.fetch,a=async(h,g)=>{var y,v,b;let m=typeof h=="string"?h:h instanceof URL?h.toString():h.url,p=((v=(y=g==null?void 0:g.method)!=null?y:h.method)!=null?v:"GET").toUpperCase(),d;try{d=await l.call(globalThis,h,g);}catch(S){try{if(!Lt(m,n)){let E=S&&typeof S=="object"&&S.name==="AbortError"?"abort":"network";e(f(0,m,p,E));}}catch(E){}throw S}try{if(!Lt(m,n)&&i.has(d.status))e(f(d.status,m,p));else if(s&&!Lt(m,n)&&d.status>=200&&d.status<300){let S=(b=d.headers.get("content-type"))!=null?b:"";(S.includes("application/json")||S.includes("+json"))&&d.clone().json().then(E=>{if(Jl(E))try{e(f(d.status,m,p,"json_error"));}catch(I){}}).catch(()=>{});}}catch(S){}return d};globalThis.fetch=a;let c=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send;return XMLHttpRequest.prototype.open=function(h,g,...m){return this.__bf_url=g,this.__bf_method=h.toUpperCase(),c.call(this,h,g,...m)},XMLHttpRequest.prototype.send=function(h){let g=()=>{var m,p;try{let d=(m=this.__bf_url)!=null?m:"",y=(p=this.__bf_method)!=null?p:"GET";!Lt(d,n)&&i.has(this.status)&&e(f(this.status,d,y));}catch(d){}};return this.__bf_handler=g,this.addEventListener("loadend",g),u.call(this,h!=null?h:null)},()=>{globalThis.fetch=l,XMLHttpRequest.prototype.open=c,XMLHttpRequest.prototype.send=u,o(),Pt=null,$t=[];};function f(h,g,m,p){let y=Date.now()-ei<Xl;return {session_id:Y(),event_type:"error",page_url:typeof window=="undefined"?"":window.location.href,selector:null,element_text:null,event_data:{http_status:h,request_url:g,method:m,...p?{error_kind:p}:{},form_selector:y?ti:null,...y&&Pt?{button_text:Pt}:{},...y&&$t.length>0?{parent_components:$t}:{}},created_at:new Date().toISOString(),stable_key:null}}}function Jl(r){if(!r||typeof r!="object")return false;let e=r;return e.ok===false||e.success===false||"error"in e&&e.error!=null&&e.error!==false}function Lt(r,e){if(e.length===0)return false;for(let t of e)if(r.includes(t))return true;return false}var Kl=3e4;function ni(r,e){if(!r.redirectLoop.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{threshold:t,windowMs:n}=r.redirectLoop,s=new Map,i=new Map,o=history.pushState,l=history.replaceState;function a(u){var f,h;try{let g=Date.now(),m=(f=i.get(u))!=null?f:0;if(g<m)return;let d=((h=s.get(u))!=null?h:[]).filter(y=>g-y<=n);if(d.push(g),s.set(u,d),d.length>=t){let y={session_id:Y(),event_type:"thrashing",page_url:window.location.href,selector:null,element_text:null,event_data:{count:d.length,url:u,window_ms:n},created_at:new Date().toISOString(),stable_key:null};e(y),i.set(u,g+Kl),s.set(u,[]);}}catch(g){}}function c(){let u=window.location.pathname+window.location.search;a(u);}return history.pushState=function(...u){let f=o.apply(this,u);return c(),f},history.replaceState=function(...u){let f=l.apply(this,u);return c(),f},window.addEventListener("popstate",c),()=>{history.pushState=o,history.replaceState=l,window.removeEventListener("popstate",c);}}var ql=6e4;function si(r,e){if(!r.formDataLoss.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let t=new Set,n=new Map,s=new Map,i=new Map;function o(p){let d=p.closest("form");return d?d.id?`#${d.id}`:"form":null}function l(){let p=0;for(let d of n.values())p+=d;return p}function a(p){t.delete(p),n.delete(p),i.delete(p);}function c(p){var d;try{let y=p.target;if(!y||!(y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||y instanceof HTMLSelectElement))return;let v=o(y);if(!v)return;t.add(v),n.set(v,((d=n.get(v))!=null?d:0)+1);let b=y.closest("form");b&&i.set(v,b);}catch(y){}}function u(p){try{let d=p.target;if(!d||!(d instanceof HTMLFormElement))return;let y=d.id?`#${d.id}`:"form";s.set(y,Date.now()),a(y);}catch(d){}}function f(p){try{let d=p.target;if(!d||!(d instanceof HTMLFormElement))return;let y=d.id?`#${d.id}`:"form";a(y);}catch(d){}}function h(p){var E,I;if(t.size===0)return;let d=Array.from(t),y=(E=d[0])!=null?E:null,v=y&&(I=i.get(y))!=null?I:null,b=v?Pe(v):null,S={session_id:Y(),event_type:"form_abandonment",page_url:window.location.href,selector:y,element_text:null,event_data:{cause:p,field_count:l(),forms:d},created_at:new Date().toISOString(),stable_key:b};e(S);}function g(p){if(!p.persisted||t.size===0)return;let d=Date.now();for(let[,y]of s)if(d-y<ql)return;h("bfcache_restore");}function m(){h("beforeunload_after_edit");}return document.addEventListener("input",c,{capture:true,passive:true}),document.addEventListener("submit",u,{capture:true}),document.addEventListener("reset",f,{capture:true}),window.addEventListener("pageshow",g),window.addEventListener("beforeunload",m),()=>{document.removeEventListener("input",c,{capture:true}),document.removeEventListener("submit",u,{capture:true}),document.removeEventListener("reset",f,{capture:true}),window.removeEventListener("pageshow",g),window.removeEventListener("beforeunload",m);}}function Ql(){let r={urlChangeCount:0,networkCount:0,filePickerCount:0,uninstall:()=>{}},e=history.pushState,t=history.replaceState;history.pushState=function(...l){return r.urlChangeCount+=1,e.apply(this,l)},history.replaceState=function(...l){return r.urlChangeCount+=1,t.apply(this,l)};let n=()=>{r.urlChangeCount+=1;};window.addEventListener("popstate",n);let s=globalThis.fetch;if(s){let l=(a,c)=>(r.networkCount+=1,s.call(globalThis,a,c));globalThis.fetch=l;}let i=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(l,a,...c){return r.networkCount+=1,i.call(this,l,a,...c)};let o=HTMLInputElement.prototype.click;return HTMLInputElement.prototype.click=function(){return this.type==="file"&&(r.filePickerCount+=1),o.call(this)},r.uninstall=()=>{history.pushState=e,history.replaceState=t,window.removeEventListener("popstate",n),s&&(globalThis.fetch=s),XMLHttpRequest.prototype.open=i,HTMLInputElement.prototype.click=o;},r}function ii(r,e){if(!r.deadClick.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};let{observationWindowMs:t,rateLimitPerSelector:n}=r.deadClick,s=new Map,i=Ql();function o(l){var a,c;try{let u=l.target;if(!u||!(u instanceof Element)||l.button!==0||l.metaKey||l.ctrlKey||l.altKey||l.shiftKey||Ot(u,r.ignoreSelectors)||u.closest("label"))return;if(u instanceof HTMLInputElement){let D=u.type;if(D==="checkbox"||D==="radio"||D==="file")return}if(u instanceof HTMLSelectElement||u.closest("a[target='_blank'], a[download]")||u.closest('[contenteditable="true"]'))return;try{let D=window.getSelection();if(D&&D.toString().length>0)return}catch(D){}let f=Js(u);if(!f)return;let h=$e(u,4);if(!h)return;let g=Pe(u),m=g!=null?g:h,p=i.urlChangeCount,d=i.networkCount,y=i.filePickerCount,v=new Date().toISOString(),b=(a=De(u,200))!=null?a:null,S=u.tagName.toLowerCase(),E=u.id||null,I=(c=rt(u))!=null?c:null,P=Le(u,5),T=ec(u),$=0,F=null;if(T){F=new MutationObserver(()=>{$+=1;});try{F.observe(T,{childList:!0,attributes:!0,characterData:!0,subtree:!0});}catch(D){F=null;}}setTimeout(()=>{var C;if(F)try{F.disconnect();}catch(te){}if($>0||i.urlChangeCount!==p||i.networkCount!==d||i.filePickerCount!==y)return;let D=(C=s.get(m))!=null?C:0;if(D>=n)return;s.set(m,D+1);let K={session_id:Y(),event_type:"dead_click",page_url:typeof window=="undefined"?"":window.location.href,selector:h,element_text:b,event_data:{tag_name:S,...E?{element_id:E}:{},...I?{component_name:I}:{},...P.length>0?{parent_components:P}:{},clickable_reason:f},created_at:v,stable_key:g};e(K);},t);}catch(u){}}return document.addEventListener("click",o,{capture:true,passive:true}),()=>{document.removeEventListener("click",o,{capture:true}),i.uninstall();}}function ec(r){let e=r.closest('button, a, form, [role="button"]');return e||r.parentElement}var tc=Object.defineProperty,rc=(r,e,t)=>e in r?tc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,w=(r,e,t)=>rc(r,typeof e!="symbol"?e+"":e,t),oi,nc=Object.defineProperty,sc=(r,e,t)=>e in r?nc(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,ai=(r,e,t)=>sc(r,typeof e!="symbol"?e+"":e,t),X=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(X||{}),li={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ci={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ft={},ic=()=>!!globalThis.Zone;function as(r){if(Ft[r])return Ft[r];let e=globalThis[r],t=e.prototype,n=r in li?li[r]:void 0,s=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=r in ci?ci[r]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!ic())return Ft[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[r].prototype;return document.body.removeChild(l),c?Ft[r]=c:t}catch(l){return t}}var nn={};function ve(r,e,t){var n;let s=`${r}.${String(t)}`;if(nn[s])return nn[s].call(e);let i=as(r),o=(n=Object.getOwnPropertyDescriptor(i,t))==null?void 0:n.get;return o?(nn[s]=o,o.call(e)):e[t]}var sn={};function so(r,e,t){let n=`${r}.${String(t)}`;if(sn[n])return sn[n].bind(e);let i=as(r)[t];return typeof i!="function"?e[t]:(sn[n]=i,i.bind(e))}function oc(r){return ve("Node",r,"ownerDocument")}function ac(r){return ve("Node",r,"childNodes")}function lc(r){return ve("Node",r,"parentNode")}function cc(r){return ve("Node",r,"parentElement")}function uc(r){return ve("Node",r,"textContent")}function fc(r,e){return so("Node",r,"contains")(e)}function hc(r){return so("Node",r,"getRootNode")()}function dc(r){return !r||!("host"in r)?null:ve("ShadowRoot",r,"host")}function pc(r){return r.styleSheets}function mc(r){return !r||!("shadowRoot"in r)?null:ve("Element",r,"shadowRoot")}function gc(r,e){return ve("Element",r,"querySelector")(e)}function yc(r,e){return ve("Element",r,"querySelectorAll")(e)}function bc(){return as("MutationObserver").constructor}function wc(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],s=t(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=s,()=>{r[e]=n;}}catch(n){return ()=>{}}}var Z={ownerDocument:oc,childNodes:ac,parentNode:lc,parentElement:cc,textContent:uc,contains:fc,getRootNode:hc,host:dc,styleSheets:pc,shadowRoot:mc,querySelector:gc,querySelectorAll:yc,mutationObserver:bc,patch:wc};function io(r){return r.nodeType===r.ELEMENT_NODE}function lt(r){let e=r&&"host"in r&&"mode"in r&&Z.host(r)||null;return !!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===r)}function ct(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}function vc(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}function Sc(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}function bn(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&(t=r.ownerNode.baseURI);let n=Array.from(e,s=>oo(s,t)).join("");return vc(n)}catch(e){return null}}function oo(r,e){if(Ec(r)){let t;try{t=bn(r.styleSheet)||Sc(r);}catch(n){t=r.cssText;}return r.styleSheet.href?gr(t,r.styleSheet.href):t}else {let t=r.cssText;return Ic(r)&&r.selectorText.includes(":")&&(t=Cc(t)),e?gr(t,e):t}}function Cc(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}function Ec(r){return "styleSheet"in r}function Ic(r){return "selectorText"in r}var dr=class{constructor(){ai(this,"idNodeMap",new Map),ai(this,"nodeMetaMap",new WeakMap);}getId(e){var t;if(!e)return -1;let n=(t=this.getMeta(e))==null?void 0:t.id;return n!=null?n:-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(n=>this.removeNodeFromMap(n));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t);}replace(e,t){let n=this.getNode(e);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(t,s);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function xc(){return new dr}function pr({element:r,maskInputOptions:e,tagName:t,type:n,value:s,maskInputFn:i}){let o=s||"",l=n&&Te(n);return (e[t.toLowerCase()]||l&&e[l])&&(i?o=i(o,r):o="*".repeat(o.length)),o}function Te(r){return r.toLowerCase()}var ui="__rrweb_original__";function Rc(r){let e=r.getContext("2d");if(!e)return true;let t=50;for(let n=0;n<r.width;n+=t)for(let s=0;s<r.height;s+=t){let i=e.getImageData,o=ui in i?i[ui]:i;if(new Uint32Array(o.call(e,n,s,Math.min(t,r.width-n),Math.min(t,r.height-s)).data.buffer).some(a=>a!==0))return false}return true}function mr(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?Te(e):null}function ao(r,e){var i;let t;try{t=new URL(r,e!=null?e:window.location.href);}catch(o){return null}let n=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(n);return (i=s==null?void 0:s[1])!=null?i:null}function Mc(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}var Ac=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tc=/^(?:[a-z+]+:)?\/\//i,Nc=/^www\..*/i,_c=/^(data:)([^,]*),(.*)/i;function gr(r,e){return (r||"").replace(Ac,(t,n,s,i,o,l)=>{let a=s||o||l,c=n||i||"";if(!a)return t;if(Tc.test(a)||Nc.test(a))return `url(${c}${a}${c})`;if(_c.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${Mc(e)+a}${c})`;let u=e.split("/"),f=a.split("/");u.pop();for(let h of f)h!=="."&&(h===".."?u.pop():u.push(h));return `url(${c}${u.join("/")}${c})`})}function Bt(r,e=false){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Oc(r,e,t=false){let n=Array.from(e.childNodes),s=[],i=0;if(n.length>1&&r&&typeof r=="string"){let o=Bt(r,t),l=o.length/r.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&typeof n[a].textContent=="string"){let c=Bt(n[a].textContent,t),u=100,f=3;for(;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){let h=c.substring(0,f),g=o.split(h),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&n[a-1].textContent!=="")m=o.indexOf(h,1);else if(g.length===1){if(h=h.substring(0,h.length-1),g=o.split(h),g.length<=1)return s.push(r),s;f=u+1;}else f===c.length-1&&(m=o.indexOf(h));if(g.length>=2&&f>u){let p=n[a-1].textContent;if(p&&typeof p=="string"){let d=Bt(p).length;m=o.indexOf(h,d);}m===-1&&(m=g[0].length);}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<r.length;){if(i+=1,i>50*n.length)return s.push(r),s;let d=Bt(r.substring(0,p),t);if(d.length===m){s.push(r.substring(0,p)),r=r.substring(p),o=o.substring(m);break}else d.length<m?p+=Math.max(1,Math.floor((m-d.length)/l)):p-=Math.max(1,Math.floor((d.length-m)*l));}break}}}}return s.push(r),s}function kc(r,e){return Oc(r,e).join("/* rr_split */")}var Dc=1,Lc=new RegExp("[^a-z0-9-_:]"),ft=-2;function lo(){return Dc++}function Pc(r){if(r instanceof HTMLFormElement)return "form";let e=Te(r.tagName);return Lc.test(e)?"div":e}var Fe,fi,$c=/^[^ \t\n\r\u000c]+/,Fc=/^[, \t\n\r\u000c]+/;function Bc(r,e){if(e.trim()==="")return e;let t=0;function n(i){let o,l=i.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let s=[];for(;n(Fc),!(t>=e.length);){let i=n($c);if(i.slice(-1)===",")i=We(r,i.substring(0,i.length-1)),s.push(i);else {let o="";i=We(r,i);let l=false;for(;;){let a=e.charAt(t);if(a===""){s.push((i+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,s.push((i+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return s.join(", ")}var hi=new WeakMap;function We(r,e){return !e||e.trim()===""?e:ls(r,e)}function Uc(r){return !!(r.tagName==="svg"||r.ownerSVGElement)}function ls(r,e){let t=hi.get(r);if(t||(t=r.createElement("a"),hi.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function co(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?We(r,n):t==="srcset"?Bc(r,n):t==="style"?gr(n,ls(r)):e==="object"&&t==="data"?We(r,n):n)}function uo(r,e,t){return ["video","audio"].includes(r)&&e==="autoplay"}function Wc(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return !0}else for(let n=r.classList.length;n--;){let s=r.classList[n];if(e.test(s))return !0}if(t)return r.matches(t)}catch(n){}return false}function yr(r,e,t){if(!r)return false;if(r.nodeType!==r.ELEMENT_NODE)return t?yr(Z.parentNode(r),e,t):false;for(let n=r.classList.length;n--;){let s=r.classList[n];if(e.test(s))return true}return t?yr(Z.parentNode(r),e,t):false}function fo(r,e,t,n){let s;if(io(r)){if(s=r,!Z.childNodes(s).length)return false}else {if(Z.parentElement(r)===null)return false;s=Z.parentElement(r);}try{if(typeof e=="string"){if(n){if(s.closest(`.${e}`))return !0}else if(s.classList.contains(e))return !0}else if(yr(s,e,n))return !0;if(t){if(n){if(s.closest(t))return !0}else if(s.matches(t))return !0}}catch(i){}return false}function Hc(r,e,t){let n=r.contentWindow;if(!n)return;let s=false,i;try{i=n.document.readyState;}catch(l){return}if(i!=="complete"){let l=setTimeout(()=>{s||(e(),s=true);},t);r.addEventListener("load",()=>{clearTimeout(l),s=true,e();});return}let o="about:blank";if(n.location.href!==o||r.src===o||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e);}function zc(r,e,t){let n=false,s;try{s=r.sheet;}catch(o){return}if(s)return;let i=setTimeout(()=>{n||(e(),n=true);},t);r.addEventListener("load",()=>{clearTimeout(i),n=true,e();});}function Vc(r,e){let{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:h,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p=false,cssCaptured:d=false}=e,y=Gc(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:r.compatMode}:{type:X.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return {type:X.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:y};case r.ELEMENT_NODE:return Yc(r,{doc:t,blockClass:s,blockSelector:i,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:h,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case r.TEXT_NODE:return jc(r,{doc:t,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:d});case r.CDATA_SECTION_NODE:return {type:X.CDATA,textContent:"",rootId:y};case r.COMMENT_NODE:return {type:X.Comment,textContent:Z.textContent(r)||"",rootId:y};default:return false}}function Gc(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}function jc(r,e){let{needsMask:t,maskTextFn:n,rootId:s,cssCaptured:i}=e,o=Z.parentNode(r),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":i||(a=Z.textContent(r),c&&a&&(a=gr(a,ls(e.doc)))),!c&&!u&&a&&t&&(a=n?n(a,Z.parentElement(r)):a.replace(/[\S]/g,"*")),{type:X.Text,textContent:a||"",rootId:s}}function Yc(r,e){let{doc:t,blockClass:n,blockSelector:s,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:h=false,rootId:g}=e,m=Wc(r,n,s),p=Pc(r),d={},y=r.attributes.length;for(let b=0;b<y;b++){let S=r.attributes[b];uo(p,S.name,S.value)||(d[S.name]=co(t,p,Te(S.name),S.value));}if(p==="link"&&i){let b=Array.from(t.styleSheets).find(E=>E.href===r.href),S=null;b&&(S=bn(b)),S&&(delete d.rel,delete d.href,d._cssText=S);}if(p==="style"&&r.sheet){let b=bn(r.sheet);b&&(r.childNodes.length>1&&(b=kc(b,r)),d._cssText=b);}if(["input","textarea","select"].includes(p)){let b=r.value,S=r.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&b?d.value=pr({element:r,type:mr(r),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):S&&(d.checked=S);}if(p==="option"&&(r.selected&&!o.select?d.selected=true:delete d.selected),p==="dialog"&&r.open&&(d.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&u){if(r.__context==="2d")Rc(r)||(d.rr_dataURL=r.toDataURL(a.type,a.quality));else if(!("__context"in r)){let b=r.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=r.width,S.height=r.height;let E=S.toDataURL(a.type,a.quality);b!==E&&(d.rr_dataURL=b);}}if(p==="img"&&c){Fe||(Fe=t.createElement("canvas"),fi=Fe.getContext("2d"));let b=r,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",E=b.crossOrigin,I=()=>{b.removeEventListener("load",I);try{Fe.width=b.naturalWidth,Fe.height=b.naturalHeight,fi.drawImage(b,0,0),d.rr_dataURL=Fe.toDataURL(a.type,a.quality);}catch(P){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${S}! Error: ${P}`);}b.crossOrigin==="anonymous"&&(E?d.crossOrigin=E:b.removeAttribute("crossorigin"));};b.complete&&b.naturalWidth!==0?I():b.addEventListener("load",I);}if(["audio","video"].includes(p)){let b=d;b.rr_mediaState=r.paused?"paused":"played",b.rr_mediaCurrentTime=r.currentTime,b.rr_mediaPlaybackRate=r.playbackRate,b.rr_mediaMuted=r.muted,b.rr_mediaLoop=r.loop,b.rr_mediaVolume=r.volume;}if(h||(r.scrollLeft&&(d.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(d.rr_scrollTop=r.scrollTop)),m){let{width:b,height:S}=r.getBoundingClientRect();d={class:d.class,rr_width:`${b}px`,rr_height:`${S}px`};}p==="iframe"&&!f(d.src)&&(r.contentDocument||(d.rr_src=d.src),delete d.src);let v;try{customElements.get(p)&&(v=!0);}catch(b){}return {type:X.Element,tagName:p,attributes:d,childNodes:[],isSVG:Uc(r)||void 0,needBlock:m,rootId:g,isCustom:v}}function L(r){return r==null?"":r.toLowerCase()}function ho(r){return r===true||r==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:r==="all",headMetaDescKeywords:r==="all",headTitleMutations:r==="all"}:r||{}}function Xc(r,e){if(e.comment&&r.type===X.Comment)return true;if(r.type===X.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ao(r.attributes.href)==="js"))return true;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(L(r.attributes.name).match(/^msapplication-tile(image|color)$/)||L(r.attributes.name)==="application-name"||L(r.attributes.rel)==="icon"||L(r.attributes.rel)==="apple-touch-icon"||L(r.attributes.rel)==="shortcut icon")))return true;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&L(r.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(r.attributes.property).match(/^(og|twitter|fb):/)||L(r.attributes.name).match(/^(og|twitter):/)||L(r.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(r.attributes.name)==="robots"||L(r.attributes.name)==="googlebot"||L(r.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(r.attributes.name)==="author"||L(r.attributes.name)==="generator"||L(r.attributes.name)==="framework"||L(r.attributes.name)==="publisher"||L(r.attributes.name)==="progid"||L(r.attributes.property).match(/^article:/)||L(r.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(r.attributes.name)==="google-site-verification"||L(r.attributes.name)==="yandex-verification"||L(r.attributes.name)==="csrf-token"||L(r.attributes.name)==="p:domain_verify"||L(r.attributes.name)==="verify-v1"||L(r.attributes.name)==="verification"||L(r.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function He(r,e){let{doc:t,mirror:n,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:c=true,maskInputOptions:u={},maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m={},inlineImages:p=false,recordCanvas:d=false,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:I=()=>false,newlyAddedElement:P=false,cssCaptured:T=false}=e,{needsMask:$}=e,{preserveWhiteSpace:F=true}=e;$||($=fo(r,o,l,$===void 0));let D=Vc(r,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:p,recordCanvas:d,keepIframeSrcFn:I,newlyAddedElement:P,cssCaptured:T});if(!D)return console.warn(r,"not serialized"),null;let K;n.hasNode(r)?K=n.getId(r):Xc(D,g)||!F&&D.type===X.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?K=ft:K=lo();let C=Object.assign(D,{id:K});if(n.add(r,C),K===ft)return null;y&&y(r);let te=!a;if(C.type===X.Element){te=te&&!C.needBlock,delete C.needBlock;let j=Z.shadowRoot(r);j&&ct(j)&&(C.isShadowHost=true);}if((C.type===X.Document||C.type===X.Element)&&te){g.headWhitespace&&C.type===X.Element&&C.tagName==="head"&&(F=false);let j={doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I,cssCaptured:false};if(!(C.type===X.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0)){C.type===X.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText=="string"&&(j.cssCaptured=true);for(let xe of Array.from(Z.childNodes(r))){let he=He(xe,j);he&&C.childNodes.push(he);}}let se=null;if(io(r)&&(se=Z.shadowRoot(r)))for(let xe of Array.from(Z.childNodes(se))){let he=He(xe,j);he&&(ct(se)&&(he.isShadow=true),C.childNodes.push(he));}}let Ie=Z.parentNode(r);return Ie&&lt(Ie)&&ct(Ie)&&(C.isShadow=true),C.type===X.Element&&C.tagName==="iframe"&&Hc(r,()=>{let j=r.contentDocument;if(j&&v){let se=He(j,{doc:j,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});se&&v(r,se);}},b),C.type===X.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&ao(C.attributes.href)==="css")&&zc(r,()=>{if(S){let j=He(r,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:$,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:h,slimDOMOptions:g,dataURLOptions:m,inlineImages:p,recordCanvas:d,preserveWhiteSpace:F,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:I});j&&S(r,j);}},E),C}function Zc(r,e){let{mirror:t=new dr,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:c=false,maskAllInputs:u=false,maskTextFn:f,maskInputFn:h,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>false}=e||{},I=u===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u===false?{password:true}:u,P=ho(g);return He(r,{doc:r,mirror:t,blockClass:n,blockSelector:s,maskTextClass:i,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:I,maskTextFn:f,maskInputFn:h,slimDOMOptions:P,dataURLOptions:m,inlineImages:a,recordCanvas:c,preserveWhiteSpace:p,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:false})}function Kc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function qc(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:true,get:function(){return r[n]}});}),t}var cs={exports:{}},B=String,po=function(){return {isColorSupported:false,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};cs.exports=po();cs.exports.createColors=po;var Qc=cs.exports,eu={},tu=Object.freeze(Object.defineProperty({__proto__:null,default:eu},Symbol.toStringTag,{value:"Module"})),ce=qc(tu),di=Qc,pi=ce,wn=class mo extends Error{constructor(e,t,n,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,mo);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=di.isColorSupported),pi&&e&&(t=pi(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=di.createColors(true);l=h=>c(f(h)),a=h=>u(h);}else l=a=c=>c;return n.slice(s,i).map((c,u)=>{let f=s+1+u,h=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(h.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(h)+c+`
3
+ `+g+l("^")}return " "+a(h)+c}).join(`
3
4
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
4
5
 
5
6
  `+e+`
6
- `),this.name+": "+this.message+e}},Hs=qr;qr.default=qr;var ft={};ft.isClean=Symbol("isClean");ft.my=Symbol("my");var Wn={after:`
7
+ `),this.name+": "+this.message+e}},us=wn;wn.default=wn;var St={};St.isClean=Symbol("isClean");St.my=Symbol("my");var mi={after:`
7
8
  `,beforeClose:`
8
9
  `,beforeComment:`
9
10
  `,beforeDecl:`
10
11
  `,beforeOpen:" ",beforeRule:`
11
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Jl(s){return s[0].toUpperCase()+s.slice(1)}var Qr=class{constructor(e){this.builder=e;}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else {let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,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 n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
12
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o;}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),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 n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||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"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e);}document(e){this.body(e);}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return Wn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Jl(r);this[l]?n=this[l](o,e):o.walk(a=>{if(n=a.raws[t],typeof n!="undefined")return false});}return typeof n=="undefined"&&(n=Wn[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
13
- `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
14
- `)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
15
- `)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?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!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
16
- `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before!="undefined"){let i=r.raws.before.split(`
17
- `);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),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!="undefined"))return false}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.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);}},Wi=Qr;Qr.default=Qr;var Kl=Wi;function es(s,e){new Kl(e).stringify(s);}var gr=es;es.default=es;var{isClean:Mt,my:ql}=ft,Ql=Hs,ec=Wi,tc=gr;function ts(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let n=s[r],i=typeof n;r==="parent"&&i==="object"?e&&(t[r]=e):r==="source"?t[r]=n:Array.isArray(n)?t[r]=n.map(o=>ts(o,t)):(i==="object"&&n!==null&&(n=ts(n)),t[r]=n);}return t}var rs=class{constructor(e={}){this.raws={},this[Mt]=false,this[ql]=true;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=ts(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:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Ql(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()),true}}}markDirty(){if(this[Mt]){this[Mt]=false;let e=this;for(;e=e.parent;)e[Mt]=false;}}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 n=t.indexOf(e.word);n!==-1&&(r=this.positionInside(n,t));}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
18
- `?(n=1,i+=1):n+=1;return {column:n,line:i}}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 n=this.toString(),i=n.indexOf(e.word);i!==-1&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n));}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 ec().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=false;for(let n of e)n===this?r=true:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);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={},n=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),r[o]={end:l.end,inputId:a,start:l.start};}else r[o]=l;}return n&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=tc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(t,n)}get proxyOf(){return this}},yr=rs;rs.default=rs;var rc=yr,ss=class extends rc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},br=ss;ss.default=ss;var sc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ic=(s=21)=>{let e="",t=s;for(;t--;)e+=sc[Math.random()*64|0];return e},oc={nanoid:ic},{SourceMapConsumer:zn,SourceMapGenerator:Hn}=ae,{existsSync:ac,readFileSync:lc}=ae,{dirname:Br,join:cc}=ae;function uc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var ns=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Br(this.mapFile)),n&&(this.text=n);}consumer(){return this.consumerCache||(this.consumerCache=new zn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return uc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false: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()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)));}loadFile(e){if(this.root=Br(e),ac(e))return this.mapFile=e,lc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else {if(t instanceof zn)return Hn.fromSourceMap(t).toString();if(t instanceof Hn)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=cc(Br(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},zi=ns;ns.default=ns;var{SourceMapConsumer:fc,SourceMapGenerator:hc}=ae,{fileURLToPath:Vn,pathToFileURL:Nt}=ae,{isAbsolute:is,resolve:os}=ae,{nanoid:dc}=oc,Ur=ae,Gn=Hs,pc=zi,Wr=Symbol("fromOffsetCache"),mc=!!(fc&&hc),jn=!!(os&&is),nr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||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=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!jn||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=os(t.from)),jn&&mc){let r=new pc(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n));}}this.file||(this.id="<input css "+dc(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,n={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?i=new Gn(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):i=new Gn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Nt&&(i.input.url=Nt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[Wr])r=this[Wr];else {let i=this.css.split(`
19
- `);r=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)r[l]=o,o+=i[l].length+1;this[Wr]=r;}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else {let i=r.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<r[o])i=o-1;else if(e>=r[o+1])n=o+1;else {n=o;break}}return {col:e-r[n]+1,line:n+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:os(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=i.originalPositionFor({column:n,line:r}));let a;is(o.source)?a=Nt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Nt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vn)c.file=Vn(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}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}},wr=nr;nr.default=nr;Ur&&Ur.registerInput&&Ur.registerInput(nr);var{SourceMapConsumer:Hi,SourceMapGenerator:Yt}=ae,{dirname:Xt,relative:Vi,resolve:Gi,sep:ji}=ae,{pathToFileURL:Yn}=ae,gc=wr,yc=!!(Hi&&Yt),bc=!!(Xt&&Gi&&Vi&&ji),wc=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,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=`
12
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function ru(r){return r[0].toUpperCase()+r.slice(1)}var vn=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else {let i=(e.raws.between||"")+(t?";":"");this.builder(n+s+i,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(n.includes(`
13
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==s||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e);}document(e){this.body(e);}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let i=e.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return mi[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+ru(n);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return false});}return typeof s=="undefined"&&(s=mi[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
14
+ `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
15
+ `)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
16
+ `)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
17
+ `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before!="undefined"){let i=n.raws.before.split(`
18
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}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);}},go=vn;vn.default=vn;var nu=go;function Sn(r,e){new nu(e).stringify(r);}var Nr=Sn;Sn.default=Sn;var{isClean:Ut,my:su}=St,iu=us,ou=go,au=Nr;function Cn(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let s=r[n],i=typeof s;n==="parent"&&i==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(o=>Cn(o,t)):(i==="object"&&s!==null&&(s=Cn(s)),t[n]=s);}return t}var En=class{constructor(e={}){this.raws={},this[Ut]=false,this[su]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}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=Cn(this);for(let n in e)t[n]=e[n];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:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new iu(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Ut]){this[Ut]=false;let e=this;for(;e=e.parent;)e[Ut]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t));}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
19
+ `?(s=1,i+=1):s+=1;return {column:s,line:i}}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},n=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 s=this.toString(),i=s.indexOf(e.word);i!==-1&&(t=this.positionInside(i,s),n=this.positionInside(i+e.word.length,s));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new ou().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,n=false;for(let s of e)s===this?n=true:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return s&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=au){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let s={node:this};for(let i in n)s[i]=n[i];return e.warn(t,s)}get proxyOf(){return this}},_r=En;En.default=En;var lu=_r,In=class extends lu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Or=In;In.default=In;var cu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",fu=(r=21)=>{let e="",t=r;for(;t--;)e+=cu[Math.random()*64|0];return e},hu={nanoid:fu},{SourceMapConsumer:gi,SourceMapGenerator:yi}=ce,{existsSync:du,readFileSync:pu}=ce,{dirname:on,join:mu}=ce;function gu(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var xn=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=on(this.mapFile)),s&&(this.text=s);}consumer(){return this.consumerCache||(this.consumerCache=new gi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(s.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return gu(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false: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 n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)));}loadFile(e){if(this.root=on(e),du(e))return this.mapFile=e,pu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else {if(t instanceof gi)return yi.fromSourceMap(t).toString();if(t instanceof yi)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 n=this.annotation;return e&&(n=mu(on(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},yo=xn;xn.default=xn;var{SourceMapConsumer:yu,SourceMapGenerator:bu}=ce,{fileURLToPath:bi,pathToFileURL:Wt}=ce,{isAbsolute:Rn,resolve:Mn}=ce,{nanoid:wu}=hu,an=ce,wi=us,vu=yo,ln=Symbol("fromOffsetCache"),Su=!!(yu&&bu),vi=!!(Mn&&Rn),br=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||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=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!vi||/^\w+:\/\//.test(t.from)||Rn(t.from)?this.file=t.from:this.file=Mn(t.from)),vi&&Su){let n=new vu(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s));}}this.file||(this.id="<input css "+wu(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,s={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?i=new wi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):i=new wi(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,s.plugin),i.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Wt&&(i.input.url=Wt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[ln])n=this[ln];else {let i=this.css.split(`
20
+ `);n=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)n[l]=o,o+=i[l].length+1;this[ln]=n;}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else {let i=n.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<n[o])i=o-1;else if(e>=n[o+1])s=o+1;else {s=o;break}}return {col:e-n[s]+1,line:s+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Mn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=i.originalPositionFor({column:s,line:n}));let a;Rn(o.source)?a=Wt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Wt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(bi)c.file=bi(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}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}},kr=br;br.default=br;an&&an.registerInput&&an.registerInput(br);var{SourceMapConsumer:bo,SourceMapGenerator:ar}=ce,{dirname:lr,relative:wo,resolve:vo,sep:So}=ce,{pathToFileURL:Si}=ce,Cu=kr,Eu=!!(bo&&ar),Iu=!!(lr&&vo&&wo&&So),xu=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.originalCSS=s,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=`
20
21
  `;this.css.includes(`\r
21
22
  `)&&(t=`\r
22
- `),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Xt(e.file),n;this.mapOpts.sourcesContent===false?(n=new Hi(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)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(),bc&&yc&&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=Yt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Yt({file:this.outputFile(),ignoreInvalidMapping:true}),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 Yt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(n.generated.line=e,n.generated.column=t-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
23
- `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}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?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(Gi(r,this.mapOpts.annotation)));let n=Vi(r,e);return this.memoizedPaths.set(e,n),n}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 gc(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]=true;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,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(Yn){let r=Yn(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;ji==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Yi=wc,vc=yr,as=class extends vc{constructor(e){super(e),this.type="comment";}},vr=as;as.default=as;var{isClean:Xi,my:Zi}=ft,Ji=br,Ki=vr,Sc=yr,qi,Vs,Gs,Qi;function eo(s){return s.map(e=>(e.nodes&&(e.nodes=eo(e.nodes)),delete e.source,e))}function to(s){if(s[Xi]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)to(e);}var pe=class ro extends Sc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n);}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,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==false);)this.indexes[t]+=1;return delete this.indexes[t],n}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(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):t==="every"||t==="some"?r=>e[t]((n,...i)=>r(n.toProxy(),...i)):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()),true}}}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),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=eo(qi(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ji(e)];}else if(e.selector)e=[new Vs(e)];else if(e.name)e=[new Gs(e)];else if(e.text)e=[new Ki(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Zi]||ro.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Xi]&&to(n),typeof n.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+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(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r);}catch(i){throw t.addToError(i)}return n!==false&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}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,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}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]}};pe.registerParse=s=>{qi=s;};pe.registerRule=s=>{Vs=s;};pe.registerAtRule=s=>{Gs=s;};pe.registerRoot=s=>{Qi=s;};var Me=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Gs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Vs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ji.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ki.prototype):s.type==="root"&&Object.setPrototypeOf(s,Qi.prototype),s[Zi]=true,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e);});};var Cc=Me,so,no,rt=class extends Cc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new so(new no,this,e).stringify()}};rt.registerLazyResult=s=>{so=s;};rt.registerProcessor=s=>{no=s;};var js=rt;rt.default=rt;var ls=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}},io=ls;ls.default=ls;var Ec=io,cs=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 Ec(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ys=cs;cs.default=cs;var zr=39,Xn=34,Rt=92,Zn=47,At=10,Ye=32,Tt=12,_t=9,Ot=13,Ic=91,xc=93,Mc=40,Nc=41,Rc=123,Ac=125,Tc=59,_c=42,Oc=58,kc=64,kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Dc=/.[\r\n"'(/\\]/,Jn=/[\da-f]/i,Lc=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,i,o,l,a,c,u,f,d,g,m,p=r.length,h=0,y=[],v=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return v.length===0&&h>=p}function I(A){if(v.length)return v.pop();if(h>=p)return;let $=A?A.ignoreUnclosed:false;switch(i=r.charCodeAt(h),i){case At:case Ye:case _t:case Ot:case Tt:{o=h;do o+=1,i=r.charCodeAt(o);while(i===Ye||i===At||i===_t||i===Ot||i===Tt);m=["space",r.slice(h,o)],h=o-1;break}case Ic:case xc:case Rc:case Ac:case Oc:case Tc:case Nc:{let F=String.fromCharCode(i);m=[F,F,h];break}case Mc:{if(d=y.length?y.pop()[1]:"",g=r.charCodeAt(h+1),d==="url"&&g!==zr&&g!==Xn&&g!==Ye&&g!==At&&g!==_t&&g!==Tt&&g!==Ot){o=h;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(n||$){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===Rt;)f-=1,u=!u;}while(u);m=["brackets",r.slice(h,o+1),h,o],h=o;}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Dc.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case zr:case Xn:{l=i===zr?"'":'"',o=h;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(n||$){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===Rt;)f-=1,u=!u;}while(u);m=["string",r.slice(h,o+1),h,o],h=o;break}case kc:{kt.lastIndex=h+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,m=["at-word",r.slice(h,o+1),h,o],h=o;break}case Rt:{for(o=h,c=true;r.charCodeAt(o+1)===Rt;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==Zn&&i!==Ye&&i!==At&&i!==_t&&i!==Ot&&i!==Tt&&(o+=1,Jn.test(r.charAt(o)))){for(;Jn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ye&&(o+=1);}m=["word",r.slice(h,o+1),h,o],h=o;break}default:{i===Zn&&r.charCodeAt(h+1)===_c?(o=r.indexOf("*/",h+2)+1,o===0&&(n||$?o=r.length:S("comment")),m=["comment",r.slice(h,o+1),h,o],h=o):(Dt.lastIndex=h+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,m=["word",r.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){v.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},oo=Me,ir=class extends oo{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)}},Xs=ir;ir.default=ir;oo.registerAtRule(ir);var ao=Me,lo,co,Be=class extends ao{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,r){let n=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 i of n)i.raws.before=t.raws.before;}return n}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 lo(new co,this,e).stringify()}};Be.registerLazyResult=s=>{lo=s;};Be.registerProcessor=s=>{co=s;};var ht=Be;Be.default=Be;ao.registerRoot(Be);var st={comma(s){return st.split(s,[","],true)},space(s){let e=[" ",`
24
- `," "];return st.split(s,e)},split(s,e,t){let r=[],n="",i=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(n!==""&&r.push(n.trim()),n="",i=false):n+=u;return (t||n!=="")&&r.push(n.trim()),r}},uo=st;st.default=st;var fo=Me,Pc=uo,or=class extends fo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Pc.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);}},Zs=or;or.default=or;fo.registerRule(or);var $c=br,Fc=Lc,Bc=vr,Uc=Xs,Wc=ht,Kn=Zs,qn={empty:true,space:true};function zc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var Hc=class{constructor(e){this.input=e,this.root=new Wc,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Uc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.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=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,n;for(let i=t-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,i;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!i)this.doubleColon(r);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r;}return false}comment(e){let t=new Bc;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 n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3];}}createTokenizer(){this.tokenizer=Fc(this.input);}decl(e,t){let r=new $c;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||zc(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 c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let d=c;d>0;d--){let g=u[d][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(r.important=true,r.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[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 Kn;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=false,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=false);}other(e){let t=false,r=null,n=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(l&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=true;break}else r===":"&&(n=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&n){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}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,n){let i,o,l=r.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)i=r[d],o=i[0],o==="space"&&d===l-1&&!n?c=false:o==="comment"?(f=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!qn[f]&&!qn[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let d=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new Kn;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 n=t;n<e.length;n++)r+=e[n][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})}},Vc=Hc,Gc=Me,jc=Vc,Yc=wr;function ar(s,e){let t=new Yc(s,e),r=new jc(t);try{r.parse();}catch(n){throw n}return r.root}var Js=ar;ar.default=ar;Gc.registerParse(ar);var{isClean:ue,my:Xc}=ft,Zc=Yi,Jc=gr,Kc=Me,qc=js;var Qn=Ys,Qc=Js,eu=ht,tu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ru={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},su={Once:true,postcssPlugin:true,prepare:true},Ue=0;function Xe(s){return typeof s=="object"&&typeof s.then=="function"}function ho(s){let e=false,t=tu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function ei(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=ho(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[ue]=false,s.nodes&&s.nodes.forEach(e=>us(e)),s}var fs={},We=class po{constructor(e,t,r){this.stringified=false,this.processed=false;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=us(t);else if(t instanceof po||t instanceof Qn)n=us(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let i=Qc;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(t,r);}catch(o){this.processed=true,this.error=o;}n&&!n[Xc]&&Kc.rebuild(n);}this.result=new Qn(e,n,r),this.helpers={...fs,postcss:fs,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion;}catch(n){console&&console.error&&console.error(n);}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n]);};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!ru[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!su[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);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(Xe(r))try{await r;}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=true;let t=[ei(e)];for(;t.length>0;){let r=this.visitTick(t);if(Xe(r))try{await r;}catch(n){let i=t[t.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n);}else await r(e,this.helpers);}catch(n){throw this.handleError(n)}}}return this.processed=true,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 Xe(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=true,this.sync();let e=this.result.opts,t=Jc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new Zc(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Xe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=true,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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(Xe(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[o,l]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=true,e.push(ei(l));return}t.iterator=0,delete r.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Ue){r.nodes&&r.nodes.length&&(r[ue]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[ue]=true;let t=ho(e);for(let r of t)if(r===Ue)e.nodes&&e.each(n=>{n[ue]||this.walkSync(n);});else {let n=this.listeners[r];if(n&&this.visitSync(n,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"}};We.registerPostcss=s=>{fs=s;};var mo=We;We.default=We;eu.registerLazyResult(We);qc.registerLazyResult(We);var nu=Yi,iu=gr;var ou=Js,au=Ys,hs=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n,i=iu;this.result=new au(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new nu(i,n,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.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 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=ou;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"}},lu=hs;hs.default=hs;var cu=lu,uu=mo,fu=js,hu=ht,nt=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===true?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)))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 cu(this,e,t):new uu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},du=nt;nt.default=nt;hu.registerProcessor(nt);fu.registerProcessor(nt);var pu=br,mu=zi,gu=vr,yu=Xs,bu=wr,wu=ht,vu=Zs;function it(s,e){if(Array.isArray(s))return s.map(n=>it(n));let{inputs:t,...r}=s;if(t){e=[];for(let n of t){let i={...n,__proto__:bu.prototype};i.map&&(i.map={...i.map,__proto__:mu.prototype}),e.push(i);}}if(r.nodes&&(r.nodes=s.nodes.map(n=>it(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n]);}if(r.type==="root")return new wu(r);if(r.type==="decl")return new pu(r);if(r.type==="rule")return new vu(r);if(r.type==="comment")return new gu(r);if(r.type==="atrule")return new yu(r);throw new Error("Unknown node type: "+s.type)}var Su=it;it.default=it;var Cu=Hs,go=br,Eu=mo,Iu=Me,Ks=du,xu=gr,Mu=Su,yo=js,Nu=io,bo=vr,wo=Xs,Ru=Ys,Au=wr,Tu=Js,_u=uo,vo=Zs,So=ht,Ou=yr;function _(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ks(s)}_.plugin=function(e,t){let r=false;function n(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
23
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||lr(e.file),s;this.mapOpts.sourcesContent===false?(s=new bo(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)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(),Iu&&Eu&&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:true});}else this.map=new ar({file:this.outputFile(),ignoreInvalidMapping:true}),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:true});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
24
+ `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}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 n=this.opts.to?lr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=lr(vo(n,this.mapOpts.annotation)));let s=wo(n,e);return this.memoizedPaths.set(e,s),s}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 Cu(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 n=t.source.input.from;if(n&&!e[n]){e[n]=true;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,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(Si){let n=Si(e).toString();return this.memoizedFileURLs.set(e,n),n}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;So==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Co=xu,Ru=_r,An=class extends Ru{constructor(e){super(e),this.type="comment";}},Dr=An;An.default=An;var{isClean:Eo,my:Io}=St,xo=Or,Ro=Dr,Mu=_r,Mo,fs,hs,Ao;function To(r){return r.map(e=>(e.nodes&&(e.nodes=To(e.nodes)),delete e.source,e))}function No(r){if(r[Eo]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)No(e);}var be=class _o extends Mu{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s);}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(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==false);)this.indexes[t]+=1;return delete this.indexes[t],s}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")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...i)=>n(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],n<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=To(Mo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xo(e)];}else if(e.selector)e=[new fs(e)];else if(e.name)e=[new hs(e)];else if(e.text)e=[new Ro(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Io]||_o.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Eo]&&No(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.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 n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n);}catch(i){throw t.addToError(i)}return s!==false&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}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]}};be.registerParse=r=>{Mo=r;};be.registerRule=r=>{fs=r;};be.registerAtRule=r=>{hs=r;};be.registerRoot=r=>{Ao=r;};var Ne=be;be.default=be;be.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,hs.prototype):r.type==="rule"?Object.setPrototypeOf(r,fs.prototype):r.type==="decl"?Object.setPrototypeOf(r,xo.prototype):r.type==="comment"?Object.setPrototypeOf(r,Ro.prototype):r.type==="root"&&Object.setPrototypeOf(r,Ao.prototype),r[Io]=true,r.nodes&&r.nodes.forEach(e=>{be.rebuild(e);});};var Au=Ne,Oo,ko,ht=class extends Au{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Oo(new ko,this,e).stringify()}};ht.registerLazyResult=r=>{Oo=r;};ht.registerProcessor=r=>{ko=r;};var ds=ht;ht.default=ht;var Tn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}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}},Do=Tn;Tn.default=Tn;var Tu=Do,Nn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new Tu(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ps=Nn;Nn.default=Nn;var cn=39,Ci=34,Ht=92,Ei=47,zt=10,nt=32,Vt=12,Gt=9,jt=13,Nu=91,_u=93,Ou=40,ku=41,Du=123,Lu=125,Pu=59,$u=42,Fu=58,Bu=64,Yt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Xt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uu=/.[\r\n"'(/\\]/,Ii=/[\da-f]/i,Wu=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,c,u,f,h,g,m,p=n.length,d=0,y=[],v=[];function b(){return d}function S(T){throw e.error("Unclosed "+T,d)}function E(){return v.length===0&&d>=p}function I(T){if(v.length)return v.pop();if(d>=p)return;let $=T?T.ignoreUnclosed:false;switch(i=n.charCodeAt(d),i){case zt:case nt:case Gt:case jt:case Vt:{o=d;do o+=1,i=n.charCodeAt(o);while(i===nt||i===zt||i===Gt||i===jt||i===Vt);m=["space",n.slice(d,o)],d=o-1;break}case Nu:case _u:case Du:case Lu:case Fu:case Pu:case ku:{let F=String.fromCharCode(i);m=[F,F,d];break}case Ou:{if(h=y.length?y.pop()[1]:"",g=n.charCodeAt(d+1),h==="url"&&g!==cn&&g!==Ci&&g!==nt&&g!==zt&&g!==Gt&&g!==Vt&&g!==jt){o=d;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(s||$){o=d;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===Ht;)f-=1,u=!u;}while(u);m=["brackets",n.slice(d,o+1),d,o],d=o;}else o=n.indexOf(")",d+1),a=n.slice(d,o+1),o===-1||Uu.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case cn:case Ci:{l=i===cn?"'":'"',o=d;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(s||$){o=d+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===Ht;)f-=1,u=!u;}while(u);m=["string",n.slice(d,o+1),d,o],d=o;break}case Bu:{Yt.lastIndex=d+1,Yt.test(n),Yt.lastIndex===0?o=n.length-1:o=Yt.lastIndex-2,m=["at-word",n.slice(d,o+1),d,o],d=o;break}case Ht:{for(o=d,c=true;n.charCodeAt(o+1)===Ht;)o+=1,c=!c;if(i=n.charCodeAt(o+1),c&&i!==Ei&&i!==nt&&i!==zt&&i!==Gt&&i!==jt&&i!==Vt&&(o+=1,Ii.test(n.charAt(o)))){for(;Ii.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===nt&&(o+=1);}m=["word",n.slice(d,o+1),d,o],d=o;break}default:{i===Ei&&n.charCodeAt(d+1)===$u?(o=n.indexOf("*/",d+2)+1,o===0&&(s||$?o=n.length:S("comment")),m=["comment",n.slice(d,o+1),d,o],d=o):(Xt.lastIndex=d+1,Xt.test(n),Xt.lastIndex===0?o=n.length-1:o=Xt.lastIndex-2,m=["word",n.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function P(T){v.push(T);}return {back:P,endOfFile:E,nextToken:I,position:b}},Lo=Ne,wr=class extends Lo{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)}},ms=wr;wr.default=wr;Lo.registerAtRule(wr);var Po=Ne,$o,Fo,Ve=class extends Po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of s)i.raws.before=t.raws.before;}return s}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new $o(new Fo,this,e).stringify()}};Ve.registerLazyResult=r=>{$o=r;};Ve.registerProcessor=r=>{Fo=r;};var Ct=Ve;Ve.default=Ve;Po.registerRoot(Ve);var dt={comma(r){return dt.split(r,[","],true)},space(r){let e=[" ",`
25
+ `," "];return dt.split(r,e)},split(r,e,t){let n=[],s="",i=false,o=0,l=false,a="",c=false;for(let u of r)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(s!==""&&n.push(s.trim()),s="",i=false):s+=u;return (t||s!=="")&&n.push(s.trim()),n}},Bo=dt;dt.default=dt;var Uo=Ne,Hu=Bo,vr=class extends Uo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Hu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},gs=vr;vr.default=vr;Uo.registerRule(vr);var zu=Or,Vu=Wu,Gu=Dr,ju=ms,Yu=Ct,xi=gs,Ri={empty:true,space:true};function Xu(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var Zu=class{constructor(e){this.input=e,this.root=new Yu,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new ju;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.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=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let n=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,i;for(let[o,l]of e.entries()){if(n=l,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!i)this.doubleColon(n);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=n;}return false}comment(e){let t=new Gu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3];}}createTokenizer(){this.tokenizer=Vu(this.input);}decl(e,t){let n=new zu;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Xu(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let h=c;h>0;h--){let g=u[h][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(n.important=true,n.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.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 xi;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=false,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=false);}other(e){let t=false,n=null,s=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(l&&s&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(s=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}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,n,s){let i,o,l=n.length,a="",c=true,u,f;for(let h=0;h<l;h+=1)i=n[h],o=i[0],o==="space"&&h===l-1&&!s?c=false:o==="comment"?(f=n[h-1]?n[h-1][0]:"empty",u=n[h+1]?n[h+1][0]:"empty",!Ri[f]&&!Ri[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let h=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:h,value:a};}e[t]=a;}rule(e){e.pop();let t=new xi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}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})}},Ju=Zu,Ku=Ne,qu=Ju,Qu=kr;function Sr(r,e){let t=new Qu(r,e),n=new qu(t);try{n.parse();}catch(s){throw s}return n.root}var ys=Sr;Sr.default=Sr;Ku.registerParse(Sr);var{isClean:pe,my:ef}=St,tf=Co,rf=Nr,nf=Ne,sf=ds;var Mi=ps,of=ys,af=Ct,lf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cf={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},uf={Once:true,postcssPlugin:true,prepare:true},Ge=0;function st(r){return typeof r=="object"&&typeof r.then=="function"}function Wo(r){let e=false,t=lf[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Ge,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Ge,t+"Exit"]:[t,t+"Exit"]}function Ai(r){let e;return r.type==="document"?e=["Document",Ge,"DocumentExit"]:r.type==="root"?e=["Root",Ge,"RootExit"]:e=Wo(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function _n(r){return r[pe]=false,r.nodes&&r.nodes.forEach(e=>_n(e)),r}var On={},je=class Ho{constructor(e,t,n){this.stringified=false,this.processed=false;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=_n(t);else if(t instanceof Ho||t instanceof Mi)s=_n(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let i=of;n.syntax&&(i=n.syntax.parse),n.parser&&(i=n.parser),i.parse&&(i=i.parse);try{s=i(t,n);}catch(o){this.processed=true,this.error=o;}s&&!s[ef]&&nf.rebuild(s);}this.result=new Mi(e,s,n),this.helpers={...On,postcss:On,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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 n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(s){console&&console.error&&console.error(s);}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!cf[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uf[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n]);}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],n=this.runOnRoot(t);if(st(n))try{await n;}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];){e[pe]=true;let t=[Ai(e)];for(;t.length>0;){let n=this.visitTick(t);if(st(n))try{await n;}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>n(i,this.helpers));await Promise.all(s);}else await n(e,this.helpers);}catch(s){throw this.handleError(s)}}}return this.processed=true,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(n=>e.Once(n,this.helpers));return st(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=true,this.sync();let e=this.result.opts,t=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new tf(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(st(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];)e[pe]=true,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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let i;try{i=s(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(st(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[pe]){l[pe]=true,e.push(Ai(l));return}t.iterator=0,delete n.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Ge){n.nodes&&n.nodes.length&&(n[pe]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[pe]=true;let t=Wo(e);for(let n of t)if(n===Ge)e.nodes&&e.each(s=>{s[pe]||this.walkSync(s);});else {let s=this.listeners[n];if(s&&this.visitSync(s,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"}};je.registerPostcss=r=>{On=r;};var zo=je;je.default=je;af.registerLazyResult(je);sf.registerLazyResult(je);var ff=Co,hf=Nr;var df=ys,pf=ps,kn=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,i=hf;this.result=new pf(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new ff(i,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.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 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=df;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},mf=kn;kn.default=kn;var gf=mf,yf=zo,bf=ds,wf=Ct,pt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new gf(this,e,t):new yf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},vf=pt;pt.default=pt;wf.registerProcessor(pt);bf.registerProcessor(pt);var Sf=Or,Cf=yo,Ef=Dr,If=ms,xf=kr,Rf=Ct,Mf=gs;function mt(r,e){if(Array.isArray(r))return r.map(s=>mt(s));let{inputs:t,...n}=r;if(t){e=[];for(let s of t){let i={...s,__proto__:xf.prototype};i.map&&(i.map={...i.map,__proto__:Cf.prototype}),e.push(i);}}if(n.nodes&&(n.nodes=r.nodes.map(s=>mt(s,e))),n.source){let{inputId:s,...i}=n.source;n.source=i,s!=null&&(n.source.input=e[s]);}if(n.type==="root")return new Rf(n);if(n.type==="decl")return new Sf(n);if(n.type==="rule")return new Mf(n);if(n.type==="comment")return new Ef(n);if(n.type==="atrule")return new If(n);throw new Error("Unknown node type: "+r.type)}var Af=mt;mt.default=mt;var Tf=us,Vo=Or,Nf=zo,_f=Ne,bs=vf,Of=Nr,kf=Af,Go=ds,Df=Do,jo=Dr,Yo=ms,Lf=ps,Pf=kr,$f=ys,Ff=Bo,Xo=gs,Zo=Ct,Bf=_r;function _(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new bs(r)}_.plugin=function(e,t){let n=false;function s(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
25
26
  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:
26
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ks().version,l}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,l,a){return _([n(a)]).process(o,l)},n};_.stringify=xu;_.parse=Tu;_.fromJSON=Mu;_.list=_u;_.comment=s=>new bo(s);_.atRule=s=>new wo(s);_.decl=s=>new go(s);_.rule=s=>new vo(s);_.root=s=>new So(s);_.document=s=>new yo(s);_.CssSyntaxError=Cu;_.Declaration=go;_.Container=Iu;_.Processor=Ks;_.Document=yo;_.Comment=bo;_.Warning=Nu;_.AtRule=wo;_.Result=Ru;_.Input=Au;_.Rule=vo;_.Root=So;_.Node=Ou;Eu.registerPostcss(_);var ku=_;_.default=_;var W=Gl(ku);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Du=Object.defineProperty,Lu=(s,e,t)=>e in s?Du(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,se=(s,e,t)=>Lu(s,typeof e!="symbol"?e+"":e,t);function Pu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function $u(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:true}),Object.keys(s).forEach(function(r){var n=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,n.get?n:{enumerable:true,get:function(){return s[r]}});}),t}var qs={exports:{}},U=String,Co=function(){return {isColorSupported:false,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};qs.exports=Co();qs.exports.createColors=Co;var Fu=qs.exports,Bu={},Uu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),le=$u(Uu),ti=Fu,ri=le,ds=class Eo extends Error{constructor(e,t,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(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,Eo);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=ti.isColorSupported),ri&&e&&(t=ri(t));let r=t.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=ti.createColors(true);l=d=>c(f(d)),a=d=>u(d);}else l=a=c=>c;return r.slice(n,i).map((c,u)=>{let f=n+1+u,d=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+c+`
27
- `+g+l("^")}return " "+a(d)+c}).join(`
27
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new bs().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return _([s(a)]).process(o,l)},s};_.stringify=Of;_.parse=$f;_.fromJSON=kf;_.list=Ff;_.comment=r=>new jo(r);_.atRule=r=>new Yo(r);_.decl=r=>new Vo(r);_.rule=r=>new Xo(r);_.root=r=>new Zo(r);_.document=r=>new Go(r);_.CssSyntaxError=Tf;_.Declaration=Vo;_.Container=_f;_.Processor=bs;_.Document=Go;_.Comment=jo;_.Warning=Df;_.AtRule=Yo;_.Result=Lf;_.Input=Pf;_.Rule=Xo;_.Root=Zo;_.Node=Bf;Nf.registerPostcss(_);var Uf=_;_.default=_;var W=Kc(Uf);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Wf=Object.defineProperty,Hf=(r,e,t)=>e in r?Wf(r,e,{enumerable:true,configurable:true,writable:true,value:t}):r[e]=t,ie=(r,e,t)=>Hf(r,typeof e!="symbol"?e+"":e,t);function zf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Vf(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype;}else t={};return Object.defineProperty(t,"__esModule",{value:true}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:true,get:function(){return r[n]}});}),t}var ws={exports:{}},U=String,Jo=function(){return {isColorSupported:false,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};ws.exports=Jo();ws.exports.createColors=Jo;var Gf=ws.exports,jf={},Yf=Object.freeze(Object.defineProperty({__proto__:null,default:jf},Symbol.toStringTag,{value:"Module"})),ue=Vf(Yf),Ti=Gf,Ni=ue,Dn=class Ko extends Error{constructor(e,t,n,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof n!="undefined"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ko);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(e){if(!this.source)return "";let t=this.source;e==null&&(e=Ti.isColorSupported),Ni&&e&&(t=Ni(t));let n=t.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),o=String(i).length,l,a;if(e){let{bold:c,gray:u,red:f}=Ti.createColors(true);l=h=>c(f(h)),a=h=>u(h);}else l=a=c=>c;return n.slice(s,i).map((c,u)=>{let f=s+1+u,h=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(h.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(h)+c+`
28
+ `+g+l("^")}return " "+a(h)+c}).join(`
28
29
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
29
30
 
30
31
  `+e+`
31
- `),this.name+": "+this.message+e}},Qs=ds;ds.default=ds;var dt={};dt.isClean=Symbol("isClean");dt.my=Symbol("my");var si={after:`
32
+ `),this.name+": "+this.message+e}},vs=Dn;Dn.default=Dn;var Et={};Et.isClean=Symbol("isClean");Et.my=Symbol("my");var _i={after:`
32
33
  `,beforeClose:`
33
34
  `,beforeComment:`
34
35
  `,beforeDecl:`
35
36
  `,beforeOpen:" ",beforeRule:`
36
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Wu(s){return s[0].toUpperCase()+s.slice(1)}var ps=class{constructor(e){this.builder=e;}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else {let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,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 n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
37
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)r+=o;}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),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 n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||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"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e);}document(e){this.body(e);}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return si[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Wu(r);this[l]?n=this[l](o,e):o.walk(a=>{if(n=a.raws[t],typeof n!="undefined")return false});}return typeof n=="undefined"&&(n=si[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
38
- `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
39
- `)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return r=n.raws.before,r.includes(`
40
- `)&&(r=r.replace(/[^\n]+$/,"")),false}),typeof r=="undefined"?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!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
41
- `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before!="undefined"){let i=r.raws.before.split(`
42
- `);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),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!="undefined"))return false}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.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);}},Io=ps;ps.default=ps;var zu=Io;function ms(s,e){new zu(e).stringify(s);}var Sr=ms;ms.default=ms;var{isClean:Lt,my:Hu}=dt,Vu=Qs,Gu=Io,ju=Sr;function gs(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let n=s[r],i=typeof n;r==="parent"&&i==="object"?e&&(t[r]=e):r==="source"?t[r]=n:Array.isArray(n)?t[r]=n.map(o=>gs(o,t)):(i==="object"&&n!==null&&(n=gs(n)),t[r]=n);}return t}var ys=class{constructor(e={}){this.raws={},this[Lt]=false,this[Hu]=true;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=gs(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:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Vu(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()),true}}}markDirty(){if(this[Lt]){this[Lt]=false;let e=this;for(;e=e.parent;)e[Lt]=false;}}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 n=t.indexOf(e.word);n!==-1&&(r=this.positionInside(n,t));}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
43
- `?(n=1,i+=1):n+=1;return {column:n,line:i}}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 n=this.toString(),i=n.indexOf(e.word);i!==-1&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n));}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 Gu().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=false;for(let n of e)n===this?r=true:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);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={},n=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),r[o]={end:l.end,inputId:a,start:l.start};}else r[o]=l;}return n&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ju){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(t,n)}get proxyOf(){return this}},Cr=ys;ys.default=ys;var Yu=Cr,bs=class extends Yu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Er=bs;bs.default=bs;var Xu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ju=(s=21)=>{let e="",t=s;for(;t--;)e+=Xu[Math.random()*64|0];return e},Ku={nanoid:Ju},{SourceMapConsumer:ni,SourceMapGenerator:ii}=le,{existsSync:qu,readFileSync:Qu}=le,{dirname:Hr,join:ef}=le;function tf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var ws=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Hr(this.mapFile)),n&&(this.text=n);}consumer(){return this.consumerCache||(this.consumerCache=new ni(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(n.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return tf(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false: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()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)));}loadFile(e){if(this.root=Hr(e),qu(e))return this.mapFile=e,Qu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else {if(t instanceof ni)return ii.fromSourceMap(t).toString();if(t instanceof ii)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=ef(Hr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},xo=ws;ws.default=ws;var{SourceMapConsumer:rf,SourceMapGenerator:sf}=le,{fileURLToPath:oi,pathToFileURL:Pt}=le,{isAbsolute:vs,resolve:Ss}=le,{nanoid:nf}=Ku,Vr=le,ai=Qs,of=xo,Gr=Symbol("fromOffsetCache"),af=!!(rf&&sf),li=!!(Ss&&vs),lr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||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=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!li||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=Ss(t.from)),li&&af){let r=new of(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n));}}this.file||(this.id="<input css "+nf(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,n={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?i=new ai(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):i=new ai(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Pt&&(i.input.url=Pt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[Gr])r=this[Gr];else {let i=this.css.split(`
44
- `);r=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)r[l]=o,o+=i[l].length+1;this[Gr]=r;}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else {let i=r.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<r[o])i=o-1;else if(e>=r[o+1])n=o+1;else {n=o;break}}return {col:e-r[n]+1,line:n+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Ss(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=i.originalPositionFor({column:n,line:r}));let a;vs(o.source)?a=Pt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Pt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(oi)c.file=oi(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}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}},Ir=lr;lr.default=lr;Vr&&Vr.registerInput&&Vr.registerInput(lr);var{SourceMapConsumer:Mo,SourceMapGenerator:Zt}=le,{dirname:Jt,relative:No,resolve:Ro,sep:Ao}=le,{pathToFileURL:ci}=le,lf=Ir,cf=!!(Mo&&Zt),uf=!!(Jt&&Ro&&No&&Ao),ff=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,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=`
37
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Xf(r){return r[0].toUpperCase()+r.slice(1)}var Ln=class{constructor(e){this.builder=e;}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else {let i=(e.raws.between||"")+(t?";":"");this.builder(n+s+i,e);}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(n.includes(`
38
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<i;l++)n+=o;}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end");}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==s||n);}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e);}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e);}document(e){this.body(e);}raw(e,t,n){let s;if(n||(n=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let i=e.parent;if(n==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return "";if(!i)return _i[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]!="undefined")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+Xf(n);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return false});}return typeof s=="undefined"&&(s=_i[n]),o.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after!="undefined")return t=n.raws.after,t.includes(`
39
+ `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
40
+ `)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return n=s.raws.before,n.includes(`
41
+ `)&&(n=n.replace(/[^\n]+$/,"")),false}),typeof n=="undefined"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t!="undefined"))return false}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before!="undefined")return t=n.raws.before,t.includes(`
42
+ `)&&(t=t.replace(/[^\n]+$/,"")),false}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between!="undefined")return t=n.raws.between.replace(/[^\s:]/g,""),false}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t!="undefined"))return false}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof n.raws.before!="undefined"){let i=n.raws.before.split(`
43
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),false}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t!="undefined"))return false}),t}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}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);}},qo=Ln;Ln.default=Ln;var Zf=qo;function Pn(r,e){new Zf(e).stringify(r);}var Lr=Pn;Pn.default=Pn;var{isClean:Zt,my:Jf}=Et,Kf=vs,qf=qo,Qf=Lr;function $n(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let s=r[n],i=typeof s;n==="parent"&&i==="object"?e&&(t[n]=e):n==="source"?t[n]=s:Array.isArray(s)?t[n]=s.map(o=>$n(o,t)):(i==="object"&&s!==null&&(s=$n(s)),t[n]=s);}return t}var Fn=class{constructor(e={}){this.raws={},this[Zt]=false,this[Jf]=true;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}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=$n(this);for(let n in e)t[n]=e[n];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:n,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},t)}return new Kf(e)}getProxyProcessor(){return {get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),true}}}markDirty(){if(this[Zt]){this[Zt]=false;let e=this;for(;e=e.parent;)e[Zt]=false;}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(n=this.positionInside(s,t));}return n}positionInside(e,t){let n=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;o<e;o++)n[o]===`
44
+ `?(s=1,i+=1):s+=1;return {column:s,line:i}}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},n=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 s=this.toString(),i=s.indexOf(e.word);i!==-1&&(t=this.positionInside(i,s),n=this.positionInside(i+e.word.length,s));}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return (n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,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,n=false;for(let s of e)s===this?n=true:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove();}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},s=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=i,t.set(l.input,i),i++),n[o]={end:l.end,inputId:a,start:l.start};}else n[o]=l;}return s&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Qf){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n;}),t}warn(e,t,n){let s={node:this};for(let i in n)s[i]=n[i];return e.warn(t,s)}get proxyOf(){return this}},Pr=Fn;Fn.default=Fn;var eh=Pr,Bn=class extends eh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},$r=Bn;Bn.default=Bn;var th="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nh=(r=21)=>{let e="",t=r;for(;t--;)e+=th[Math.random()*64|0];return e},sh={nanoid:nh},{SourceMapConsumer:Oi,SourceMapGenerator:ki}=ue,{existsSync:ih,readFileSync:oh}=ue,{dirname:un,join:ah}=ue;function lh(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}var Un=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=un(this.mapFile)),s&&(this.text=s);}consumer(){return this.consumerCache||(this.consumerCache=new Oi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(s.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return lh(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false: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 n=e.lastIndexOf(t.pop()),s=e.indexOf("*/",n);n>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,s)));}loadFile(e){if(this.root=un(e),ih(e))return this.mapFile=e,oh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let s=this.loadFile(n);if(!s)throw new Error("Unable to load previous source map: "+n.toString());return s}}else {if(t instanceof Oi)return ki.fromSourceMap(t).toString();if(t instanceof ki)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 n=this.annotation;return e&&(n=ah(un(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Qo=Un;Un.default=Un;var{SourceMapConsumer:ch,SourceMapGenerator:uh}=ue,{fileURLToPath:Di,pathToFileURL:Jt}=ue,{isAbsolute:Wn,resolve:Hn}=ue,{nanoid:fh}=sh,fn=ue,Li=vs,hh=Qo,hn=Symbol("fromOffsetCache"),dh=!!(ch&&uh),Pi=!!(Hn&&Wn),Cr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||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=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!Pi||/^\w+:\/\//.test(t.from)||Wn(t.from)?this.file=t.from:this.file=Hn(t.from)),Pi&&dh){let n=new hh(this.css,t);if(n.text){this.map=n;let s=n.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s));}}this.file||(this.id="<input css "+fh(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,n,s={}){let i,o,l;if(t&&typeof t=="object"){let c=t,u=n;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,n=f.col;}else t=c.line,n=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col;}else o=u.line,l=u.column;}else if(!n){let c=this.fromOffset(t);t=c.line,n=c.col;}let a=this.origin(t,n,o,l);return a?i=new Li(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):i=new Li(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,s.plugin),i.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Jt&&(i.input.url=Jt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,n;if(this[hn])n=this[hn];else {let i=this.css.split(`
45
+ `);n=new Array(i.length);let o=0;for(let l=0,a=i.length;l<a;l++)n[l]=o,o+=i[l].length+1;this[hn]=n;}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else {let i=n.length-2,o;for(;s<i;)if(o=s+(i-s>>1),e<n[o])i=o-1;else if(e>=n[o+1])s=o+1;else {s=o;break}}return {col:e-n[s]+1,line:s+1}}mapResolve(e){return /^\w+:\/\//.test(e)?e:Hn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,s){if(!this.map)return false;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof n=="number"&&(l=i.originalPositionFor({column:s,line:n}));let a;Wn(o.source)?a=Jt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Jt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Di)c.file=Di(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=i.sourceContentFor(o.source);return u&&(c.source=u),c}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}},Fr=Cr;Cr.default=Cr;fn&&fn.registerInput&&fn.registerInput(Cr);var{SourceMapConsumer:ea,SourceMapGenerator:cr}=ue,{dirname:ur,relative:ta,resolve:ra,sep:na}=ue,{pathToFileURL:$i}=ue,ph=Fr,mh=!!(ea&&cr),gh=!!(ur&&ra&&ta&&na),yh=class{constructor(e,t,n,s){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=s,this.originalCSS=s,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=`
45
46
  `;this.css.includes(`\r
46
47
  `)&&(t=`\r
47
- `),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Jt(e.file),n;this.mapOpts.sourcesContent===false?(n=new Mo(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)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(),uf&&cf&&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=Zt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Zt({file:this.outputFile(),ignoreInvalidMapping:true}),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 Zt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(n.generated.line=e,n.generated.column=t-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
48
- `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}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?Jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Jt(Ro(r,this.mapOpts.annotation)));let n=No(r,e);return this.memoizedPaths.set(e,n),n}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 lf(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]=true;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,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(ci){let r=ci(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;Ao==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},To=ff,hf=Cr,Cs=class extends hf{constructor(e){super(e),this.type="comment";}},xr=Cs;Cs.default=Cs;var{isClean:_o,my:Oo}=dt,ko=Er,Do=xr,df=Cr,Lo,en,tn,Po;function $o(s){return s.map(e=>(e.nodes&&(e.nodes=$o(e.nodes)),delete e.source,e))}function Fo(s){if(s[_o]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Fo(e);}var me=class Bo extends df{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n);}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,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==false);)this.indexes[t]+=1;return delete this.indexes[t],n}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(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):t==="every"||t==="some"?r=>e[t]((n,...i)=>r(n.toProxy(),...i)):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()),true}}}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),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=$o(Lo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ko(e)];}else if(e.selector)e=[new en(e)];else if(e.name)e=[new tn(e)];else if(e.text)e=[new Do(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Oo]||Bo.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[_o]&&Fo(n),typeof n.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+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(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r);}catch(i){throw t.addToError(i)}return n!==false&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}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,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}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]}};me.registerParse=s=>{Lo=s;};me.registerRule=s=>{en=s;};me.registerAtRule=s=>{tn=s;};me.registerRoot=s=>{Po=s;};var Ne=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,tn.prototype):s.type==="rule"?Object.setPrototypeOf(s,en.prototype):s.type==="decl"?Object.setPrototypeOf(s,ko.prototype):s.type==="comment"?Object.setPrototypeOf(s,Do.prototype):s.type==="root"&&Object.setPrototypeOf(s,Po.prototype),s[Oo]=true,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e);});};var pf=Ne,Uo,Wo,ot=class extends pf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Uo(new Wo,this,e).stringify()}};ot.registerLazyResult=s=>{Uo=s;};ot.registerProcessor=s=>{Wo=s;};var rn=ot;ot.default=ot;var Es=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}},zo=Es;Es.default=Es;var mf=zo,Is=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 mf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},sn=Is;Is.default=Is;var jr=39,ui=34,$t=92,fi=47,Ft=10,Ze=32,Bt=12,Ut=9,Wt=13,gf=91,yf=93,bf=40,wf=41,vf=123,Sf=125,Cf=59,Ef=42,If=58,xf=64,zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ht=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Mf=/.[\r\n"'(/\\]/,hi=/[\da-f]/i,Nf=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,i,o,l,a,c,u,f,d,g,m,p=r.length,h=0,y=[],v=[];function b(){return h}function S(A){throw e.error("Unclosed "+A,h)}function E(){return v.length===0&&h>=p}function I(A){if(v.length)return v.pop();if(h>=p)return;let $=A?A.ignoreUnclosed:false;switch(i=r.charCodeAt(h),i){case Ft:case Ze:case Ut:case Wt:case Bt:{o=h;do o+=1,i=r.charCodeAt(o);while(i===Ze||i===Ft||i===Ut||i===Wt||i===Bt);m=["space",r.slice(h,o)],h=o-1;break}case gf:case yf:case vf:case Sf:case If:case Cf:case wf:{let F=String.fromCharCode(i);m=[F,F,h];break}case bf:{if(d=y.length?y.pop()[1]:"",g=r.charCodeAt(h+1),d==="url"&&g!==jr&&g!==ui&&g!==Ze&&g!==Ft&&g!==Ut&&g!==Bt&&g!==Wt){o=h;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(n||$){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u;}while(u);m=["brackets",r.slice(h,o+1),h,o],h=o;}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||Mf.test(a)?m=["(","(",h]:(m=["brackets",a,h,o],h=o);break}case jr:case ui:{l=i===jr?"'":'"',o=h;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(n||$){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u;}while(u);m=["string",r.slice(h,o+1),h,o],h=o;break}case xf:{zt.lastIndex=h+1,zt.test(r),zt.lastIndex===0?o=r.length-1:o=zt.lastIndex-2,m=["at-word",r.slice(h,o+1),h,o],h=o;break}case $t:{for(o=h,c=true;r.charCodeAt(o+1)===$t;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==fi&&i!==Ze&&i!==Ft&&i!==Ut&&i!==Wt&&i!==Bt&&(o+=1,hi.test(r.charAt(o)))){for(;hi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1);}m=["word",r.slice(h,o+1),h,o],h=o;break}default:{i===fi&&r.charCodeAt(h+1)===Ef?(o=r.indexOf("*/",h+2)+1,o===0&&(n||$?o=r.length:S("comment")),m=["comment",r.slice(h,o+1),h,o],h=o):(Ht.lastIndex=h+1,Ht.test(r),Ht.lastIndex===0?o=r.length-1:o=Ht.lastIndex-2,m=["word",r.slice(h,o+1),h,o],y.push(m),h=o);break}}return h++,m}function P(A){v.push(A);}return {back:P,endOfFile:E,nextToken:I,position:b}},Ho=Ne,cr=class extends Ho{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)}},nn=cr;cr.default=cr;Ho.registerAtRule(cr);var Vo=Ne,Go,jo,ze=class extends Vo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,r){let n=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 i of n)i.raws.before=t.raws.before;}return n}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 Go(new jo,this,e).stringify()}};ze.registerLazyResult=s=>{Go=s;};ze.registerProcessor=s=>{jo=s;};var pt=ze;ze.default=ze;Vo.registerRoot(ze);var at={comma(s){return at.split(s,[","],true)},space(s){let e=[" ",`
49
- `," "];return at.split(s,e)},split(s,e,t){let r=[],n="",i=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(n!==""&&r.push(n.trim()),n="",i=false):n+=u;return (t||n!=="")&&r.push(n.trim()),r}},Yo=at;at.default=at;var Xo=Ne,Rf=Yo,ur=class extends Xo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Rf.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);}},on=ur;ur.default=ur;Xo.registerRule(ur);var Af=Er,Tf=Nf,_f=xr,Of=nn,kf=pt,di=on,pi={empty:true,space:true};function Df(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var Lf=class{constructor(e){this.input=e,this.root=new kf,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Of;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.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=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,n;for(let i=t-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,i;for(let[o,l]of e.entries()){if(r=l,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!i)this.doubleColon(r);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r;}return false}comment(e){let t=new _f;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 n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3];}}createTokenizer(){this.tokenizer=Tf(this.input);}decl(e,t){let r=new Af;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Df(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 c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let d=c;d>0;d--){let g=u[d][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(r.important=true,r.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[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 di;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=false,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=false);}other(e){let t=false,r=null,n=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(l&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=true;break}else r===":"&&(n=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&n){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}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,n){let i,o,l=r.length,a="",c=true,u,f;for(let d=0;d<l;d+=1)i=r[d],o=i[0],o==="space"&&d===l-1&&!n?c=false:o==="comment"?(f=r[d-1]?r[d-1][0]:"empty",u=r[d+1]?r[d+1][0]:"empty",!pi[f]&&!pi[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let d=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:d,value:a};}e[t]=a;}rule(e){e.pop();let t=new di;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 n=t;n<e.length;n++)r+=e[n][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})}},Pf=Lf,$f=Ne,Ff=Pf,Bf=Ir;function fr(s,e){let t=new Bf(s,e),r=new Ff(t);try{r.parse();}catch(n){throw n}return r.root}var an=fr;fr.default=fr;$f.registerParse(fr);var{isClean:fe,my:Uf}=dt,Wf=To,zf=Sr,Hf=Ne,Vf=rn;var mi=sn,Gf=an,jf=pt,Yf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xf={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},Zf={Once:true,postcssPlugin:true,prepare:true},He=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Zo(s){let e=false,t=Yf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,He,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,He,t+"Exit"]:[t,t+"Exit"]}function gi(s){let e;return s.type==="document"?e=["Document",He,"DocumentExit"]:s.type==="root"?e=["Root",He,"RootExit"]:e=Zo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[fe]=false,s.nodes&&s.nodes.forEach(e=>xs(e)),s}var Ms={},Ve=class Jo{constructor(e,t,r){this.stringified=false,this.processed=false;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=xs(t);else if(t instanceof Jo||t instanceof mi)n=xs(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let i=Gf;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(t,r);}catch(o){this.processed=true,this.error=o;}n&&!n[Uf]&&Hf.rebuild(n);}this.result=new mi(e,n,r),this.helpers={...Ms,postcss:Ms,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion;}catch(n){console&&console.error&&console.error(n);}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n]);};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Xf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Zf[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);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(Je(r))try{await r;}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=true;let t=[gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r;}catch(n){let i=t[t.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n);}else await r(e,this.helpers);}catch(n){throw this.handleError(n)}}}return this.processed=true,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 Je(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=true,this.sync();let e=this.result.opts,t=zf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new Wf(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=true,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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(Je(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[o,l]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=true,e.push(gi(l));return}t.iterator=0,delete r.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===He){r.nodes&&r.nodes.length&&(r[fe]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[fe]=true;let t=Zo(e);for(let r of t)if(r===He)e.nodes&&e.each(n=>{n[fe]||this.walkSync(n);});else {let n=this.listeners[r];if(n&&this.visitSync(n,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"}};Ve.registerPostcss=s=>{Ms=s;};var Ko=Ve;Ve.default=Ve;jf.registerLazyResult(Ve);Vf.registerLazyResult(Ve);var Jf=To,Kf=Sr;var qf=an,Qf=sn,Ns=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n,i=Kf;this.result=new Qf(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Jf(i,n,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.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 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=qf;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"}},eh=Ns;Ns.default=Ns;var th=eh,rh=Ko,sh=rn,nh=pt,lt=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===true?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)))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 th(this,e,t):new rh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ih=lt;lt.default=lt;nh.registerProcessor(lt);sh.registerProcessor(lt);var oh=Er,ah=xo,lh=xr,ch=nn,uh=Ir,fh=pt,hh=on;function ct(s,e){if(Array.isArray(s))return s.map(n=>ct(n));let{inputs:t,...r}=s;if(t){e=[];for(let n of t){let i={...n,__proto__:uh.prototype};i.map&&(i.map={...i.map,__proto__:ah.prototype}),e.push(i);}}if(r.nodes&&(r.nodes=s.nodes.map(n=>ct(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n]);}if(r.type==="root")return new fh(r);if(r.type==="decl")return new oh(r);if(r.type==="rule")return new hh(r);if(r.type==="comment")return new lh(r);if(r.type==="atrule")return new ch(r);throw new Error("Unknown node type: "+s.type)}var dh=ct;ct.default=ct;var ph=Qs,qo=Er,mh=Ko,gh=Ne,ln=ih,yh=Sr,bh=dh,Qo=rn,wh=zo,ea=xr,ta=nn,vh=sn,Sh=Ir,Ch=an,Eh=Yo,ra=on,sa=pt,Ih=Cr;function O(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ln(s)}O.plugin=function(e,t){let r=false;function n(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
48
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */";}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||ur(e.file),s;this.mapOpts.sourcesContent===false?(s=new ea(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(n)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)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(),gh&&mh&&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=cr.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new cr({file:this.outputFile(),ignoreInvalidMapping:true}),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 cr({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),i=l.match(/\n/g),i?(e+=i.length,o=l.lastIndexOf(`
49
+ `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}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 n=this.opts.to?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ur(ra(n,this.mapOpts.annotation)));let s=ta(n,e);return this.memoizedPaths.set(e,s),s}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 ph(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 n=t.source.input.from;if(n&&!e[n]){e[n]=true;let s=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(s,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($i){let n=$i(e).toString();return this.memoizedFileURLs.set(e,n),n}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;na==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},sa=yh,bh=Pr,zn=class extends bh{constructor(e){super(e),this.type="comment";}},Br=zn;zn.default=zn;var{isClean:ia,my:oa}=Et,aa=$r,la=Br,wh=Pr,ca,Ss,Cs,ua;function fa(r){return r.map(e=>(e.nodes&&(e.nodes=fa(e.nodes)),delete e.source,e))}function ha(r){if(r[ia]=false,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)ha(e);}var we=class da extends wh{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let s of n)this.proxyOf.nodes.push(s);}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(),n,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],s=e(this.proxyOf.nodes[n],n),s!==false);)this.indexes[t]+=1;return delete this.indexes[t],s}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")?(...n)=>e[t](...n.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):t==="every"||t==="some"?n=>e[t]((s,...i)=>n(s.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),true}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of s)this.proxyOf.nodes.splice(n+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],n<i&&(this.indexes[o]=i+s.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),s=n===0?"prepend":false,i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fa(ca(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore");}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new aa(e)];}else if(e.selector)e=[new Ss(e)];else if(e.name)e=[new Cs(e)];else if(e.text)e=[new la(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[oa]||da.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[ia]&&ha(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let s of n)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+n.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 n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n));}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let s;try{s=e(t,n);}catch(i){throw t.addToError(i)}return s!==false&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,s)}):this.walk((n,s)=>{if(n.type==="atrule"&&n.name===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="atrule")return t(n,s)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,s)}):this.walk((n,s)=>{if(n.type==="decl"&&n.prop===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="decl")return t(n,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,s)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,s)}):this.walk((n,s)=>{if(n.type==="rule"&&n.selector===e)return t(n,s)}):(t=e,this.walk((n,s)=>{if(n.type==="rule")return t(n,s)}))}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]}};we.registerParse=r=>{ca=r;};we.registerRule=r=>{Ss=r;};we.registerAtRule=r=>{Cs=r;};we.registerRoot=r=>{ua=r;};var _e=we;we.default=we;we.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Cs.prototype):r.type==="rule"?Object.setPrototypeOf(r,Ss.prototype):r.type==="decl"?Object.setPrototypeOf(r,aa.prototype):r.type==="comment"?Object.setPrototypeOf(r,la.prototype):r.type==="root"&&Object.setPrototypeOf(r,ua.prototype),r[oa]=true,r.nodes&&r.nodes.forEach(e=>{we.rebuild(e);});};var vh=_e,pa,ma,gt=class extends vh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new pa(new ma,this,e).stringify()}};gt.registerLazyResult=r=>{pa=r;};gt.registerProcessor=r=>{ma=r;};var Es=gt;gt.default=gt;var Vn=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column;}for(let n in t)this[n]=t[n];}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}},ga=Vn;Vn.default=Vn;var Sh=ga,Gn=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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 n=new Sh(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Is=Gn;Gn.default=Gn;var dn=39,Fi=34,Kt=92,Bi=47,qt=10,it=32,Qt=12,er=9,tr=13,Ch=91,Eh=93,Ih=40,xh=41,Rh=123,Mh=125,Ah=59,Th=42,Nh=58,_h=64,rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Oh=/.[\r\n"'(/\\]/,Ui=/[\da-f]/i,kh=function(e,t={}){let n=e.css.valueOf(),s=t.ignoreErrors,i,o,l,a,c,u,f,h,g,m,p=n.length,d=0,y=[],v=[];function b(){return d}function S(T){throw e.error("Unclosed "+T,d)}function E(){return v.length===0&&d>=p}function I(T){if(v.length)return v.pop();if(d>=p)return;let $=T?T.ignoreUnclosed:false;switch(i=n.charCodeAt(d),i){case qt:case it:case er:case tr:case Qt:{o=d;do o+=1,i=n.charCodeAt(o);while(i===it||i===qt||i===er||i===tr||i===Qt);m=["space",n.slice(d,o)],d=o-1;break}case Ch:case Eh:case Rh:case Mh:case Nh:case Ah:case xh:{let F=String.fromCharCode(i);m=[F,F,d];break}case Ih:{if(h=y.length?y.pop()[1]:"",g=n.charCodeAt(d+1),h==="url"&&g!==dn&&g!==Fi&&g!==it&&g!==qt&&g!==er&&g!==Qt&&g!==tr){o=d;do{if(u=false,o=n.indexOf(")",o+1),o===-1)if(s||$){o=d;break}else S("bracket");for(f=o;n.charCodeAt(f-1)===Kt;)f-=1,u=!u;}while(u);m=["brackets",n.slice(d,o+1),d,o],d=o;}else o=n.indexOf(")",d+1),a=n.slice(d,o+1),o===-1||Oh.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case dn:case Fi:{l=i===dn?"'":'"',o=d;do{if(u=false,o=n.indexOf(l,o+1),o===-1)if(s||$){o=d+1;break}else S("string");for(f=o;n.charCodeAt(f-1)===Kt;)f-=1,u=!u;}while(u);m=["string",n.slice(d,o+1),d,o],d=o;break}case _h:{rr.lastIndex=d+1,rr.test(n),rr.lastIndex===0?o=n.length-1:o=rr.lastIndex-2,m=["at-word",n.slice(d,o+1),d,o],d=o;break}case Kt:{for(o=d,c=true;n.charCodeAt(o+1)===Kt;)o+=1,c=!c;if(i=n.charCodeAt(o+1),c&&i!==Bi&&i!==it&&i!==qt&&i!==er&&i!==tr&&i!==Qt&&(o+=1,Ui.test(n.charAt(o)))){for(;Ui.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===it&&(o+=1);}m=["word",n.slice(d,o+1),d,o],d=o;break}default:{i===Bi&&n.charCodeAt(d+1)===Th?(o=n.indexOf("*/",d+2)+1,o===0&&(s||$?o=n.length:S("comment")),m=["comment",n.slice(d,o+1),d,o],d=o):(nr.lastIndex=d+1,nr.test(n),nr.lastIndex===0?o=n.length-1:o=nr.lastIndex-2,m=["word",n.slice(d,o+1),d,o],y.push(m),d=o);break}}return d++,m}function P(T){v.push(T);}return {back:P,endOfFile:E,nextToken:I,position:b}},ya=_e,Er=class extends ya{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)}},xs=Er;Er.default=Er;ya.registerAtRule(Er);var ba=_e,wa,va,Ye=class extends ba{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[]);}normalize(e,t,n){let s=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of s)i.raws.before=t.raws.before;}return s}removeChild(e,t){let n=this.index(e);return !t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new wa(new va,this,e).stringify()}};Ye.registerLazyResult=r=>{wa=r;};Ye.registerProcessor=r=>{va=r;};var It=Ye;Ye.default=Ye;ba.registerRoot(Ye);var yt={comma(r){return yt.split(r,[","],true)},space(r){let e=[" ",`
50
+ `," "];return yt.split(r,e)},split(r,e,t){let n=[],s="",i=false,o=0,l=false,a="",c=false;for(let u of r)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(i=true),i?(s!==""&&n.push(s.trim()),s="",i=false):s+=u;return (t||s!=="")&&n.push(s.trim()),n}},Sa=yt;yt.default=yt;var Ca=_e,Dh=Sa,Ir=class extends Ca{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Dh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n);}},Rs=Ir;Ir.default=Ir;Ca.registerRule(Ir);var Lh=$r,Ph=kh,$h=Br,Fh=xs,Bh=It,Wi=Rs,Hi={empty:true,space:true};function Uh(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}var Wh=class{constructor(e){this.input=e,this.root=new Bh,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new Fh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,s,i,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?c.push(n==="("?")":"]"):n==="{"&&c.length>0?c.push("}"):n===c[c.length-1]&&c.pop(),c.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(n==="{"){l=true;break}else if(n==="}"){if(a.length>0){for(i=a.length-1,s=a[i];s&&s[0]==="space";)s=a[--i];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++);}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.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=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let n=0,s;for(let i=t-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(n+=1,n===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,n,s,i;for(let[o,l]of e.entries()){if(n=l,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!i)this.doubleColon(n);else {if(i[0]==="word"&&i[1]==="progid")continue;return o}i=n;}return false}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 n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else {let s=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3];}}createTokenizer(){this.tokenizer=Ph(this.input);}decl(e,t){let n=new Lh;this.init(n,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=true,e.pop()),n.source.end=this.getPosition(s[3]||s[2]||Uh(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;n.prop+=e.shift()[1];}n.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){n.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){n.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(n.raws.important=u);break}else if(i[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let h=c;h>0;h--){let g=u[h][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f;}f.trim().indexOf("!")===0&&(n.important=true,n.raws.important=f,e=u);}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(n.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.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 Wi;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=false,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=false);}other(e){let t=false,n=null,s=false,i=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(n=c[0],a.push(c),n==="("||n==="[")i||(i=c),o.push(n==="("?")":"]");else if(l&&s&&n==="{")i||(i=c),o.push("}");else if(o.length===0)if(n===";")if(s){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=true;break}else n===":"&&(s=true);else n===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(i),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}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,n,s){let i,o,l=n.length,a="",c=true,u,f;for(let h=0;h<l;h+=1)i=n[h],o=i[0],o==="space"&&h===l-1&&!s?c=false:o==="comment"?(f=n[h-1]?n[h-1][0]:"empty",u=n[h+1]?n[h+1][0]:"empty",!Hi[f]&&!Hi[u]?a.slice(-1)===","?c=false:a+=i[1]:c=false):a+=i[1];if(!c){let h=n.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:h,value:a};}e[t]=a;}rule(e){e.pop();let t=new Wi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}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})}},Hh=Wh,zh=_e,Vh=Hh,Gh=Fr;function xr(r,e){let t=new Gh(r,e),n=new Vh(t);try{n.parse();}catch(s){throw s}return n.root}var Ms=xr;xr.default=xr;zh.registerParse(xr);var{isClean:me,my:jh}=Et,Yh=sa,Xh=Lr,Zh=_e,Jh=Es;var zi=Is,Kh=Ms,qh=It,Qh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ed={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},td={Once:true,postcssPlugin:true,prepare:true},Xe=0;function ot(r){return typeof r=="object"&&typeof r.then=="function"}function Ea(r){let e=false,t=Qh[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function Vi(r){let e;return r.type==="document"?e=["Document",Xe,"DocumentExit"]:r.type==="root"?e=["Root",Xe,"RootExit"]:e=Ea(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function jn(r){return r[me]=false,r.nodes&&r.nodes.forEach(e=>jn(e)),r}var Yn={},Ze=class Ia{constructor(e,t,n){this.stringified=false,this.processed=false;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=jn(t);else if(t instanceof Ia||t instanceof zi)s=jn(t.root),t.map&&(typeof n.map=="undefined"&&(n.map={}),n.map.inline||(n.map.inline=false),n.map.prev=t.map);else {let i=Kh;n.syntax&&(i=n.syntax.parse),n.parser&&(i=n.parser),i.parse&&(i=i.parse);try{s=i(t,n);}catch(o){this.processed=true,this.error=o;}s&&!s[jh]&&Zh.rebuild(s);}this.result=new zi(e,s,n),this.helpers={...Yn,postcss:Yn,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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 n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion;}catch(s){console&&console.error&&console.error(s);}return e}prepareVisitors(){this.listeners={};let e=(t,n,s)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,s]);};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!ed[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!td[n])if(typeof t[n]=="object")for(let s in t[n])s==="*"?e(t,n,t[n][s]):e(t,n+"-"+s.toLowerCase(),t[n][s]);else typeof t[n]=="function"&&e(t,n,t[n]);}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],n=this.runOnRoot(t);if(ot(n))try{await n;}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=true;let t=[Vi(e)];for(;t.length>0;){let n=this.visitTick(t);if(ot(n))try{await n;}catch(s){let i=t[t.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(i=>n(i,this.helpers));await Promise.all(s);}else await n(e,this.helpers);}catch(s){throw this.handleError(s)}}}return this.processed=true,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(n=>e.Once(n,this.helpers));return ot(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=true,this.sync();let e=this.result.opts,t=Xh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Yh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=true,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 this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){this.result.lastPlugin=n;let i;try{i=s(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(ot(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[me]){l[me]=true,e.push(Vi(l));return}t.iterator=0,delete n.indexes[o];}let i=t.events;for(;t.eventIndex<i.length;){let o=i[t.eventIndex];if(t.eventIndex+=1,o===Xe){n.nodes&&n.nodes.length&&(n[me]=true,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[me]=true;let t=Ea(e);for(let n of t)if(n===Xe)e.nodes&&e.each(s=>{s[me]||this.walkSync(s);});else {let s=this.listeners[n];if(s&&this.visitSync(s,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"}};Ze.registerPostcss=r=>{Yn=r;};var xa=Ze;Ze.default=Ze;qh.registerLazyResult(Ze);Jh.registerLazyResult(Ze);var rd=sa,nd=Lr;var sd=Ms,id=Is,Xn=class{constructor(e,t,n){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let s,i=nd;this.result=new id(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new rd(i,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.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 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=sd;try{e=t(this._css,this._opts);}catch(n){this.error=n;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},od=Xn;Xn.default=Xn;var ad=od,ld=xa,cd=Es,ud=It,bt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e);}normalize(e){let t=[];for(let n of e)if(n.postcss===true?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return !this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ad(this,e,t):new ld(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},fd=bt;bt.default=bt;ud.registerProcessor(bt);cd.registerProcessor(bt);var hd=$r,dd=Qo,pd=Br,md=xs,gd=Fr,yd=It,bd=Rs;function wt(r,e){if(Array.isArray(r))return r.map(s=>wt(s));let{inputs:t,...n}=r;if(t){e=[];for(let s of t){let i={...s,__proto__:gd.prototype};i.map&&(i.map={...i.map,__proto__:dd.prototype}),e.push(i);}}if(n.nodes&&(n.nodes=r.nodes.map(s=>wt(s,e))),n.source){let{inputId:s,...i}=n.source;n.source=i,s!=null&&(n.source.input=e[s]);}if(n.type==="root")return new yd(n);if(n.type==="decl")return new hd(n);if(n.type==="rule")return new bd(n);if(n.type==="comment")return new pd(n);if(n.type==="atrule")return new md(n);throw new Error("Unknown node type: "+r.type)}var wd=wt;wt.default=wt;var vd=vs,Ra=$r,Sd=xa,Cd=_e,As=fd,Ed=Lr,Id=wd,Ma=Es,xd=ga,Aa=Br,Ta=xs,Rd=Is,Md=Fr,Ad=Ms,Td=Sa,Na=Rs,_a=It,Nd=Pr;function O(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new As(r)}O.plugin=function(e,t){let n=false;function s(...o){console&&console.warn&&!n&&(n=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
50
51
  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:
51
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ln().version,l}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,l,a){return O([n(a)]).process(o,l)},n};O.stringify=yh;O.parse=Ch;O.fromJSON=bh;O.list=Eh;O.comment=s=>new ea(s);O.atRule=s=>new ta(s);O.decl=s=>new qo(s);O.rule=s=>new ra(s);O.root=s=>new sa(s);O.document=s=>new Qo(s);O.CssSyntaxError=ph;O.Declaration=qo;O.Container=gh;O.Processor=ln;O.Document=Qo;O.Comment=ea;O.Warning=wh;O.AtRule=ta;O.Result=vh;O.Input=Sh;O.Rule=ra;O.Root=sa;O.Node=Ih;mh.registerPostcss(O);var xh=O;O.default=O;var z=Pu(xh);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;var Rs=class s{constructor(...e){se(this,"parentElement",null),se(this,"parentNode",null),se(this,"ownerDocument"),se(this,"firstChild",null),se(this,"lastChild",null),se(this,"previousSibling",null),se(this,"nextSibling",null),se(this,"ELEMENT_NODE",1),se(this,"TEXT_NODE",3),se(this,"nodeType"),se(this,"nodeName"),se(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 false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}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"}};var yi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Vt={},Mh=()=>!!globalThis.Zone;function cn(s){if(Vt[s])return Vt[s];let e=globalThis[s],t=e.prototype,r=s in yi?yi[s]:void 0,n=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=s in bi?bi[s]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(n&&o&&!Mh())return Vt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?Vt[s]=c:t}catch(l){return t}}var Yr={};function ye(s,e,t){var r;let n=`${s}.${String(t)}`;if(Yr[n])return Yr[n].call(e);let i=cn(s),o=(r=Object.getOwnPropertyDescriptor(i,t))==null?void 0:r.get;return o?(Yr[n]=o,o.call(e)):e[t]}var Xr={};function na(s,e,t){let r=`${s}.${String(t)}`;if(Xr[r])return Xr[r].bind(e);let i=cn(s)[t];return typeof i!="function"?e[t]:(Xr[r]=i,i.bind(e))}function Nh(s){return ye("Node",s,"ownerDocument")}function Rh(s){return ye("Node",s,"childNodes")}function Ah(s){return ye("Node",s,"parentNode")}function Th(s){return ye("Node",s,"parentElement")}function _h(s){return ye("Node",s,"textContent")}function Oh(s,e){return na("Node",s,"contains")(e)}function kh(s){return na("Node",s,"getRootNode")()}function Dh(s){return !s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function Lh(s){return s.styleSheets}function Ph(s){return !s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function $h(s,e){return ye("Element",s,"querySelector")(e)}function Fh(s,e){return ye("Element",s,"querySelectorAll")(e)}function ia(){return cn("MutationObserver").constructor}function Re(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],n=t(r);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=n,()=>{s[e]=r;}}catch(r){return ()=>{}}}var x={ownerDocument:Nh,childNodes:Rh,parentNode:Ah,parentElement:Th,textContent:_h,contains:Oh,getRootNode:kh,host:Dh,styleSheets:Lh,shadowRoot:Ph,querySelector:$h,querySelectorAll:Fh,mutationObserver:ia,patch:Re};function K(s,e,t=document){let r={capture:true,passive:true};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}var De=`Please stop import mirror directly. Instead of that,\r
52
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new As().version,l}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,l,a){return O([s(a)]).process(o,l)},s};O.stringify=Ed;O.parse=Ad;O.fromJSON=Id;O.list=Td;O.comment=r=>new Aa(r);O.atRule=r=>new Ta(r);O.decl=r=>new Ra(r);O.rule=r=>new Na(r);O.root=r=>new _a(r);O.document=r=>new Ma(r);O.CssSyntaxError=vd;O.Declaration=Ra;O.Container=Cd;O.Processor=As;O.Document=Ma;O.Comment=Aa;O.Warning=xd;O.AtRule=Ta;O.Result=Rd;O.Input=Md;O.Rule=Na;O.Root=_a;O.Node=Nd;Sd.registerPostcss(O);var _d=O;O.default=O;var H=zf(_d);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;var Zn=class r{constructor(...e){ie(this,"parentElement",null),ie(this,"parentNode",null),ie(this,"ownerDocument"),ie(this,"firstChild",null),ie(this,"lastChild",null),ie(this,"previousSibling",null),ie(this,"nextSibling",null),ie(this,"ELEMENT_NODE",1),ie(this,"TEXT_NODE",3),ie(this,"nodeType"),ie(this,"nodeName"),ie(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof r){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}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"}};var Gi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ji={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},sr={},Od=()=>!!globalThis.Zone;function Ts(r){if(sr[r])return sr[r];let e=globalThis[r],t=e.prototype,n=r in Gi?Gi[r]:void 0,s=!!(n&&n.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=r in ji?ji[r]:void 0,o=!!(i&&i.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Od())return sr[r]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[r].prototype;return document.body.removeChild(l),c?sr[r]=c:t}catch(l){return t}}var pn={};function Se(r,e,t){var n;let s=`${r}.${String(t)}`;if(pn[s])return pn[s].call(e);let i=Ts(r),o=(n=Object.getOwnPropertyDescriptor(i,t))==null?void 0:n.get;return o?(pn[s]=o,o.call(e)):e[t]}var mn={};function Oa(r,e,t){let n=`${r}.${String(t)}`;if(mn[n])return mn[n].bind(e);let i=Ts(r)[t];return typeof i!="function"?e[t]:(mn[n]=i,i.bind(e))}function kd(r){return Se("Node",r,"ownerDocument")}function Dd(r){return Se("Node",r,"childNodes")}function Ld(r){return Se("Node",r,"parentNode")}function Pd(r){return Se("Node",r,"parentElement")}function $d(r){return Se("Node",r,"textContent")}function Fd(r,e){return Oa("Node",r,"contains")(e)}function Bd(r){return Oa("Node",r,"getRootNode")()}function Ud(r){return !r||!("host"in r)?null:Se("ShadowRoot",r,"host")}function Wd(r){return r.styleSheets}function Hd(r){return !r||!("shadowRoot"in r)?null:Se("Element",r,"shadowRoot")}function zd(r,e){return Se("Element",r,"querySelector")(e)}function Vd(r,e){return Se("Element",r,"querySelectorAll")(e)}function ka(){return Ts("MutationObserver").constructor}function Oe(r,e,t){try{if(!(e in r))return ()=>{};let n=r[e],s=t(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=s,()=>{r[e]=n;}}catch(n){return ()=>{}}}var x={ownerDocument:kd,childNodes:Dd,parentNode:Ld,parentElement:Pd,textContent:$d,contains:Fd,getRootNode:Bd,host:Ud,styleSheets:Wd,shadowRoot:Hd,querySelector:zd,querySelectorAll:Vd,mutationObserver:ka,patch:Oe};function q(r,e,t=document){let n={capture:true,passive:true};return t.addEventListener(r,e,n),()=>t.removeEventListener(r,e,n)}var Be=`Please stop import mirror directly. Instead of that,\r
52
53
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
53
- or you can use record.mirror to access the mirror instance during recording.`,wi={map:{},getId(){return console.error(De),-1},getNode(){return console.error(De),null},removeNodeFromMap(){console.error(De);},has(){return console.error(De),false},reset(){console.error(De);}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(wi=new Proxy(wi,{get(s,e,t){return e==="map"&&console.error(De),Reflect.get(s,e,t)}}));function ut(s,e,t={}){let r=null,n=0;return function(...i){let o=Date.now();!n&&t.leading===false&&(n=o);let l=e-(o-n),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),n=o,s.apply(a,i)):!r&&t.trailing!==false&&(r=setTimeout(()=>{n=t.leading===false?0:Date.now(),r=null,s.apply(a,i);},l));}}function Mr(s,e,t,r,n=window){let i=n.Object.getOwnPropertyDescriptor(s,e);return n.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),i&&i.set&&i.set.call(this,o);}}),()=>Mr(s,e,i||{},true)}var hr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(hr=()=>new Date().getTime());function oa(s){var e,t,r,n;let i=s.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((e=x.parentElement(i.body))==null?void 0:e.scrollLeft)||((t=i==null?void 0:i.body)==null?void 0:t.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((r=x.parentElement(i.body))==null?void 0:r.scrollTop)||((n=i==null?void 0:i.body)==null?void 0:n.scrollTop)||0}}function aa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function la(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ca(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function q(s,e,t,r){if(!s)return false;let n=ca(s);if(!n)return false;try{if(typeof e=="string"){if(n.classList.contains(e)||r&&n.closest("."+e)!==null)return !0}else if(sr(n,e,r))return !0}catch(i){}return !!(t&&(n.matches(t)||r&&n.closest(t)!==null))}function Bh(s,e){return e.getId(s)!==-1}function Zr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(s)===tt}function ua(s,e){if(qe(s))return false;let t=e.getId(s);if(!e.has(t))return true;let r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?false:r?ua(r,e):true}function As(s){return !!s.changedTouches}function Uh(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 fa(s,e){return !!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ha(s,e){return !!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ts(s){return s?s instanceof Rs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):false}var _s=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map);}getId(e){var t;return (t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function da(s){var e;let t=null;return "getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function Wh(s){let e=s,t;for(;t=da(e);)e=t;return e}function zh(s){let e=x.ownerDocument(s);if(!e)return false;let t=Wh(s);return x.contains(e,t)}function pa(s){let e=x.ownerDocument(s);return e?x.contains(e,s)||zh(s):false}var R=(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))(R||{}),M=(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))(M||{}),Q=(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))(Q||{}),de=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(de||{}),Ge=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ge||{}),Le=(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))(Le||{});var ma=(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))(ma||{});function vi(s){return "__ln"in s}var Os=class{constructor(){w(this,"length",0),w(this,"head",null),w(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==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&vi(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&&vi(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--);}},Si=(s,e)=>`${s}@${e}`,ks=class{constructor(){w(this,"frozen",false),w(this,"locked",false),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),w(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Os,n=a=>{let c=a,u=tt;for(;u===tt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=a=>{let c=x.parentNode(a);if(!c||!pa(a))return;let u=false;if(a.nodeType===Node.TEXT_NODE){let m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=true);}let f=qe(c)?this.mirror.getId(da(a)):this.mirror.getId(c),d=n(a);if(f===-1||d===-1)return r.addNode(a);let g=$e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,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=>{fa(m,this.mirror)&&this.iframeManager.addIframe(m),ha(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ts(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc);},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p);},cssCaptured:u});g&&(e.push({parentId:f,nextId:d,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Ci(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||i(a);for(let a of this.addedSet)!Ei(this.droppedSet,a)&&!Ci(this.removesSubTreeCache,a,this.mirror)||Ei(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=n(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=r.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(n(u.value)===-1)continue;if(f!==-1){a=u;break}else {let g=u.value,m=x.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=x.host(m);if(this.mirror.getId(p)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value);}let l={texts:this.texts.map(a=>{let c=a.node,u=x.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l));}),w(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(x.childNodes(e),n=>x.textContent(n)||"").join("");t.attributes.value=er({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:tr(e),value:r,maskInputFn:this.maskInputFn});}),w(this,"processMutation",e=>{if(!Zr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:$i(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,ca(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if(r==="value"){let o=tr(t);n=er({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:n,maskInputFn:this.maskInputFn});}if(q(e.target,this.blockClass,this.blockSelector,false)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(n))if(!t.contentDocument)r="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Pi(t.tagName,r))if(i.attributes[r]=Li(this.doc,xe(t.tagName),xe(r),n),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch(l){this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?i.styleDiff[l]=a:i.styleDiff[l]=[a,c]:i._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(i.styleDiff[l]=false);}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(q(e.target,this.blockClass,this.blockSelector,true))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),n=qe(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,false)||Zr(t,this.mirror,this.slimDOMOptions)||!Bh(t,this.mirror)||(this.addedSet.has(t)?(Ds(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ua(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Si(r,n)]?Ds(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:qe(e.target)&&Qe(e.target)?true:void 0}),Hh(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Zr(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[Si(this.mirror.getId(e),r)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(r=>this.genAdds(r)),Ts(e)&&x.childNodes(x.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=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Ds(s,e){s.delete(e),x.childNodes(e).forEach(t=>Ds(s,t));}function Hh(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(n=>t.push(n)));}}function Ci(s,e,t){return s.size===0?false:Vh(s,e)}function Vh(s,e,t){let r=x.parentNode(e);return r?s.has(r):false}function Ei(s,e){return s.size===0?false:ga(s,e)}function ga(s,e){let t=x.parentNode(e);return t?s.has(t)?true:ga(s,t):false}var et;function Gh(s){et=s;}function jh(){et=void 0;}var N=s=>et?(...t)=>{try{return s(...t)}catch(r){if(et&&et(r)===true)return;throw r}}:s,Ie=[];function mt(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(e){}return s&&s.target}function ya(s,e){let t=new ks;Ie.push(t),t.init(s);let r=new(ia())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),r}function Yh({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===false)return ()=>{};let n=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=ut(N(f=>{let d=Date.now()-l;s(o.map(g=>(g.timeOffset-=d,g)),f),o=[],l=null;}),i),c=N(ut(N(f=>{let d=mt(f),{clientX:g,clientY:m}=As(f)?f.changedTouches[0]:f;l||(l=hr()),o.push({x:g,y:m,id:r.getId(d),timeOffset:hr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?M.Drag:f instanceof MouseEvent?M.MouseMove:M.TouchMove);}),n,{trailing:!1})),u=[K("mousemove",c,t),K("touchmove",c,t),K("drag",c,t)];return N(()=>{u.forEach(f=>f());})}function Xh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let o=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[],a=null,c=u=>f=>{let d=mt(f);if(q(d,r,n,true))return;let g=null,m=u;if("pointerType"in f){switch(f.pointerType){case "mouse":g=de.Mouse;break;case "touch":g=de.Touch;break;case "pen":g=de.Pen;break}g===de.Touch?Q[u]===Q.MouseDown?m="TouchStart":Q[u]===Q.MouseUp&&(m="TouchEnd"):de.Pen;}else As(f)&&(g=de.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===de.Touch||m.startsWith("Mouse")&&g===de.Mouse)&&(g=null)):Q[u]===Q.Click&&(g=a,a=null);let p=As(f)?f.changedTouches[0]:f;if(!p)return;let h=t.getId(d),{clientX:y,clientY:v}=p;N(s)({type:Q[m],id:h,x:y,y:v,...g!==null&&{pointerType:g}});};return Object.keys(Q).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let f=xe(u),d=c(u);if(window.PointerEvent)switch(Q[u]){case Q.MouseDown:case Q.MouseUp:f=f.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}l.push(K(f,d,e));}),N(()=>{l.forEach(u=>u());})}function ba({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,sampling:i}){let o=N(ut(N(l=>{let a=mt(l);if(!a||q(a,r,n,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=oa(e.defaultView);s({id:c,x:u.left,y:u.top});}else s({id:c,x:a.scrollLeft,y:a.scrollTop});}),i.scroll||100));return K("scroll",o,e)}function Zh({viewportResizeCb:s},{win:e}){let t=-1,r=-1,n=N(ut(N(()=>{let i=aa(),o=la();(t!==i||r!==o)&&(s({width:Number(o),height:Number(i)}),t=i,r=o);}),200));return K("resize",n,e)}var Jh=["INPUT","TEXTAREA","SELECT"],Ii=new WeakMap;function Kh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function f(v){let b=mt(v),S=v.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=x.parentElement(b)),!b||!E||Jh.indexOf(E)<0||q(b,r,n,true)||b.classList.contains(i)||o&&b.matches(o))return;let I=b.value,P=false,A=tr(b)||"";A==="radio"||A==="checkbox"?P=b.checked:(l[E.toLowerCase()]||l[A])&&(I=er({element:b,maskInputOptions:l,tagName:E,type:A,value:I,maskInputFn:a})),d(b,u?{text:I,isChecked:P,userTriggered:S}:{text:I,isChecked:P});let $=b.name;A==="radio"&&$&&P&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(F=>{if(F!==b){let D=F.value;d(F,u?{text:D,isChecked:!P,userTriggered:false}:{text:D,isChecked:!P});}});}function d(v,b){let S=Ii.get(v);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){Ii.set(v,b);let E=t.getId(v);N(s)({...b,id:E});}}let m=(c.input==="last"?["change"]:["input","change"]).map(v=>K(v,N(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(v=>v());};let h=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[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 h&&h.set&&m.push(...y.map(v=>Mr(v[0],v[1],{set(){N(f)({target:this,isTrusted:false});}},false,p))),N(()=>{m.forEach(v=>v());})}function dr(s){let e=[];function t(r,n){if(Gt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);n.unshift(o);}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);n.unshift(o);}return n}return t(s,e)}function we(s,e,t){let r,n;return s?(s.ownerNode?r=e.getId(s.ownerNode):n=t.getId(s),{styleId:n,id:r}):{}}function qh({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return ()=>{};let n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:N((u,f,d)=>{let[g,m]=d,{id:p,styleId:h}=we(f,e,t.styleMirror);return (p&&p!==-1||h&&h!==-1)&&s({id:p,styleId:h,adds:[{rule:g,index:m}]}),u.apply(f,d)})}),r.CSSStyleSheet.prototype.addRule=function(u,f,d=this.cssRules.length){let g=`${u} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,removes:[{index:g}]}),u.apply(f,d)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replace:g}),u.apply(f,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((u,f,d)=>{let[g]=d,{id:m,styleId:p}=we(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,replaceSync:g}),u.apply(f,d)})}));let a={};jt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(jt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),jt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),jt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,f])=>{c[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(c[u].insertRule,{apply:N((d,g,m)=>{let[p,h]=m,{id:y,styleId:v}=we(g.parentStyleSheet,e,t.styleMirror);return (y&&y!==-1||v&&v!==-1)&&s({id:y,styleId:v,adds:[{rule:p,index:[...dr(g),h||0]}]}),d.apply(g,m)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:N((d,g,m)=>{let[p]=m,{id:h,styleId:y}=we(g.parentStyleSheet,e,t.styleMirror);return (h&&h!==-1||y&&y!==-1)&&s({id:h,styleId:y,removes:[{index:[...dr(g),p]}]}),d.apply(g,m)})});}),N(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule;});})}function wa({mirror:s,stylesheetManager:e},t){var r,n,i;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(x.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(i=(n=t.ownerDocument)==null?void 0:n.defaultView)==null?void 0:i.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return (c=a.get)==null?void 0:c.call(this)},set(c){var u;let f=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o);}catch(d){}return f}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function Qh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:n}){let i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:N((l,a,c)=>{var u;let[f,d,g]=c;if(t.has(f))return i.apply(a,[f,d,g]);let{id:m,styleId:p}=we((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,set:{property:f,value:d,priority:g},index:dr(a.parentRule)}),l.apply(a,c)})});let o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:N((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:d,styleId:g}=we((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,remove:{property:f},index:dr(a.parentRule)}),l.apply(a,c)})}),N(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o;})}function ed({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:n,doc:i}){let o=N(a=>ut(N(c=>{let u=mt(c);if(!u||q(u,e,t,!0))return;let{currentTime:f,volume:d,muted:g,playbackRate:m,loop:p}=u;s({type:a,id:r.getId(u),currentTime:f,volume:d,muted:g,playbackRate:m,loop:p});}),n.media||500)),l=[K("play",o(Le.Play),i),K("pause",o(Le.Pause),i),K("seeked",o(Le.Seeked),i),K("volumechange",o(Le.VolumeChange),i),K("ratechange",o(Le.RateChange),i)];return N(()=>{l.forEach(a=>a());})}function td({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let r=[],n=new WeakMap,i=t.FontFace;t.FontFace=function(a,c,u){let f=new i(a,c,u);return n.set(f,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),f};let o=Re(e.fonts,"add",function(l){return function(a){return setTimeout(N(()=>{let c=n.get(a);c&&(s(c),n.delete(a));}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=i;}),r.push(o),N(()=>{r.forEach(l=>l());})}function rd(s){let{doc:e,mirror:t,blockClass:r,blockSelector:n,selectionCb:i}=s,o=true,l=N(()=>{let a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let f=0;f<u;f++){let d=a.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:p,endOffset:h}=d;q(g,r,n,!0)||q(p,r,n,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:h});}i({ranges:c});});return l(),K("selectionchange",l)}function sd({doc:s,customElementCb:e}){let t=s.defaultView;return !t||!t.customElements?()=>{}:Re(t.customElements,"define",function(n){return function(i,o,l){try{e({define:{name:i}});}catch(a){console.warn(`Custom element callback failed for ${i}`);}return n.apply(this,[i,o,l])}})}function nd(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:d,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),n(...p);},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p);},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p);},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p);},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p);},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p);},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},s.fontCb=(...p)=>{e.font&&e.font(...p),d(...p);},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p);},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function id(s,e={}){let t=s.doc.defaultView;if(!t)return ()=>{};nd(s,e);let r;s.recordDOM&&(r=ya(s,s.doc));let n=Yh(s),i=Xh(s),o=ba(s),l=Zh(s,{win:t}),a=Kh(s),c=ed(s),u=()=>{},f=()=>{},d=()=>{},g=()=>{};s.recordDOM&&(u=qh(s,{win:t}),f=wa(s,s.doc),d=Qh(s,{win:t}),s.collectFonts&&(g=td(s)));let m=rd(s),p=sd(s),h=[];for(let y of s.plugins)h.push(y.observer(y.callback,t,y.options));return N(()=>{Ie.forEach(y=>y.reset()),r==null||r.disconnect(),n(),i(),o(),l(),a(),c(),u(),f(),d(),g(),m(),p(),h.forEach(y=>y());})}function Gt(s){return typeof window[s]!="undefined"}function jt(s){return !!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var pr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),l=i.get(t);return l||(l=this.generateIdFn(),i.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(n=>this.getRemoteId(e,n,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}},Ls=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new pr(Di)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pr(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,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.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 n=this.crossOriginIframeMap.get(e.source);if(!n)return;let i=this.transformCrossOriginEvent(n,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout);}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case R.Meta:case R.Load:case R.DomContentLoaded:return false;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case M.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(n.node,i);}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"]);}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"]);}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"]);}),t;case M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"]);}),t;case M.ViewportResize:return false;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"]);}),t;case M.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(n=>{this.replaceStyleIds(n,e,["styleId"]);}),t}}return false}replace(e,t,r,n){for(let i of n)!Array.isArray(t[i])&&typeof t[i]!="number"||(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));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!==ma.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t);});}},Ps=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!Qe(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ya({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ba({...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(x.host(e))),this.restoreHandlers.push(wa({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(Re(e.prototype,"attachShadow",function(n){return function(i){let o=n.call(this,i),l=x.shadowRoot(this);return l&&pa(this)&&r.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",od=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(Ke=0;Ke<Fe.length;Ke++)od[Fe.charCodeAt(Ke)]=Ke;var Ke,ad=function(s){var e=new Uint8Array(s),t,r=e.length,n="";for(t=0;t<r;t+=3)n+=Fe[e[t]>>2],n+=Fe[(e[t]&3)<<4|e[t+1]>>4],n+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],n+=Fe[e[t+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var xi=new Map;function ld(s,e){let t=xi.get(s);return t||(t=new Map,xi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var va=(s,e,t)=>{if(!s||!(Ca(s,e)||typeof s=="object"))return;let r=s.constructor.name,n=ld(t,r),i=n.indexOf(s);return i===-1&&(i=n.length,n.push(s)),i};function Kt(s,e,t){if(s instanceof Array)return s.map(r=>Kt(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,n=ad(s);return {rr_type:r,base64:n}}else {if(s instanceof DataView)return {rr_type:s.constructor.name,args:[Kt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:n}=s;return {rr_type:r,src:n}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",n=s.toDataURL();return {rr_type:r,src:n}}else {if(s instanceof ImageData)return {rr_type:s.constructor.name,args:[Kt(s.data,e,t),s.width,s.height]};if(Ca(s,e)||typeof s=="object"){let r=s.constructor.name,n=va(s,e,t);return {rr_type:r,index:n}}}}return s}var Sa=(s,e,t)=>s.map(r=>Kt(r,e,t)),Ca=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>s instanceof e[n]);function cd(s,e,t,r){let n=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of i)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Re(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return q(this.canvas,t,r,!0)||setTimeout(()=>{let u=Sa(c,e,this);s(this.canvas,{type:Ge["2D"],property:o,args:u});},0),a.apply(this,c)}});n.push(l);}catch(l){let a=Mr(e.CanvasRenderingContext2D.prototype,o,{set(c){s(this.canvas,{type:Ge["2D"],property:o,args:[c],setter:true});}});n.push(a);}return ()=>{n.forEach(o=>o());}}function ud(s){return s==="experimental-webgl"?"webgl":s}function Mi(s,e,t,r){let n=[];try{let i=Re(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){let c=ud(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});n.push(i);}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(i=>i());}}function Ni(s,e,t,r,n,i){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let c=Re(s,a,function(u){return function(...f){let d=u.apply(this,f);if(va(d,i,this),"tagName"in this.canvas&&!q(this.canvas,r,n,!0)){let g=Sa(f,i,this),m={type:e,property:a,args:g};t(this.canvas,m);}return d}});o.push(c);}catch(c){let u=Mr(s,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:true});}});o.push(u);}return o}function fd(s,e,t,r){let n=[];return n.push(...Ni(e.WebGLRenderingContext.prototype,Ge.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&n.push(...Ni(e.WebGL2RenderingContext.prototype,Ge.WebGL2,s,t,r,e)),()=>{n.forEach(i=>i());}}var Ea="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hd=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Ri=typeof window!="undefined"&&window.Blob&&new Blob([hd(Ea)],{type:"text/javascript;charset=utf-8"});function dd(s){let e;try{if(e=Ri&&(window.URL||window.webkitURL).createObjectURL(Ri),!e)throw "";let t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ea,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var $s=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",false),w(this,"locked",false),w(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c);});let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,n,i),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:l});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,t,r,n,i){let o=Mi(t,r,n,true),l=new Map,a=new dd;a.onmessage=m=>{let{id:p}=m.data;if(l.set(p,false),!("base64"in m.data))return;let{base64:h,type:y,width:v,height:b}=m.data;this.mutationCb({id:p,type:Ge["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:y}]},0,0]}]});};let c=1e3/e,u=0,f,d=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{q(p,r,n,true)||m.push(p);}),m},g=m=>{if(u&&m-u<c){f=requestAnimationFrame(g);return}u=m,d().forEach(async p=>{var h;let y=this.mirror.getId(p);if(l.get(y)||p.width===0||p.height===0)return;if(l.set(y,true),["webgl","webgl2"].includes(p.__context)){let b=p.getContext(p.__context);((h=b==null?void 0:b.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let v=await createImageBitmap(p);a.postMessage({id:y,bitmap:v,width:p.width,height:p.height,dataURLOptions:i.dataURLOptions},[v]);}),f=requestAnimationFrame(g);};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=Mi(e,t,r,false),i=cd(this.processMutation.bind(this),e,t,r),o=fd(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),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 n=r.map(o=>{let{type:l,...a}=o;return a}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e);}},Fs=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new _s),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:[]},n=[];for(let i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),n.push({styleId:o,rules:Array.from(i.rules||CSSRule,(l,a)=>({rule:Oi(l,i.href),index:a}))})),r.styleIds.push(o);}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},Bs=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",false);}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(n=>n!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},G,qt,Jr,mr=false;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((On=s.contentWindow)==null?void 0:On.Array.from)||Array.from,document.body.removeChild(s);}}catch(s){console.debug("Unable to override Array.from",s);}var oe=wl();function be(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=true,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:h,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:S,recordDOM:E=true,recordCanvas:I=false,recordCrossOriginIframes:P=false,recordAfter:A=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:$=false,collectFonts:F=false,inlineImages:D=false,plugins:J,keepIframeSrcFn:C=()=>false,ignoreCSSAttributes:ee=new Set([]),errorHandler:ve}=s;Gh(ve);let j=P?window.parent===window:true,re=false;if(!j)try{window.parent.document&&(re=!1);}catch(T){re=true;}if(j&&!e)throw new Error("emit function is required");if(!j&&!re)return ()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),oe.reset();let Se=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:d!==void 0?d:{password:true},ce=Fi(g);Uh();let pn,kr=0,mn=T=>{for(let ie of J||[])ie.eventProcessor&&(T=ie.eventProcessor(T));return y&&!re&&(T=y(T)),T};G=(T,ie)=>{var H;let V=T;if(V.timestamp=hr(),(H=Ie[0])!=null&&H.isFrozen()&&V.type!==R.FullSnapshot&&!(V.type===R.IncrementalSnapshot&&V.data.source===M.Mutation)&&Ie.forEach(te=>te.unfreeze()),j)e==null||e(mn(V),ie);else if(re){let te={type:"rrweb",event:mn(V),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(te,"*");}if(V.type===R.FullSnapshot)pn=V,kr=0;else if(V.type===R.IncrementalSnapshot){if(V.data.source===M.Mutation&&V.data.isAttachIframe)return;kr++;let te=r&&kr>=r,k=t&&V.timestamp-pn.timestamp>t;(te||k)&&qt(true);}};let gt=T=>{G({type:R.IncrementalSnapshot,data:{source:M.Mutation,...T}});},gn=T=>G({type:R.IncrementalSnapshot,data:{source:M.Scroll,...T}}),yn=T=>G({type:R.IncrementalSnapshot,data:{source:M.CanvasMutation,...T}}),La=T=>G({type:R.IncrementalSnapshot,data:{source:M.AdoptedStyleSheet,...T}}),Ce=new Fs({mutationCb:gt,adoptedStyleSheetCb:La}),Ee=new Ls({mirror:oe,mutationCb:gt,stylesheetManager:Ce,recordCrossOriginIframes:P,wrappedEmit:G});for(let T of J||[])T.getMirror&&T.getMirror({nodeMirror:oe,crossOriginIframeMirror:Ee.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ee.crossOriginIframeStyleMirror});let Dr=new Bs;Jr=new $s({recordCanvas:I,mutationCb:yn,win:window,blockClass:n,blockSelector:i,mirror:oe,sampling:v.canvas,dataURLOptions:b});let yt=new Ps({mutationCb:gt,scrollCb:gn,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:Se,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:I,inlineImages:D,sampling:v,slimDOMOptions:ce,iframeManager:Ee,stylesheetManager:Ce,canvasManager:Jr,keepIframeSrcFn:C,processedNodeManager:Dr},mirror:oe});qt=(T=false)=>{if(!E)return;G({type:R.Meta,data:{href:window.location.href,width:la(),height:aa()}},T),Ce.reset(),yt.init(),Ie.forEach(H=>H.lock());let ie=Hl(document,{mirror:oe,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:Se,maskTextFn:p,maskInputFn:m,slimDOM:ce,dataURLOptions:b,recordCanvas:I,inlineImages:D,onSerialize:H=>{fa(H,oe)&&Ee.addIframe(H),ha(H,oe)&&Ce.trackLinkElement(H),Ts(H)&&yt.addShadowRoot(x.shadowRoot(H),document);},onIframeLoad:(H,V)=>{Ee.attachIframe(H,V),yt.observeAttachShadow(H);},onStylesheetLoad:(H,V)=>{Ce.attachLinkElement(H,V);},keepIframeSrcFn:C});if(!ie)return console.warn("Failed to snapshot the document");G({type:R.FullSnapshot,data:{node:ie,initialOffset:oa(window)}},T),Ie.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ce.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document));};try{let T=[],ie=V=>{var te;return N(id)({mutationCb:gt,mousemoveCb:(k,Lr)=>G({type:R.IncrementalSnapshot,data:{source:Lr,positions:k}}),mouseInteractionCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.MouseInteraction,...k}}),scrollCb:gn,viewportResizeCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.ViewportResize,...k}}),inputCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.Input,...k}}),mediaInteractionCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.MediaInteraction,...k}}),styleSheetRuleCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.StyleSheetRule,...k}}),styleDeclarationCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.StyleDeclaration,...k}}),canvasMutationCb:yn,fontCb:k=>G({type:R.IncrementalSnapshot,data:{source:M.Font,...k}}),selectionCb:k=>{G({type:R.IncrementalSnapshot,data:{source:M.Selection,...k}});},customElementCb:k=>{G({type:R.IncrementalSnapshot,data:{source:M.CustomElement,...k}});},blockClass:n,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:Se,inlineStylesheet:u,sampling:v,recordDOM:E,recordCanvas:I,inlineImages:D,userTriggeredOnInput:$,collectFonts:F,doc:V,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:C,blockSelector:i,slimDOMOptions:ce,dataURLOptions:b,mirror:oe,iframeManager:Ee,stylesheetManager:Ce,shadowDomManager:yt,processedNodeManager:Dr,canvasManager:Jr,ignoreCSSAttributes:ee,plugins:((te=J==null?void 0:J.filter(k=>k.observer))==null?void 0:te.map(k=>({observer:k.observer,options:k.options,callback:Lr=>G({type:R.Plugin,data:{plugin:k.name,payload:Lr}})})))||[]},h)};Ee.addLoadListener(V=>{try{T.push(ie(V.contentDocument));}catch(te){console.warn(te);}});let H=()=>{qt(),T.push(ie(document)),mr=!0;};return ["interactive","complete"].includes(document.readyState)?H():(T.push(K("DOMContentLoaded",()=>{G({type:R.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&H();})),T.push(K("load",()=>{G({type:R.Load,data:{}}),A==="load"&&H();},window))),()=>{T.forEach(V=>{try{V();}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te);}}),Dr.destroy(),mr=!1,jh();}}catch(T){console.warn(T);}}be.addCustomEvent=(s,e)=>{if(!mr)throw new Error("please add custom event after start recording");G({type:R.Custom,data:{tag:s,payload:e}});};be.freezePage=()=>{Ie.forEach(s=>s.freeze());};be.takeFullSnapshot=s=>{if(!mr)throw new Error("please take full snapshot after start recording");qt(s);};be.mirror=oe;var Ai;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped";})(Ai||(Ai={}));var pd="https://blocfeed.com/api/replay-events";function Ia(s){var J;if(!s.config.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=X();if(vt(e)%100/100>=s.config.sampling)return ()=>{};let r=Date.now(),n=(J=s.config.endpoint)!=null?J:pd,i=[],o=0,l=false,a=false,c=null,u=`bf_replay_chunkseq_${e}`,f=`bf_replay_pauses_${e}`,d=0,g=0;try{let C=sessionStorage.getItem(u);C&&(d=parseInt(C,10)||0);let ee=sessionStorage.getItem(f);ee&&(g=parseInt(ee,10)||0);}catch(C){}let m=(C=false)=>{if(i.length===0)return;let ee=C?gd(i):i;i=[],o=0;let ve=d++;try{sessionStorage.setItem(u,String(d));}catch(j){}yd({blocfeedId:s.blocfeedId,sessionId:e,sessionStartedAtMs:r,chunkSeq:ve,events:ee,endpoint:n,useBeacon:C,pauseCount:g});},p=setInterval(()=>{l||m();},s.config.flushIntervalMs),h=setTimeout(()=>{m(),D();},s.config.maxDurationMs),y=null,v=()=>{y&&clearTimeout(y),y=setTimeout(()=>{$();},s.config.inactivityTimeoutMs);},b=()=>{m(true);};window.addEventListener("pagehide",b);let S=s.config.masking,E={emit(C){l||(i.push(C),o+=md(C),v(),o>=s.config.flushSizeBytes&&m());},recordCanvas:false,sampling:{mousemove:50}};S.maskAllInputs!==void 0&&(E.maskAllInputs=S.maskAllInputs),S.maskTextSelector!==void 0&&(E.maskTextSelector=S.maskTextSelector),S.maskTextClass!==void 0&&(E.maskTextClass=S.maskTextClass),S.blockSelector!==void 0&&(E.blockSelector=S.blockSelector);let I=null,P=()=>{I&&(document.removeEventListener("pointerdown",I,true),document.removeEventListener("keydown",I,true),I=null);};function A(){var C;c=(C=be(E))!=null?C:null;}function $(){if(l||a)return;a=true,g++;try{sessionStorage.setItem(f,String(g));}catch(ee){}if(m(),c){try{c();}catch(ee){}c=null;}y&&(clearTimeout(y),y=null);let C=()=>{P(),F();};I=C,document.addEventListener("pointerdown",C,{capture:true,once:true}),document.addEventListener("keydown",C,{capture:true,once:true});}function F(){l||!a||(a=false,A(),v());}v(),A();function D(){if(!l&&(l=true,clearInterval(p),clearTimeout(h),y&&clearTimeout(y),P(),window.removeEventListener("pagehide",b),c)){try{c();}catch(C){}c=null;}}return D}function md(s){try{return JSON.stringify(s).length}catch(e){return 1024}}function gd(s){let t=JSON.stringify(s);if(t.length<=6e4)return s;let r=[...s];for(;r.length>1;)if(r.shift(),t=JSON.stringify(r),t.length<=6e4)return r;return r}async function yd(s){let e=JSON.stringify({blocfeed_id:s.blocfeedId,session_id:s.sessionId,session_started_at_ms:s.sessionStartedAtMs,chunk_seq:s.chunkSeq,pause_count:s.pauseCount,events:s.events,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:""});if(s.useBeacon&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let r=new Blob([e],{type:"application/json"});navigator.sendBeacon(s.endpoint,r);return}catch(r){}let t=!!s.useBeacon;try{await fetch(s.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:e,...t?{keepalive:!0}:{}});}catch(r){}}var bd={enabled:true,endpoint:null,maxDurationMs:144e5,flushIntervalMs:3e4,flushSizeBytes:1048576,inactivityTimeoutMs:18e5,sampling:1,masking:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}};function xa(s){var t,r,n,i,o,l,a,c;let e=bd;return {enabled:(t=s==null?void 0:s.enabled)!=null?t:e.enabled,endpoint:(r=s==null?void 0:s.endpoint)!=null?r:e.endpoint,maxDurationMs:(n=s==null?void 0:s.maxDurationMs)!=null?n:e.maxDurationMs,flushIntervalMs:(i=s==null?void 0:s.flushIntervalMs)!=null?i:e.flushIntervalMs,flushSizeBytes:(o=s==null?void 0:s.flushSizeBytes)!=null?o:e.flushSizeBytes,inactivityTimeoutMs:(l=s==null?void 0:s.inactivityTimeoutMs)!=null?l:e.inactivityTimeoutMs,sampling:(a=s==null?void 0:s.sampling)!=null?a:e.sampling,masking:{...e.masking,...(c=s==null?void 0:s.masking)!=null?c:{}}}}var wd="https://blocfeed.com/api/events/track",vd=5e3,Sd=50,Cd=1024,Ar="blocfeed-events-queue",Ma=500,Na=100,Ed=/^[a-z][a-z0-9_]{0,127}$/,Ra=50,Aa=1024,Ta;function un(s){Ta=s;}function Id(s){if(typeof s!="string"||!Ed.test(s))throw new Error(`[BlocFeed] track(): event_name "${s}" must match /^[a-z][a-z0-9_]{0,127}$/ (lowercase, start with a letter, only [a-z0-9_], \u2264128 chars).`)}function xd(s){if(s===void 0)return {};if(s===null||typeof s!="object"||Array.isArray(s))throw new Error("[BlocFeed] track(): properties must be a plain object.");let e=Object.keys(s);if(e.length>Ra)throw new Error(`[BlocFeed] track(): properties has ${e.length} keys, max ${Ra}.`);for(let r of e){let n=s[r];if(n!==null&&typeof n!="string"&&typeof n!="number"&&typeof n!="boolean")throw new Error(`[BlocFeed] track(): property "${r}" has unsupported type "${typeof n}". Allowed: string | number | boolean | null.`)}let t;try{t=JSON.stringify(s);}catch(r){throw new Error(`[BlocFeed] track(): properties is not JSON-serializable (${r.message}).`)}if(t.length>Aa)throw new Error(`[BlocFeed] track(): properties serialized to ${t.length} bytes, max ${Aa}. Server allows 8192 bytes \u2014 the client cap is defensive; trim down or split the event.`);return s}function fn(){if(typeof localStorage=="undefined")return [];try{let s=localStorage.getItem(Ar);if(!s)return [];let e=JSON.parse(s);return Array.isArray(e)?e:[]}catch(s){try{localStorage.removeItem(Ar);}catch(e){}return []}}function hn(s){if(typeof localStorage!="undefined")try{if(s.length===0)localStorage.removeItem(Ar);else {let e=s.length>Ma?s.slice(s.length-Ma):s;localStorage.setItem(Ar,JSON.stringify(e));}}catch(e){}}var ne=null;function Md(){if(ne)return ne;if(typeof window=="undefined")return null;let s=Nd();return s?(ne={blocfeedId:s,endpoint:wd,events:[],bytes:0,flushTimer:null,pageHideHandler:null,visibilityHandler:null},ne.flushTimer=setInterval(()=>{Rr(false);},vd),ne.pageHideHandler=()=>{Rr(true);},ne.visibilityHandler=()=>{document.visibilityState==="hidden"&&Rr(true);},window.addEventListener("pagehide",ne.pageHideHandler),document.addEventListener("visibilitychange",ne.visibilityHandler),ne):null}function Nd(){try{let e=window.__blocfeed_id__;return typeof e=="string"&&e.length>0?e:null}catch(s){return null}}function _a(s){try{window.__blocfeed_id__=s;}catch(e){}ne&&(ne.blocfeedId=s);}function dn(s,e,t){var f,d,g;Id(s);let r=xd(e),n=new Date().toISOString(),i={event_name:s,properties:r,occurred_at:n},o=(f=void 0)!=null?f:Ad();o&&(i.session_id=o);let l=(d=void 0)!=null?d:Ta;l&&(i.user_id=l);let a=(g=void 0)!=null?g:Td();a&&(i.page_url=a);let c=_d();c&&(i.user_agent=c);let u=Md();if(!u){let m=fn();m.push(i),hn(m);return}u.events.push(i),u.bytes+=Rd(i),(u.events.length>=Sd||u.bytes>=Cd)&&Rr(false);}async function Rr(s){let e=ne;if(!e)return;let r=fn().concat(e.events);if(e.events=[],e.bytes=0,hn([]),r.length!==0)for(let n=0;n<r.length;n+=Na){let i=r.slice(n,n+Na),o=JSON.stringify({blocfeed_id:e.blocfeedId,events:i});if(s&&kd())try{let l=new Blob([o],{type:"application/json"});navigator.sendBeacon(e.endpoint,l)||Nr(i);continue}catch(l){Nr(i);continue}try{(await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||Nr(i);}catch(l){Nr(i);}}}function Nr(s){let e=fn();hn(e.concat(s));}function Rd(s){try{return JSON.stringify(s).length}catch(e){return 256}}function Ad(){try{return X()}catch(s){return}}function Td(){try{return typeof window!="undefined"?window.location.href:void 0}catch(s){return}}function _d(){try{return typeof navigator!="undefined"?navigator.userAgent:void 0}catch(s){return}}function kd(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}var Dd="https://blocfeed.com/api/heartbeat",Ld=300*1e3;function Oa(s){var l,a,c;if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=(l=s.endpoint)!=null?l:Dd,t=(a=s.intervalMs)!=null?a:Ld,r=(c=s.features)!=null?c:["replay","behavioral","customEvents"],n=u=>{try{let f=JSON.stringify({blocfeed_id:s.blocfeedId,session_id:Pd(),version:s.version,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:"",sdk_features:r}),d={method:"POST",headers:{"Content-Type":"application/json"},body:f};u&&(d.keepalive=!0),fetch(e,d).catch(()=>{});}catch(f){}};try{n(!1);}catch(u){}let i=null;try{i=setInterval(()=>{try{n(!1);}catch(u){}},t);}catch(u){i=null;}let o=()=>{try{n(!0);}catch(u){}};try{window.addEventListener("pagehide",o);}catch(u){}return function(){try{i&&clearInterval(i);}catch(f){}i=null;try{window.removeEventListener("pagehide",o);}catch(f){}}}function Pd(){try{return X()}catch(s){return ""}}var Tr="0.21.0";var $d=5e3,_r=class{constructor(e){this.submitter=null;this.detectorUninstallers=[];this.flushTimer=null;this.pageHideHandler=null;this.installed=false;this.opts=e,this.resolved=bn(e.config);}install(){var l,a,c,u;if(this.installed||!this.resolved.enabled)return;let e=()=>{try{let f=X();return vt(f)%100/100<this.resolved.sampling}catch(f){return false}};if(!((l=this.opts.passiveSampler)!=null?l:e)())return;_a(this.opts.blocfeedId);let r=(a=this.opts.endpoint)!=null?a:"https://blocfeed.com/api/behavioral-events";this.submitter=(c=this.opts.submitter)!=null?c:wn({endpoint:r,blocfeedId:this.opts.blocfeedId});let n=f=>{var d;(d=this.submitter)==null||d.enqueue(f);};this.detectorUninstallers.push(xn(this.resolved,n)),this.detectorUninstallers.push(Rn(this.resolved,n)),this.detectorUninstallers.push(An(this.resolved,n)),this.detectorUninstallers.push(Tn(this.resolved,n)),this.detectorUninstallers.push(_n(this.resolved,n));let i=xa((u=this.opts.config)==null?void 0:u.sessionReplay);this.detectorUninstallers.push(Ia({blocfeedId:this.opts.blocfeedId,config:i}));let o=["behavioral","customEvents"];if(i.enabled&&o.unshift("replay"),this.opts.extraSdkFeatures)for(let f of this.opts.extraSdkFeatures)o.push(f);this.detectorUninstallers.push(Oa({blocfeedId:this.opts.blocfeedId,version:Tr,features:o})),this.flushTimer=setInterval(()=>{var f;(f=this.submitter)==null||f.flush();},$d),this.pageHideHandler=()=>{var f;(f=this.submitter)==null||f.flushBeacon();},typeof window!="undefined"&&window.addEventListener("pagehide",this.pageHideHandler),this.installed=true;}uninstall(){var e;if(this.installed){for(let t of [...this.detectorUninstallers].reverse())try{t();}catch(r){}this.detectorUninstallers=[],this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.pageHideHandler&&typeof window!="undefined"&&(window.removeEventListener("pagehide",this.pageHideHandler),this.pageHideHandler=null);try{(e=this.submitter)==null||e.flush();}catch(t){}this.submitter=null,this.installed=false;}}};var he=null;function ka(s){var e;he||((e=s.user)!=null&&e.id&&un(s.user.id),he=new _r({blocfeedId:s.blocfeed_id,...s.config!==void 0?{config:s.config}:{},extraSdkFeatures:["script-tag"]}),he.install());}function Fd(s,e){un(s);}function Bd(s,e){dn(s,e);}function Ud(){he&&(he.uninstall(),he=null);}var Wd={init:ka,identify:Fd,track:Bd,uninstall:Ud,SDK_VERSION:Tr};function zd(s){let e=(s!=null?s:"inputs").toLowerCase();return e==="none"?{maskAllInputs:false,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:e==="text"?{maskAllInputs:true,maskTextSelector:"*",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}}function Hd(s){var c,u;let e=s.blocfeedId;if(!e)return null;let t=parseFloat((c=s.sample)!=null?c:"1"),r=Number.isFinite(t)&&t>0?t:1,n=s.replay!=="false",i=s.signals!=="false",o=zd((u=s.mask)!=null?u:"inputs"),l={sampling:r,sessionReplay:{enabled:n,sampling:r,...o!==void 0?{masking:o}:{}},rageClick:{enabled:i},deadClick:{enabled:i},httpFail:{enabled:i},redirectLoop:{enabled:i},formDataLoss:{enabled:i}},a=s.userId||s.userEmail||s.userName?{...s.userId!==void 0?{id:s.userId}:{},...s.userEmail!==void 0?{email:s.userEmail}:{},...s.userName!==void 0?{name:s.userName}:{}}:void 0;return {blocfeedId:e,...a!==void 0?{user:a}:{},config:l,trackClicks:s.trackClicks==="true"}}var Vd=60;function Gd(){if(typeof document=="undefined")return ()=>{};let s=[],e=t=>{var o,l;let r=Date.now();if(s=s.filter(a=>r-a<6e4),s.length>=Vd)return;s.push(r);let n=t.target;if(!n||!(n instanceof Element))return;let i=null;try{i=(l=(o=n.innerText)==null?void 0:o.trim().slice(0,80))!=null?l:null;}catch(a){i=null;}try{dn("click",{tag:n.tagName.toLowerCase(),text:i||null,url:window.location.href});}catch(a){}};return document.addEventListener("click",e,{capture:true,passive:true}),()=>{try{document.removeEventListener("click",e,{capture:!0});}catch(t){}}}function Da(){if(typeof document=="undefined")return null;let s=document.currentScript;return s&&s.dataset&&s.dataset.blocfeedId?s:document.querySelector("script[data-blocfeed-id]")}function Or(){if(typeof window=="undefined"||typeof document=="undefined")return;let s=Da();if(!s)return;let e=Hd(s.dataset);if(!e){console.warn("[BlocFeed] script-tag init: data-blocfeed-id missing");return}ka({blocfeed_id:e.blocfeedId,...e.user!==void 0?{user:e.user}:{},config:e.config}),e.trackClicks&&Gd();}typeof window!="undefined"&&(window.BlocFeed=Wd,Da()?Or():typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Or,{once:true}):Or()));function Sm(){return he}function Cm(){he&&(he.uninstall(),he=null);}function Em(){Or();}/*! Bundled license information:
54
+ or you can use record.mirror to access the mirror instance during recording.`,Yi={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be);},has(){return console.error(Be),false},reset(){console.error(Be);}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Yi=new Proxy(Yi,{get(r,e,t){return e==="map"&&console.error(Be),Reflect.get(r,e,t)}}));function vt(r,e,t={}){let n=null,s=0;return function(...i){let o=Date.now();!s&&t.leading===false&&(s=o);let l=e-(o-s),a=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),s=o,r.apply(a,i)):!n&&t.trailing!==false&&(n=setTimeout(()=>{s=t.leading===false?0:Date.now(),n=null,r.apply(a,i);},l));}}function Ur(r,e,t,n,s=window){let i=s.Object.getOwnPropertyDescriptor(r,e);return s.Object.defineProperty(r,e,n?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),i&&i.set&&i.set.call(this,o);}}),()=>Ur(r,e,i||{},true)}var Rr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Rr=()=>new Date().getTime());function Da(r){var e,t,n,s;let i=r.document;return {left:i.scrollingElement?i.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((e=x.parentElement(i.body))==null?void 0:e.scrollLeft)||((t=i==null?void 0:i.body)==null?void 0:t.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((n=x.parentElement(i.body))==null?void 0:n.scrollTop)||((s=i==null?void 0:i.body)==null?void 0:s.scrollTop)||0}}function La(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Pa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function $a(r){return r?r.nodeType===r.ELEMENT_NODE?r:x.parentElement(r):null}function Q(r,e,t,n){if(!r)return false;let s=$a(r);if(!s)return false;try{if(typeof e=="string"){if(s.classList.contains(e)||n&&s.closest("."+e)!==null)return !0}else if(yr(s,e,n))return !0}catch(i){}return !!(t&&(s.matches(t)||n&&s.closest(t)!==null))}function Gd(r,e){return e.getId(r)!==-1}function gn(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(r)===ft}function Fa(r,e){if(lt(r))return false;let t=e.getId(r);if(!e.has(t))return true;let n=x.parentNode(r);return n&&n.nodeType===r.DOCUMENT_NODE?false:n?Fa(n,e):true}function Jn(r){return !!r.changedTouches}function jd(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function Ba(r,e){return !!(r.nodeName==="IFRAME"&&e.getMeta(r))}function Ua(r,e){return !!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}function Kn(r){return r?r instanceof Zn&&"shadowRoot"in r?!!r.shadowRoot:!!x.shadowRoot(r):false}var qn=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map);}getId(e){var t;return (t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function Wa(r){var e;let t=null;return "getRootNode"in r&&((e=x.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(r))&&(t=x.host(x.getRootNode(r))),t}function Yd(r){let e=r,t;for(;t=Wa(e);)e=t;return e}function Xd(r){let e=x.ownerDocument(r);if(!e)return false;let t=Yd(r);return x.contains(e,t)}function Ha(r){let e=x.ownerDocument(r);return e?x.contains(e,r)||Xd(r):false}var A=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(A||{}),R=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(R||{}),ee=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(ee||{}),ye=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(ye||{}),Je=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))(Je||{}),Ue=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(Ue||{});var za=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(za||{});function Xi(r){return "__ln"in r}var Qn=class{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xi(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t);}else if(e.nextSibling&&Xi(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.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--);}},Zi=(r,e)=>`${r}@${e}`,es=class{constructor(){w(this,"frozen",false),w(this,"locked",false),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),w(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Qn,s=a=>{let c=a,u=ft;for(;u===ft;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=a=>{let c=x.parentNode(a);if(!c||!Ha(a))return;let u=false;if(a.nodeType===Node.TEXT_NODE){let m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=true);}let f=lt(c)?this.mirror.getId(Wa(a)):this.mirror.getId(c),h=s(a);if(f===-1||h===-1)return n.addNode(a);let g=He(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,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=>{Ba(m,this.mirror)&&this.iframeManager.addIframe(m),Ua(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Kn(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc);},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p);},cssCaptured:u});g&&(e.push({parentId:f,nextId:h,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Ji(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||i(a);for(let a of this.addedSet)!Ki(this.droppedSet,a)&&!Ji(this.removesSubTreeCache,a,this.mirror)||Ki(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;n.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=s(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(s(u.value)===-1)continue;if(f!==-1){a=u;break}else {let g=u.value,m=x.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=x.host(m);if(this.mirror.getId(p)!==-1){a=u;break}}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}o=a.previous,n.removeNode(a.value),i(a.value);}let l={texts:this.texts.map(a=>{let c=a.node,u=x.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l));}),w(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 n=Array.from(x.childNodes(e),s=>x.textContent(s)||"").join("");t.attributes.value=pr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:mr(e),value:n,maskInputFn:this.maskInputFn});}),w(this,"processMutation",e=>{if(!gn(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!Q(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:fo(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,$a(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,n=e.attributeName,s=e.target.getAttribute(n);if(n==="value"){let o=mr(t);s=pr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:s,maskInputFn:this.maskInputFn});}if(Q(e.target,this.blockClass,this.blockSelector,false)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)n="rr_src";else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!uo(t.tagName,n))if(i.attributes[n]=co(this.doc,Te(t.tagName),Te(n),s),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch(l){this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?i.styleDiff[l]=a:i.styleDiff[l]=[a,c]:i._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(i.styleDiff[l]=false);}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case "childList":{if(Q(e.target,this.blockClass,this.blockSelector,true))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 n=this.mirror.getId(t),s=lt(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,false)||gn(t,this.mirror,this.slimDOMOptions)||!Gd(t,this.mirror)||(this.addedSet.has(t)?(ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Zi(n,s)]?ts(this.movedSet,t):(this.removes.push({parentId:s,id:n,isShadow:lt(e.target)&&ct(e.target)?true:void 0}),Zd(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(gn(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Zi(this.mirror.getId(e),n)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(n=>this.genAdds(n)),Kn(e)&&x.childNodes(x.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function ts(r,e){r.delete(e),x.childNodes(e).forEach(t=>ts(r,t));}function Zd(r,e){let t=[r];for(;t.length;){let n=t.pop();e.has(n)||(e.add(n),x.childNodes(n).forEach(s=>t.push(s)));}}function Ji(r,e,t){return r.size===0?false:Jd(r,e)}function Jd(r,e,t){let n=x.parentNode(e);return n?r.has(n):false}function Ki(r,e){return r.size===0?false:Va(r,e)}function Va(r,e){let t=x.parentNode(e);return t?r.has(t)?true:Va(r,t):false}var ut;function Kd(r){ut=r;}function qd(){ut=void 0;}var M=r=>ut?(...t)=>{try{return r(...t)}catch(n){if(ut&&ut(n)===true)return;throw n}}:r,Ae=[];function xt(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch(e){}return r&&r.target}function Ga(r,e){let t=new es;Ae.push(t),t.init(r);let n=new(ka())(M(t.processMutations.bind(t)));return n.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),n}function Qd({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(e.mousemove===false)return ()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=vt(M(f=>{let h=Date.now()-l;r(o.map(g=>(g.timeOffset-=h,g)),f),o=[],l=null;}),i),c=M(vt(M(f=>{let h=xt(f),{clientX:g,clientY:m}=Jn(f)?f.changedTouches[0]:f;l||(l=Rr()),o.push({x:g,y:m,id:n.getId(h),timeOffset:Rr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?R.Drag:f instanceof MouseEvent?R.MouseMove:R.TouchMove);}),s,{trailing:!1})),u=[q("mousemove",c,t),q("touchmove",c,t),q("drag",c,t)];return M(()=>{u.forEach(f=>f());})}function ep({mouseInteractionCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let o=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[],a=null,c=u=>f=>{let h=xt(f);if(Q(h,n,s,true))return;let g=null,m=u;if("pointerType"in f){switch(f.pointerType){case "mouse":g=ye.Mouse;break;case "touch":g=ye.Touch;break;case "pen":g=ye.Pen;break}g===ye.Touch?ee[u]===ee.MouseDown?m="TouchStart":ee[u]===ee.MouseUp&&(m="TouchEnd"):ye.Pen;}else Jn(f)&&(g=ye.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===ye.Touch||m.startsWith("Mouse")&&g===ye.Mouse)&&(g=null)):ee[u]===ee.Click&&(g=a,a=null);let p=Jn(f)?f.changedTouches[0]:f;if(!p)return;let d=t.getId(h),{clientX:y,clientY:v}=p;M(r)({type:ee[m],id:d,x:y,y:v,...g!==null&&{pointerType:g}});};return Object.keys(ee).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let f=Te(u),h=c(u);if(window.PointerEvent)switch(ee[u]){case ee.MouseDown:case ee.MouseUp:f=f.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}l.push(q(f,h,e));}),M(()=>{l.forEach(u=>u());})}function ja({scrollCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,sampling:i}){let o=M(vt(M(l=>{let a=xt(l);if(!a||Q(a,n,s,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=Da(e.defaultView);r({id:c,x:u.left,y:u.top});}else r({id:c,x:a.scrollLeft,y:a.scrollTop});}),i.scroll||100));return q("scroll",o,e)}function tp({viewportResizeCb:r},{win:e}){let t=-1,n=-1,s=M(vt(M(()=>{let i=La(),o=Pa();(t!==i||n!==o)&&(r({width:Number(o),height:Number(i)}),t=i,n=o);}),200));return q("resize",s,e)}var rp=["INPUT","TEXTAREA","SELECT"],qi=new WeakMap;function np({inputCb:r,doc:e,mirror:t,blockClass:n,blockSelector:s,ignoreClass:i,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function f(v){let b=xt(v),S=v.isTrusted,E=b&&b.tagName;if(b&&E==="OPTION"&&(b=x.parentElement(b)),!b||!E||rp.indexOf(E)<0||Q(b,n,s,true)||b.classList.contains(i)||o&&b.matches(o))return;let I=b.value,P=false,T=mr(b)||"";T==="radio"||T==="checkbox"?P=b.checked:(l[E.toLowerCase()]||l[T])&&(I=pr({element:b,maskInputOptions:l,tagName:E,type:T,value:I,maskInputFn:a})),h(b,u?{text:I,isChecked:P,userTriggered:S}:{text:I,isChecked:P});let $=b.name;T==="radio"&&$&&P&&e.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(F=>{if(F!==b){let D=F.value;h(F,u?{text:D,isChecked:!P,userTriggered:false}:{text:D,isChecked:!P});}});}function h(v,b){let S=qi.get(v);if(!S||S.text!==b.text||S.isChecked!==b.isChecked){qi.set(v,b);let E=t.getId(v);M(r)({...b,id:E});}}let m=(c.input==="last"?["change"]:["input","change"]).map(v=>q(v,M(f),e)),p=e.defaultView;if(!p)return ()=>{m.forEach(v=>v());};let d=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[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(...y.map(v=>Ur(v[0],v[1],{set(){M(f)({target:this,isTrusted:false});}},false,p))),M(()=>{m.forEach(v=>v());})}function Mr(r){let e=[];function t(n,s){if(ir("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||ir("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||ir("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||ir("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let o=Array.from(n.parentRule.cssRules).indexOf(n);s.unshift(o);}else if(n.parentStyleSheet){let o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(o);}return s}return t(r,e)}function Ee(r,e,t){let n,s;return r?(r.ownerNode?n=e.getId(r.ownerNode):s=t.getId(r),{styleId:s,id:n}):{}}function sp({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return ()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:M((u,f,h)=>{let[g,m]=h,{id:p,styleId:d}=Ee(f,e,t.styleMirror);return (p&&p!==-1||d&&d!==-1)&&r({id:p,styleId:d,adds:[{rule:g,index:m}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.addRule=function(u,f,h=this.cssRules.length){let g=`${u} { ${f} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[g,h])};let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,removes:[{index:g}]}),u.apply(f,h)})}),n.CSSStyleSheet.prototype.removeRule=function(u){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replace:g}),u.apply(f,h)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:M((u,f,h)=>{let[g]=h,{id:m,styleId:p}=Ee(f,e,t.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,replaceSync:g}),u.apply(f,h)})}));let a={};or("CSSGroupingRule")?a.CSSGroupingRule=n.CSSGroupingRule:(or("CSSMediaRule")&&(a.CSSMediaRule=n.CSSMediaRule),or("CSSConditionRule")&&(a.CSSConditionRule=n.CSSConditionRule),or("CSSSupportsRule")&&(a.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,f])=>{c[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(c[u].insertRule,{apply:M((h,g,m)=>{let[p,d]=m,{id:y,styleId:v}=Ee(g.parentStyleSheet,e,t.styleMirror);return (y&&y!==-1||v&&v!==-1)&&r({id:y,styleId:v,adds:[{rule:p,index:[...Mr(g),d||0]}]}),h.apply(g,m)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:M((h,g,m)=>{let[p]=m,{id:d,styleId:y}=Ee(g.parentStyleSheet,e,t.styleMirror);return (d&&d!==-1||y&&y!==-1)&&r({id:d,styleId:y,removes:[{index:[...Mr(g),p]}]}),h.apply(g,m)})});}),M(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,o&&(n.CSSStyleSheet.prototype.replace=o),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule;});})}function Ya({mirror:r,stylesheetManager:e},t){var n,s,i;let o=null;t.nodeName==="#document"?o=r.getId(t):o=r.getId(x.host(t));let l=t.nodeName==="#document"?(n=t.defaultView)==null?void 0:n.Document:(i=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:i.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return (c=a.get)==null?void 0:c.call(this)},set(c){var u;let f=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o);}catch(h){}return f}}),M(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function ip({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:n},{win:s}){let i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:M((l,a,c)=>{var u;let[f,h,g]=c;if(t.has(f))return i.apply(a,[f,h,g]);let{id:m,styleId:p}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (m&&m!==-1||p&&p!==-1)&&r({id:m,styleId:p,set:{property:f,value:h,priority:g},index:Mr(a.parentRule)}),l.apply(a,c)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:M((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:h,styleId:g}=Ee((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,n.styleMirror);return (h&&h!==-1||g&&g!==-1)&&r({id:h,styleId:g,remove:{property:f},index:Mr(a.parentRule)}),l.apply(a,c)})}),M(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o;})}function op({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:n,sampling:s,doc:i}){let o=M(a=>vt(M(c=>{let u=xt(c);if(!u||Q(u,e,t,!0))return;let{currentTime:f,volume:h,muted:g,playbackRate:m,loop:p}=u;r({type:a,id:n.getId(u),currentTime:f,volume:h,muted:g,playbackRate:m,loop:p});}),s.media||500)),l=[q("play",o(Ue.Play),i),q("pause",o(Ue.Pause),i),q("seeked",o(Ue.Seeked),i),q("volumechange",o(Ue.VolumeChange),i),q("ratechange",o(Ue.RateChange),i)];return M(()=>{l.forEach(a=>a());})}function ap({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let n=[],s=new WeakMap,i=t.FontFace;t.FontFace=function(a,c,u){let f=new i(a,c,u);return s.set(f,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),f};let o=Oe(e.fonts,"add",function(l){return function(a){return setTimeout(M(()=>{let c=s.get(a);c&&(r(c),s.delete(a));}),0),l.apply(this,[a])}});return n.push(()=>{t.FontFace=i;}),n.push(o),M(()=>{n.forEach(l=>l());})}function lp(r){let{doc:e,mirror:t,blockClass:n,blockSelector:s,selectionCb:i}=r,o=true,l=M(()=>{let a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let f=0;f<u;f++){let h=a.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:p,endOffset:d}=h;Q(g,n,s,!0)||Q(p,n,s,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(p),endOffset:d});}i({ranges:c});});return l(),q("selectionchange",l)}function cp({doc:r,customElementCb:e}){let t=r.defaultView;return !t||!t.customElements?()=>{}:Oe(t.customElements,"define",function(s){return function(i,o,l){try{e({define:{name:i}});}catch(a){console.warn(`Custom element callback failed for ${i}`);}return s.apply(this,[i,o,l])}})}function up(r,e){let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:s,scrollCb:i,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:h,selectionCb:g,customElementCb:m}=r;r.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p);},r.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p);},r.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),s(...p);},r.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},r.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p);},r.inputCb=(...p)=>{e.input&&e.input(...p),l(...p);},r.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p);},r.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),c(...p);},r.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),u(...p);},r.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),f(...p);},r.fontCb=(...p)=>{e.font&&e.font(...p),h(...p);},r.selectionCb=(...p)=>{e.selection&&e.selection(...p),g(...p);},r.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p);};}function fp(r,e={}){let t=r.doc.defaultView;if(!t)return ()=>{};up(r,e);let n;r.recordDOM&&(n=Ga(r,r.doc));let s=Qd(r),i=ep(r),o=ja(r),l=tp(r,{win:t}),a=np(r),c=op(r),u=()=>{},f=()=>{},h=()=>{},g=()=>{};r.recordDOM&&(u=sp(r,{win:t}),f=Ya(r,r.doc),h=ip(r,{win:t}),r.collectFonts&&(g=ap(r)));let m=lp(r),p=cp(r),d=[];for(let y of r.plugins)d.push(y.observer(y.callback,t,y.options));return M(()=>{Ae.forEach(y=>y.reset()),n==null||n.disconnect(),s(),i(),o(),l(),a(),c(),u(),f(),h(),g(),m(),p(),d.forEach(y=>y());})}function ir(r){return typeof window[r]!="undefined"}function or(r){return !!(typeof window[r]!="undefined"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}var Ar=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,n,s){let i=n||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e),l=i.get(t);return l||(l=this.generateIdFn(),i.set(t,l),o.set(l,t)),l}getIds(e,t){let n=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,n,s))}getRemoteId(e,t,n){let s=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let i=s.get(t);return i||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,n))}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}},rs=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Ar(lo)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ar(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,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,t){var n,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.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 s=this.crossOriginIframeMap.get(e.source);if(!s)return;let i=this.transformCrossOriginEvent(s,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout);}transformCrossOriginEvent(e,t){var n;switch(t.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:A.IncrementalSnapshot,data:{source:R.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case A.Meta:case A.Load:case A.DomContentLoaded:return false;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 R.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(s.node,i);}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"]);}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"]);}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"]);}),t;case R.Drag:case R.TouchMove:case R.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"]);}),t;case R.ViewportResize:return false;case R.MediaInteraction:case R.MouseInteraction:case R.Scroll:case R.CanvasMutation:case R.Input:return this.replaceIds(t.data,e,["id"]),t;case R.StyleSheetRule:case R.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case R.Font:return t;case R.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"]);}),t;case R.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,e,["styleId"]);}),t}}return false}replace(e,t,n,s){for(let i of s)!Array.isArray(t[i])&&typeof t[i]!="number"||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t);});}patchRootIdOnNode(e,t){e.type!==za.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t);});}},ns=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(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(!ct(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Ga({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(ja({...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(x.host(e))),this.restoreHandlers.push(Ya({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 n=this;this.restoreHandlers.push(Oe(e.prototype,"attachShadow",function(s){return function(i){let o=s.call(this,i),l=x.shadowRoot(this);return l&&Ha(this)&&n.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(at=0;at<ze.length;at++)hp[ze.charCodeAt(at)]=at;var at,dp=function(r){var e=new Uint8Array(r),t,n=e.length,s="";for(t=0;t<n;t+=3)s+=ze[e[t]>>2],s+=ze[(e[t]&3)<<4|e[t+1]>>4],s+=ze[(e[t+1]&15)<<2|e[t+2]>>6],s+=ze[e[t+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var Qi=new Map;function pp(r,e){let t=Qi.get(r);return t||(t=new Map,Qi.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}var Xa=(r,e,t)=>{if(!r||!(Ja(r,e)||typeof r=="object"))return;let n=r.constructor.name,s=pp(t,n),i=s.indexOf(r);return i===-1&&(i=s.length,s.push(r)),i};function fr(r,e,t){if(r instanceof Array)return r.map(n=>fr(n,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return {rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){let n=r.constructor.name,s=dp(r);return {rr_type:n,base64:s}}else {if(r instanceof DataView)return {rr_type:r.constructor.name,args:[fr(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){let n=r.constructor.name,{src:s}=r;return {rr_type:n,src:s}}else if(r instanceof HTMLCanvasElement){let n="HTMLImageElement",s=r.toDataURL();return {rr_type:n,src:s}}else {if(r instanceof ImageData)return {rr_type:r.constructor.name,args:[fr(r.data,e,t),r.width,r.height]};if(Ja(r,e)||typeof r=="object"){let n=r.constructor.name,s=Xa(r,e,t);return {rr_type:n,index:s}}}}return r}var Za=(r,e,t)=>r.map(n=>fr(n,e,t)),Ja=(r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>r instanceof e[s]);function mp(r,e,t,n){let s=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of i)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Oe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return Q(this.canvas,t,n,!0)||setTimeout(()=>{let u=Za(c,e,this);r(this.canvas,{type:Je["2D"],property:o,args:u});},0),a.apply(this,c)}});s.push(l);}catch(l){let a=Ur(e.CanvasRenderingContext2D.prototype,o,{set(c){r(this.canvas,{type:Je["2D"],property:o,args:[c],setter:true});}});s.push(a);}return ()=>{s.forEach(o=>o());}}function gp(r){return r==="experimental-webgl"?"webgl":r}function eo(r,e,t,n){let s=[];try{let i=Oe(r.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!Q(this,e,t,!0)){let c=gp(l);if("__context"in this||(this.__context=c),n&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});s.push(i);}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{s.forEach(i=>i());}}function to(r,e,t,n,s,i){let o=[],l=Object.getOwnPropertyNames(r);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof r[a]!="function")continue;let c=Oe(r,a,function(u){return function(...f){let h=u.apply(this,f);if(Xa(h,i,this),"tagName"in this.canvas&&!Q(this.canvas,n,s,!0)){let g=Za(f,i,this),m={type:e,property:a,args:g};t(this.canvas,m);}return h}});o.push(c);}catch(c){let u=Ur(r,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:true});}});o.push(u);}return o}function yp(r,e,t,n){let s=[];return s.push(...to(e.WebGLRenderingContext.prototype,Je.WebGL,r,t,n,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...to(e.WebGL2RenderingContext.prototype,Je.WebGL2,r,t,n,e)),()=>{s.forEach(i=>i());}}var Ka="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",bp=r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),ro=typeof window!="undefined"&&window.Blob&&new Blob([bp(Ka)],{type:"text/javascript;charset=utf-8"});function wp(r){let e;try{if(e=ro&&(window.URL||window.webkitURL).createObjectURL(ro),!e)throw "";let t=new Worker(e,{name:r==null?void 0:r.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ka,{name:r==null?void 0:r.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var ss=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",false),w(this,"locked",false),w(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c);});let{sampling:t="all",win:n,blockClass:s,blockSelector:i,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(n,s,i),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,s,i,{dataURLOptions:l});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,t,n,s,i){let o=eo(t,n,s,true),l=new Map,a=new wp;a.onmessage=m=>{let{id:p}=m.data;if(l.set(p,false),!("base64"in m.data))return;let{base64:d,type:y,width:v,height:b}=m.data;this.mutationCb({id:p,type:Je["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]});};let c=1e3/e,u=0,f,h=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(p=>{Q(p,n,s,true)||m.push(p);}),m},g=m=>{if(u&&m-u<c){f=requestAnimationFrame(g);return}u=m,h().forEach(async p=>{var d;let y=this.mirror.getId(p);if(l.get(y)||p.width===0||p.height===0)return;if(l.set(y,true),["webgl","webgl2"].includes(p.__context)){let b=p.getContext(p.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===false&&b.clear(b.COLOR_BUFFER_BIT);}let v=await createImageBitmap(p);a.postMessage({id:y,bitmap:v,width:p.width,height:p.height,dataURLOptions:i.dataURLOptions},[v]);}),f=requestAnimationFrame(g);};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f);};}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=eo(e,t,n,false),i=mp(this.processMutation.bind(this),e,t,n),o=yp(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{s(),i(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let s=n.map(o=>{let{type:l,...a}=o;return a}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:s}),this.pendingCanvasMutations.delete(e);}},is=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new qn),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 n={id:t,styleIds:[]},s=[];for(let i of e){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(l,a)=>({rule:oo(l,i.href),index:a}))})),n.styleIds.push(o);}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}},os=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",false);}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(s=>s!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},G,hr,yn,Tr=false;try{if(Array.from([1],r=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((oi=r.contentWindow)==null?void 0:oi.Array.from)||Array.from,document.body.removeChild(r);}}catch(r){console.debug("Unable to override Array.from",r);}var le=xc();function Ce(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=true,maskAllInputs:f,maskInputOptions:h,slimDOMOptions:g,maskInputFn:m,maskTextFn:p,hooks:d,packFn:y,sampling:v={},dataURLOptions:b={},mousemoveWait:S,recordDOM:E=true,recordCanvas:I=false,recordCrossOriginIframes:P=false,recordAfter:T=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:$=false,collectFonts:F=false,inlineImages:D=false,plugins:K,keepIframeSrcFn:C=()=>false,ignoreCSSAttributes:te=new Set([]),errorHandler:Ie}=r;Kd(Ie);let j=P?window.parent===window:true,se=false;if(!j)try{window.parent.document&&(se=!1);}catch(N){se=true;}if(j&&!e)throw new Error("emit function is required");if(!j&&!se)return ()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),le.reset();let xe=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:h!==void 0?h:{password:true},he=ho(g);jd();let Hs,Qr=0,zs=N=>{for(let ae of K||[])ae.eventProcessor&&(N=ae.eventProcessor(N));return y&&!se&&(N=y(N)),N};G=(N,ae)=>{var z;let V=N;if(V.timestamp=Rr(),(z=Ae[0])!=null&&z.isFrozen()&&V.type!==A.FullSnapshot&&!(V.type===A.IncrementalSnapshot&&V.data.source===R.Mutation)&&Ae.forEach(re=>re.unfreeze()),j)e==null||e(zs(V),ae);else if(se){let re={type:"rrweb",event:zs(V),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(re,"*");}if(V.type===A.FullSnapshot)Hs=V,Qr=0;else if(V.type===A.IncrementalSnapshot){if(V.data.source===R.Mutation&&V.data.isAttachIframe)return;Qr++;let re=n&&Qr>=n,k=t&&V.timestamp-Hs.timestamp>t;(re||k)&&hr(true);}};let Nt=N=>{G({type:A.IncrementalSnapshot,data:{source:R.Mutation,...N}});},Vs=N=>G({type:A.IncrementalSnapshot,data:{source:R.Scroll,...N}}),Gs=N=>G({type:A.IncrementalSnapshot,data:{source:R.CanvasMutation,...N}}),Bl=N=>G({type:A.IncrementalSnapshot,data:{source:R.AdoptedStyleSheet,...N}}),Re=new is({mutationCb:Nt,adoptedStyleSheetCb:Bl}),Me=new rs({mirror:le,mutationCb:Nt,stylesheetManager:Re,recordCrossOriginIframes:P,wrappedEmit:G});for(let N of K||[])N.getMirror&&N.getMirror({nodeMirror:le,crossOriginIframeMirror:Me.crossOriginIframeMirror,crossOriginIframeStyleMirror:Me.crossOriginIframeStyleMirror});let en=new os;yn=new ss({recordCanvas:I,mutationCb:Gs,win:window,blockClass:s,blockSelector:i,mirror:le,sampling:v.canvas,dataURLOptions:b});let _t=new ns({mutationCb:Nt,scrollCb:Vs,bypassOptions:{blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:xe,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:I,inlineImages:D,sampling:v,slimDOMOptions:he,iframeManager:Me,stylesheetManager:Re,canvasManager:yn,keepIframeSrcFn:C,processedNodeManager:en},mirror:le});hr=(N=false)=>{if(!E)return;G({type:A.Meta,data:{href:window.location.href,width:Pa(),height:La()}},N),Re.reset(),_t.init(),Ae.forEach(z=>z.lock());let ae=Zc(document,{mirror:le,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:xe,maskTextFn:p,maskInputFn:m,slimDOM:he,dataURLOptions:b,recordCanvas:I,inlineImages:D,onSerialize:z=>{Ba(z,le)&&Me.addIframe(z),Ua(z,le)&&Re.trackLinkElement(z),Kn(z)&&_t.addShadowRoot(x.shadowRoot(z),document);},onIframeLoad:(z,V)=>{Me.attachIframe(z,V),_t.observeAttachShadow(z);},onStylesheetLoad:(z,V)=>{Re.attachLinkElement(z,V);},keepIframeSrcFn:C});if(!ae)return console.warn("Failed to snapshot the document");G({type:A.FullSnapshot,data:{node:ae,initialOffset:Da(window)}},N),Ae.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Re.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document));};try{let N=[],ae=V=>{var re;return M(fp)({mutationCb:Nt,mousemoveCb:(k,tn)=>G({type:A.IncrementalSnapshot,data:{source:tn,positions:k}}),mouseInteractionCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.MouseInteraction,...k}}),scrollCb:Vs,viewportResizeCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.ViewportResize,...k}}),inputCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.Input,...k}}),mediaInteractionCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.MediaInteraction,...k}}),styleSheetRuleCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.StyleSheetRule,...k}}),styleDeclarationCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.StyleDeclaration,...k}}),canvasMutationCb:Gs,fontCb:k=>G({type:A.IncrementalSnapshot,data:{source:R.Font,...k}}),selectionCb:k=>{G({type:A.IncrementalSnapshot,data:{source:R.Selection,...k}});},customElementCb:k=>{G({type:A.IncrementalSnapshot,data:{source:R.CustomElement,...k}});},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:xe,inlineStylesheet:u,sampling:v,recordDOM:E,recordCanvas:I,inlineImages:D,userTriggeredOnInput:$,collectFonts:F,doc:V,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:C,blockSelector:i,slimDOMOptions:he,dataURLOptions:b,mirror:le,iframeManager:Me,stylesheetManager:Re,shadowDomManager:_t,processedNodeManager:en,canvasManager:yn,ignoreCSSAttributes:te,plugins:((re=K==null?void 0:K.filter(k=>k.observer))==null?void 0:re.map(k=>({observer:k.observer,options:k.options,callback:tn=>G({type:A.Plugin,data:{plugin:k.name,payload:tn}})})))||[]},d)};Me.addLoadListener(V=>{try{N.push(ae(V.contentDocument));}catch(re){console.warn(re);}});let z=()=>{hr(),N.push(ae(document)),Tr=!0;};return ["interactive","complete"].includes(document.readyState)?z():(N.push(q("DOMContentLoaded",()=>{G({type:A.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&z();})),N.push(q("load",()=>{G({type:A.Load,data:{}}),T==="load"&&z();},window))),()=>{N.forEach(V=>{try{V();}catch(re){String(re).toLowerCase().includes("cross-origin")||console.warn(re);}}),en.destroy(),Tr=!1,qd();}}catch(N){console.warn(N);}}Ce.addCustomEvent=(r,e)=>{if(!Tr)throw new Error("please add custom event after start recording");G({type:A.Custom,data:{tag:r,payload:e}});};Ce.freezePage=()=>{Ae.forEach(r=>r.freeze());};Ce.takeFullSnapshot=r=>{if(!Tr)throw new Error("please take full snapshot after start recording");hr(r);};Ce.mirror=le;var no;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped";})(no||(no={}));var vp="https://blocfeed.com/api/replay-events";function qa(r){var K;if(!r.config.enabled)return ()=>{};if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=Y();if(Dt(e)%100/100>=r.config.sampling)return ()=>{};let n=Date.now(),s=(K=r.config.endpoint)!=null?K:vp,i=[],o=0,l=false,a=false,c=null,u=`bf_replay_chunkseq_${e}`,f=`bf_replay_pauses_${e}`,h=0,g=0;try{let C=sessionStorage.getItem(u);C&&(h=parseInt(C,10)||0);let te=sessionStorage.getItem(f);te&&(g=parseInt(te,10)||0);}catch(C){}let m=(C=false)=>{if(i.length===0)return;let te=C?Cp(i):i;i=[],o=0;let Ie=h++;try{sessionStorage.setItem(u,String(h));}catch(j){}Ep({blocfeedId:r.blocfeedId,sessionId:e,sessionStartedAtMs:n,chunkSeq:Ie,events:te,endpoint:s,useBeacon:C,pauseCount:g});},p=setInterval(()=>{l||m();},r.config.flushIntervalMs),d=setTimeout(()=>{m(),D();},r.config.maxDurationMs),y=null,v=()=>{y&&clearTimeout(y),y=setTimeout(()=>{$();},r.config.inactivityTimeoutMs);},b=()=>{m(true);};window.addEventListener("pagehide",b);let S=r.config.masking,E={emit(C){l||(i.push(C),o+=Sp(C),v(),o>=r.config.flushSizeBytes&&m());},recordCanvas:false,sampling:{mousemove:50}};S.maskAllInputs!==void 0&&(E.maskAllInputs=S.maskAllInputs),S.maskTextSelector!==void 0&&(E.maskTextSelector=S.maskTextSelector),S.maskTextClass!==void 0&&(E.maskTextClass=S.maskTextClass),S.blockSelector!==void 0&&(E.blockSelector=S.blockSelector);let I=null,P=()=>{I&&(document.removeEventListener("pointerdown",I,true),document.removeEventListener("keydown",I,true),I=null);};function T(){var C;c=(C=Ce(E))!=null?C:null;}function $(){if(l||a)return;a=true,g++;try{sessionStorage.setItem(f,String(g));}catch(te){}if(m(),c){try{c();}catch(te){}c=null;}y&&(clearTimeout(y),y=null);let C=()=>{P(),F();};I=C,document.addEventListener("pointerdown",C,{capture:true,once:true}),document.addEventListener("keydown",C,{capture:true,once:true});}function F(){l||!a||(a=false,T(),v());}v(),T();function D(){if(!l&&(l=true,clearInterval(p),clearTimeout(d),y&&clearTimeout(y),P(),window.removeEventListener("pagehide",b),c)){try{c();}catch(C){}c=null;}}return D}function Sp(r){try{return JSON.stringify(r).length}catch(e){return 1024}}function Cp(r){let t=JSON.stringify(r);if(t.length<=6e4)return r;let n=[...r];for(;n.length>1;)if(n.shift(),t=JSON.stringify(n),t.length<=6e4)return n;return n}async function Ep(r){let e=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:r.sessionId,session_started_at_ms:r.sessionStartedAtMs,chunk_seq:r.chunkSeq,pause_count:r.pauseCount,events:r.events,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:""});if(r.useBeacon&&typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function")try{let n=new Blob([e],{type:"application/json"});navigator.sendBeacon(r.endpoint,n);return}catch(n){}let t=!!r.useBeacon;try{await fetch(r.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:e,...t?{keepalive:!0}:{}});}catch(n){}}var Ip={enabled:true,endpoint:null,maxDurationMs:144e5,flushIntervalMs:3e4,flushSizeBytes:1048576,inactivityTimeoutMs:18e5,sampling:1,masking:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}};function Qa(r){var t,n,s,i,o,l,a,c;let e=Ip;return {enabled:(t=r==null?void 0:r.enabled)!=null?t:e.enabled,endpoint:(n=r==null?void 0:r.endpoint)!=null?n:e.endpoint,maxDurationMs:(s=r==null?void 0:r.maxDurationMs)!=null?s:e.maxDurationMs,flushIntervalMs:(i=r==null?void 0:r.flushIntervalMs)!=null?i:e.flushIntervalMs,flushSizeBytes:(o=r==null?void 0:r.flushSizeBytes)!=null?o:e.flushSizeBytes,inactivityTimeoutMs:(l=r==null?void 0:r.inactivityTimeoutMs)!=null?l:e.inactivityTimeoutMs,sampling:(a=r==null?void 0:r.sampling)!=null?a:e.sampling,masking:{...e.masking,...(c=r==null?void 0:r.masking)!=null?c:{}}}}var xp="https://blocfeed.com/api/events/track",Rp=5e3,Mp=50,Ap=1024,zr="blocfeed-events-queue",el=500,tl=100,Tp=/^[a-z][a-z0-9_]{0,127}$/,rl=50,nl=1024,sl;function Ns(r){sl=r;}function Np(r){if(typeof r!="string"||!Tp.test(r))throw new Error(`[BlocFeed] track(): event_name "${r}" must match /^[a-z][a-z0-9_]{0,127}$/ (lowercase, start with a letter, only [a-z0-9_], \u2264128 chars).`)}function _p(r){if(r===void 0)return {};if(r===null||typeof r!="object"||Array.isArray(r))throw new Error("[BlocFeed] track(): properties must be a plain object.");let e=Object.keys(r);if(e.length>rl)throw new Error(`[BlocFeed] track(): properties has ${e.length} keys, max ${rl}.`);for(let n of e){let s=r[n];if(s!==null&&typeof s!="string"&&typeof s!="number"&&typeof s!="boolean")throw new Error(`[BlocFeed] track(): property "${n}" has unsupported type "${typeof s}". Allowed: string | number | boolean | null.`)}let t;try{t=JSON.stringify(r);}catch(n){throw new Error(`[BlocFeed] track(): properties is not JSON-serializable (${n.message}).`)}if(t.length>nl)throw new Error(`[BlocFeed] track(): properties serialized to ${t.length} bytes, max ${nl}. Server allows 8192 bytes \u2014 the client cap is defensive; trim down or split the event.`);return r}function _s(){if(typeof localStorage=="undefined")return [];try{let r=localStorage.getItem(zr);if(!r)return [];let e=JSON.parse(r);return Array.isArray(e)?e:[]}catch(r){try{localStorage.removeItem(zr);}catch(e){}return []}}function Os(r){if(typeof localStorage!="undefined")try{if(r.length===0)localStorage.removeItem(zr);else {let e=r.length>el?r.slice(r.length-el):r;localStorage.setItem(zr,JSON.stringify(e));}}catch(e){}}var oe=null;function Op(){if(oe)return oe;if(typeof window=="undefined")return null;let r=kp();return r?(oe={blocfeedId:r,endpoint:xp,events:[],bytes:0,flushTimer:null,pageHideHandler:null,visibilityHandler:null},oe.flushTimer=setInterval(()=>{Hr(false);},Rp),oe.pageHideHandler=()=>{Hr(true);},oe.visibilityHandler=()=>{document.visibilityState==="hidden"&&Hr(true);},window.addEventListener("pagehide",oe.pageHideHandler),document.addEventListener("visibilitychange",oe.visibilityHandler),oe):null}function kp(){try{let e=window.__blocfeed_id__;return typeof e=="string"&&e.length>0?e:null}catch(r){return null}}function il(r){try{window.__blocfeed_id__=r;}catch(e){}oe&&(oe.blocfeedId=r);}function ks(r,e,t){var f,h,g;Np(r);let n=_p(e),s=new Date().toISOString(),i={event_name:r,properties:n,occurred_at:s},o=(f=void 0)!=null?f:Lp();o&&(i.session_id=o);let l=(h=void 0)!=null?h:sl;l&&(i.user_id=l);let a=(g=void 0)!=null?g:Pp();a&&(i.page_url=a);let c=$p();c&&(i.user_agent=c);let u=Op();if(!u){let m=_s();m.push(i),Os(m);return}u.events.push(i),u.bytes+=Dp(i),(u.events.length>=Mp||u.bytes>=Ap)&&Hr(false);}async function Hr(r){let e=oe;if(!e)return;let n=_s().concat(e.events);if(e.events=[],e.bytes=0,Os([]),n.length!==0)for(let s=0;s<n.length;s+=tl){let i=n.slice(s,s+tl),o=JSON.stringify({blocfeed_id:e.blocfeedId,events:i});if(r&&Bp())try{let l=new Blob([o],{type:"application/json"});navigator.sendBeacon(e.endpoint,l)||Wr(i);continue}catch(l){Wr(i);continue}try{(await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:o})).ok||Wr(i);}catch(l){Wr(i);}}}function Wr(r){let e=_s();Os(e.concat(r));}function Dp(r){try{return JSON.stringify(r).length}catch(e){return 256}}function Lp(){try{return Y()}catch(r){return}}function Pp(){try{return typeof window!="undefined"?window.location.href:void 0}catch(r){return}}function $p(){try{return typeof navigator!="undefined"?navigator.userAgent:void 0}catch(r){return}}function Bp(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}var Up="https://blocfeed.com/api/heartbeat",Wp=300*1e3;function ol(r){var l,a,c;if(typeof window=="undefined")return ()=>{};if(typeof globalThis.matchMedia=="undefined")return ()=>{};let e=(l=r.endpoint)!=null?l:Up,t=(a=r.intervalMs)!=null?a:Wp,n=(c=r.features)!=null?c:["replay","behavioral","customEvents"],s=u=>{try{let f=JSON.stringify({blocfeed_id:r.blocfeedId,session_id:Hp(),version:r.version,page_url:typeof window!="undefined"?window.location.href:"",user_agent:typeof navigator!="undefined"?navigator.userAgent:"",sdk_features:n}),h={method:"POST",headers:{"Content-Type":"application/json"},body:f};u&&(h.keepalive=!0),fetch(e,h).catch(()=>{});}catch(f){}};try{s(!1);}catch(u){}let i=null;try{i=setInterval(()=>{try{s(!1);}catch(u){}},t);}catch(u){i=null;}let o=()=>{try{s(!0);}catch(u){}};try{window.addEventListener("pagehide",o);}catch(u){}return function(){try{i&&clearInterval(i);}catch(f){}i=null;try{window.removeEventListener("pagehide",o);}catch(f){}}}function Hp(){try{return Y()}catch(r){return ""}}var Vr="0.22.0";var zp=5e3,Gr=class{constructor(e){this.submitter=null;this.detectorUninstallers=[];this.flushTimer=null;this.pageHideHandler=null;this.installed=false;this.opts=e,this.resolved=js(e.config);}install(){var l,a,c,u;if(this.installed||!this.resolved.enabled)return;let e=()=>{try{let f=Y();return Dt(f)%100/100<this.resolved.sampling}catch(f){return false}};if(!((l=this.opts.passiveSampler)!=null?l:e)())return;il(this.opts.blocfeedId);let n=(a=this.opts.endpoint)!=null?a:"https://blocfeed.com/api/behavioral-events";this.submitter=(c=this.opts.submitter)!=null?c:Ys({endpoint:n,blocfeedId:this.opts.blocfeedId});let s=f=>{var h;(h=this.submitter)==null||h.enqueue(f);};this.detectorUninstallers.push(Qs(this.resolved,s)),this.detectorUninstallers.push(ri(this.resolved,s)),this.detectorUninstallers.push(ni(this.resolved,s)),this.detectorUninstallers.push(si(this.resolved,s)),this.detectorUninstallers.push(ii(this.resolved,s));let i=Qa((u=this.opts.config)==null?void 0:u.sessionReplay);this.detectorUninstallers.push(qa({blocfeedId:this.opts.blocfeedId,config:i}));let o=["behavioral","customEvents"];if(i.enabled&&o.unshift("replay"),this.opts.extraSdkFeatures)for(let f of this.opts.extraSdkFeatures)o.push(f);this.detectorUninstallers.push(ol({blocfeedId:this.opts.blocfeedId,version:Vr,features:o})),this.flushTimer=setInterval(()=>{var f;(f=this.submitter)==null||f.flush();},zp),this.pageHideHandler=()=>{var f;(f=this.submitter)==null||f.flushBeacon();},typeof window!="undefined"&&window.addEventListener("pagehide",this.pageHideHandler),this.installed=true;}uninstall(){var e;if(this.installed){for(let t of [...this.detectorUninstallers].reverse())try{t();}catch(n){}this.detectorUninstallers=[],this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.pageHideHandler&&typeof window!="undefined"&&(window.removeEventListener("pagehide",this.pageHideHandler),this.pageHideHandler=null);try{(e=this.submitter)==null||e.flush();}catch(t){}this.submitter=null,this.installed=false;}}};var Tm="blocfeed-embed/ready",Nm="blocfeed-embed/screenshot-request",_m="blocfeed-embed/submit-success",Om="blocfeed-embed/close",km="blocfeed-embed/init",Dm="blocfeed-embed/screenshot-result",Kr=null;function Lm(r,e,t){r.style.position="fixed",r.style.zIndex="2147483647",r.style.background=e,r.style.color="#ffffff",r.style.border="0",r.style.borderRadius="24px",r.style.padding="12px 20px",r.style.fontSize="14px",r.style.fontWeight="600",r.style.fontFamily="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",r.style.cursor="pointer",r.style.boxShadow="0 8px 16px rgba(0,0,0,0.18)",r.style.lineHeight="1",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="";let n="16px";t==="bottom-right"?(r.style.bottom=n,r.style.right=n):t==="bottom-left"?(r.style.bottom=n,r.style.left=n):t==="top-right"?(r.style.top=n,r.style.right=n):(r.style.top=n,r.style.left=n);}function Pm(r,e){r.style.position="fixed",r.style.width="380px",r.style.height="600px",r.style.border="0",r.style.borderRadius="12px",r.style.boxShadow="0 25px 50px -12px rgba(0,0,0,0.4)",r.style.zIndex="2147483646",r.style.display="none",r.style.background="transparent",r.style.top="",r.style.bottom="",r.style.left="",r.style.right="",e==="bottom-right"?(r.style.bottom="80px",r.style.right="16px"):e==="bottom-left"?(r.style.bottom="80px",r.style.left="16px"):e==="top-right"?(r.style.top="80px",r.style.right="16px"):(r.style.top="80px",r.style.left="16px");}function $m(r,e){return `${r.replace(/\/+$/,"")}/embed/${encodeURIComponent(e)}`}async function Fm(){try{let r=await Promise.resolve().then(()=>(kl(),Ol)),e=typeof devicePixelRatio=="number"?devicePixelRatio:1;return {dataUrl:await r.toPng(document.body,{pixelRatio:Math.min(2,e),cacheBust:!0})}}catch(r){return {dataUrl:null,error:r instanceof Error?r.message:String(r)}}}function Dl(r,e,t){let n=r.contentWindow;if(n)try{n.postMessage(t,e);}catch(s){}}function Ll(r){if(Kr)return Kr;if(typeof window=="undefined"||typeof document=="undefined")return ()=>{};let{blocfeedId:e,embedOrigin:t,color:n,label:s,position:i,user:o}=r,l=document.createElement("button");l.setAttribute("data-blocfeed-trigger",""),l.setAttribute("type","button"),l.setAttribute("aria-label","Open feedback"),l.textContent=s,Lm(l,n,i);let a=document.createElement("iframe");a.setAttribute("data-blocfeed-iframe",""),a.setAttribute("title","BlocFeed feedback"),a.setAttribute("allow","microphone; clipboard-write"),a.src=$m(t,e),Pm(a,i);let c=()=>{a.style.display="block";};l.addEventListener("click",c);let u=h=>{if(h.origin!==t)return;let g=h.data;if(!(!g||typeof g!="object"||typeof g.kind!="string")){if(g.kind===Tm){let m={kind:km,pageUrl:window.location.href,userAgent:navigator.userAgent,sessionId:Y(),...o!==void 0?{user:o}:{}};Dl(a,t,m);return}if(g.kind===Nm){let m=g.requestId;Fm().then(p=>{Dl(a,t,{kind:Dm,requestId:m,dataUrl:p.dataUrl,...p.error!==void 0?{error:p.error}:{}});});return}if(g.kind===_m){try{console.log("[BlocFeed] feedback submitted",{feedback_id:g.feedback_id,viewer_url:g.viewer_url});}catch(m){}return}if(g.kind===Om){a.style.display="none";return}}};window.addEventListener("message",u),document.body.appendChild(l),document.body.appendChild(a);let f=()=>{try{l.removeEventListener("click",c);}catch(h){}try{window.removeEventListener("message",u);}catch(h){}l.parentNode&&l.parentNode.removeChild(l),a.parentNode&&a.parentNode.removeChild(a),Kr=null;};return Kr=f,f}var ge=null;function $l(r){var e;ge||((e=r.user)!=null&&e.id&&Ns(r.user.id),ge=new Gr({blocfeedId:r.blocfeed_id,...r.config!==void 0?{config:r.config}:{},extraSdkFeatures:["script-tag"]}),ge.install());}function Bm(r,e){Ns(r);}function Um(r,e){ks(r,e);}function Wm(){ge&&(ge.uninstall(),ge=null);}var Hm={init:$l,identify:Bm,track:Um,uninstall:Wm,SDK_VERSION:Vr};function zm(r){let e=(r!=null?r:"inputs").toLowerCase();return e==="none"?{maskAllInputs:false,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:e==="text"?{maskAllInputs:true,maskTextSelector:"*",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}:{maskAllInputs:true,maskTextSelector:"[data-blocfeed-mask]",maskTextClass:"blocfeed-mask",blockSelector:"[data-blocfeed-block]"}}var Ws="https://blocfeed.com",Vm="#12D393",Gm="Feedback",Pl="bottom-right",jm=new Set(["bottom-right","bottom-left","top-right","top-left"]);function Ym(r){if(!r)return Ws;let e=r.trim();return e&&(e.startsWith("https://")||/^http:\/\/localhost(?::\d+)?(\/.*)?$/i.test(e))?e:Ws}function Xm(r){if(!r)return Pl;let e=r.toLowerCase();return jm.has(e)?e:Pl}function Zm(r){var m,p;let e=r.blocfeedId;if(!e)return null;let t=parseFloat((m=r.sample)!=null?m:"1"),n=Number.isFinite(t)&&t>0?t:1,s=r.replay!=="false",i=r.signals!=="false",o=zm((p=r.mask)!=null?p:"inputs"),l={sampling:n,sessionReplay:{enabled:s,sampling:n,...o!==void 0?{masking:o}:{}},rageClick:{enabled:i},deadClick:{enabled:i},httpFail:{enabled:i},redirectLoop:{enabled:i},formDataLoss:{enabled:i}},a=r.userId||r.userEmail||r.userName?{...r.userId!==void 0?{id:r.userId}:{},...r.userEmail!==void 0?{email:r.userEmail}:{},...r.userName!==void 0?{name:r.userName}:{}}:void 0,c=r.feedback==="true",u=Ym(r.embedOrigin),f=r.feedbackColor&&r.feedbackColor.trim()?r.feedbackColor.trim():Vm,h=r.feedbackLabel&&r.feedbackLabel.trim()?r.feedbackLabel:Gm,g=Xm(r.feedbackPosition);return {blocfeedId:e,...a!==void 0?{user:a}:{},config:l,trackClicks:r.trackClicks==="true",feedback:c,embedOrigin:u,feedbackColor:f,feedbackLabel:h,feedbackPosition:g}}var Jm=60;function Km(){if(typeof document=="undefined")return ()=>{};let r=[],e=t=>{var o,l;let n=Date.now();if(r=r.filter(a=>n-a<6e4),r.length>=Jm)return;r.push(n);let s=t.target;if(!s||!(s instanceof Element))return;let i=null;try{i=(l=(o=s.innerText)==null?void 0:o.trim().slice(0,80))!=null?l:null;}catch(a){i=null;}try{ks("click",{tag:s.tagName.toLowerCase(),text:i||null,url:window.location.href});}catch(a){}};return document.addEventListener("click",e,{capture:true,passive:true}),()=>{try{document.removeEventListener("click",e,{capture:!0});}catch(t){}}}function Fl(){if(typeof document=="undefined")return null;let r=document.currentScript;return r&&r.dataset&&r.dataset.blocfeedId?r:document.querySelector("script[data-blocfeed-id]")}function qr(){if(typeof window=="undefined"||typeof document=="undefined")return;let r=Fl();if(!r)return;let e=Zm(r.dataset);if(!e){console.warn("[BlocFeed] script-tag init: data-blocfeed-id missing");return}if($l({blocfeed_id:e.blocfeedId,...e.user!==void 0?{user:e.user}:{},config:e.config}),e.trackClicks&&Km(),e.feedback)try{Ll({blocfeedId:e.blocfeedId,embedOrigin:e.embedOrigin,color:e.feedbackColor,label:e.feedbackLabel,position:e.feedbackPosition,...e.user!==void 0?{user:e.user}:{}});}catch(t){}}typeof window!="undefined"&&(window.BlocFeed=Hm,Fl()?qr():typeof document!="undefined"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",qr,{once:true}):qr()));function ob(){return ge}function ab(){ge&&(ge.uninstall(),ge=null);}function lb(){qr();}/*! Bundled license information:
54
55
 
55
56
  rrweb/dist/rrweb.js:
56
57
  (*! *****************************************************************************
@@ -67,4 +68,4 @@ rrweb/dist/rrweb.js:
67
68
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
68
69
  PERFORMANCE OF THIS SOFTWARE.
69
70
  ***************************************************************************** *)
70
- */exports.BlocFeed=Wd;exports.__autoInitForTesting=Em;exports.__getInstalledTrackerForTesting=Sm;exports.__resetForTesting=Cm;exports.parseMasking=zd;exports.parseScriptTagAttrs=Hd;return exports;})({});
71
+ */exports.BlocFeed=Hm;exports.__autoInitForTesting=lb;exports.__getInstalledTrackerForTesting=ob;exports.__resetForTesting=ab;exports.parseMasking=zm;exports.parseScriptTagAttrs=Zm;return exports;})({});