@bworlds/launchkit 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -142
- package/dist/error-capture.d.ts +2 -0
- package/dist/heartbeat.d.ts +8 -0
- package/dist/index.d.ts +8 -62
- package/dist/launchkit.cjs +1 -440
- package/dist/launchkit.cjs.map +1 -1
- package/dist/launchkit.js +56 -10038
- package/dist/launchkit.js.map +1 -1
- package/dist/launchkit.umd.js +1 -440
- package/dist/launchkit.umd.js.map +1 -1
- package/dist/telemetry-sender.d.ts +7 -0
- package/dist/types.d.ts +12 -94
- package/package.json +9 -20
- package/dist/events.d.ts +0 -57
- package/dist/privacy.d.ts +0 -41
- package/dist/recorder.d.ts +0 -72
- package/dist/screenshot.d.ts +0 -40
- package/dist/ui/InviteDialog.d.ts +0 -41
- package/dist/ui/Toolbar.d.ts +0 -64
- package/dist/ui/injectStyles.d.ts +0 -6
- package/dist/uploader.d.ts +0 -36
package/dist/launchkit.umd.js
CHANGED
|
@@ -1,441 +1,2 @@
|
|
|
1
|
-
(function(pe,Ge){typeof exports=="object"&&typeof module<"u"?Ge(exports):typeof define=="function"&&define.amd?define(["exports"],Ge):(pe=typeof globalThis<"u"?globalThis:pe||self,Ge(pe.BWorldsLaunchKit={}))})(this,(function(pe){"use strict";var Ge=Object.defineProperty,Ha=(s,e,t)=>e in s?Ge(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Ha(s,typeof e!="symbol"?e+"":e,t),mi,Ga=Object.defineProperty,Va=(s,e,t)=>e in s?Ga(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,gi=(s,e,t)=>Va(s,typeof e!="symbol"?e+"":e,t),Z=(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))(Z||{});const yi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},Ya=()=>!!globalThis.Zone;function Nr(s){if(yt[s])return yt[s];const e=globalThis[s],t=e.prototype,r=s in yi?yi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in wi?wi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ya())return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?yt[s]=u:t}catch{return t}}const Tr={};function de(s,e,t){var r;const i=`${s}.${String(t)}`;if(Tr[i])return Tr[i].call(e);const n=Nr(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Tr[i]=o,o.call(e)):e[t]}const Pr={};function bi(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Nr(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function Za(s){return de("Node",s,"ownerDocument")}function Ja(s){return de("Node",s,"childNodes")}function Xa(s){return de("Node",s,"parentNode")}function Ka(s){return de("Node",s,"parentElement")}function Qa(s){return de("Node",s,"textContent")}function qa(s,e){return bi("Node",s,"contains")(e)}function el(s){return bi("Node",s,"getRootNode")()}function tl(s){return!s||!("host"in s)?null:de("ShadowRoot",s,"host")}function rl(s){return s.styleSheets}function sl(s){return!s||!("shadowRoot"in s)?null:de("Element",s,"shadowRoot")}function il(s,e){return de("Element",s,"querySelector")(e)}function nl(s,e){return de("Element",s,"querySelectorAll")(e)}function ol(){return Nr("MutationObserver").constructor}function al(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const K={ownerDocument:Za,childNodes:Ja,parentNode:Xa,parentElement:Ka,textContent:Qa,contains:qa,getRootNode:el,host:tl,styleSheets:rl,shadowRoot:sl,querySelector:il,querySelectorAll:nl,mutationObserver:ol,patch:al};function vi(s){return s.nodeType===s.ELEMENT_NODE}function Ve(s){const e=s&&"host"in s&&"mode"in s&&K.host(s)||null;return!!(e&&"shadowRoot"in e&&K.shadowRoot(e)===s)}function Ye(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ll(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 ul(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const 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 Dr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);const r=Array.from(e,i=>Si(i,t)).join("");return ll(r)}catch{return null}}function Si(s,e){if(hl(s)){let t;try{t=Dr(s.styleSheet)||ul(s)}catch{t=s.cssText}return s.styleSheet.href?vt(t,s.styleSheet.href):t}else{let t=s.cssText;return fl(s)&&s.selectorText.includes(":")&&(t=cl(t)),e?vt(t,e):t}}function cl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function hl(s){return"styleSheet"in s}function fl(s){return"selectorText"in s}class Ci{constructor(){gi(this,"idNodeMap",new Map),gi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const 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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function pl(){return new Ci}function wt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Se(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Se(s){return s.toLowerCase()}const _i="__rrweb_original__";function dl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=_i in n?n[_i]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function bt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Se(e):null}function xi(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(i==null?void 0:i[1])??null}function ml(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const gl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,yl=/^(?:[a-z+]+:)?\/\//i,wl=/^www\..*/i,bl=/^(data:)([^,]*),(.*)/i;function vt(s,e){return(s||"").replace(gl,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(yl.test(a)||wl.test(a))return`url(${u}${a}${u})`;if(bl.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ml(e)+a}${u})`;const h=e.split("/"),c=a.split("/");h.pop();for(const p of c)p!=="."&&(p===".."?h.pop():h.push(p));return`url(${u}${h.join("/")}${u})`})}function St(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function vl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=St(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=St(r[a].textContent,t),h=100;let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){let p=u.substring(0,c),d=o.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")g=o.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=o.split(p),d.length<=1)return i.push(s),i;c=h+1}else c===u.length-1&&(g=o.indexOf(p));if(d.length>=2&&c>h){const m=r[a-1].textContent;if(m&&typeof m=="string"){const f=St(m).length;g=o.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=St(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function Sl(s,e){return vl(s,e).join("/* rr_split */")}let Cl=1;const _l=new RegExp("[^a-z0-9-_:]"),Ze=-2;function Ii(){return Cl++}function xl(s){if(s instanceof HTMLFormElement)return"form";const e=Se(s.tagName);return _l.test(e)?"div":e}let Me,Ri;const Il=/^[^ \t\n\r\u000c]+/,Rl=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(Rl),!(t>=e.length);){let n=r(Il);if(n.slice(-1)===",")n=Oe(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Oe(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const ki=new WeakMap;function Oe(s,e){return!e||e.trim()===""?e:Lr(s,e)}function El(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Lr(s,e){let t=ki.get(s);if(t||(t=s.createElement("a"),ki.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Ei(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)?Oe(s,r):t==="srcset"?kl(s,r):t==="style"?vt(r,Lr(s)):e==="object"&&t==="data"?Oe(s,r):r)}function Ai(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Al(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Ct(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Ct(K.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?Ct(K.parentNode(s),e,t):!1}function Mi(s,e,t,r){let i;if(vi(s)){if(i=s,!K.childNodes(i).length)return!1}else{if(K.parentElement(s)===null)return!1;i=K.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ct(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function Ml(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const 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 Ol(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function $l(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:h,dataURLOptions:c={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,v=Nl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Z.Document,childNodes:[],compatMode:s.compatMode}:{type:Z.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Z.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return Pl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:h,dataURLOptions:c,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:v});case s.TEXT_NODE:return Tl(s,{doc:t,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:Z.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:Z.Comment,textContent:K.textContent(s)||"",rootId:v};default:return!1}}function Nl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Tl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=K.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;return h?a="SCRIPT_PLACEHOLDER":n||(a=K.textContent(s),u&&a&&(a=vt(a,Lr(e.doc)))),!u&&!h&&a&&t&&(a=r?r(a,K.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Z.Text,textContent:a||"",rootId:i}}function Pl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:c,newlyAddedElement:p=!1,rootId:d}=e,g=Al(s,r,i),m=xl(s);let f={};const v=s.attributes.length;for(let y=0;y<v;y++){const C=s.attributes[y];Ai(m,C.name,C.value)||(f[C.name]=Ei(t,m,Se(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets).find(k=>k.href===s.href);let C=null;y&&(C=Dr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(m==="style"&&s.sheet){let y=Dr(s.sheet);y&&(s.childNodes.length>1&&(y=Sl(y,s)),f._cssText=y)}if(["input","textarea","select"].includes(m)){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=wt({element:s,type:bt(s),tagName:m,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&h){if(s.__context==="2d")dl(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const k=C.toDataURL(a.type,a.quality);y!==k&&(f.rr_dataURL=y)}}if(m==="img"&&u){Me||(Me=t.createElement("canvas"),Ri=Me.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",k=y.crossOrigin,N=()=>{y.removeEventListener("load",N);try{Me.width=y.naturalWidth,Me.height=y.naturalHeight,Ri.drawImage(y,0,0),f.rr_dataURL=Me.toDataURL(a.type,a.quality)}catch(W){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?N():y.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${C}! Error: ${W}`)}y.crossOrigin==="anonymous"&&(k?f.crossOrigin=k:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?N():y.addEventListener("load",N)}if(["audio","video"].includes(m)){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!c(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch{}return{type:Z.Element,tagName:m,attributes:f,childNodes:[],isSVG:El(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function L(s){return s==null?"":s.toLowerCase()}function Oi(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Dl(s,e){if(e.comment&&s.type===Z.Comment)return!0;if(s.type===Z.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"&&xi(s.attributes.href)==="js"))return!0;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!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;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!0;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!0}}return!1}function $e(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:W=!1,cssCaptured:T=!1}=e;let{needsMask:A}=e,{preserveWhiteSpace:j=!0}=e;A||(A=Mi(s,o,l,A===void 0));const se=$l(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:N,newlyAddedElement:W,cssCaptured:T});if(!se)return console.warn(s,"not serialized"),null;let he;r.hasNode(s)?he=r.getId(s):Dl(se,d)||!j&&se.type===Z.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?he=Ze:he=Ii();const E=Object.assign(se,{id:he});if(r.add(s,E),he===Ze)return null;v&&v(s);let mt=!a;if(E.type===Z.Element){mt=mt&&!E.needBlock,delete E.needBlock;const X=K.shadowRoot(s);X&&Ye(X)&&(E.isShadowHost=!0)}if((E.type===Z.Document||E.type===Z.Element)&&mt){d.headWhitespace&&E.type===Z.Element&&E.tagName==="head"&&(j=!1);const X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:N,cssCaptured:!1};if(!(E.type===Z.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===Z.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(X.cssCaptured=!0);for(const ke of Array.from(K.childNodes(s))){const fe=$e(ke,X);fe&&E.childNodes.push(fe)}}let ie=null;if(vi(s)&&(ie=K.shadowRoot(s)))for(const ke of Array.from(K.childNodes(ie))){const fe=$e(ke,X);fe&&(Ye(ie)&&(fe.isShadow=!0),E.childNodes.push(fe))}}const gt=K.parentNode(s);return gt&&Ve(gt)&&Ye(gt)&&(E.isShadow=!0),E.type===Z.Element&&E.tagName==="iframe"&&Ml(s,()=>{const X=s.contentDocument;if(X&&b){const ie=$e(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:N});ie&&b(s,ie)}},y),E.type===Z.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&xi(E.attributes.href)==="css")&&Ol(s,()=>{if(C){const X=$e(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:j,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:N});X&&C(s,X)}},k),E}function Ll(s,e){const{mirror:t=new Ci,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:c,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k=()=>!1}=e||{},N=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,W=Oi(d);return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:N,maskTextFn:c,maskInputFn:p,slimDOMOptions:W,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k,newlyAddedElement:!1})}function Fl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ul(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Fr={exports:{}},F=String,$i=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};Fr.exports=$i(),Fr.exports.createColors=$i;var Bl=Fr.exports;const ne=Ul(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ni=Bl,Ti=ne,Ur=class Fa extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Fa)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ni.isColorSupported),Ti&&e&&(t=Ti(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=Ni.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
2
|
-
`+d+l("^")}return" "+a(p)+u}).join(`
|
|
3
|
-
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
|
-
|
|
5
|
-
`+e+`
|
|
6
|
-
`),this.name+": "+this.message+e}};var Br=Ur;Ur.default=Ur;var Je={};Je.isClean=Symbol("isClean"),Je.my=Symbol("my");const Pi={after:`
|
|
7
|
-
`,beforeClose:`
|
|
8
|
-
`,beforeComment:`
|
|
9
|
-
`,beforeDecl:`
|
|
10
|
-
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function zl(s){return s[0].toUpperCase()+s.slice(1)}let zr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
12
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Pi[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+zl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Pi[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
13
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
14
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
15
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
16
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
17
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Di=zr;zr.default=zr;let Wl=Di;function Wr(s,e){new Wl(e).stringify(s)}var _t=Wr;Wr.default=Wr;let{isClean:xt,my:jl}=Je,Hl=Br,Gl=Di,Vl=_t;function jr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>jr(o,t)):(n==="object"&&i!==null&&(i=jr(i)),t[r]=i)}return t}let Hr=class{constructor(e={}){this.raws={},this[xt]=!1,this[jl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=jr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Hl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[xt]){this[xt]=!1;let e=this;for(;e=e.parent;)e[xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Gl().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=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=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Vl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var It=Hr;Hr.default=Hr;let Yl=It,Gr=class extends Yl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Rt=Gr;Gr.default=Gr;let Zl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Jl={nanoid:(s=21)=>{let e="",t=s;for(;t--;)e+=Zl[Math.random()*64|0];return e}};let{SourceMapConsumer:Li,SourceMapGenerator:Fi}=ne,{existsSync:Xl,readFileSync:Kl}=ne,{dirname:Vr,join:Ql}=ne;function ql(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Yr=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Vr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Li(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ql(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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Vr(e),Xl(e))return this.mapFile=e,Kl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Li)return Fi.fromSourceMap(t).toString();if(t instanceof Fi)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=Ql(Vr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ui=Yr;Yr.default=Yr;let{SourceMapConsumer:eu,SourceMapGenerator:tu}=ne,{fileURLToPath:Bi,pathToFileURL:kt}=ne,{isAbsolute:Zr,resolve:Jr}=ne,{nanoid:ru}=Jl,Xr=ne,zi=Br,su=Ui,Kr=Symbol("fromOffsetCache"),iu=!!(eu&&tu),Wi=!!(Jr&&Zr),Et=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Wi||/^\w+:\/\//.test(t.from)||Zr(t.from)?this.file=t.from:this.file=Jr(t.from)),Wi&&iu){let r=new su(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ru(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new zi(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,i.plugin):n=new zi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(kt&&(n.input.url=kt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Kr])r=this[Kr];else{let n=this.css.split(`
|
|
19
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Kr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Jr(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;Zr(o.source)?a=kt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||kt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Bi)u.file=Bi(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var At=Et;Et.default=Et,Xr&&Xr.registerInput&&Xr.registerInput(Et);let{SourceMapConsumer:ji,SourceMapGenerator:Mt}=ne,{dirname:Ot,relative:Hi,resolve:Gi,sep:Vi}=ne,{pathToFileURL:Yi}=ne,nu=At,ou=!!(ji&&Mt),au=!!(Ot&&Gi&&Hi&&Vi);var Zi=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
20
|
-
`;this.css.includes(`\r
|
|
21
|
-
`)&&(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||Ot(e.file),i;this.mapOpts.sourcesContent===!1?(i=new ji(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),au&&ou&&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=Mt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Mt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Mt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
23
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ot(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ot(Gi(r,this.mapOpts.annotation)));let i=Hi(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new nu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Yi){let r=Yi(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;Vi==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let lu=It,Qr=class extends lu{constructor(e){super(e),this.type="comment"}};var $t=Qr;Qr.default=Qr;let{isClean:Ji,my:Xi}=Je,Ki=Rt,Qi=$t,uu=It,qi,qr,es,en;function tn(s){return s.map(e=>(e.nodes&&(e.nodes=tn(e.nodes)),delete e.source,e))}function rn(s){if(s[Ji]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)rn(e)}let me=class Ua extends uu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)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+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=tn(qi(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ki(e)]}else if(e.selector)e=[new qr(e)];else if(e.name)e=[new es(e)];else if(e.text)e=[new Qi(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Xi]||Ua.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ji]&&rn(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};me.registerParse=s=>{qi=s},me.registerRule=s=>{qr=s},me.registerAtRule=s=>{es=s},me.registerRoot=s=>{en=s};var Ce=me;me.default=me,me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,es.prototype):s.type==="rule"?Object.setPrototypeOf(s,qr.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ki.prototype):s.type==="comment"?Object.setPrototypeOf(s,Qi.prototype):s.type==="root"&&Object.setPrototypeOf(s,en.prototype),s[Xi]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let cu=Ce,sn,nn,Xe=class extends cu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new sn(new nn,this,e).stringify()}};Xe.registerLazyResult=s=>{sn=s},Xe.registerProcessor=s=>{nn=s};var ts=Xe;Xe.default=Xe;let on={};var an=function(e){on[e]||(on[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let rs=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}};var ln=rs;rs.default=rs;let hu=ln,ss=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 hu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var is=ss;ss.default=ss;const ns=39,un=34,Nt=92,cn=47,Tt=10,Ke=32,Pt=12,Dt=9,Lt=13,fu=91,pu=93,du=40,mu=41,gu=123,yu=125,wu=59,bu=42,vu=58,Su=64,Ft=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ut=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cu=/.[\r\n"'(/\\]/,hn=/[\da-f]/i;var _u=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function k(){return b.length===0&&f>=m}function N(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Tt:case Ke:case Dt:case Lt:case Pt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ke||n===Tt||n===Dt||n===Lt||n===Pt);g=["space",r.slice(f,o)],f=o-1;break}case fu:case pu:case gu:case yu:case vu:case wu:case mu:{let j=String.fromCharCode(n);g=[j,j,f];break}case du:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==ns&&d!==un&&d!==Ke&&d!==Tt&&d!==Dt&&d!==Pt&&d!==Lt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===Nt;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Cu.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case ns:case un:{l=n===ns?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===Nt;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case Su:{Ft.lastIndex=f+1,Ft.test(r),Ft.lastIndex===0?o=r.length-1:o=Ft.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Nt:{for(o=f,u=!0;r.charCodeAt(o+1)===Nt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==cn&&n!==Ke&&n!==Tt&&n!==Dt&&n!==Lt&&n!==Pt&&(o+=1,hn.test(r.charAt(o)))){for(;hn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ke&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===cn&&r.charCodeAt(f+1)===bu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Ut.lastIndex=f+1,Ut.test(r),Ut.lastIndex===0?o=r.length-1:o=Ut.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function W(T){b.push(T)}return{back:W,endOfFile:k,nextToken:N,position:y}};let fn=Ce,Bt=class extends fn{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)}};var os=Bt;Bt.default=Bt,fn.registerAtRule(Bt);let pn=Ce,dn,mn,Ne=class extends pn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new dn(new mn,this,e).stringify()}};Ne.registerLazyResult=s=>{dn=s},Ne.registerProcessor=s=>{mn=s};var Qe=Ne;Ne.default=Ne,pn.registerRoot(Ne);let qe={comma(s){return qe.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
-
`," "];return qe.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var gn=qe;qe.default=qe;let yn=Ce,xu=gn,zt=class extends yn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return xu.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)}};var as=zt;zt.default=zt,yn.registerRule(zt);let Iu=Rt,Ru=_u,ku=$t,Eu=os,Au=Qe,wn=as;const bn={empty:!0,space:!0};function Mu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var Ou=class{constructor(e){this.input=e,this.root=new Au,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Eu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new ku;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ru(this.input)}decl(e,t){let r=new Iu;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Mu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new wn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="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,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!bn[c]&&!bn[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new wn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let $u=Ce,Nu=Ou,Tu=At;function Wt(s,e){let t=new Tu(s,e),r=new Nu(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
25
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
26
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
27
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var ls=Wt;Wt.default=Wt,$u.registerParse(Wt);let{isClean:ue,my:Pu}=Je,Du=Zi,Lu=_t,Fu=Ce,Uu=ts,Bu=an,vn=is,zu=ls,Wu=Qe;const ju={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Hu={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Gu={Once:!0,postcssPlugin:!0,prepare:!0},Te=0;function et(s){return typeof s=="object"&&typeof s.then=="function"}function Sn(s){let e=!1,t=ju[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Te,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Te,t+"Exit"]:[t,t+"Exit"]}function Cn(s){let e;return s.type==="document"?e=["Document",Te,"DocumentExit"]:s.type==="root"?e=["Root",Te,"RootExit"]:e=Sn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>us(e)),s}let cs={},Pe=class Ba{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=us(t);else if(t instanceof Ba||t instanceof vn)i=us(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=zu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Pu]&&Fu.rebuild(i)}this.result=new vn(e,i,r),this.helpers={...cs,postcss:cs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Hu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Gu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Cn(e)];for(;t.length>0;){let r=this.visitTick(t);if(et(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return et(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Lu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Du(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Bu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(et(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.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]=!0,e.push(Cn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Te){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ue]=!0;let t=Sn(e);for(let r of t)if(r===Te)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Pe.registerPostcss=s=>{cs=s};var _n=Pe;Pe.default=Pe,Wu.registerLazyResult(Pe),Uu.registerLazyResult(Pe);let Vu=Zi,Yu=_t,Zu=an,Ju=ls;const Xu=is;let hs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Yu;this.result=new Xu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Vu(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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 process.env.NODE_ENV!=="production"&&("from"in this._opts||Zu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ju;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"}};var Ku=hs;hs.default=hs;let Qu=Ku,qu=_n,ec=ts,tc=Qe,tt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Qu(this,e,t):new qu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var rc=tt;tt.default=tt,tc.registerProcessor(tt),ec.registerProcessor(tt);let sc=Rt,ic=Ui,nc=$t,oc=os,ac=At,lc=Qe,uc=as;function rt(s,e){if(Array.isArray(s))return s.map(i=>rt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:ac.prototype};n.map&&(n.map={...n.map,__proto__:ic.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>rt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new lc(r);if(r.type==="decl")return new sc(r);if(r.type==="rule")return new uc(r);if(r.type==="comment")return new nc(r);if(r.type==="atrule")return new oc(r);throw new Error("Unknown node type: "+s.type)}var cc=rt;rt.default=rt;let hc=Br,xn=Rt,fc=_n,pc=Ce,fs=rc,dc=_t,mc=cc,In=ts,gc=ln,Rn=$t,kn=os,yc=is,wc=At,bc=ls,vc=gn,En=as,An=Qe,Sc=It;function O(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new fs(s)}O.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new fs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return O([i(a)]).process(o,l)},i},O.stringify=dc,O.parse=bc,O.fromJSON=mc,O.list=vc,O.comment=s=>new Rn(s),O.atRule=s=>new kn(s),O.decl=s=>new xn(s),O.rule=s=>new En(s),O.root=s=>new An(s),O.document=s=>new In(s),O.CssSyntaxError=hc,O.Declaration=xn,O.Container=pc,O.Processor=fs,O.Document=In,O.Comment=Rn,O.Warning=gc,O.AtRule=kn,O.Result=yc,O.Input=wc,O.Rule=En,O.Root=An,O.Node=Sc,fc.registerPostcss(O);var Cc=O;O.default=O;const B=Fl(Cc);B.stringify,B.fromJSON,B.plugin,B.parse,B.list,B.document,B.comment,B.atRule,B.rule,B.decl,B.root,B.CssSyntaxError,B.Declaration,B.Container,B.Processor,B.Document,B.Comment,B.Warning,B.AtRule,B.Result,B.Input,B.Rule,B.Root,B.Node;var _c=Object.defineProperty,xc=(s,e,t)=>e in s?_c(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,re=(s,e,t)=>xc(s,typeof e!="symbol"?e+"":e,t);function Ic(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Rc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ps={exports:{}},U=String,Mn=function(){return{isColorSupported:!1,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}};ps.exports=Mn(),ps.exports.createColors=Mn;var kc=ps.exports;const oe=Rc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let On=kc,$n=oe,ds=class za extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,za)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=On.isColorSupported),$n&&e&&(t=$n(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=On.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
30
|
-
`+d+l("^")}return" "+a(p)+u}).join(`
|
|
31
|
-
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
32
|
-
|
|
33
|
-
`+e+`
|
|
34
|
-
`),this.name+": "+this.message+e}};var ms=ds;ds.default=ds;var st={};st.isClean=Symbol("isClean"),st.my=Symbol("my");const Nn={after:`
|
|
35
|
-
`,beforeClose:`
|
|
36
|
-
`,beforeComment:`
|
|
37
|
-
`,beforeDecl:`
|
|
38
|
-
`,beforeOpen:" ",beforeRule:`
|
|
39
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ec(s){return s[0].toUpperCase()+s.slice(1)}let gs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
40
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Nn[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Ec(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Nn[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
41
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
42
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
43
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
44
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
45
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tn=gs;gs.default=gs;let Ac=Tn;function ys(s,e){new Ac(e).stringify(s)}var jt=ys;ys.default=ys;let{isClean:Ht,my:Mc}=st,Oc=ms,$c=Tn,Nc=jt;function ws(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ws(o,t)):(n==="object"&&i!==null&&(i=ws(i)),t[r]=i)}return t}let bs=class{constructor(e={}){this.raws={},this[Ht]=!1,this[Mc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ws(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Oc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ht]){this[Ht]=!1;let e=this;for(;e=e.parent;)e[Ht]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
46
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new $c().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=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=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Nc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var Gt=bs;bs.default=bs;let Tc=Gt,vs=class extends Tc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Vt=vs;vs.default=vs;let Pc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Dc={nanoid:(s=21)=>{let e="",t=s;for(;t--;)e+=Pc[Math.random()*64|0];return e}};let{SourceMapConsumer:Pn,SourceMapGenerator:Dn}=oe,{existsSync:Lc,readFileSync:Fc}=oe,{dirname:Ss,join:Uc}=oe;function Bc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Cs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ss(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Pn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Bc(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"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ss(e),Lc(e))return this.mapFile=e,Fc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Pn)return Dn.fromSourceMap(t).toString();if(t instanceof Dn)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=Uc(Ss(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ln=Cs;Cs.default=Cs;let{SourceMapConsumer:zc,SourceMapGenerator:Wc}=oe,{fileURLToPath:Fn,pathToFileURL:Yt}=oe,{isAbsolute:_s,resolve:xs}=oe,{nanoid:jc}=Dc,Is=oe,Un=ms,Hc=Ln,Rs=Symbol("fromOffsetCache"),Gc=!!(zc&&Wc),Bn=!!(xs&&_s),Zt=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Bn||/^\w+:\/\//.test(t.from)||_s(t.from)?this.file=t.from:this.file=xs(t.from)),Bn&&Gc){let r=new Hc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+jc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Un(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,i.plugin):n=new Un(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Yt&&(n.input.url=Yt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Rs])r=this[Rs];else{let n=this.css.split(`
|
|
47
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Rs]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;_s(o.source)?a=Yt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Yt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Fn)u.file=Fn(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Jt=Zt;Zt.default=Zt,Is&&Is.registerInput&&Is.registerInput(Zt);let{SourceMapConsumer:zn,SourceMapGenerator:Xt}=oe,{dirname:Kt,relative:Wn,resolve:jn,sep:Hn}=oe,{pathToFileURL:Gn}=oe,Vc=Jt,Yc=!!(zn&&Xt),Zc=!!(Kt&&jn&&Wn&&Hn);var Vn=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
48
|
-
`;this.css.includes(`\r
|
|
49
|
-
`)&&(t=`\r
|
|
50
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Kt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new zn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Zc&&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=Xt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Xt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Xt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
51
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Kt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Kt(jn(r,this.mapOpts.annotation)));let i=Wn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Vc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Gn){let r=Gn(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;Hn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Jc=Gt,ks=class extends Jc{constructor(e){super(e),this.type="comment"}};var Qt=ks;ks.default=ks;let{isClean:Yn,my:Zn}=st,Jn=Vt,Xn=Qt,Xc=Gt,Kn,Es,As,Qn;function qn(s){return s.map(e=>(e.nodes&&(e.nodes=qn(e.nodes)),delete e.source,e))}function eo(s){if(s[Yn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)eo(e)}let ge=class Wa extends Xc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)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+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=qn(Kn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Jn(e)]}else if(e.selector)e=[new Es(e)];else if(e.name)e=[new As(e)];else if(e.text)e=[new Xn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Zn]||Wa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Yn]&&eo(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ge.registerParse=s=>{Kn=s},ge.registerRule=s=>{Es=s},ge.registerAtRule=s=>{As=s},ge.registerRoot=s=>{Qn=s};var _e=ge;ge.default=ge,ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,As.prototype):s.type==="rule"?Object.setPrototypeOf(s,Es.prototype):s.type==="decl"?Object.setPrototypeOf(s,Jn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Xn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Qn.prototype),s[Zn]=!0,s.nodes&&s.nodes.forEach(e=>{ge.rebuild(e)})};let Kc=_e,to,ro,it=class extends Kc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new to(new ro,this,e).stringify()}};it.registerLazyResult=s=>{to=s},it.registerProcessor=s=>{ro=s};var Ms=it;it.default=it;let so={};var io=function(e){so[e]||(so[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Os=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}};var no=Os;Os.default=Os;let Qc=no,$s=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 Qc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ns=$s;$s.default=$s;const Ts=39,oo=34,qt=92,ao=47,er=10,nt=32,tr=12,rr=9,sr=13,qc=91,eh=93,th=40,rh=41,sh=123,ih=125,nh=59,oh=42,ah=58,lh=64,ir=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uh=/.[\r\n"'(/\\]/,lo=/[\da-f]/i;var ch=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function k(){return b.length===0&&f>=m}function N(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case er:case nt:case rr:case sr:case tr:{o=f;do o+=1,n=r.charCodeAt(o);while(n===nt||n===er||n===rr||n===sr||n===tr);g=["space",r.slice(f,o)],f=o-1;break}case qc:case eh:case sh:case ih:case ah:case nh:case rh:{let j=String.fromCharCode(n);g=[j,j,f];break}case th:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==Ts&&d!==oo&&d!==nt&&d!==er&&d!==rr&&d!==tr&&d!==sr){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===qt;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||uh.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Ts:case oo:{l=n===Ts?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===qt;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case lh:{ir.lastIndex=f+1,ir.test(r),ir.lastIndex===0?o=r.length-1:o=ir.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case qt:{for(o=f,u=!0;r.charCodeAt(o+1)===qt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==ao&&n!==nt&&n!==er&&n!==rr&&n!==sr&&n!==tr&&(o+=1,lo.test(r.charAt(o)))){for(;lo.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===nt&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===ao&&r.charCodeAt(f+1)===oh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(nr.lastIndex=f+1,nr.test(r),nr.lastIndex===0?o=r.length-1:o=nr.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function W(T){b.push(T)}return{back:W,endOfFile:k,nextToken:N,position:y}};let uo=_e,or=class extends uo{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)}};var Ps=or;or.default=or,uo.registerAtRule(or);let co=_e,ho,fo,De=class extends co{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ho(new fo,this,e).stringify()}};De.registerLazyResult=s=>{ho=s},De.registerProcessor=s=>{fo=s};var ot=De;De.default=De,co.registerRoot(De);let at={comma(s){return at.split(s,[","],!0)},space(s){let e=[" ",`
|
|
52
|
-
`," "];return at.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var po=at;at.default=at;let mo=_e,hh=po,ar=class extends mo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return hh.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)}};var Ds=ar;ar.default=ar,mo.registerRule(ar);let fh=Vt,ph=ch,dh=Qt,mh=Ps,gh=ot,go=Ds;const yo={empty:!0,space:!0};function yh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var wh=class{constructor(e){this.input=e,this.root=new gh,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new mh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;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===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new dh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ph(this.input)}decl(e,t){let r=new fh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||yh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new go;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="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,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!yo[c]&&!yo[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new go;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let bh=_e,vh=wh,Sh=Jt;function lr(s,e){let t=new Sh(s,e),r=new vh(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
53
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
54
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
55
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Ls=lr;lr.default=lr,bh.registerParse(lr);let{isClean:ce,my:Ch}=st,_h=Vn,xh=jt,Ih=_e,Rh=Ms,kh=io,wo=Ns,Eh=Ls,Ah=ot;const Mh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Oh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},$h={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function bo(s){let e=!1,t=Mh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Le,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Le,t+"Exit"]:[t,t+"Exit"]}function vo(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=bo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Fs(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>Fs(e)),s}let Us={},Fe=class ja{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Fs(t);else if(t instanceof ja||t instanceof wo)i=Fs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Eh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Ch]&&Ih.rebuild(i)}this.result=new wo(e,i,r),this.helpers={...Us,postcss:Us,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Oh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!$h[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=!0;let t=[vo(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return lt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=xh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new _h(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||kh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(lt(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.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[ce]){l[ce]=!0,e.push(vo(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Le){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ce]=!0;let t=bo(e);for(let r of t)if(r===Le)e.nodes&&e.each(i=>{i[ce]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Fe.registerPostcss=s=>{Us=s};var So=Fe;Fe.default=Fe,Ah.registerLazyResult(Fe),Rh.registerLazyResult(Fe);let Nh=Vn,Th=jt,Ph=io,Dh=Ls;const Lh=Ns;let Bs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Th;this.result=new Lh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Nh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}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 process.env.NODE_ENV!=="production"&&("from"in this._opts||Ph("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Dh;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"}};var Fh=Bs;Bs.default=Bs;let Uh=Fh,Bh=So,zh=Ms,Wh=ot,ut=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Uh(this,e,t):new Bh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var jh=ut;ut.default=ut,Wh.registerProcessor(ut),zh.registerProcessor(ut);let Hh=Vt,Gh=Ln,Vh=Qt,Yh=Ps,Zh=Jt,Jh=ot,Xh=Ds;function ct(s,e){if(Array.isArray(s))return s.map(i=>ct(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Zh.prototype};n.map&&(n.map={...n.map,__proto__:Gh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ct(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new Jh(r);if(r.type==="decl")return new Hh(r);if(r.type==="rule")return new Xh(r);if(r.type==="comment")return new Vh(r);if(r.type==="atrule")return new Yh(r);throw new Error("Unknown node type: "+s.type)}var Kh=ct;ct.default=ct;let Qh=ms,Co=Vt,qh=So,ef=_e,zs=jh,tf=jt,rf=Kh,_o=Ms,sf=no,xo=Qt,Io=Ps,nf=Ns,of=Jt,af=Ls,lf=po,Ro=Ds,ko=ot,uf=Gt;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new zs(s)}$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
56
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
57
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new zs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return $([i(a)]).process(o,l)},i},$.stringify=tf,$.parse=af,$.fromJSON=rf,$.list=lf,$.comment=s=>new xo(s),$.atRule=s=>new Io(s),$.decl=s=>new Co(s),$.rule=s=>new Ro(s),$.root=s=>new ko(s),$.document=s=>new _o(s),$.CssSyntaxError=Qh,$.Declaration=Co,$.Container=ef,$.Processor=zs,$.Document=_o,$.Comment=xo,$.Warning=sf,$.AtRule=Io,$.Result=nf,$.Input=of,$.Rule=Ro,$.Root=ko,$.Node=uf,qh.registerPostcss($);var cf=$;$.default=$;const z=Ic(cf);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;class Ws{constructor(...e){re(this,"parentElement",null),re(this,"parentNode",null),re(this,"ownerDocument"),re(this,"firstChild",null),re(this,"lastChild",null),re(this,"previousSibling",null),re(this,"nextSibling",null),re(this,"ELEMENT_NODE",1),re(this,"TEXT_NODE",3),re(this,"nodeType"),re(this,"nodeName"),re(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Ws){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Eo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ao={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ur={},hf=()=>!!globalThis.Zone;function js(s){if(ur[s])return ur[s];const e=globalThis[s],t=e.prototype,r=s in Eo?Eo[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in Ao?Ao[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!hf())return ur[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?ur[s]=u:t}catch{return t}}const Hs={};function ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(Hs[i])return Hs[i].call(e);const n=js(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Hs[i]=o,o.call(e)):e[t]}const Gs={};function Mo(s,e,t){const r=`${s}.${String(t)}`;if(Gs[r])return Gs[r].bind(e);const n=js(s)[t];return typeof n!="function"?e[t]:(Gs[r]=n,n.bind(e))}function ff(s){return ye("Node",s,"ownerDocument")}function pf(s){return ye("Node",s,"childNodes")}function df(s){return ye("Node",s,"parentNode")}function mf(s){return ye("Node",s,"parentElement")}function gf(s){return ye("Node",s,"textContent")}function yf(s,e){return Mo("Node",s,"contains")(e)}function wf(s){return Mo("Node",s,"getRootNode")()}function bf(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function vf(s){return s.styleSheets}function Sf(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function Cf(s,e){return ye("Element",s,"querySelector")(e)}function _f(s,e){return ye("Element",s,"querySelectorAll")(e)}function Oo(){return js("MutationObserver").constructor}function xe(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const _={ownerDocument:ff,childNodes:pf,parentNode:df,parentElement:mf,textContent:gf,contains:yf,getRootNode:wf,host:bf,styleSheets:vf,shadowRoot:Sf,querySelector:Cf,querySelectorAll:_f,mutationObserver:Oo,patch:xe};function Q(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ue=`Please stop import mirror directly. Instead of that,\r
|
|
58
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
59
|
-
or you can use record.mirror to access the mirror instance during recording.`;let $o={map:{},getId(){return console.error(Ue),-1},getNode(){return console.error(Ue),null},removeNodeFromMap(){console.error(Ue)},has(){return console.error(Ue),!1},reset(){console.error(Ue)}};typeof window<"u"&&window.Proxy&&window.Reflect&&($o=new Proxy($o,{get(s,e,t){return e==="map"&&console.error(Ue),Reflect.get(s,e,t)}}));function ht(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function cr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>cr(s,e,n||{},!0)}let hr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(hr=()=>new Date().getTime());function No(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=_.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=_.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function To(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Po(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Do(s){return s?s.nodeType===s.ELEMENT_NODE?s:_.parentElement(s):null}function q(s,e,t,r){if(!s)return!1;const i=Do(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Ct(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function xf(s,e){return e.getId(s)!==-1}function Vs(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Ze}function Lo(s,e){if(Ve(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=_.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Lo(r,e):!0}function Ys(s){return!!s.changedTouches}function If(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 Fo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Uo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Zs(s){return s?s instanceof Ws&&"shadowRoot"in s?!!s.shadowRoot:!!_.shadowRoot(s):!1}class Rf{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Bo(s){var e;let t=null;return"getRootNode"in s&&((e=_.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(s))&&(t=_.host(_.getRootNode(s))),t}function kf(s){let e=s,t;for(;t=Bo(e);)e=t;return e}function Ef(s){const e=_.ownerDocument(s);if(!e)return!1;const t=kf(s);return _.contains(e,t)}function zo(s){const e=_.ownerDocument(s);return e?_.contains(e,s)||Ef(s):!1}var I=(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))(I||{}),x=(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))(x||{}),ee=(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))(ee||{}),we=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(we||{}),Be=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Be||{}),ze=(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))(ze||{}),Wo=(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))(Wo||{});function jo(s){return"__ln"in s}class Af{constructor(){S(this,"length",0),S(this,"head",null),S(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){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&jo(e.previousSibling)){const 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&&jo(e.nextSibling)&&e.nextSibling.__ln.previous){const 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){const 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--)}}const Ho=(s,e)=>`${s}@${e}`;class Mf{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Af,i=a=>{let u=a,h=Ze;for(;h===Ze;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},n=a=>{const u=_.parentNode(a);if(!u||!zo(a))return;let h=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(h=!0)}const c=Ve(u)?this.mirror.getId(Bo(a)):this.mirror.getId(u),p=i(a);if(c===-1||p===-1)return r.addNode(a);const d=$e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{Fo(g,this.mirror)&&this.iframeManager.addIframe(g),Uo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Zs(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m)},cssCaptured:h});d&&(e.push({parentId:c,nextId:p,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Go(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||n(a);for(const a of this.addedSet)!Vo(this.droppedSet,a)&&!Go(this.removesSubTreeCache,a,this.mirror)||Vo(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(_.parentNode(o.value)),h=i(o.value);u!==-1&&h!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const c=this.mirror.getId(_.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){a=h;break}else{const d=h.value,g=_.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=_.host(g);if(this.mirror.getId(m)!==-1){a=h;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,h=_.parentNode(u);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const h=JSON.stringify(a.styleDiff),c=JSON.stringify(a._unchangedStyles);h.length<u.style.length&&(h+c).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).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))}),S(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));const r=Array.from(_.childNodes(e),i=>_.textContent(i)||"").join("");t.attributes.value=wt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:bt(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Vs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Mi(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Do(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=bt(t);i=wt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(q(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ai(t.tagName,r))if(n.attributes[r]=Ei(this.doc,Se(t.tagName),Se(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Ve(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,!1)||Vs(t,this.mirror,this.slimDOMOptions)||!xf(t,this.mirror)||(this.addedSet.has(t)?(Js(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Lo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ho(r,i)]?Js(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ve(e.target)&&Ye(e.target)?!0:void 0}),Of(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Vs(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[Ho(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(r=>this.genAdds(r)),Zs(e)&&_.childNodes(_.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Js(s,e){s.delete(e),_.childNodes(e).forEach(t=>Js(s,t))}function Of(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(i=>t.push(i)))}}function Go(s,e,t){return s.size===0?!1:$f(s,e)}function $f(s,e,t){const r=_.parentNode(e);return r?s.has(r):!1}function Vo(s,e){return s.size===0?!1:Yo(s,e)}function Yo(s,e){const t=_.parentNode(e);return t?s.has(t)?!0:Yo(s,t):!1}let ft;function Nf(s){ft=s}function Tf(){ft=void 0}const R=s=>ft?(...t)=>{try{return s(...t)}catch(r){if(ft&&ft(r)===!0)return;throw r}}:s,Ie=[];function pt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Zo(s,e){const t=new Mf;Ie.push(t),t.init(s);const r=new(Oo())(R(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Pf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=ht(R(c=>{const p=Date.now()-l;s(o.map(d=>(d.timeOffset-=p,d)),c),o=[],l=null}),n),u=R(ht(R(c=>{const p=pt(c),{clientX:d,clientY:g}=Ys(c)?c.changedTouches[0]:c;l||(l=hr()),o.push({x:d,y:g,id:r.getId(p),timeOffset:hr()-l}),a(typeof DragEvent<"u"&&c instanceof DragEvent?x.Drag:c instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),h=[Q("mousemove",u,t),Q("touchmove",u,t),Q("drag",u,t)];return R(()=>{h.forEach(c=>c())})}function Df({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=h=>c=>{const p=pt(c);if(q(p,r,i,!0))return;let d=null,g=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=we.Mouse;break;case"touch":d=we.Touch;break;case"pen":d=we.Pen;break}d===we.Touch?ee[h]===ee.MouseDown?g="TouchStart":ee[h]===ee.MouseUp&&(g="TouchEnd"):we.Pen}else Ys(c)&&(d=we.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===we.Touch||g.startsWith("Mouse")&&d===we.Mouse)&&(d=null)):ee[h]===ee.Click&&(d=a,a=null);const m=Ys(c)?c.changedTouches[0]:c;if(!m)return;const f=t.getId(p),{clientX:v,clientY:b}=m;R(s)({type:ee[g],id:f,x:v,y:b,...d!==null&&{pointerType:d}})};return Object.keys(ee).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=Se(h);const p=u(h);if(window.PointerEvent)switch(ee[h]){case ee.MouseDown:case ee.MouseUp:c=c.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}l.push(Q(c,p,e))}),R(()=>{l.forEach(h=>h())})}function Jo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=R(ht(R(l=>{const a=pt(l);if(!a||q(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const h=No(e.defaultView);s({id:u,x:h.left,y:h.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Q("scroll",o,e)}function Lf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=R(ht(R(()=>{const n=To(),o=Po();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Q("resize",i,e)}const Ff=["INPUT","TEXTAREA","SELECT"],Xo=new WeakMap;function Uf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:h}){function c(b){let y=pt(b);const C=b.isTrusted,k=y&&y.tagName;if(y&&k==="OPTION"&&(y=_.parentElement(y)),!y||!k||Ff.indexOf(k)<0||q(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let N=y.value,W=!1;const T=bt(y)||"";T==="radio"||T==="checkbox"?W=y.checked:(l[k.toLowerCase()]||l[T])&&(N=wt({element:y,maskInputOptions:l,tagName:k,type:T,value:N,maskInputFn:a})),p(y,h?{text:N,isChecked:W,userTriggered:C}:{text:N,isChecked:W});const A=y.name;T==="radio"&&A&&W&&e.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach(j=>{if(j!==y){const se=j.value;p(j,h?{text:se,isChecked:!W,userTriggered:!1}:{text:se,isChecked:!W})}})}function p(b,y){const C=Xo.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Xo.set(b,y);const k=t.getId(b);R(s)({...y,id:k})}}const g=(u.input==="last"?["change"]:["input","change"]).map(b=>Q(b,R(c),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...v.map(b=>cr(b[0],b[1],{set(){R(c)({target:this,isTrusted:!1})}},!1,m))),R(()=>{g.forEach(b=>b())})}function fr(s){const e=[];function t(r,i){if(pr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||pr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||pr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||pr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function ve(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Bf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:R((h,c,p)=>{const[d,g]=p,{id:m,styleId:f}=ve(c,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.addRule=function(h,c,p=this.cssRules.length){const d=`${h} { ${c} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:R((h,c,p)=>{const[d]=p,{id:g,styleId:m}=ve(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:R((h,c,p)=>{const[d]=p,{id:g,styleId:m}=ve(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),h.apply(c,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:R((h,c,p)=>{const[d]=p,{id:g,styleId:m}=ve(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),h.apply(c,p)})}));const a={};dr("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(dr("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),dr("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),dr("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([h,c])=>{u[h]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(u[h].insertRule,{apply:R((p,d,g)=>{const[m,f]=g,{id:v,styleId:b}=ve(d.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||b&&b!==-1)&&s({id:v,styleId:b,adds:[{rule:m,index:[...fr(d),f||0]}]}),p.apply(d,g)})}),c.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:R((p,d,g)=>{const[m]=g,{id:f,styleId:v}=ve(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||v&&v!==-1)&&s({id:f,styleId:v,removes:[{index:[...fr(d),m]}]}),p.apply(d,g)})})}),R(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([h,c])=>{c.prototype.insertRule=u[h].insertRule,c.prototype.deleteRule=u[h].deleteRule})})}function Ko({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(_.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,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 u;return(u=a.get)==null?void 0:u.call(this)},set(u){var h;const c=(h=a.set)==null?void 0:h.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return c}}),R(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function zf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:R((l,a,u)=>{var h;const[c,p,d]=u;if(t.has(c))return n.apply(a,[c,p,d]);const{id:g,styleId:m}=ve((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:c,value:p,priority:d},index:fr(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((l,a,u)=>{var h;const[c]=u;if(t.has(c))return o.apply(a,[c]);const{id:p,styleId:d}=ve((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:c},index:fr(a.parentRule)}),l.apply(a,u)})}),R(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Wf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=R(a=>ht(R(u=>{const h=pt(u);if(!h||q(h,e,t,!0))return;const{currentTime:c,volume:p,muted:d,playbackRate:g,loop:m}=h;s({type:a,id:r.getId(h),currentTime:c,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Q("play",o(ze.Play),n),Q("pause",o(ze.Pause),n),Q("seeked",o(ze.Seeked),n),Q("volumechange",o(ze.VolumeChange),n),Q("ratechange",o(ze.RateChange),n)];return R(()=>{l.forEach(a=>a())})}function jf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,h){const c=new n(a,u,h);return i.set(c,{family:a,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),c};const o=xe(e.fonts,"add",function(l){return function(a){return setTimeout(R(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),R(()=>{r.forEach(l=>l())})}function Hf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=R(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],h=a.rangeCount||0;for(let c=0;c<h;c++){const p=a.getRangeAt(c),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;q(d,r,i,!0)||q(m,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:u})});return l(),Q("selectionchange",l)}function Gf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:xe(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Vf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:c,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),h(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),c(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function Yf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Vf(s,e);let r;s.recordDOM&&(r=Zo(s,s.doc));const i=Pf(s),n=Df(s),o=Jo(s),l=Lf(s,{win:t}),a=Uf(s),u=Wf(s);let h=()=>{},c=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(h=Bf(s,{win:t}),c=Ko(s,s.doc),p=zf(s,{win:t}),s.collectFonts&&(d=jf(s)));const g=Hf(s),m=Gf(s),f=[];for(const v of s.plugins)f.push(v.observer(v.callback,t,v.options));return R(()=>{Ie.forEach(v=>v.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),h(),c(),p(),d(),g(),m(),f.forEach(v=>v())})}function pr(s){return typeof window[s]<"u"}function dr(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Qo{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Zf{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new Qo(Ii)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Qo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Wo.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Jf{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(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(!Ye(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Zo({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Jo({...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(_.host(e))),this.restoreHandlers.push(Ko({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){const r=this;this.restoreHandlers.push(xe(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=_.shadowRoot(this);return l&&zo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xf=typeof Uint8Array>"u"?[]:new Uint8Array(256),mr=0;mr<We.length;mr++)Xf[We.charCodeAt(mr)]=mr;var Kf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=We[e[t]>>2],i+=We[(e[t]&3)<<4|e[t+1]>>4],i+=We[(e[t+1]&15)<<2|e[t+2]>>6],i+=We[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const qo=new Map;function Qf(s,e){let t=qo.get(s);return t||(t=new Map,qo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const ea=(s,e,t)=>{if(!s||!(ra(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Qf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function gr(s,e,t){if(s instanceof Array)return s.map(r=>gr(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){const r=s.constructor.name,i=Kf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[gr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[gr(s.data,e,t),s.width,s.height]};if(ra(s,e)||typeof s=="object"){const r=s.constructor.name,i=ea(s,e,t);return{rr_type:r,index:i}}}}return s}const ta=(s,e,t)=>s.map(r=>gr(r,e,t)),ra=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function qf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=xe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return q(this.canvas,t,r,!0)||setTimeout(()=>{const h=ta(u,e,this);s(this.canvas,{type:Be["2D"],property:o,args:h})},0),a.apply(this,u)}});i.push(l)}catch{const l=cr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Be["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function ep(s){return s==="experimental-webgl"?"webgl":s}function sa(s,e,t,r){const i=[];try{const n=xe(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){const u=ep(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const h=a[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ia(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=xe(s,a,function(h){return function(...c){const p=h.apply(this,c);if(ea(p,n,this),"tagName"in this.canvas&&!q(this.canvas,r,i,!0)){const d=ta(c,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return p}});o.push(u)}catch{const u=cr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function tp(s,e,t,r){const i=[];return i.push(...ia(e.WebGLRenderingContext.prototype,Be.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...ia(e.WebGL2RenderingContext.prototype,Be.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const na="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",rp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),oa=typeof window<"u"&&window.Blob&&new Blob([rp(na)],{type:"text/javascript;charset=utf-8"});function sp(s){let e;try{if(e=oa&&(window.URL||window.webkitURL).createObjectURL(oa),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+na,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class ip{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(a,u)=>{(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(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=sa(t,r,i,!0),l=new Map,a=new sp;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:v,width:b,height:y}=g.data;this.mutationCb({id:m,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:v}]},0,0]}]})};const u=1e3/e;let h=0,c;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{q(m,r,i,!0)||g.push(m)}),g},d=g=>{if(h&&g-h<u){c=requestAnimationFrame(d);return}h=g,p().forEach(async m=>{var f;const v=this.mirror.getId(m);if(l.get(v)||m.width===0||m.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:v,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=sa(e,t,r,!1),n=qf(this.processMutation.bind(this),e,t,r),o=tp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class np{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new Rf),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;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Si(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class op{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let H,yr,Xs,wr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((mi=s.contentWindow)==null?void 0:mi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ae=pl();function dt(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:h=!0,maskAllInputs:c,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:v,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:k=!0,recordCanvas:N=!1,recordCrossOriginIframes:W=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:j=!1,inlineImages:se=!1,plugins:he,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:mt=new Set([]),errorHandler:gt}=s;Nf(gt);const X=W?window.parent===window:!0;let ie=!1;if(!X)try{window.parent.document&&(ie=!1)}catch{ie=!0}if(X&&!e)throw new Error("emit function is required");if(!X&&!ie)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),ae.reset();const ke=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},fe=Oi(d);If();let Ta,fi=0;const Pa=M=>{for(const le of he||[])le.eventProcessor&&(M=le.eventProcessor(M));return v&&!ie&&(M=v(M)),M};H=(M,le)=>{var G;const V=M;if(V.timestamp=hr(),(G=Ie[0])!=null&&G.isFrozen()&&V.type!==I.FullSnapshot&&!(V.type===I.IncrementalSnapshot&&V.data.source===x.Mutation)&&Ie.forEach(te=>te.unfreeze()),X)e==null||e(Pa(V),le);else if(ie){const te={type:"rrweb",event:Pa(V),origin:window.location.origin,isCheckout:le};window.parent.postMessage(te,"*")}if(V.type===I.FullSnapshot)Ta=V,fi=0;else if(V.type===I.IncrementalSnapshot){if(V.data.source===x.Mutation&&V.data.isAttachIframe)return;fi++;const te=r&&fi>=r,P=t&&V.timestamp-Ta.timestamp>t;(te||P)&&yr(!0)}};const Or=M=>{H({type:I.IncrementalSnapshot,data:{source:x.Mutation,...M}})},Da=M=>H({type:I.IncrementalSnapshot,data:{source:x.Scroll,...M}}),La=M=>H({type:I.IncrementalSnapshot,data:{source:x.CanvasMutation,...M}}),rd=M=>H({type:I.IncrementalSnapshot,data:{source:x.AdoptedStyleSheet,...M}}),Ee=new np({mutationCb:Or,adoptedStyleSheetCb:rd}),Ae=new Zf({mirror:ae,mutationCb:Or,stylesheetManager:Ee,recordCrossOriginIframes:W,wrappedEmit:H});for(const M of he||[])M.getMirror&&M.getMirror({nodeMirror:ae,crossOriginIframeMirror:Ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ae.crossOriginIframeStyleMirror});const pi=new op;Xs=new ip({recordCanvas:N,mutationCb:La,win:window,blockClass:i,blockSelector:n,mirror:ae,sampling:b.canvas,dataURLOptions:y});const $r=new Jf({mutationCb:Or,scrollCb:Da,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskInputOptions:ke,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:N,inlineImages:se,sampling:b,slimDOMOptions:fe,iframeManager:Ae,stylesheetManager:Ee,canvasManager:Xs,keepIframeSrcFn:E,processedNodeManager:pi},mirror:ae});yr=(M=!1)=>{if(!k)return;H({type:I.Meta,data:{href:window.location.href,width:Po(),height:To()}},M),Ee.reset(),$r.init(),Ie.forEach(G=>G.lock());const le=Ll(document,{mirror:ae,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskAllInputs:ke,maskTextFn:m,maskInputFn:g,slimDOM:fe,dataURLOptions:y,recordCanvas:N,inlineImages:se,onSerialize:G=>{Fo(G,ae)&&Ae.addIframe(G),Uo(G,ae)&&Ee.trackLinkElement(G),Zs(G)&&$r.addShadowRoot(_.shadowRoot(G),document)},onIframeLoad:(G,V)=>{Ae.attachIframe(G,V),$r.observeAttachShadow(G)},onStylesheetLoad:(G,V)=>{Ee.attachLinkElement(G,V)},keepIframeSrcFn:E});if(!le)return console.warn("Failed to snapshot the document");H({type:I.FullSnapshot,data:{node:le,initialOffset:No(window)}},M),Ie.forEach(G=>G.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ee.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))};try{const M=[],le=V=>{var te;return R(Yf)({mutationCb:Or,mousemoveCb:(P,di)=>H({type:I.IncrementalSnapshot,data:{source:di,positions:P}}),mouseInteractionCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.MouseInteraction,...P}}),scrollCb:Da,viewportResizeCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.ViewportResize,...P}}),inputCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.Input,...P}}),mediaInteractionCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.MediaInteraction,...P}}),styleSheetRuleCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.StyleSheetRule,...P}}),styleDeclarationCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.StyleDeclaration,...P}}),canvasMutationCb:La,fontCb:P=>H({type:I.IncrementalSnapshot,data:{source:x.Font,...P}}),selectionCb:P=>{H({type:I.IncrementalSnapshot,data:{source:x.Selection,...P}})},customElementCb:P=>{H({type:I.IncrementalSnapshot,data:{source:x.CustomElement,...P}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ke,inlineStylesheet:h,sampling:b,recordDOM:k,recordCanvas:N,inlineImages:se,userTriggeredOnInput:A,collectFonts:j,doc:V,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:fe,dataURLOptions:y,mirror:ae,iframeManager:Ae,stylesheetManager:Ee,shadowDomManager:$r,processedNodeManager:pi,canvasManager:Xs,ignoreCSSAttributes:mt,plugins:((te=he==null?void 0:he.filter(P=>P.observer))==null?void 0:te.map(P=>({observer:P.observer,options:P.options,callback:di=>H({type:I.Plugin,data:{plugin:P.name,payload:di}})})))||[]},f)};Ae.addLoadListener(V=>{try{M.push(le(V.contentDocument))}catch(te){console.warn(te)}});const G=()=>{yr(),M.push(le(document)),wr=!0};return["interactive","complete"].includes(document.readyState)?G():(M.push(Q("DOMContentLoaded",()=>{H({type:I.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&G()})),M.push(Q("load",()=>{H({type:I.Load,data:{}}),T==="load"&&G()},window))),()=>{M.forEach(V=>{try{V()}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te)}}),pi.destroy(),wr=!1,Tf()}}catch(M){console.warn(M)}}dt.addCustomEvent=(s,e)=>{if(!wr)throw new Error("please add custom event after start recording");H({type:I.Custom,data:{tag:s,payload:e}})},dt.freezePage=()=>{Ie.forEach(s=>s.freeze())},dt.takeFullSnapshot=s=>{if(!wr)throw new Error("please take full snapshot after start recording");yr(s)},dt.mirror=ae;var aa;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(aa||(aa={}));const ap=['input[type="password"]','input[type="credit-card"]','input[autocomplete="cc-number"]','input[autocomplete="cc-csc"]','input[autocomplete="cc-exp"]','input[autocomplete="cc-exp-month"]','input[autocomplete="cc-exp-year"]','input[autocomplete="new-password"]','input[autocomplete="current-password"]','input[name*="password"]','input[name*="passwd"]','input[name*="secret"]','input[name*="token"]','input[name*="apikey"]','input[name*="api_key"]','input[name*="api-key"]','input[name*="credit"]','input[name*="card"]','input[name*="cvv"]','input[name*="cvc"]','input[name*="ssn"]','input[id*="password"]','input[id*="secret"]','input[id*="token"]',"[data-private]","[data-mask]","[data-sensitive]"];function lp(){return ap.join(", ")}function up(){return"[data-private-text], [data-mask-text]"}function cp(s){return s.matches(lp())}function hp(s){return s?{maskAllInputs:!1,maskTextSelector:up(),maskInputOptions:{password:!0},maskInputFn:(e,t)=>cp(t)?"*".repeat(Math.min(e.length,20)):e,blockSelector:"[data-recorder-block], [data-bw-recorder-ui], #bw-recorder-root",ignoreSelector:"[data-recorder-ignore]"}:{maskAllInputs:!1,maskTextSelector:null,maskInputOptions:{}}}const fp=900*1e3,pp=30*1e3,dp=100;class mp{constructor(e){this.state="idle",this.events=[],this.stopFn=null,this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.maxDurationTimer=null,this.chunkTimer=null,this.uploader=null,this.metadata=null,this.onEventCallback=null,this.config={...e,maxDuration:e.maxDuration??fp,maskInputs:e.maskInputs??!0}}setUploader(e){this.uploader=e}onEvent(e){this.onEventCallback=e}getState(){return this.state}getElapsedTime(){return this.state==="idle"||this.startTime===0?0:this.state==="paused"?this.pauseTime-this.startTime-this.totalPausedDuration:Date.now()-this.startTime-this.totalPausedDuration}getEvents(){return[...this.events]}async start(){var r,i;if(this.state!=="idle")throw new Error(`Cannot start recording: state is ${this.state}`);if(this.setState("recording"),this.startTime=Date.now(),this.events=[],this.chunkIndex=0,this.totalPausedDuration=0,this.metadata={url:window.location.href,userAgent:navigator.userAgent,viewport:{width:window.innerWidth,height:window.innerHeight},startedAt:this.startTime},this.uploader)try{await this.uploader.start(this.metadata)}catch(n){throw(i=(r=this.config).onError)==null||i.call(r,n),this.setState("idle"),n}const e=hp(this.config.maskInputs),t=dt({emit:n=>this.handleEvent(n),maskAllInputs:e.maskAllInputs,maskTextSelector:e.maskTextSelector??void 0,maskInputFn:e.maskInputFn,blockSelector:e.blockSelector,recordCanvas:!0,collectFonts:!0,inlineStylesheet:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"}});this.stopFn=t??null,this.maxDurationTimer=setTimeout(()=>{this.stop()},this.config.maxDuration),this.chunkTimer=setInterval(()=>{this.flushChunk()},pp)}pause(){if(this.state!=="recording")throw new Error(`Cannot pause: state is ${this.state}`);this.setState("paused"),this.pauseTime=Date.now()}resume(){if(this.state!=="paused")throw new Error(`Cannot resume: state is ${this.state}`);this.totalPausedDuration+=Date.now()-this.pauseTime,this.setState("recording")}async stop(e=[]){var t,r,i,n;if(this.state==="idle"||this.state==="stopped")return null;if(this.maxDurationTimer&&(clearTimeout(this.maxDurationTimer),this.maxDurationTimer=null),this.chunkTimer&&(clearInterval(this.chunkTimer),this.chunkTimer=null),this.stopFn&&(this.stopFn(),this.stopFn=null),this.setState("stopped"),await this.flushChunk(),this.uploader)try{const o=await this.uploader.complete(this.getElapsedTime(),this.events.length,e);return(r=(t=this.config).onComplete)==null||r.call(t,o),o}catch(o){return(n=(i=this.config).onError)==null||n.call(i,o),null}return null}handleEvent(e){var t;this.state!=="paused"&&(this.events.push(e),(t=this.onEventCallback)==null||t.call(this,e),this.events.length>=dp&&this.flushChunk())}async flushChunk(){var t,r;if(this.events.length===0||!this.uploader)return;const e={index:this.chunkIndex++,events:[...this.events],timestamp:Date.now()};this.events=[];try{await this.uploader.uploadChunk(e)}catch(i){this.events=[...e.events,...this.events],this.chunkIndex--,(r=(t=this.config).onError)==null||r.call(t,i)}}setState(e){var t,r;this.state=e,(r=(t=this.config).onStateChange)==null||r.call(t,e)}reset(){this.stop(),this.state="idle",this.events=[],this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.metadata=null}}class gp{constructor(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer=null}setStartTime(e){this.recordingStartTime=e,this.isRecording=!0}getMarkers(){return[...this.markers]}getCount(){return this.markers.length}capture(e){if(!this.isRecording||this.recordingStartTime===0)return null;const t={timestamp:Date.now()-this.recordingStartTime,eventType:e};return this.markers.push(t),console.log("[BWorlds Recorder] Screenshot marker added",{timestamp:t.timestamp,eventType:t.eventType,totalMarkers:this.markers.length}),t}captureDebounced(e,t=500){this.captureDebounceTimer&&clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=setTimeout(()=>{this.capture(e),this.captureDebounceTimer=null},t)}stop(){this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}reset(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}}class yp{constructor(e){this.lastScrollY=0,this.viewportHeight=0,this.observers=[],this.isRecording=!1,this.hasInitialScreenshot=!1,this.handleScroll=()=>{if(!this.isRecording)return;const t=window.scrollY;Math.abs(t-this.lastScrollY)>this.viewportHeight*.5&&(this.lastScrollY=t,this.screenshotCapture.captureDebounced("scroll",500))},this.handleFormSubmit=t=>{this.isRecording&&this.triggerScreenshot("form_submit")},this.handleNavigation=()=>{this.isRecording&&setTimeout(()=>{this.triggerScreenshot("navigation")},500)},this.screenshotCapture=e,this.viewportHeight=window.innerHeight}start(){this.isRecording||(this.isRecording=!0,this.lastScrollY=window.scrollY,this.viewportHeight=window.innerHeight,this.hasInitialScreenshot=!1,this.setupModalDetection(),this.setupScrollDetection(),this.setupFormDetection(),this.setupNavigationDetection(),setTimeout(()=>{this.isRecording&&!this.hasInitialScreenshot&&(this.hasInitialScreenshot=!0,this.triggerScreenshot("load"))},500))}stop(){this.isRecording=!1,this.observers.forEach(e=>e.disconnect()),this.observers=[],window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("popstate",this.handleNavigation)}handleRrwebEvent(e){this.isRecording&&e.type===I.IncrementalSnapshot&&e.data.source}triggerScreenshot(e){this.isRecording&&this.screenshotCapture.capture(e)}setupModalDetection(){const e=new MutationObserver(t=>{for(const r of t){if(r.type==="childList"){for(const i of r.addedNodes)if(i instanceof HTMLElement&&this.isModal(i)){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}if(r.type==="attributes"){const i=r.target;if(r.attributeName==="open"&&i.tagName==="DIALOG"&&i.hasAttribute("open")){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}}});e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-hidden","aria-modal"]}),this.observers.push(e)}isModal(e){if(e.tagName.toLowerCase()==="dialog"||e.getAttribute("role")==="dialog"||e.getAttribute("role")==="alertdialog"||e.getAttribute("aria-modal")==="true")return!0;const r=e.className.toLowerCase(),i=["modal","dialog","overlay","popup","lightbox"];for(const o of i)if(r.includes(o))return!0;const n=window.getComputedStyle(e);if((n.position==="fixed"||n.position==="absolute")&&parseInt(n.zIndex)>100){const o=e.getBoundingClientRect(),l=window.innerWidth*window.innerHeight;if(o.width*o.height>l*.3)return!0}return!1}setupScrollDetection(){window.addEventListener("scroll",this.handleScroll,{passive:!0})}setupFormDetection(){document.addEventListener("submit",this.handleFormSubmit,!0)}setupNavigationDetection(){window.addEventListener("popstate",this.handleNavigation);const e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=(...r)=>{e(...r),this.handleNavigation()},history.replaceState=(...r)=>{t(...r),this.handleNavigation()}}destroy(){this.stop(),document.removeEventListener("submit",this.handleFormSubmit,!0)}}class wp{constructor(){this.recordingId="",this.sessionToken="",this.metadata=null,this.chunks=[],this.screenshotMarkers=[]}async start(e){return this.recordingId=`rec_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,this.sessionToken=`tok_${Math.random().toString(36).substr(2,16)}`,this.metadata=e,this.chunks=[],this.screenshotMarkers=[],console.log("[BWorlds Recorder] Recording started",{recordingId:this.recordingId,metadata:{url:e.url,viewport:e.viewport,startedAt:new Date(e.startedAt).toISOString()}}),{token:this.sessionToken,recordingId:this.recordingId,expiresAt:Date.now()+3600*1e3}}async uploadChunk(e){this.chunks.push(e),console.log("[BWorlds Recorder] Chunk uploaded",{recordingId:this.recordingId,chunkIndex:e.index,eventCount:e.events.length,totalEvents:this.chunks.reduce((t,r)=>t+r.events.length,0)})}async complete(e,t,r){this.screenshotMarkers=r;const i={recordingId:this.recordingId,playbackUrl:`https://app.bworlds.com/recordings/${this.recordingId}`,duration:e,eventCount:this.chunks.reduce((n,o)=>n+o.events.length,0),screenshotCount:r.length};return console.log("[BWorlds Recorder] Recording completed",{...i,metadata:this.metadata,screenshotMarkers:r.map(n=>({timestamp:n.timestamp,eventType:n.eventType}))}),console.log("[BWorlds Recorder] Recording data summary:",{chunks:this.chunks.length,screenshotMarkers:r.length,totalEvents:i.eventCount,duration:`${Math.round(e/1e3)}s`}),i}getData(){return{metadata:this.metadata,chunks:this.chunks,screenshotMarkers:this.screenshotMarkers}}}class bp{constructor(e,t){this.sessionToken="",this.recordingId="",this.apiEndpoint=e,this.apiKey=t}async start(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:this.apiKey,metadata:{url:e.url,user_agent:e.userAgent,viewport:e.viewport}})});if(!t.ok)throw new Error(`Failed to start recording: ${t.statusText}`);const r=await t.json();return this.sessionToken=r.session_token,this.recordingId=r.recording_id,{token:r.session_token,recordingId:r.recording_id,expiresAt:r.expires_at}}async uploadChunk(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/chunk`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({events:e.events,chunk_index:e.index})});if(!t.ok)throw new Error(`Failed to upload chunk: ${t.statusText}`)}async complete(e,t,r){const i=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/complete`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({duration_ms:e,event_count:t,screenshot_markers:r.map(o=>({timestamp_ms:o.timestamp,event_type:o.eventType}))})});if(!i.ok)throw new Error(`Failed to complete recording: ${i.statusText}`);const n=await i.json();return{recordingId:this.recordingId,playbackUrl:n.playback_url,duration:e,eventCount:t,screenshotCount:r.length}}}var br,D,la,Re,ua,ca,ha,fa,Ks,Qs,qs,vr={},Sr=[],vp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cr=Array.isArray;function be(s,e){for(var t in e)s[t]=e[t];return s}function ei(s){s&&s.parentNode&&s.parentNode.removeChild(s)}function Sp(s,e,t){var r,i,n,o={};for(n in e)n=="key"?r=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?br.call(arguments,2):t),typeof s=="function"&&s.defaultProps!=null)for(n in s.defaultProps)o[n]===void 0&&(o[n]=s.defaultProps[n]);return _r(s,o,r,i,null)}function _r(s,e,t,r,i){var n={type:s,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++la,__i:-1,__u:0};return i==null&&D.vnode!=null&&D.vnode(n),n}function je(s){return s.children}function xr(s,e){this.props=s,this.context=e}function He(s,e){if(e==null)return s.__?He(s.__,s.__i+1):null;for(var t;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null)return t.__e;return typeof s.type=="function"?He(s):null}function Cp(s){if(s.__P&&s.__d){var e=s.__v,t=e.__e,r=[],i=[],n=be({},e);n.__v=e.__v+1,D.vnode&&D.vnode(n),ti(s.__P,n,e,s.__n,s.__P.namespaceURI,32&e.__u?[t]:null,r,t??He(e),!!(32&e.__u),i),n.__v=e.__v,n.__.__k[n.__i]=n,ba(r,n,i),e.__e=e.__=null,n.__e!=t&&pa(n)}}function pa(s){if((s=s.__)!=null&&s.__c!=null)return s.__e=s.__c.base=null,s.__k.some(function(e){if(e!=null&&e.__e!=null)return s.__e=s.__c.base=e.__e}),pa(s)}function da(s){(!s.__d&&(s.__d=!0)&&Re.push(s)&&!Ir.__r++||ua!=D.debounceRendering)&&((ua=D.debounceRendering)||ca)(Ir)}function Ir(){for(var s,e=1;Re.length;)Re.length>e&&Re.sort(ha),s=Re.shift(),e=Re.length,Cp(s);Ir.__r=0}function ma(s,e,t,r,i,n,o,l,a,u,h){var c,p,d,g,m,f,v,b=r&&r.__k||Sr,y=e.length;for(a=_p(t,e,b,a,y),c=0;c<y;c++)(d=t.__k[c])!=null&&(p=d.__i!=-1&&b[d.__i]||vr,d.__i=c,f=ti(s,d,p,i,n,o,l,a,u,h),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&si(p.ref,null,d),h.push(d.ref,d.__c||g,d)),m==null&&g!=null&&(m=g),(v=!!(4&d.__u))||p.__k===d.__k?a=ga(d,a,s,v):typeof d.type=="function"&&f!==void 0?a=f:g&&(a=g.nextSibling),d.__u&=-7);return t.__e=m,a}function _p(s,e,t,r,i){var n,o,l,a,u,h=t.length,c=h,p=0;for(s.__k=new Array(i),n=0;n<i;n++)(o=e[n])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=s.__k[n]=_r(null,o,null,null,null):Cr(o)?o=s.__k[n]=_r(je,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=s.__k[n]=_r(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):s.__k[n]=o,a=n+p,o.__=s,o.__b=s.__b+1,l=null,(u=o.__i=xp(o,t,a,c))!=-1&&(c--,(l=t[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>h?p--:i<h&&p++),typeof o.type!="function"&&(o.__u|=4)):u!=a&&(u==a-1?p--:u==a+1?p++:(u>a?p--:p++,o.__u|=4))):s.__k[n]=null;if(c)for(n=0;n<h;n++)(l=t[n])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=He(l)),Sa(l,l));return r}function ga(s,e,t,r){var i,n;if(typeof s.type=="function"){for(i=s.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=s,e=ga(i[n],e,t,r));return e}s.__e!=e&&(r&&(e&&s.type&&!e.parentNode&&(e=He(s)),t.insertBefore(s.__e,e||null)),e=s.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function xp(s,e,t,r){var i,n,o,l=s.key,a=s.type,u=e[t],h=u!=null&&(2&u.__u)==0;if(u===null&&l==null||h&&l==u.key&&a==u.type)return t;if(r>(h?1:0)){for(i=t-1,n=t+1;i>=0||n<e.length;)if((u=e[o=i>=0?i--:n++])!=null&&(2&u.__u)==0&&l==u.key&&a==u.type)return o}return-1}function ya(s,e,t){e[0]=="-"?s.setProperty(e,t??""):s[e]=t==null?"":typeof t!="number"||vp.test(e)?t:t+"px"}function Rr(s,e,t,r,i){var n,o;e:if(e=="style")if(typeof t=="string")s.style.cssText=t;else{if(typeof r=="string"&&(s.style.cssText=r=""),r)for(e in r)t&&e in t||ya(s.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||ya(s.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(fa,"$1")),o=e.toLowerCase(),e=o in s||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),s.l||(s.l={}),s.l[e+n]=t,t?r?t.u=r.u:(t.u=Ks,s.addEventListener(e,n?qs:Qs,n)):s.removeEventListener(e,n?qs:Qs,n);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in s)try{s[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?s.removeAttribute(e):s.setAttribute(e,e=="popover"&&t==1?"":t))}}function wa(s){return function(e){if(this.l){var t=this.l[e.type+s];if(e.t==null)e.t=Ks++;else if(e.t<t.u)return;return t(D.event?D.event(e):e)}}}function ti(s,e,t,r,i,n,o,l,a,u){var h,c,p,d,g,m,f,v,b,y,C,k,N,W,T,A=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),n=[l=e.__e=t.__e]),(h=D.__b)&&h(e);e:if(typeof A=="function")try{if(v=e.props,b="prototype"in A&&A.prototype.render,y=(h=A.contextType)&&r[h.__c],C=h?y?y.props.value:h.__:r,t.__c?f=(c=e.__c=t.__c).__=c.__E:(b?e.__c=c=new A(v,C):(e.__c=c=new xr(v,C),c.constructor=A,c.render=Rp),y&&y.sub(c),c.state||(c.state={}),c.__n=r,p=c.__d=!0,c.__h=[],c._sb=[]),b&&c.__s==null&&(c.__s=c.state),b&&A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=be({},c.__s)),be(c.__s,A.getDerivedStateFromProps(v,c.__s))),d=c.props,g=c.state,c.__v=e,p)b&&A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),b&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b&&A.getDerivedStateFromProps==null&&v!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(v,C),e.__v==t.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(v,c.__s,C)===!1){e.__v!=t.__v&&(c.props=v,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(j){j&&(j.__=e)}),Sr.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(v,c.__s,C),b&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,g,m)})}if(c.context=C,c.props=v,c.__P=s,c.__e=!1,k=D.__r,N=0,b)c.state=c.__s,c.__d=!1,k&&k(e),h=c.render(c.props,c.state,c.context),Sr.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,k&&k(e),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(r=be(be({},r),c.getChildContext())),b&&!p&&c.getSnapshotBeforeUpdate!=null&&(m=c.getSnapshotBeforeUpdate(d,g)),W=h!=null&&h.type===je&&h.key==null?va(h.props.children):h,l=ma(s,Cr(W)?W:[W],e,t,r,i,n,o,l,a,u),c.base=e.__e,e.__u&=-161,c.__h.length&&o.push(c),f&&(c.__E=c.__=null)}catch(j){if(e.__v=null,a||n!=null)if(j.then){for(e.__u|=a?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l}else{for(T=n.length;T--;)ei(n[T]);ri(e)}else e.__e=t.__e,e.__k=t.__k,j.then||ri(e);D.__e(j,e,t)}else n==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):l=e.__e=Ip(t.__e,e,t,r,i,n,o,a,u);return(h=D.diffed)&&h(e),128&e.__u?void 0:l}function ri(s){s&&(s.__c&&(s.__c.__e=!0),s.__k&&s.__k.some(ri))}function ba(s,e,t){for(var r=0;r<t.length;r++)si(t[r],t[++r],t[++r]);D.__c&&D.__c(e,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(n){n.call(i)})}catch(n){D.__e(n,i.__v)}})}function va(s){return typeof s!="object"||s==null||s.__b>0?s:Cr(s)?s.map(va):be({},s)}function Ip(s,e,t,r,i,n,o,l,a){var u,h,c,p,d,g,m,f=t.props||vr,v=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),n!=null){for(u=0;u<n.length;u++)if((d=n[u])&&"setAttribute"in d==!!b&&(b?d.localName==b:d.nodeType==3)){s=d,n[u]=null;break}}if(s==null){if(b==null)return document.createTextNode(v);s=document.createElementNS(i,b,v.is&&v),l&&(D.__m&&D.__m(e,n),l=!1),n=null}if(b==null)f===v||l&&s.data==v||(s.data=v);else{if(n=n&&br.call(s.childNodes),!l&&n!=null)for(f={},u=0;u<s.attributes.length;u++)f[(d=s.attributes[u]).name]=d.value;for(u in f)d=f[u],u=="dangerouslySetInnerHTML"?c=d:u=="children"||u in v||u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v||Rr(s,u,null,d,i);for(u in v)d=v[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?h=d:u=="value"?g=d:u=="checked"?m=d:l&&typeof d!="function"||f[u]===d||Rr(s,u,d,f[u],i);if(h)l||c&&(h.__html==c.__html||h.__html==s.innerHTML)||(s.innerHTML=h.__html),e.__k=[];else if(c&&(s.innerHTML=""),ma(e.type=="template"?s.content:s,Cr(p)?p:[p],e,t,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,n,o,n?n[0]:t.__k&&He(t,0),l,a),n!=null)for(u=n.length;u--;)ei(n[u]);l||(u="value",b=="progress"&&g==null?s.removeAttribute("value"):g!=null&&(g!==s[u]||b=="progress"&&!g||b=="option"&&g!=f[u])&&Rr(s,u,g,f[u],i),u="checked",m!=null&&m!=s[u]&&Rr(s,u,m,f[u],i))}return s}function si(s,e,t){try{if(typeof s=="function"){var r=typeof s.__u=="function";r&&s.__u(),r&&e==null||(s.__u=s(e))}else s.current=e}catch(i){D.__e(i,t)}}function Sa(s,e,t){var r,i;if(D.unmount&&D.unmount(s),(r=s.ref)&&(r.current&&r.current!=s.__e||si(r,null,e)),(r=s.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(n){D.__e(n,e)}r.base=r.__P=null}if(r=s.__k)for(i=0;i<r.length;i++)r[i]&&Sa(r[i],e,t||typeof s.type!="function");t||ei(s.__e),s.__c=s.__=s.__e=void 0}function Rp(s,e,t){return this.constructor(s,t)}function kr(s,e,t){var r,i,n,o;e==document&&(e=document.documentElement),D.__&&D.__(s,e),i=(r=!1)?null:e.__k,n=[],o=[],ti(e,s=e.__k=Sp(je,null,[s]),i||vr,vr,e.namespaceURI,i?null:e.firstChild?br.call(e.childNodes):null,n,i?i.__e:e.firstChild,r,o),ba(n,s,o)}br=Sr.slice,D={__e:function(s,e,t,r){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,r||{}),o=i.__d),o)return i.__E=i}catch(l){s=l}throw s}},la=0,xr.prototype.setState=function(s,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=be({},this.state),typeof s=="function"&&(s=s(be({},t),this.props)),s&&be(t,s),s!=null&&this.__v&&(e&&this._sb.push(e),da(this))},xr.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),da(this))},xr.prototype.render=je,Re=[],ca=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ha=function(s,e){return s.__v.__b-e.__v.__b},Ir.__r=0,fa=/(PointerCapture)$|Capture$/i,Ks=0,Qs=wa(!1),qs=wa(!0);var kp=0;function w(s,e,t,r,i,n){e||(e={});var o,l,a=e;if("ref"in a)for(l in a={},e)l=="ref"?o=e[l]:a[l]=e[l];var u={type:s,props:a,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--kp,__i:-1,__u:0,__source:i,__self:n};if(typeof s=="function"&&(o=s.defaultProps))for(l in o)a[l]===void 0&&(a[l]=o[l]);return D.vnode&&D.vnode(u),u}const ii="bw-recorder-styles",Ep=`
|
|
60
|
-
.bw-recorder-toolbar {
|
|
61
|
-
--bw-cream: #FAF7F2;
|
|
62
|
-
--bw-cream-dim: #F0EBE0;
|
|
63
|
-
--bw-charcoal: #1F1F23;
|
|
64
|
-
--bw-coral: #E64C3C;
|
|
65
|
-
--bw-coral-light: #EF6355;
|
|
66
|
-
--bw-stone-200: #e7e5e4;
|
|
67
|
-
--bw-stone-400: #a8a29e;
|
|
68
|
-
--bw-stone-500: #78716c;
|
|
69
|
-
position: fixed;
|
|
70
|
-
z-index: 2147483647;
|
|
71
|
-
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
72
|
-
font-size: 13px;
|
|
73
|
-
line-height: 1;
|
|
74
|
-
box-sizing: border-box;
|
|
75
|
-
}
|
|
76
|
-
.bw-recorder-toolbar * { box-sizing: border-box; }
|
|
77
|
-
.bw-recorder-toolbar.bottom-right { bottom: 16px; right: 16px; }
|
|
78
|
-
.bw-recorder-toolbar.bottom-left { bottom: 16px; left: 16px; }
|
|
79
|
-
.bw-recorder-toolbar.top-right { top: 16px; right: 16px; }
|
|
80
|
-
.bw-recorder-toolbar.top-left { top: 16px; left: 16px; }
|
|
81
|
-
.bw-toolbar-container {
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
gap: 2px;
|
|
85
|
-
background: var(--bw-cream);
|
|
86
|
-
border: 1px solid var(--bw-stone-200);
|
|
87
|
-
border-radius: 8px;
|
|
88
|
-
padding: 4px;
|
|
89
|
-
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
|
|
90
|
-
}
|
|
91
|
-
.bw-toolbar-status {
|
|
92
|
-
display: flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
gap: 8px;
|
|
95
|
-
padding: 0 12px 0 8px;
|
|
96
|
-
border-right: 1px solid var(--bw-stone-200);
|
|
97
|
-
min-width: 130px;
|
|
98
|
-
}
|
|
99
|
-
.bw-status-indicator {
|
|
100
|
-
width: 8px;
|
|
101
|
-
height: 8px;
|
|
102
|
-
border-radius: 50%;
|
|
103
|
-
background: var(--bw-stone-400);
|
|
104
|
-
flex-shrink: 0;
|
|
105
|
-
}
|
|
106
|
-
.bw-status-indicator.recording {
|
|
107
|
-
background: var(--bw-coral);
|
|
108
|
-
animation: bw-pulse 1.5s ease-in-out infinite;
|
|
109
|
-
}
|
|
110
|
-
.bw-status-indicator.paused { background: var(--bw-stone-500); }
|
|
111
|
-
@keyframes bw-pulse {
|
|
112
|
-
0%, 100% { opacity: 1; }
|
|
113
|
-
50% { opacity: 0.5; }
|
|
114
|
-
}
|
|
115
|
-
@keyframes bw-spin {
|
|
116
|
-
0% { transform: rotate(0deg); }
|
|
117
|
-
100% { transform: rotate(360deg); }
|
|
118
|
-
}
|
|
119
|
-
.bw-spin {
|
|
120
|
-
animation: bw-spin 1s linear infinite;
|
|
121
|
-
}
|
|
122
|
-
.bw-saving {
|
|
123
|
-
color: var(--bw-stone-500);
|
|
124
|
-
}
|
|
125
|
-
.bw-status-text {
|
|
126
|
-
color: var(--bw-charcoal);
|
|
127
|
-
font-weight: 500;
|
|
128
|
-
font-size: 12px;
|
|
129
|
-
}
|
|
130
|
-
.bw-status-time {
|
|
131
|
-
color: var(--bw-stone-500);
|
|
132
|
-
font-variant-numeric: tabular-nums;
|
|
133
|
-
font-size: 12px;
|
|
134
|
-
min-width: 40px;
|
|
135
|
-
}
|
|
136
|
-
.bw-toolbar-btn {
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
width: 32px;
|
|
141
|
-
height: 32px;
|
|
142
|
-
border: none;
|
|
143
|
-
border-radius: 6px;
|
|
144
|
-
background: transparent;
|
|
145
|
-
color: var(--bw-charcoal);
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
transition: all 0.15s ease;
|
|
148
|
-
padding: 0;
|
|
149
|
-
}
|
|
150
|
-
.bw-toolbar-btn:hover { background: var(--bw-cream-dim); }
|
|
151
|
-
.bw-toolbar-btn:active { transform: translateY(1px); }
|
|
152
|
-
.bw-toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
153
|
-
.bw-toolbar-btn:disabled:hover { background: transparent; }
|
|
154
|
-
.bw-toolbar-btn svg { width: 16px; height: 16px; }
|
|
155
|
-
.bw-toolbar-btn.primary { background: var(--bw-coral); color: white; }
|
|
156
|
-
.bw-toolbar-btn.primary:hover { background: var(--bw-coral-light); }
|
|
157
|
-
.bw-toolbar-btn.stop { color: var(--bw-coral); }
|
|
158
|
-
.bw-toolbar-btn.stop:hover { background: rgba(230, 76, 60, 0.1); }
|
|
159
|
-
.bw-toolbar-divider {
|
|
160
|
-
width: 1px;
|
|
161
|
-
height: 20px;
|
|
162
|
-
background: var(--bw-stone-200);
|
|
163
|
-
margin: 0 4px;
|
|
164
|
-
}
|
|
165
|
-
.bw-toolbar-logo {
|
|
166
|
-
display: flex;
|
|
167
|
-
align-items: center;
|
|
168
|
-
padding: 0 8px 0 4px;
|
|
169
|
-
color: var(--bw-stone-400);
|
|
170
|
-
font-size: 11px;
|
|
171
|
-
font-weight: 600;
|
|
172
|
-
letter-spacing: 0.5px;
|
|
173
|
-
text-transform: lowercase;
|
|
174
|
-
}
|
|
175
|
-
.bw-toolbar-idle {
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
gap: 8px;
|
|
179
|
-
padding: 8px 12px;
|
|
180
|
-
background: var(--bw-cream);
|
|
181
|
-
border: 1px solid var(--bw-stone-200);
|
|
182
|
-
border-radius: 8px;
|
|
183
|
-
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
transition: all 0.15s ease;
|
|
186
|
-
}
|
|
187
|
-
.bw-toolbar-idle:hover {
|
|
188
|
-
background: var(--bw-cream-dim);
|
|
189
|
-
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
|
|
190
|
-
transform: translateY(1px);
|
|
191
|
-
}
|
|
192
|
-
.bw-toolbar-idle .bw-idle-icon {
|
|
193
|
-
width: 10px;
|
|
194
|
-
height: 10px;
|
|
195
|
-
border-radius: 50%;
|
|
196
|
-
background: var(--bw-coral);
|
|
197
|
-
}
|
|
198
|
-
.bw-toolbar-idle .bw-idle-text {
|
|
199
|
-
color: var(--bw-charcoal);
|
|
200
|
-
font-weight: 500;
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
}
|
|
203
|
-
.bw-toolbar-idle .bw-idle-logo {
|
|
204
|
-
color: var(--bw-stone-400);
|
|
205
|
-
font-size: 10px;
|
|
206
|
-
font-weight: 600;
|
|
207
|
-
margin-left: 4px;
|
|
208
|
-
}
|
|
209
|
-
.bw-toolbar-complete {
|
|
210
|
-
display: flex;
|
|
211
|
-
align-items: center;
|
|
212
|
-
gap: 8px;
|
|
213
|
-
padding: 8px 12px;
|
|
214
|
-
background: var(--bw-cream);
|
|
215
|
-
border: 1px solid var(--bw-stone-200);
|
|
216
|
-
border-radius: 8px;
|
|
217
|
-
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
|
|
218
|
-
}
|
|
219
|
-
.bw-toolbar-complete .bw-complete-icon { color: #2AA9A1; }
|
|
220
|
-
.bw-toolbar-complete .bw-complete-icon svg { width: 16px; height: 16px; }
|
|
221
|
-
.bw-toolbar-complete .bw-complete-text {
|
|
222
|
-
color: var(--bw-charcoal);
|
|
223
|
-
font-weight: 500;
|
|
224
|
-
font-size: 12px;
|
|
225
|
-
}
|
|
226
|
-
.bw-toolbar-complete a {
|
|
227
|
-
color: var(--bw-coral);
|
|
228
|
-
text-decoration: none;
|
|
229
|
-
font-weight: 500;
|
|
230
|
-
}
|
|
231
|
-
.bw-toolbar-complete a:hover { text-decoration: underline; }
|
|
232
|
-
.bw-restart-btn {
|
|
233
|
-
margin-left: 8px;
|
|
234
|
-
padding: 4px 10px;
|
|
235
|
-
background: var(--bw-cream-dim);
|
|
236
|
-
border: 1px solid var(--bw-stone-200);
|
|
237
|
-
border-radius: 4px;
|
|
238
|
-
color: var(--bw-charcoal);
|
|
239
|
-
font-size: 11px;
|
|
240
|
-
font-weight: 500;
|
|
241
|
-
cursor: pointer;
|
|
242
|
-
transition: all 0.15s ease;
|
|
243
|
-
}
|
|
244
|
-
.bw-restart-btn:hover {
|
|
245
|
-
background: var(--bw-stone-200);
|
|
246
|
-
}
|
|
247
|
-
.bw-restart-btn:active {
|
|
248
|
-
transform: translateY(1px);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/* Invite Dialog Styles */
|
|
252
|
-
.bw-invite-overlay {
|
|
253
|
-
position: fixed;
|
|
254
|
-
top: 0;
|
|
255
|
-
left: 0;
|
|
256
|
-
right: 0;
|
|
257
|
-
bottom: 0;
|
|
258
|
-
background: #1F1F23;
|
|
259
|
-
display: flex;
|
|
260
|
-
align-items: center;
|
|
261
|
-
justify-content: center;
|
|
262
|
-
z-index: 2147483646;
|
|
263
|
-
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
264
|
-
box-sizing: border-box;
|
|
265
|
-
}
|
|
266
|
-
.bw-invite-overlay * { box-sizing: border-box; }
|
|
267
|
-
.bw-invite-dialog {
|
|
268
|
-
background: white;
|
|
269
|
-
border-radius: 12px;
|
|
270
|
-
padding: 32px;
|
|
271
|
-
width: 100%;
|
|
272
|
-
max-width: 360px;
|
|
273
|
-
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
274
|
-
animation: bw-invite-fade-in 0.2s ease-out;
|
|
275
|
-
}
|
|
276
|
-
@keyframes bw-invite-fade-in {
|
|
277
|
-
from { opacity: 0; transform: scale(0.95); }
|
|
278
|
-
to { opacity: 1; transform: scale(1); }
|
|
279
|
-
}
|
|
280
|
-
.bw-invite-logo {
|
|
281
|
-
display: flex;
|
|
282
|
-
justify-content: center;
|
|
283
|
-
margin-bottom: 24px;
|
|
284
|
-
color: var(--bw-coral, #E64C3C);
|
|
285
|
-
}
|
|
286
|
-
.bw-invite-logo svg {
|
|
287
|
-
width: 40px;
|
|
288
|
-
height: 40px;
|
|
289
|
-
}
|
|
290
|
-
.bw-invite-title {
|
|
291
|
-
text-align: center;
|
|
292
|
-
font-size: 24px;
|
|
293
|
-
font-weight: 600;
|
|
294
|
-
color: #1F1F23;
|
|
295
|
-
margin: 0 0 8px 0;
|
|
296
|
-
}
|
|
297
|
-
.bw-invite-subtitle {
|
|
298
|
-
text-align: center;
|
|
299
|
-
font-size: 14px;
|
|
300
|
-
color: #6b7280;
|
|
301
|
-
margin: 0 0 24px 0;
|
|
302
|
-
line-height: 1.5;
|
|
303
|
-
}
|
|
304
|
-
.bw-invite-form {
|
|
305
|
-
display: flex;
|
|
306
|
-
flex-direction: column;
|
|
307
|
-
gap: 12px;
|
|
308
|
-
}
|
|
309
|
-
.bw-invite-field {
|
|
310
|
-
position: relative;
|
|
311
|
-
}
|
|
312
|
-
.bw-invite-input {
|
|
313
|
-
width: 100%;
|
|
314
|
-
padding: 12px 16px;
|
|
315
|
-
font-size: 14px;
|
|
316
|
-
border: 1px solid #e5e7eb;
|
|
317
|
-
border-radius: 8px;
|
|
318
|
-
background: white;
|
|
319
|
-
color: #1F1F23;
|
|
320
|
-
outline: none;
|
|
321
|
-
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
322
|
-
}
|
|
323
|
-
.bw-invite-input:focus {
|
|
324
|
-
border-color: var(--bw-coral, #E64C3C);
|
|
325
|
-
box-shadow: 0 0 0 3px rgba(230, 76, 60, 0.1);
|
|
326
|
-
}
|
|
327
|
-
.bw-invite-input[readonly] {
|
|
328
|
-
background: #f9fafb;
|
|
329
|
-
color: #6b7280;
|
|
330
|
-
cursor: not-allowed;
|
|
331
|
-
}
|
|
332
|
-
.bw-invite-input::placeholder {
|
|
333
|
-
color: #9ca3af;
|
|
334
|
-
}
|
|
335
|
-
.bw-invite-input[type="password"] {
|
|
336
|
-
padding-right: 44px;
|
|
337
|
-
}
|
|
338
|
-
.bw-invite-input[type="text"]:not([readonly]) {
|
|
339
|
-
padding-right: 44px;
|
|
340
|
-
}
|
|
341
|
-
.bw-invite-eye-btn {
|
|
342
|
-
position: absolute;
|
|
343
|
-
right: 8px;
|
|
344
|
-
top: 50%;
|
|
345
|
-
transform: translateY(-50%);
|
|
346
|
-
width: 32px;
|
|
347
|
-
height: 32px;
|
|
348
|
-
display: flex;
|
|
349
|
-
align-items: center;
|
|
350
|
-
justify-content: center;
|
|
351
|
-
background: none;
|
|
352
|
-
border: none;
|
|
353
|
-
cursor: pointer;
|
|
354
|
-
color: #9ca3af;
|
|
355
|
-
border-radius: 4px;
|
|
356
|
-
transition: color 0.15s ease;
|
|
357
|
-
}
|
|
358
|
-
.bw-invite-eye-btn:hover {
|
|
359
|
-
color: #6b7280;
|
|
360
|
-
}
|
|
361
|
-
.bw-invite-eye-btn svg {
|
|
362
|
-
width: 18px;
|
|
363
|
-
height: 18px;
|
|
364
|
-
}
|
|
365
|
-
.bw-invite-submit {
|
|
366
|
-
display: flex;
|
|
367
|
-
align-items: center;
|
|
368
|
-
justify-content: center;
|
|
369
|
-
gap: 8px;
|
|
370
|
-
width: 100%;
|
|
371
|
-
padding: 12px 16px;
|
|
372
|
-
font-size: 14px;
|
|
373
|
-
font-weight: 500;
|
|
374
|
-
color: white;
|
|
375
|
-
background: #10b981;
|
|
376
|
-
border: none;
|
|
377
|
-
border-radius: 8px;
|
|
378
|
-
cursor: pointer;
|
|
379
|
-
transition: background 0.15s ease;
|
|
380
|
-
margin-top: 4px;
|
|
381
|
-
}
|
|
382
|
-
.bw-invite-submit:hover:not(:disabled) {
|
|
383
|
-
background: #059669;
|
|
384
|
-
}
|
|
385
|
-
.bw-invite-submit:disabled {
|
|
386
|
-
opacity: 0.6;
|
|
387
|
-
cursor: not-allowed;
|
|
388
|
-
}
|
|
389
|
-
.bw-invite-submit svg {
|
|
390
|
-
width: 16px;
|
|
391
|
-
height: 16px;
|
|
392
|
-
}
|
|
393
|
-
@keyframes bw-invite-spin {
|
|
394
|
-
from { transform: rotate(0deg); }
|
|
395
|
-
to { transform: rotate(360deg); }
|
|
396
|
-
}
|
|
397
|
-
.bw-invite-spin {
|
|
398
|
-
animation: bw-invite-spin 1s linear infinite;
|
|
399
|
-
}
|
|
400
|
-
.bw-invite-login-text {
|
|
401
|
-
text-align: center;
|
|
402
|
-
font-size: 13px;
|
|
403
|
-
color: #6b7280;
|
|
404
|
-
margin: 20px 0 0 0;
|
|
405
|
-
}
|
|
406
|
-
.bw-invite-login-link {
|
|
407
|
-
color: #10b981;
|
|
408
|
-
text-decoration: none;
|
|
409
|
-
font-weight: 500;
|
|
410
|
-
}
|
|
411
|
-
.bw-invite-login-link:hover {
|
|
412
|
-
text-decoration: underline;
|
|
413
|
-
}
|
|
414
|
-
.bw-invite-success {
|
|
415
|
-
display: flex;
|
|
416
|
-
flex-direction: column;
|
|
417
|
-
align-items: center;
|
|
418
|
-
padding: 16px 0;
|
|
419
|
-
animation: bw-invite-fade-in 0.3s ease-out;
|
|
420
|
-
}
|
|
421
|
-
.bw-invite-success-icon {
|
|
422
|
-
color: #10b981;
|
|
423
|
-
margin-bottom: 16px;
|
|
424
|
-
}
|
|
425
|
-
.bw-invite-success-icon svg {
|
|
426
|
-
width: 48px;
|
|
427
|
-
height: 48px;
|
|
428
|
-
}
|
|
429
|
-
.bw-invite-success-title {
|
|
430
|
-
font-size: 20px;
|
|
431
|
-
font-weight: 600;
|
|
432
|
-
color: #1F1F23;
|
|
433
|
-
margin: 0 0 4px 0;
|
|
434
|
-
}
|
|
435
|
-
.bw-invite-success-text {
|
|
436
|
-
font-size: 14px;
|
|
437
|
-
color: #6b7280;
|
|
438
|
-
margin: 0;
|
|
439
|
-
}
|
|
440
|
-
`;let Er=!1;function Ca(){if(Er||typeof document>"u")return;if(document.getElementById(ii)){Er=!0;return}const s=document.createElement("style");s.id=ii,s.textContent=Ep,document.head.appendChild(s),Er=!0}function Ap(){const s=document.getElementById(ii);s&&(s.remove(),Er=!1)}const Mp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M8 5v14l11-7z"})}),Op=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}),$p=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 6h12v12H6z"})}),Np=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:[w("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),w("circle",{cx:"12",cy:"13",r:"4"})]}),Tp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:w("path",{d:"M20 6L9 17l-5-5"})}),Pp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function Dp(s){const e=Math.floor(s/1e3),t=Math.floor(e/60),r=e%60;return`${t.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Lp({position:s,state:e,elapsedTime:t,result:r,onStart:i,onPause:n,onResume:o,onStop:l,onScreenshot:a,onRestart:u}){if(e==="idle")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("button",{class:"bw-toolbar-idle",onClick:i,type:"button",children:[w("span",{class:"bw-idle-icon"}),w("span",{class:"bw-idle-text",children:"Start Recording"}),w("span",{class:"bw-idle-logo",children:"bw"})]})});if(e==="stopped"&&r)return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon",children:w(Tp,{})}),w("span",{class:"bw-complete-text",children:["Recording saved!"," ",w("a",{href:r.playbackUrl,target:"_blank",rel:"noopener noreferrer",children:"View"})]}),w("button",{class:"bw-restart-btn",onClick:u,type:"button",title:"Start new recording",children:"New"})]})});if(e==="stopped")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon bw-saving",children:w(Pp,{})}),w("span",{class:"bw-complete-text",children:"Saving..."})]})});const h=e==="recording",c=e==="paused";return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-container",children:[w("div",{class:"bw-toolbar-status",children:[w("span",{class:`bw-status-indicator ${h?"recording":""} ${c?"paused":""}`}),w("span",{class:"bw-status-text",children:h?"Recording":"Paused"}),w("span",{class:"bw-status-time",children:Dp(t)})]}),w("button",{class:"bw-toolbar-btn",onClick:h?n:o,title:h?"Pause":"Resume",type:"button",children:h?w(Op,{}):w(Mp,{})}),w("button",{class:"bw-toolbar-btn stop",onClick:l,title:"Stop Recording",type:"button",children:w($p,{})}),w("div",{class:"bw-toolbar-divider"}),w("button",{class:"bw-toolbar-btn",onClick:a,title:"Take Screenshot",disabled:!h,type:"button",children:w(Np,{})}),w("div",{class:"bw-toolbar-divider"}),w("span",{class:"bw-toolbar-logo",children:"bw"})]})})}class Fp{constructor(e="bottom-right"){this.container=null,this.state="idle",this.elapsedTime=0,this.result=null,this.updateInterval=null,this.getElapsedTime=null,this.onStartCallback=null,this.onPauseCallback=null,this.onResumeCallback=null,this.onStopCallback=null,this.onScreenshotCallback=null,this.onRestartCallback=null,this.position=e}mount(){this.container||(Ca(),this.container=document.createElement("div"),this.container.id="bw-recorder-root",this.container.setAttribute("data-bw-recorder-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null),this.container&&(kr(null,this.container),this.container.remove(),this.container=null),Ap()}setCallbacks(e){this.onStartCallback=e.onStart??null,this.onPauseCallback=e.onPause??null,this.onResumeCallback=e.onResume??null,this.onStopCallback=e.onStop??null,this.onScreenshotCallback=e.onScreenshot??null,this.onRestartCallback=e.onRestart??null,this.getElapsedTime=e.getElapsedTime??null}setState(e){this.state=e,e==="recording"?this.startTimeUpdates():(e==="stopped"||e==="idle")&&this.stopTimeUpdates(),this.render()}setResult(e){this.result=e,this.render()}reset(){this.state="idle",this.result=null,this.elapsedTime=0,this.render()}startTimeUpdates(){this.updateInterval||(this.updateInterval=setInterval(()=>{this.getElapsedTime&&(this.elapsedTime=this.getElapsedTime(),this.render())},100))}stopTimeUpdates(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null)}render(){this.container&&kr(w(Lp,{position:this.position,state:this.state,elapsedTime:this.elapsedTime,result:this.result,onStart:()=>{var e;return(e=this.onStartCallback)==null?void 0:e.call(this)},onPause:()=>{var e;return(e=this.onPauseCallback)==null?void 0:e.call(this)},onResume:()=>{var e;return(e=this.onResumeCallback)==null?void 0:e.call(this)},onStop:()=>{var e;return(e=this.onStopCallback)==null?void 0:e.call(this)},onScreenshot:()=>{var e;return(e=this.onScreenshotCallback)==null?void 0:e.call(this)},onRestart:()=>{var e;return(e=this.onRestartCallback)==null?void 0:e.call(this)}}),this.container)}}var ni,Y,oi,_a,ai=0,xa=[],J=D,Ia=J.__b,Ra=J.__r,ka=J.diffed,Ea=J.__c,Aa=J.unmount,Ma=J.__;function Up(s,e){J.__h&&J.__h(Y,s,ai||e),ai=0;var t=Y.__H||(Y.__H={__:[],__h:[]});return s>=t.__.length&&t.__.push({}),t.__[s]}function li(s){return ai=1,Bp($a,s)}function Bp(s,e,t){var r=Up(ni++,2);if(r.t=s,!r.__c&&(r.__=[$a(void 0,e),function(l){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,l);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.__f)){var i=function(l,a,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!n||n.call(this,l,a,u);var c=r.__c.props!==l;return h.some(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(c=!0)}}),n&&n.call(this,l,a,u)||c};Y.__f=!0;var n=Y.shouldComponentUpdate,o=Y.componentWillUpdate;Y.componentWillUpdate=function(l,a,u){if(this.__e){var h=n;n=void 0,i(l,a,u),n=h}o&&o.call(this,l,a,u)},Y.shouldComponentUpdate=i}return r.__N||r.__}function zp(){for(var s;s=xa.shift();){var e=s.__H;if(s.__P&&e)try{e.__h.some(Ar),e.__h.some(ui),e.__h=[]}catch(t){e.__h=[],J.__e(t,s.__v)}}}J.__b=function(s){Y=null,Ia&&Ia(s)},J.__=function(s,e){s&&e.__k&&e.__k.__m&&(s.__m=e.__k.__m),Ma&&Ma(s,e)},J.__r=function(s){Ra&&Ra(s),ni=0;var e=(Y=s.__c).__H;e&&(oi===Y?(e.__h=[],Y.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(Ar),e.__h.some(ui),e.__h=[],ni=0)),oi=Y},J.diffed=function(s){ka&&ka(s);var e=s.__c;e&&e.__H&&(e.__H.__h.length&&(xa.push(e)!==1&&_a===J.requestAnimationFrame||((_a=J.requestAnimationFrame)||Wp)(zp)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),oi=Y=null},J.__c=function(s,e){e.some(function(t){try{t.__h.some(Ar),t.__h=t.__h.filter(function(r){return!r.__||ui(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],J.__e(r,t.__v)}}),Ea&&Ea(s,e)},J.unmount=function(s){Aa&&Aa(s);var e,t=s.__c;t&&t.__H&&(t.__H.__.some(function(r){try{Ar(r)}catch(i){e=i}}),t.__H=void 0,e&&J.__e(e,t.__v))};var Oa=typeof requestAnimationFrame=="function";function Wp(s){var e,t=function(){clearTimeout(r),Oa&&cancelAnimationFrame(e),setTimeout(s)},r=setTimeout(t,35);Oa&&(e=requestAnimationFrame(t))}function Ar(s){var e=Y,t=s.__c;typeof t=="function"&&(s.__c=void 0,t()),Y=e}function ui(s){var e=Y;s.__c=s.__(),Y=e}function $a(s,e){return typeof e=="function"?e(s):e}const Mr="bw_invite_completed",jp=()=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9"}),w("path",{d:"m18 15 4-4"}),w("path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"})]}),Hp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),w("circle",{cx:"12",cy:"12",r:"3"})]}),Gp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),w("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),Vp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),w("polyline",{points:"22 4 12 14.01 9 11.01"})]}),Yp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-invite-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function Zp({email:s,onComplete:e,onLogin:t}){const[r,i]=li("form"),[n,o]=li(""),[l,a]=li(!1),u=c=>{c.preventDefault(),n.trim()&&(i("loading"),setTimeout(()=>{i("success"),localStorage.setItem(Mr,JSON.stringify({email:s,timestamp:Date.now()})),setTimeout(()=>{e()},1500)},1200))},h=c=>{c.preventDefault(),localStorage.setItem(Mr,JSON.stringify({email:s,timestamp:Date.now()})),t()};return w("div",{class:"bw-invite-overlay","data-bw-launchkit-ui":!0,children:w("div",{class:"bw-invite-dialog",children:r==="success"?w("div",{class:"bw-invite-success",children:[w("div",{class:"bw-invite-success-icon",children:w(Vp,{})}),w("h2",{class:"bw-invite-success-title",children:"You're in!"}),w("p",{class:"bw-invite-success-text",children:"Welcome aboard."})]}):w(je,{children:[w("div",{class:"bw-invite-logo",children:w(jp,{})}),w("h2",{class:"bw-invite-title",children:"Welcome"}),w("p",{class:"bw-invite-subtitle",children:"You've been invited. Set a password to continue."}),w("form",{class:"bw-invite-form",onSubmit:u,children:[w("div",{class:"bw-invite-field",children:w("input",{type:"email",value:s,readonly:!0,class:"bw-invite-input",placeholder:"Email address"})}),w("div",{class:"bw-invite-field",children:[w("input",{type:l?"text":"password",value:n,onInput:c=>o(c.target.value),class:"bw-invite-input",placeholder:"Password",disabled:r==="loading",autoFocus:!0}),w("button",{type:"button",class:"bw-invite-eye-btn",onClick:()=>a(!l),tabIndex:-1,children:l?w(Gp,{}):w(Hp,{})})]}),w("button",{type:"submit",class:"bw-invite-submit",disabled:r==="loading"||!n.trim(),children:r==="loading"?w(je,{children:[w(Yp,{}),w("span",{children:"Setting up..."})]}):"Continue"})]}),w("p",{class:"bw-invite-login-text",children:["Already have an account?"," ",w("a",{href:"#",onClick:h,class:"bw-invite-login-link",children:"Log in"})]})]})})})}class ci{constructor(e){this.container=null,this.onCompleteCallback=null,this.handleComplete=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.handleLogin=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.email=e}static isCompleted(){return typeof localStorage>"u"?!1:localStorage.getItem(Mr)!==null}static clearCompletion(){typeof localStorage>"u"||localStorage.removeItem(Mr)}mount(){this.container||(Ca(),this.container=document.createElement("div"),this.container.id="bw-invite-root",this.container.setAttribute("data-bw-launchkit-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.container&&(kr(null,this.container),this.container.remove(),this.container=null)}onComplete(e){this.onCompleteCallback=e}render(){this.container&&kr(w(Zp,{email:this.email,onComplete:this.handleComplete,onLogin:this.handleLogin}),this.container)}}class hi{constructor(e){this.toolbar=null,this.isInitialized=!1;const t=e.onStateChange;this.config={apiEndpoint:"https://api.bworlds.com",maxDuration:900*1e3,maskInputs:!0,autoOpenPlayback:!0,toolbar:{enabled:!0,position:"bottom-right"},...e,onStateChange:n=>{this.handleStateChange(n),t==null||t(n)}},this.recorder=new mp(this.config),this.screenshotMarker=new gp,this.eventDetector=new yp(this.screenshotMarker);const i=this.config.apiEndpoint&&this.config.apiEndpoint!=="https://api.bworlds.com"?new bp(this.config.apiEndpoint,this.config.apiKey):new wp;this.recorder.setUploader(i),this.recorder.onEvent(n=>{this.eventDetector.handleRrwebEvent(n)})}init(){var e,t;if(!this.isInitialized&&(this.isInitialized=!0,((e=this.config.toolbar)==null?void 0:e.enabled)!==!1)){const r=((t=this.config.toolbar)==null?void 0:t.position)??"bottom-right";this.toolbar=new Fp(r),this.toolbar.setCallbacks({onStart:()=>this.start(),onPause:()=>this.pause(),onResume:()=>this.resume(),onStop:()=>this.stop(),onScreenshot:()=>this.screenshot(),onRestart:()=>this.restart(),getElapsedTime:()=>this.recorder.getElapsedTime()}),this.toolbar.mount()}}async start(){var e;await this.recorder.start(),this.screenshotMarker.setStartTime(Date.now()),this.eventDetector.start(),(e=this.toolbar)==null||e.setState("recording")}pause(){var e;this.recorder.pause(),(e=this.toolbar)==null||e.setState("paused")}resume(){var e;this.recorder.resume(),(e=this.toolbar)==null||e.setState("recording")}async stop(){var n,o,l;this.eventDetector.stop(),this.screenshotMarker.stop();const e=this.screenshotMarker.getMarkers(),t=await this.recorder.stop(e);if((n=this.toolbar)==null||n.setState("stopped"),t)return(o=this.toolbar)==null||o.setResult(t),this.config.autoOpenPlayback!==!1&&t.playbackUrl&&window.open(t.playbackUrl,"_blank"),t;const r=this.recorder.getEvents(),i={recordingId:`rec_${Date.now()}`,playbackUrl:"",duration:this.recorder.getElapsedTime(),eventCount:r.length,screenshotCount:e.length};return(l=this.toolbar)==null||l.setResult(i),i}screenshot(){this.screenshotMarker.capture("manual")}restart(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.reset()}getState(){return this.recorder.getState()}getElapsedTime(){return this.recorder.getElapsedTime()}destroy(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.unmount(),this.isInitialized=!1}handleStateChange(e){var t;(t=this.toolbar)==null||t.setState(e)}}const Jp="_bw_record",Xp="_bw_invite";function Kp(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Jp)}function Qp(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Xp)}function qp(s){if(ci.isCompleted()){console.log("[BWorlds LaunchKit] Invite already completed");return}console.log("[BWorlds LaunchKit] Showing invite dialog for:",s);const e=new ci(s);e.onComplete(()=>{console.log("[BWorlds LaunchKit] Invite flow completed")}),e.mount(),typeof window<"u"&&(window.__bwInviteDialog=e)}function ed(s){const t=new URLSearchParams(window.location.search).get("_bw_api")||"http://localhost:3941";console.log("[BWorlds Recorder] Initializing with endpoint:",t);const r=new hi({apiKey:s,apiEndpoint:t,onComplete:i=>{console.log("[BWorlds Recorder] Recording complete:",i.playbackUrl)},onError:i=>{console.error("[BWorlds Recorder] Error:",i)}});r.init(),typeof window<"u"&&(window.__bwRecorder=r)}function td(){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Na()):Na())}function Na(){const s=Kp(),e=Qp();e&&qp(e),s&&ed(s)}pe.DemoRecorder=hi,pe.InviteDialogController=ci,pe.default=hi,pe.init=td,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(l,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(l=typeof globalThis<"u"?globalThis:l||self,i(l.BWorldsLaunchKit={}))})(this,(function(l){"use strict";const i="https://api.bworlds.co";let f=null;function y(e){f=e}async function h(e,n){if(!f)return;const t=`${f.apiEndpoint||i}${e}`;try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})}catch{}}const g=300*1e3;let r=null,c=null;function T(e,n=g){r||(c=e,S(),r=setInterval(S,n))}function v(){r&&(clearInterval(r),r=null)}async function S(){c&&await h("/api/telemetry/heartbeat",{buildSlug:c})}const m=1e4,I=5;let o=[],d=null,p=null,b=!1,u=null,a=null;function L(e){b||(b=!0,p=e,u=window.onerror,window.onerror=(n,t,O,j,s)=>(E({message:String(n),stack:(s==null?void 0:s.stack)??null,url:t??window.location.href}),u?u.call(window,n,t,O,j,s):!1),a=n=>{const t=n.reason;E({message:(t==null?void 0:t.message)??String(t),stack:(t==null?void 0:t.stack)??null,url:window.location.href})},window.addEventListener("unhandledrejection",a),d=setInterval(w,m))}function H(){d&&(clearInterval(d),d=null),w(),window.onerror=u,a&&(window.removeEventListener("unhandledrejection",a),a=null),u=null,b=!1}function E(e){o.push(e),o.length>=I&&w()}function w(){if(o.length===0||!p)return;const e=o.splice(0);h("/api/telemetry/errors",{buildSlug:p,errors:e})}function A(e){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>_(e)):_(e))}function _(e){y({buildSlug:e.buildSlug,apiEndpoint:e.apiEndpoint}),e.enableHeartbeat!==!1&&T(e.buildSlug,e.heartbeatInterval),e.enableErrorCapture!==!1&&L(e.buildSlug)}function C(){v(),H()}l.init=A,l.stop=C,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
441
2
|
//# sourceMappingURL=launchkit.umd.js.map
|