rewindlog 0.0.0-stage → 2.0.1
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/LICENSE +19 -0
- package/README.md +190 -2
- package/dist/BankingSecurity.d.ts +61 -0
- package/dist/ReplayStudio.d.ts +10 -0
- package/dist/ReportTranslator.d.ts +72 -0
- package/dist/RewindLog.d.ts +368 -0
- package/dist/RewindLogFloatingWidget.d.ts +22 -0
- package/dist/enterprise.d.ts +8 -0
- package/dist/index.d.ts +42 -0
- package/dist/lite.d.ts +9 -0
- package/dist/rewindlog.cjs.js +630 -0
- package/dist/rewindlog.es.js +18264 -0
- package/dist/rewindlog.min.js +630 -0
- package/dist/style.css +1 -0
- package/dist/vanilla-widget.d.ts +9 -0
- package/package.json +85 -4
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
"use strict";var tu=Object.defineProperty;var ru=(t,e,r)=>e in t?tu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var _e=(t,e,r)=>ru(t,typeof e!="symbol"?e+"":e,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var nu=Object.defineProperty,iu=(t,e,r)=>e in t?nu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$=(t,e,r)=>iu(t,typeof e!="symbol"?e+"":e,r),bo,su=Object.defineProperty,ou=(t,e,r)=>e in t?su(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vo=(t,e,r)=>ou(t,typeof e!="symbol"?e+"":e,r),he=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(he||{});const wo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},So={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vr={},as={};let xo=0;const au=()=>!!globalThis.Zone;function vs(t){if(vr[t])return vr[t];const e=globalThis[t],r=e.prototype,n=t in wo?wo[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in So?So[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!au())return vr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),as[t]=()=>l.remove()):l.remove(),vr[t]=u}catch{return r}}const Yn={};function ot(t,e,r){var n,i;const s=(n=Yn[t])==null?void 0:n[r];if(s)return s.call(e);const o=vs(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?((Yn[t]||(Yn[t]={}))[r]=l,l.call(e)):e[r]}const Jn={};function pl(t,e,r){const n=`${t}.${String(r)}`;if(Jn[n])return Jn[n].bind(e);const s=vs(t)[r];return typeof s!="function"?e[r]:(Jn[n]=s,s.bind(e))}function lu(t){return ot("Node",t,"ownerDocument")}function cu(t){return ot("Node",t,"childNodes")}function uu(t){return ot("Node",t,"parentNode")}function du(t){return ot("Node",t,"parentElement")}function fu(t){return ot("Node",t,"textContent")}function hu(t){return ot("Node",t,"firstChild")}function pu(t){return ot("Node",t,"lastChild")}function mu(t){return ot("Node",t,"nextSibling")}function gu(t){return ot("Node",t,"previousSibling")}function yu(t,e){return pl("Node",t,"contains")(e)}function bu(t){return pl("Node",t,"getRootNode")()}function vu(t){return!t||!("host"in t)?null:ot("ShadowRoot",t,"host")}function wu(t){return t.styleSheets}function Su(t){return!t||!("shadowRoot"in t)?null:ot("Element",t,"shadowRoot")}function xu(t,e){return ot("Element",t,"querySelector")(e)}function Cu(t,e){return ot("Element",t,"querySelectorAll")(e)}function Ru(){const t=vs("MutationObserver");xo++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--xo!==0))return;const r=as.MutationObserver;if(r)try{r()}finally{delete vr.MutationObserver,delete as.MutationObserver}}]}let ml=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ml=()=>new Date().getTime());function Eu(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const Xe={ownerDocument:lu,childNodes:cu,parentNode:uu,parentElement:du,textContent:fu,firstChild:hu,lastChild:pu,nextSibling:mu,previousSibling:gu,contains:yu,getRootNode:bu,host:vu,styleSheets:wu,shadowRoot:Su,querySelector:xu,querySelectorAll:Cu,nowTimestamp:ml,mutationObserverCtor:Ru,patch:Eu};function ws(t){return t.nodeType===t.ELEMENT_NODE}function kr(t){const e=t&&"host"in t&&"mode"in t&&Xe.host(t)||null;return!!(e&&"shadowRoot"in e&&Xe.shadowRoot(e)===t)}function Mr(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function ku(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function Mu(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function ls(t){try{const e=t.rules||t.cssRules;if(!e)return null;let r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);const n=Array.from(e,i=>gl(i,r)).join("");return ku(n)}catch{return null}}function gl(t,e){if(Au(t)){let r;try{r=ls(t.styleSheet)||Mu(t)}catch{r=t.cssText}return t.styleSheet.href?dn(r,t.styleSheet.href):r}else{let r=t.cssText;return Iu(t)&&t.selectorText.includes(":")&&(r=Tu(r)),e?dn(r,e):r}}function Tu(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Au(t){return"styleSheet"in t}function Iu(t){return"selectorText"in t}class Ss{constructor(){vo(this,"idNodeMap",new Map),vo(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));const n=Xe.shadowRoot(e);n&&this.removeNodeFromMap(n)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function yl(){return new Ss}function cn({element:t,maskInputOptions:e,tagName:r,type:n,value:i,maskInputFn:s}){let o=i||"";const l=n&&kt(n);return(e[r.toLowerCase()]||l&&e[l])&&(s?o=s(o,t):o="*".repeat(o.length)),o}function kt(t){return t.toLowerCase()}const Co="__rrweb_original__";function Ou(t){const e=t.getContext("2d");if(!e)return!0;const r=50;for(let n=0;n<t.width;n+=r)for(let i=0;i<t.height;i+=r){const s=e.getImageData,o=Co in s?s[Co]:s;if(new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function Nu(t,e){return!t||!e||t.type!==e.type?!1:t.type===he.Document?t.compatMode===e.compatMode:t.type===he.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===he.Comment||t.type===he.Text||t.type===he.CDATA?t.textContent===e.textContent:t.type===he.Element?t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock:!1}function un(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?kt(e):null}function xs(t,e){let r;try{r=new URL(t,e??window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(i==null?void 0:i[1])??null}function Du(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const _u=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Lu=/^(?:[a-z+]+:)?\/\//i,Pu=/^www\..*/i,$u=/^(data:)([^,]*),(.*)/i;function dn(t,e){return(t||"").replace(_u,(r,n,i,s,o,l)=>{const c=i||o||l,u=n||s||"";if(!c)return r;if(Lu.test(c)||Pu.test(c))return`url(${u}${c}${u})`;if($u.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${Du(e)+c}${u})`;const a=c.split("#")[0],h=c.substring(a.length),d=e.split("#")[0].split("/"),f=a.split("/");d.pop();for(const m of f)m!=="."&&(m===".."?d.pop():d.push(m));return`url(${u}${d.join("/")}${h}${u})`})}const bl="(?:/\\*[^*]*\\*/)|[\\s;]",ju=new RegExp(`${bl}|\\b(0)px?`,"g"),Bu=new RegExp(bl,"g");function Kr(t,e=!1){return e?t.replace(Bu,""):t.replace(ju,"$1")}function Fu(t,e,r=!1){const n=Array.from(e.childNodes),i=[];let s=0;if(n.length>1&&t&&typeof t=="string"){let o=Kr(t,r);const l=o.length/t.length;for(let c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){const u=Kr(n[c].textContent,r),a=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),f=o.split(d),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&n[c-1].textContent!=="")m=o.indexOf(d,1);else if(f.length===1){if(d=d.substring(0,d.length-1),f=o.split(d),f.length<=1)return i.push(t),i;h=a+1}else h===u.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>a){const p=n[c-1].textContent;if(p&&typeof p=="string"){const y=Kr(p).length;m=o.indexOf(d,y)}m===-1&&(m=f[0].length)}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<t.length;){if(s+=1,s>50*n.length)return i.push(t),i;const y=Kr(t.substring(0,p),r);if(y.length===m){i.push(t.substring(0,p)),t=t.substring(p),o=o.substring(m);break}else y.length<m?p+=Math.max(1,Math.floor((m-y.length)/l)):p-=Math.max(1,Math.floor((y.length-m)*l))}break}}}}return i.push(t),i}function Uu(t,e){return Fu(t,e).join("/* rr_split */")}let Wu=1;const zu=new RegExp("[^a-z0-9-_:]"),fn=-2;function vl(){return Wu++}function Hu(t){if(t instanceof HTMLFormElement)return"form";const e=kt(t.tagName);return zu.test(e)?"div":e}let Jt,Ro;const qu=/^[^ \t\n\r\u000c]+/,Vu=/^[, \t\n\r\u000c]+/;function Gu(t,e){if(e.trim()==="")return e;let r=0;function n(s){let o;const l=s.exec(e.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(Vu),!(r>=e.length);){let s=n(qu);if(s.slice(-1)===",")s=tr(t,s.substring(0,s.length-1)),i.push(s);else{let o="";s=tr(t,s);let l=!1;for(;;){const c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(l=!0);o+=c,r+=1}}}return i.join(", ")}const Eo=new WeakMap;function tr(t,e){return!e||e.trim()===""?e:Cs(t,e)}function Ku(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function Cs(t,e){let r=Eo.get(t);if(r||(r=t.createElement("a"),Eo.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function wl(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(e)?tr(t,n):r==="srcset"?Gu(t,n):r==="style"?dn(n,Cs(t)):e==="object"&&r==="data"?tr(t,n):n)}function Sl(t,e,r){return["video","audio"].includes(t)&&kt(e)==="autoplay"}function Yu(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function hn(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?hn(Xe.parentNode(t),e,r):!1;for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}return r?hn(Xe.parentNode(t),e,r):!1}function xl(t,e,r,n){let i;if(ws(t)){if(i=t,!Xe.childNodes(i).length)return!1}else{if(Xe.parentElement(t)===null)return!1;i=Xe.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(hn(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function Ju(t,e,r){const n=t.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},r);t.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(n.location.href!==o||t.src===o||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function Xu(t,e,r){let n=!1,i;try{i=t.sheet}catch{return}if(i)return;const s=setTimeout(()=>{n||(e(),n=!0)},r);t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}function Qu(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:a,dataURLOptions:h={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:y=!1}=e,v=Zu(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:he.Document,childNodes:[],compatMode:t.compatMode}:{type:he.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:he.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:v};case t.ELEMENT_NODE:return td(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:c,maskInputFn:a,dataURLOptions:h,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:v});case t.TEXT_NODE:return ed(t,{doc:r,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:y});case t.CDATA_SECTION_NODE:return{type:he.CDATA,textContent:"",rootId:v};case t.COMMENT_NODE:return{type:he.Comment,textContent:Xe.textContent(t)||"",rootId:v};default:return!1}}function Zu(t,e){if(!e.hasNode(t))return;const r=e.getId(t);return r===1?void 0:r}function ed(t,e){const{needsMask:r,maskTextFn:n,rootId:i,cssCaptured:s}=e,o=Xe.parentNode(t),l=o&&o.tagName;let c="";const u=l==="STYLE"?!0:void 0,a=l==="SCRIPT"?!0:void 0;return a?c="SCRIPT_PLACEHOLDER":s||(c=Xe.textContent(t),u&&c&&(c=dn(c,Cs(e.doc)))),!u&&!a&&c&&r&&(c=n?n(c,Xe.parentElement(t)):c.replace(/[\S]/g,"*")),{type:he.Text,textContent:c||"",rootId:i}}function td(t,e){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:a,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:f}=e,m=Yu(t,n,i),p=Hu(t);let y={};const v=t.attributes.length;for(let b=0;b<v;b++){const C=t.attributes[b];Sl(p,C.name,C.value)||(y[C.name]=wl(r,p,kt(C.name),C.value))}if(p==="link"&&s){const b=Array.from(r.styleSheets).find(S=>S.href===t.href);let C=null;b&&(C=ls(b)),C&&(delete y.rel,delete y.href,y._cssText=C)}if(p==="style"&&t.sheet){let b=ls(t.sheet);b&&(t.childNodes.length>1&&(b=Uu(b,t)),y._cssText=b)}if(["input","textarea","select"].includes(p)){const b=t.value,C=t.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&b?y.value=cn({element:t,type:un(t),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):C&&(y.checked=C)}if(p==="option"&&(t.selected&&!o.select?y.selected=!0:delete y.selected),p==="dialog"&&t.open&&(y.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&a){if(t.__context==="2d")Ou(t)||(y.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const b=t.toDataURL(c.type,c.quality),C=r.createElement("canvas");C.width=t.width,C.height=t.height;const S=C.toDataURL(c.type,c.quality);b!==S&&(y.rr_dataURL=b)}}if(p==="img"&&u){Jt||(Jt=r.createElement("canvas"),Ro=Jt.getContext("2d"));const b=t,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",S=b.crossOrigin,x=()=>{b.removeEventListener("load",x);try{Jt.width=b.naturalWidth,Jt.height=b.naturalHeight,Ro.drawImage(b,0,0),y.rr_dataURL=Jt.toDataURL(c.type,c.quality)}catch(k){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${C}! Error: ${k}`)}b.crossOrigin==="anonymous"&&(S?y.crossOrigin=S:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x)}if(["audio","video"].includes(p)){const b=y;b.rr_mediaState=t.paused?"paused":"played",b.rr_mediaCurrentTime=t.currentTime,b.rr_mediaPlaybackRate=t.playbackRate,b.rr_mediaMuted=t.muted,b.rr_mediaLoop=t.loop,b.rr_mediaVolume=t.volume}if(d||(t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop)),m){const{width:b,height:C}=t.getBoundingClientRect();y={class:y.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!h(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src);let w;try{customElements.get(p)&&(w=!0)}catch{}return{type:he.Element,tagName:p,attributes:y,childNodes:[],isSVG:Ku(t)||void 0,needBlock:m,rootId:f,isCustom:w}}function Le(t){return t==null?"":t.toLowerCase()}function Cl(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function rd(t,e){if(e.comment&&t.type===he.Comment)return!0;if(t.type===he.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&xs(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Le(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Le(t.attributes.name)==="application-name"||Le(t.attributes.rel)==="icon"||Le(t.attributes.rel)==="apple-touch-icon"||Le(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Le(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Le(t.attributes.property).match(/^(og|twitter|fb):/)||Le(t.attributes.name).match(/^(og|twitter):/)||Le(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Le(t.attributes.name)==="robots"||Le(t.attributes.name)==="googlebot"||Le(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Le(t.attributes.name)==="author"||Le(t.attributes.name)==="generator"||Le(t.attributes.name)==="framework"||Le(t.attributes.name)==="publisher"||Le(t.attributes.name)==="progid"||Le(t.attributes.property).match(/^article:/)||Le(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Le(t.attributes.name)==="google-site-verification"||Le(t.attributes.name)==="yandex-verification"||Le(t.attributes.name)==="csrf-token"||Le(t.attributes.name)==="p:domain_verify"||Le(t.attributes.name)==="verify-v1"||Le(t.attributes.name)==="verification"||Le(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function rr(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:a={},maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:y=!1,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=e;let{needsMask:B}=e,{preserveWhiteSpace:D=!0}=e;B||(B=xl(t,o,l,B===void 0));const H=Qu(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:y,keepIframeSrcFn:x,newlyAddedElement:k,cssCaptured:I});if(!H)return console.warn(t,"not serialized"),null;let z;n.hasNode(t)?z=n.getId(t):rd(H,f)||!D&&H.type===he.Text&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?z=fn:z=vl();const A=Object.assign(H,{id:z});if(n.add(t,A),z===fn)return null;v&&v(t);let be=!c;if(A.type===he.Element){be=be&&!A.needBlock,delete A.needBlock;const ne=Xe.shadowRoot(t);ne&&Mr(ne)&&(A.isShadowHost=!0)}if((A.type===he.Document||A.type===he.Element)&&be){f.headWhitespace&&A.type===he.Element&&A.tagName==="head"&&(D=!1);const ne={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:c,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x,cssCaptured:!1};if(!(A.type===he.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===he.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(ne.cssCaptured=!0);for(const ue of Array.from(Xe.childNodes(t))){const j=rr(ue,ne);j&&A.childNodes.push(j)}}let F=null;if(ws(t)&&(F=Xe.shadowRoot(t)))for(const ue of Array.from(Xe.childNodes(F))){const j=rr(ue,ne);j&&(Mr(F)&&(j.isShadow=!0),A.childNodes.push(j))}}const fe=Xe.parentNode(t);return fe&&kr(fe)&&Mr(fe)&&(A.isShadow=!0),A.type===he.Element&&A.tagName==="iframe"&&Ju(t,()=>{const ne=t.contentDocument;if(ne&&w){const F=rr(ne,{doc:ne,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x});F&&w(t,F)}},b),A.type===he.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&xs(A.attributes.href)==="css")&&Xu(t,()=>{if(C){const ne=rr(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:D,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x});ne&&C(t,ne)}},S),A}function nd(t,e){const{mirror:r=new Ss,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:a=!1,maskTextFn:h,maskInputFn:d,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:S=()=>!1}=e,x=a===!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}:a===!1?{password:!0}:a,k=Cl(f);return rr(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:x,maskTextFn:h,maskInputFn:d,slimDOMOptions:k,dataURLOptions:m,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:S,newlyAddedElement:!1})}const id=/(max|min)-device-(width|height)/,ko=new RegExp(id.source,"g"),sd={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(t){t.params.match(ko)&&(t.params=t.params.replace(ko,"$1-$2"))}}}},od={postcssPlugin:"postcss-hover-classes",prepare:function(){const t=[];return{Rule:function(e){t.indexOf(e)===-1&&(t.push(e),e.selectors.forEach(function(r){r.includes(":hover")&&(e.selector+=`,
|
|
2
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function ad(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ld(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Yr={exports:{}},Mo;function cd(){if(Mo)return Yr.exports;Mo=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return Yr.exports=e(),Yr.exports.createColors=e,Yr.exports}const ud={},dd=Object.freeze(Object.defineProperty({__proto__:null,default:ud},Symbol.toStringTag,{value:"Module"})),dt=ld(dd);var Xn,To;function Rs(){if(To)return Xn;To=1;let t=cd(),e=dt;class r extends Error{constructor(i,s,o,l,c,u){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),u&&(this.plugin=u),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported),e&&i&&(s=e(s));let o=s.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),u=String(c).length,a,h;if(i){let{bold:d,gray:f,red:m}=t.createColors(!0);a=p=>d(m(p)),h=p=>f(p)}else a=h=d=>d;return o.slice(l,c).map((d,f)=>{let m=l+1+f,p=" "+(" "+m).slice(-u)+" | ";if(m===this.line){let y=h(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(p)+d+`
|
|
3
|
+
`+y+a("^")}return" "+h(p)+d}).join(`
|
|
4
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
5
|
+
|
|
6
|
+
`+i+`
|
|
7
|
+
`),this.name+": "+this.message+i}}return Xn=r,r.default=r,Xn}var Jr={},Ao;function Es(){return Ao||(Ao=1,Jr.isClean=Symbol("isClean"),Jr.my=Symbol("my")),Jr}var Qn,Io;function Rl(){if(Io)return Qn;Io=1;const t={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(i){this.builder=i}atrule(i,s){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let c=(i.raws.between||"")+(s?";":"");this.builder(o+l+c,i)}}beforeAfter(i,s){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):s==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,c=0;for(;l&&l.type!=="root";)c+=1,l=l.parent;if(o.includes(`
|
|
13
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<c;a++)o+=u}return o}block(i,s){let o=this.raw(i,"between","beforeOpen");this.builder(s+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let s=i.nodes.length-1;for(;s>0&&i.nodes[s].type==="comment";)s-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let c=i.nodes[l],u=this.raw(c,"before");u&&this.builder(u),this.stringify(c,s!==l||o)}}comment(i){let s=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+s+i.text+o+"*/",i)}decl(i,s){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),s&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,s,o){let l;if(o||(o=s),s&&(l=i.raws[s],typeof l<"u"))return l;let c=i.parent;if(o==="before"&&(!c||c.type==="root"&&c.first===i||c&&c.type==="document"))return"";if(!c)return t[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let a="raw"+e(o);this[a]?l=this[a](u,i):u.walk(h=>{if(l=h.raws[s],typeof l<"u")return!1})}return typeof l>"u"&&(l=t[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return s=o.raws.after,s.includes(`
|
|
14
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(i,s){let o;return i.walkComments(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
15
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,s){let o;return i.walkDecls(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
16
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let s;return i.walk(o=>{if(o.type!=="decl"&&(s=o.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(i){let s;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before<"u")return s=o.raws.before,s.includes(`
|
|
17
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(i){let s;return i.walkDecls(o=>{if(typeof o.raws.between<"u")return s=o.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(s=o.raws.after,typeof s<"u"))return!1}),s}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
18
|
+
`);return s=c[c.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(s=o.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(i,s){let o=i[s],l=i.raws[s];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,s){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,s)}}return Qn=r,r.default=r,Qn}var Zn,Oo;function bn(){if(Oo)return Zn;Oo=1;let t=Rl();function e(r,n){new t(n).stringify(r)}return Zn=e,e.default=e,Zn}var ei,No;function vn(){if(No)return ei;No=1;let{isClean:t,my:e}=Es(),r=Rs(),n=Rl(),i=bn();function s(l,c){let u=new l.constructor;for(let a in l){if(!Object.prototype.hasOwnProperty.call(l,a)||a==="proxyCache")continue;let h=l[a],d=typeof h;a==="parent"&&d==="object"?c&&(u[a]=c):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(f=>s(f,u)):(d==="object"&&h!==null&&(h=s(h)),u[a]=h)}return u}class o{constructor(c={}){this.raws={},this[t]=!1,this[e]=!0;for(let u in c)if(u==="nodes"){this.nodes=[];for(let a of c[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=c[u]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let u=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let u in c)this[u]=c[u];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let u=s(this);for(let a in c)u[a]=c[a];return u}cloneAfter(c={}){let u=this.clone(c);return this.parent.insertAfter(this,u),u}cloneBefore(c={}){let u=this.clone(c);return this.parent.insertBefore(this,u),u}error(c,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(c,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(c)}getProxyProcessor(){return{get(c,u){return u==="proxyOf"?c:u==="root"?()=>c.root().toProxy():c[u]},set(c,u,a){return c[u]===a||(c[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&c.markDirty()),!0}}}markDirty(){if(this[t]){this[t]=!1;let c=this;for(;c=c.parent;)c[t]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c,u){let a=this.source.start;if(c.index)a=this.positionInside(c.index,u);else if(c.word){u=this.toString();let h=u.indexOf(c.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(c,u){let a=u||this.toString(),h=this.source.start.column,d=this.source.start.line;for(let f=0;f<c;f++)a[f]===`
|
|
19
|
+
`?(h=1,d+=1):h+=1;return{column:h,line:d}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(c.word){let h=this.toString(),d=h.indexOf(c.word);d!==-1&&(u=this.positionInside(d,h),a=this.positionInside(d+c.word.length,h))}else c.start?u={column:c.start.column,line:c.start.line}:c.index&&(u=this.positionInside(c.index)),c.end?a={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?a=this.positionInside(c.endIndex):c.index&&(a=this.positionInside(c.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(c,u){return new n().raw(this,c,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let u=this,a=!1;for(let h of c)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,u){let a={},h=u==null;u=u||new Map;let d=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))a[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,u):p);else if(typeof m=="object"&&m.toJSON)a[f]=m.toJSON(null,u);else if(f==="source"){let p=u.get(m.input);p==null&&(p=d,u.set(m.input,d),d++),a[f]={end:m.end,inputId:p,start:m.start}}else a[f]=m}return h&&(a.inputs=[...u.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=i){c.stringify&&(c=c.stringify);let u="";return c(this,a=>{u+=a}),u}warn(c,u,a){let h={node:this};for(let d in a)h[d]=a[d];return c.warn(u,h)}get proxyOf(){return this}}return ei=o,o.default=o,ei}var ti,Do;function wn(){if(Do)return ti;Do=1;let t=vn();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return ti=e,e.default=e,ti}var ri,_o;function fd(){if(_o)return ri;_o=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ri={nanoid:(n=21)=>{let i="",s=n;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s;for(;l--;)o+=n[Math.random()*n.length|0];return o}},ri}var ni,Lo;function El(){if(Lo)return ni;Lo=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=dt,{existsSync:r,readFileSync:n}=dt,{dirname:i,join:s}=dt;function o(c){return Buffer?Buffer.from(c,"base64").toString():window.atob(c)}class l{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,d=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(d.test(u)||f.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return o(u.substr(RegExp.lastMatch.length));let m=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),d=u.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,d)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ni=l,l.default=l,ni}var ii,Po;function Sn(){if(Po)return ii;Po=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=dt,{fileURLToPath:r,pathToFileURL:n}=dt,{isAbsolute:i,resolve:s}=dt,{nanoid:o}=fd(),l=dt,c=Rs(),u=El(),a=Symbol("fromOffsetCache"),h=!!(t&&e),d=!!(s&&i);class f{constructor(p,y={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,y.from&&(!d||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=s(y.from)),d&&h){let v=new u(this.css,y);if(v.text){this.map=v;let w=v.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(p,y,v,w={}){let b,C,S;if(y&&typeof y=="object"){let k=y,I=v;if(typeof k.offset=="number"){let B=this.fromOffset(k.offset);y=B.line,v=B.col}else y=k.line,v=k.column;if(typeof I.offset=="number"){let B=this.fromOffset(I.offset);C=B.line,S=B.col}else C=I.line,S=I.column}else if(!v){let k=this.fromOffset(y);y=k.line,v=k.col}let x=this.origin(y,v,C,S);return x?b=new c(p,x.endLine===void 0?x.line:{column:x.column,line:x.line},x.endLine===void 0?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,w.plugin):b=new c(p,C===void 0?y:{column:v,line:y},C===void 0?v:{column:S,line:C},this.css,this.file,w.plugin),b.input={column:v,endColumn:S,endLine:C,line:y,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let y,v;if(this[a])v=this[a];else{let b=this.css.split(`
|
|
20
|
+
`);v=new Array(b.length);let C=0;for(let S=0,x=b.length;S<x;S++)v[S]=C,C+=b[S].length+1;this[a]=v}y=v[v.length-1];let w=0;if(p>=y)w=v.length-1;else{let b=v.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<v[C])b=C-1;else if(p>=v[C+1])w=C+1;else{w=C;break}}return{col:p-v[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:s(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,y,v,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:y,line:p});if(!C.source)return!1;let S;typeof v=="number"&&(S=b.originalPositionFor({column:w,line:v}));let x;i(C.source)?x=n(C.source):x=new URL(C.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let k={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:x.toString()};if(x.protocol==="file:")if(r)k.file=r(x);else throw new Error("file: protocol is not available in this PostCSS build");let I=b.sourceContentFor(C.source);return I&&(k.source=I),k}toJSON(){let p={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(p[y]=this[y]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ii=f,f.default=f,l&&l.registerInput&&l.registerInput(f),ii}var si,$o;function kl(){if($o)return si;$o=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=dt,{dirname:r,relative:n,resolve:i,sep:s}=dt,{pathToFileURL:o}=dt,l=Sn(),c=!!(t&&e),u=!!(r&&i&&n&&s);class a{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(f=`\r
|
|
23
|
+
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===!1?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&c&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new e({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 e({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,v;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(d+=y.length,v=w.lastIndexOf(`
|
|
24
|
+
`),f=w.length-v):f+=w.length,b&&C!=="start"){let S=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==S.last||S.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return si=a,si}var oi,jo;function xn(){if(jo)return oi;jo=1;let t=vn();class e extends t{constructor(n){super(n),this.type="comment"}}return oi=e,e.default=e,oi}var ai,Bo;function Ut(){if(Bo)return ai;Bo=1;let{isClean:t,my:e}=Es(),r=wn(),n=xn(),i=vn(),s,o,l,c;function u(d){return d.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function a(d){if(d[t]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)a(f)}class h extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,y;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],y=f(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[m]+=1;return delete this.indexes[m],y}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(y=>typeof y=="function"?(v,w)=>y(v.toProxy(),w):y)):m==="every"||m==="some"?p=>f[m]((y,...v)=>p(y.toProxy(),...v)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),y=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let w of y)this.proxyOf.nodes.splice(p+1,0,w);let v;for(let w in this.indexes)v=this.indexes[w],p<v&&(this.indexes[w]=v+y.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),y=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],y).reverse();p=this.index(f);for(let b of v)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+v.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=u(s(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new o(f)];else if(f.name)f=[new l(f)];else if(f.text)f=[new n(f)];else throw new Error("Unknown node type in node creation");return f.map(y=>(y[e]||h.rebuild(y),y=y.proxyOf,y.parent&&y.parent.removeChild(y),y[t]&&a(y),typeof y.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(y.raws.before=m.raws.before.replace(/\S/g,"")),y.parent=this.proxyOf,y))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(y=>{m.props&&!m.props.includes(y.prop)||m.fast&&!y.value.includes(m.fast)||(y.value=y.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let y;try{y=f(m,p)}catch(v){throw m.addToError(v)}return y!==!1&&m.walk&&(y=m.walk(f)),y})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="atrule")return m(p,y)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="decl")return m(p,y)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="rule")return m(p,y)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=d=>{s=d},h.registerRule=d=>{o=d},h.registerAtRule=d=>{l=d},h.registerRoot=d=>{c=d},ai=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,l.prototype):d.type==="rule"?Object.setPrototypeOf(d,o.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,c.prototype),d[e]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},ai}var li,Fo;function ks(){if(Fo)return li;Fo=1;let t=Ut(),e,r;class n extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},li=n,n.default=n,li}var ci,Uo;function Ml(){if(Uo)return ci;Uo=1;let t={};return ci=function(r){t[r]||(t[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},ci}var ui,Wo;function Tl(){if(Wo)return ui;Wo=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return ui=t,t.default=t,ui}var di,zo;function Ms(){if(zo)return di;zo=1;let t=Tl();class e{constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return di=e,e.default=e,di}var fi,Ho;function hd(){if(Ho)return fi;Ho=1;const t=39,e=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,u=91,a=93,h=40,d=41,f=123,m=125,p=59,y=42,v=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,x=/[\da-f]/i;return fi=function(I,B={}){let D=I.css.valueOf(),H=B.ignoreErrors,z,A,be,fe,ne,F,ue,j,X,T,U=D.length,_=0,te=[],ie=[];function xe(){return _}function se(ee){throw I.error("Unclosed "+ee,_)}function le(){return ie.length===0&&_>=U}function pe(ee){if(ie.length)return ie.pop();if(_>=U)return;let Te=ee?ee.ignoreUnclosed:!1;switch(z=D.charCodeAt(_),z){case i:case s:case l:case c:case o:{A=_;do A+=1,z=D.charCodeAt(A);while(z===s||z===i||z===l||z===c||z===o);T=["space",D.slice(_,A)],_=A-1;break}case u:case a:case f:case m:case v:case p:case d:{let re=String.fromCharCode(z);T=[re,re,_];break}case h:{if(j=te.length?te.pop()[1]:"",X=D.charCodeAt(_+1),j==="url"&&X!==t&&X!==e&&X!==s&&X!==i&&X!==l&&X!==o&&X!==c){A=_;do{if(F=!1,A=D.indexOf(")",A+1),A===-1)if(H||Te){A=_;break}else se("bracket");for(ue=A;D.charCodeAt(ue-1)===r;)ue-=1,F=!F}while(F);T=["brackets",D.slice(_,A+1),_,A],_=A}else A=D.indexOf(")",_+1),fe=D.slice(_,A+1),A===-1||S.test(fe)?T=["(","(",_]:(T=["brackets",fe,_,A],_=A);break}case t:case e:{be=z===t?"'":'"',A=_;do{if(F=!1,A=D.indexOf(be,A+1),A===-1)if(H||Te){A=_+1;break}else se("string");for(ue=A;D.charCodeAt(ue-1)===r;)ue-=1,F=!F}while(F);T=["string",D.slice(_,A+1),_,A],_=A;break}case w:{b.lastIndex=_+1,b.test(D),b.lastIndex===0?A=D.length-1:A=b.lastIndex-2,T=["at-word",D.slice(_,A+1),_,A],_=A;break}case r:{for(A=_,ne=!0;D.charCodeAt(A+1)===r;)A+=1,ne=!ne;if(z=D.charCodeAt(A+1),ne&&z!==n&&z!==s&&z!==i&&z!==l&&z!==c&&z!==o&&(A+=1,x.test(D.charAt(A)))){for(;x.test(D.charAt(A+1));)A+=1;D.charCodeAt(A+1)===s&&(A+=1)}T=["word",D.slice(_,A+1),_,A],_=A;break}default:{z===n&&D.charCodeAt(_+1)===y?(A=D.indexOf("*/",_+2)+1,A===0&&(H||Te?A=D.length:se("comment")),T=["comment",D.slice(_,A+1),_,A],_=A):(C.lastIndex=_+1,C.test(D),C.lastIndex===0?A=D.length-1:A=C.lastIndex-2,T=["word",D.slice(_,A+1),_,A],te.push(T),_=A);break}}return _++,T}function ke(ee){ie.push(ee)}return{back:ke,endOfFile:le,nextToken:pe,position:xe}},fi}var hi,qo;function Ts(){if(qo)return hi;qo=1;let t=Ut();class e extends t{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return hi=e,e.default=e,t.registerAtRule(e),hi}var pi,Vo;function _r(){if(Vo)return pi;Vo=1;let t=Ut(),e,r;class n extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of c)u.raws.before=o.raws.before}return c}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},pi=n,n.default=n,t.registerRoot(n),pi}var mi,Go;function Al(){if(Go)return mi;Go=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let r=[" ",`
|
|
25
|
+
`," "];return t.split(e,r)},split(e,r,n){let i=[],s="",o=!1,l=0,c=!1,u="",a=!1;for(let h of e)a?a=!1:h==="\\"?a=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&i.push(s.trim()),i}};return mi=t,t.default=t,mi}var gi,Ko;function As(){if(Ko)return gi;Ko=1;let t=Ut(),e=Al();class r extends t{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return gi=r,r.default=r,t.registerRule(r),gi}var yi,Yo;function pd(){if(Yo)return yi;Yo=1;let t=wn(),e=hd(),r=xn(),n=Ts(),i=_r(),s=As();const o={empty:!0,space:!0};function l(u){for(let a=u.length-1;a>=0;a--){let h=u[a],d=h[3]||h[2];if(d)return d}}class c{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let d,f,m,p=!1,y=!1,v=[],w=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){y=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,f=v[m];f&&f[0]==="space";)f=v[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(a);break}else v.push(a);else v.push(a);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),p&&(a=v[v.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),y&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=a[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(a){let h=0,d,f,m;for(let[p,y]of a.entries()){if(d=y,f=d[0],f==="("&&(h+=1),f===")"&&(h-=1),h===0&&f===":")if(!m)this.doubleColon(d);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=e(this.input)}decl(a,h){let d=new t;this.init(d,a[0][2]);let f=a[a.length-1];for(f[0]===";"&&(this.semicolon=!0,a.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let w=a[0][0];if(w===":"||w==="space"||w==="comment")break;d.prop+=a.shift()[1]}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],y;for(;a.length&&(y=a[0][0],!(y!=="space"&&y!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let w=a.length-1;w>=0;w--){if(m=a[w],m[1].toLowerCase()==="!important"){d.important=!0;let b=this.stringFrom(a,w);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),C="";for(let S=w;S>0;S--){let x=b[S][0];if(C.trim().indexOf("!")===0&&x!=="space")break;C=b.pop()[1]+C}C.trim().indexOf("!")===0&&(d.important=!0,d.raws.important=C,a=b)}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(d.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new s;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}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(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,d=null,f=!1,m=null,p=[],y=a[1].startsWith("--"),v=[],w=a;for(;w;){if(d=w[0],v.push(w),d==="("||d==="[")m||(m=w),p.push(d==="("?")":"]");else if(y&&f&&d==="{")m||(m=w),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(v,y);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!y)for(;v.length&&(w=v[v.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,y)}else this.unknownWord(v)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,d,f){let m,p,y=d.length,v="",w=!0,b,C;for(let S=0;S<y;S+=1)m=d[S],p=m[0],p==="space"&&S===y-1&&!f?w=!1:p==="comment"?(C=d[S-1]?d[S-1][0]:"empty",b=d[S+1]?d[S+1][0]:"empty",!o[C]&&!o[b]?v.slice(-1)===","?w=!1:v+=m[1]:w=!1):v+=m[1];if(!w){let S=d.reduce((x,k)=>x+k[1],"");a.raws[h]={raw:S,value:v}}a[h]=v}rule(a){a.pop();let h=new s;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let h,d="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],h==="space");)d=a.pop()[1]+d;return d}stringFrom(a,h){let d="";for(let f=h;f<a.length;f++)d+=a[f][1];return a.splice(h,a.length-h),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return yi=c,yi}var bi,Jo;function Is(){if(Jo)return bi;Jo=1;let t=Ut(),e=pd(),r=Sn();function n(i,s){let o=new r(i,s),l=new e(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
26
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
27
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
28
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return bi=n,n.default=n,t.registerParse(n),bi}var vi,Xo;function Il(){if(Xo)return vi;Xo=1;let{isClean:t,my:e}=Es(),r=kl(),n=bn(),i=Ut(),s=ks(),o=Ml(),l=Ms(),c=Is(),u=_r();const a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,x=a[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[x,x+"-"+S,f,x+"Exit",x+"Exit-"+S]:S?[x,x+"-"+S,x+"Exit",x+"Exit-"+S]:C.append?[x,f,x+"Exit"]:[x,x+"Exit"]}function y(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[t]=!1,C.nodes&&C.nodes.forEach(S=>v(S)),C}let w={};class b{constructor(S,x,k){this.stringified=!1,this.processed=!1;let I;if(typeof x=="object"&&x!==null&&(x.type==="root"||x.type==="document"))I=v(x);else if(x instanceof b||x instanceof l)I=v(x.root),x.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=x.map);else{let B=c;k.syntax&&(B=k.syntax.parse),k.parser&&(B=k.parser),B.parse&&(B=B.parse);try{I=B(x,k)}catch(D){this.processed=!0,this.error=D}I&&!I[e]&&i.rebuild(I)}this.result=new l(S,I,k),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(B=>typeof B=="object"&&B.prepare?{...B,...B.prepare(this.result)}:B)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,x){let k=this.result.lastPlugin;try{if(x&&x.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=k.postcssPlugin,S.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let I=k.postcssPlugin,B=k.postcssVersion,D=this.result.processor.version,H=B.split("."),z=D.split(".");(H[0]!==z[0]||parseInt(H[1])>parseInt(z[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+I+" uses "+B+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(x,k,I)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([x,I])};for(let x of this.plugins)if(typeof x=="object")for(let k in x){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${x.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[k])if(typeof x[k]=="object")for(let I in x[k])I==="*"?S(x,k,x[k][I]):S(x,k+"-"+I.toLowerCase(),x[k][I]);else typeof x[k]=="function"&&S(x,k,x[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let x=this.plugins[S],k=this.runOnRoot(x);if(m(k))try{await k}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];){S[t]=!0;let x=[y(S)];for(;x.length>0;){let k=this.visitTick(x);if(m(k))try{await k}catch(I){let B=x[x.length-1].node;throw this.handleError(I,B)}}}if(this.listeners.OnceExit)for(let[x,k]of this.listeners.OnceExit){this.result.lastPlugin=x;try{if(S.type==="document"){let I=S.nodes.map(B=>k(B,this.helpers));await Promise.all(I)}else await k(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let x=this.result.root.nodes.map(k=>S.Once(k,this.helpers));return m(x[0])?Promise.all(x):x}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(x){throw this.handleError(x)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,x=n;S.syntax&&(x=S.syntax.stringify),S.stringifier&&(x=S.stringifier),x.stringify&&(x=x.stringify);let I=new r(x,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 S of this.plugins){let x=this.runOnRoot(S);if(m(x))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];)S[t]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let x of S.nodes)this.visitSync(this.listeners.OnceExit,x);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,x){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(S,x)}toString(){return this.css}visitSync(S,x){for(let[k,I]of S){this.result.lastPlugin=k;let B;try{B=I(x,this.helpers)}catch(D){throw this.handleError(D,x.proxyOf)}if(x.type!=="root"&&x.type!=="document"&&!x.parent)return!0;if(m(B))throw this.getAsyncError()}}visitTick(S){let x=S[S.length-1],{node:k,visitors:I}=x;if(k.type!=="root"&&k.type!=="document"&&!k.parent){S.pop();return}if(I.length>0&&x.visitorIndex<I.length){let[D,H]=I[x.visitorIndex];x.visitorIndex+=1,x.visitorIndex===I.length&&(x.visitors=[],x.visitorIndex=0),this.result.lastPlugin=D;try{return H(k.toProxy(),this.helpers)}catch(z){throw this.handleError(z,k)}}if(x.iterator!==0){let D=x.iterator,H;for(;H=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!H[t]){H[t]=!0,S.push(y(H));return}x.iterator=0,delete k.indexes[D]}let B=x.events;for(;x.eventIndex<B.length;){let D=B[x.eventIndex];if(x.eventIndex+=1,D===f){k.nodes&&k.nodes.length&&(k[t]=!0,x.iterator=k.getIterator());return}else if(this.listeners[D]){x.visitors=this.listeners[D];return}}S.pop()}walkSync(S){S[t]=!0;let x=p(S);for(let k of x)if(k===f)S.nodes&&S.each(I=>{I[t]||this.walkSync(I)});else{let I=this.listeners[k];if(I&&this.visitSync(I,S.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=C=>{w=C},vi=b,b.default=b,u.registerLazyResult(b),s.registerLazyResult(b),vi}var wi,Qo;function md(){if(Qo)return wi;Qo=1;let t=kl(),e=bn(),r=Ml(),n=Is();const i=Ms();class s{constructor(l,c,u){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=u,this._map=void 0;let a,h=e;this.result=new i(this._processor,a,this._opts),this.result.css=c;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new t(h,a,this._opts,c);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(l,c)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=n;try{l=c(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return wi=s,s.default=s,wi}var Si,Zo;function gd(){if(Zo)return Si;Zo=1;let t=md(),e=Il(),r=ks(),n=_r();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.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(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new t(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Si=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),Si}var xi,ea;function yd(){if(ea)return xi;ea=1;let t=wn(),e=El(),r=xn(),n=Ts(),i=Sn(),s=_r(),o=As();function l(c,u){if(Array.isArray(c))return c.map(d=>l(d));let{inputs:a,...h}=c;if(a){u=[];for(let d of a){let f={...d,__proto__:i.prototype};f.map&&(f.map={...f.map,__proto__:e.prototype}),u.push(f)}}if(h.nodes&&(h.nodes=c.nodes.map(d=>l(d,u))),h.source){let{inputId:d,...f}=h.source;h.source=f,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new s(h);if(h.type==="decl")return new t(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+c.type)}return xi=l,l.default=l,xi}var Ci,ta;function bd(){if(ta)return Ci;ta=1;let t=Rs(),e=wn(),r=Il(),n=Ut(),i=gd(),s=bn(),o=yd(),l=ks(),c=Tl(),u=xn(),a=Ts(),h=Ms(),d=Sn(),f=Is(),m=Al(),p=As(),y=_r(),v=vn();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new i(b)}return w.plugin=function(C,S){let x=!1;function k(...B){console&&console.warn&&!x&&(x=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
29
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
30
|
+
https://www.w3ctech.com/topic/2226`));let D=S(...B);return D.postcssPlugin=C,D.postcssVersion=new i().version,D}let I;return Object.defineProperty(k,"postcss",{get(){return I||(I=k()),I}}),k.process=function(B,D,H){return w([k(H)]).process(B,D)},k},w.stringify=s,w.parse=f,w.fromJSON=o,w.list=m,w.comment=b=>new u(b),w.atRule=b=>new a(b),w.decl=b=>new e(b),w.rule=b=>new p(b),w.root=b=>new y(b),w.document=b=>new l(b),w.CssSyntaxError=t,w.Declaration=e,w.Container=n,w.Processor=i,w.Document=l,w.Comment=u,w.Warning=c,w.AtRule=a,w.Result=h,w.Input=d,w.Rule=p,w.Root=y,w.Node=v,r.registerPostcss(w),Ci=w,w.default=w,Ci}var vd=bd();const $e=ad(vd);$e.stringify;$e.fromJSON;$e.plugin;$e.parse;$e.list;$e.document;$e.comment;$e.atRule;$e.rule;$e.decl;$e.root;$e.CssSyntaxError;$e.Declaration;$e.Container;$e.Processor;$e.Document;$e.Comment;$e.Warning;$e.AtRule;$e.Result;$e.Input;$e.Rule;$e.Root;$e.Node;const ra={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function wd(t){let e=ra[t.tagName]?ra[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function Cn(t,e){const r=e==null?void 0:e.stylesWithHoverClass.get(t);if(r)return r;let n=t;try{n=$e([sd,od]).process(t).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(t,n),n}function na(){return{stylesWithHoverClass:new Map}}const Sd="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",ia="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Ol=new WeakSet;function xd(t){if(!t||t.tagName!=="IFRAME"||!("sandbox"in t))return!1;const e=Array.from(t.sandbox);return e.length===1&&e[0]==="allow-same-origin"}function Cd(t){if(t.UNSAFE_allowUnprotectedRebuild)return;const e=t.doc.defaultView;if(e&&!(Ol.has(t.doc)&&xd(e.frameElement)))throw new Error(Sd)}function Rd(t,e,r,n){const i=[];for(const u of t.childNodes)u.type===he.Text&&i.push(u);const s=e.split("/* rr_split */");for(;s.length>1&&s.length>i.length;)s.splice(-2,2,s.slice(-2).join(""));let o="";r&&(o=Cn(s.join(""),n));let l=0,c=-1;for(let u=0;u<i.length&&u!==s.length;u++){const a=i[u];let h=s[u];const d=u<s.length-1?s[u+1]:null;if(r&&d){let f=l,m=d.length;m=Math.min(m,30);let p=!1;for(;m>2;m--){const y=d.substring(0,m),v=o.substring(l).indexOf(y);if(p=v!==-1,p){f+=v;break}}p||(f+=h.length),h=o.substring(l,f),l=f}else r&&(h=o.substring(l));c!==-1&&(h=h.substring(c)),d&&(c!==-1||h.endsWith("0p")&&d.startsWith("x"))&&(c=d.indexOf("}"),c!==-1&&(c+=1,h+=d.substring(0,c))),a.textContent=h}}function Ed(t,e,r,n){const{doc:i,hackCss:s,cache:o}=n;t.childNodes.length?Rd(t,r,s,o):(s&&(r=Cn(r,o)),e.appendChild(i.createTextNode(r)))}function kd(t,e){var r;const{doc:n,hackCss:i,cache:s}=e;switch(t.type){case he.Document:return n.implementation.createDocument(null,"",null);case he.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case he.Element:{const o=wd(t);let l;t.isSVG?l=n.createElementNS("http://www.w3.org/2000/svg",o):(t.isCustom&&((r=n.defaultView)!=null&&r.customElements)&&!n.defaultView.customElements.get(t.tagName)&&n.defaultView.customElements.define(t.tagName,class extends n.defaultView.HTMLElement{}),l=n.createElement(o));const c={};for(const u in t.attributes){if(!Object.prototype.hasOwnProperty.call(t.attributes,u))continue;let a=t.attributes[u];if(!(o==="option"&&u==="selected"&&a===!1)&&a!==null){if(a===!0&&(a=""),u.startsWith("rr_")){c[u]=a;continue}if(typeof a=="string"){if(o==="style"&&u==="_cssText"){Ed(t,l,a,e);continue}else if(o==="textarea"&&u==="value"){l.appendChild(n.createTextNode(a)),t.childNodes=[];continue}}try{if(t.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,a.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,a.toString());else if(o==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",a.toString());continue}else o==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||o==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&xs(t.attributes.href)==="js"||(o==="img"&&t.attributes.srcset&&t.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",t.attributes.srcset):l.setAttribute(u,a.toString()))}catch{}}}for(const u in c){const a=c[u];if(o==="canvas"&&u==="rr_dataURL"){const h=n.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=a.toString(),l.RRNodeType&&(l.rr_dataURL=a.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",t.attributes.src),h.src=a.toString())}if(u==="rr_width")l.style.setProperty("width",a.toString());else if(u==="rr_height")l.style.setProperty("height",a.toString());else if(u==="rr_mediaCurrentTime"&&typeof a=="number")l.currentTime=a;else if(u==="rr_mediaState")switch(a){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof a=="number"?l.playbackRate=a:u==="rr_mediaMuted"&&typeof a=="boolean"?l.muted=a:u==="rr_mediaLoop"&&typeof a=="boolean"?l.loop=a:u==="rr_mediaVolume"&&typeof a=="number"?l.volume=a:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",a)}if(t.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return(o==="input"||o==="textarea")&&l.setAttribute("autocomplete","off"),l}case he.Text:return t.isStyle&&i?n.createTextNode(Cn(t.textContent,s)):n.createTextNode(t.textContent);case he.CDATA:return n.createCDATASection(t.textContent);case he.Comment:return n.createComment(t.textContent);default:return null}}function Tr(t,e){const{doc:r,mirror:n,skipChild:i=!1,hackCss:s=!0,afterAppend:o,cache:l}=e;if(n.has(t.id)){const u=n.getNode(t.id),a=n.getMeta(u);if(Nu(a,t))return n.getNode(t.id)}let c=kd(t,{doc:r,hackCss:s,cache:l});if(!c)return null;if(t.rootId&&n.getNode(t.rootId)!==r&&n.replace(t.rootId,r),t.type===he.Document&&(r.close(),r.open(),t.compatMode==="BackCompat"&&t.childNodes&&t.childNodes[0].type!==he.DocumentType&&(t.childNodes[0].type===he.Element&&"xmlns"in t.childNodes[0].attributes&&t.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=r),n.add(c,t),(t.type===he.Document||t.type===he.Element)&&!i)for(const u of t.childNodes){const a=Tr(u,{doc:r,mirror:n,skipChild:!1,hackCss:s,afterAppend:o,cache:l});if(!a){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ws(c)&&c.shadowRoot)c.shadowRoot.appendChild(a);else if(t.type===he.Document&&u.type==he.Element){const h=a;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),c.appendChild(a),h.appendChild(d)):c.appendChild(a)}else c.appendChild(a);o&&o(a,u.id)}return c}function Md(t,e){function r(n){e(n)}for(const n of t.getIds())t.has(n)&&r(t.getNode(n))}function Td(t,e){const r=e.getMeta(t);if((r==null?void 0:r.type)!==he.Element)return;const n=t;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const s=r.attributes[i];i==="rr_scrollLeft"&&(n.scrollLeft=s),i==="rr_scrollTop"&&(n.scrollTop=s)}}function Ad(t,e){Cd(e);const{doc:r,onVisit:n,hackCss:i=!0,afterAppend:s,cache:o,mirror:l=new Ss}=e,c=Tr(t,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:s,cache:o});return Md(l,u=>{n&&n(u),Td(u,l)}),c}function Id(t){var e;if(!t.root.isConnected)throw new Error(ia);const r=t.root.ownerDocument.createElement("iframe");for(const[i,s]of Object.entries(t.iframeAttributes||{}))i!=="sandbox"&&r.setAttribute(i,s);r.setAttribute("sandbox","allow-same-origin"),t.root.appendChild(r);const n=r.contentDocument;if(!n||!r.contentWindow)throw(e=r.parentNode)==null||e.removeChild(r),new Error(ia);return Ol.add(n),r}var Od=Object.defineProperty,Nd=(t,e,r)=>e in t?Od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e,r)=>Nd(t,typeof e!="symbol"?e+"":e,r),Dd=Object.defineProperty,_d=(t,e,r)=>e in t?Dd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,sa=(t,e,r)=>_d(t,typeof e!="symbol"?e+"":e,r);const oa={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},aa={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},wr={},cs={};let la=0;const Ld=()=>!!globalThis.Zone;function Os(t){if(wr[t])return wr[t];const e=globalThis[t],r=e.prototype,n=t in oa?oa[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in aa?aa[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!Ld())return wr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),cs[t]=()=>l.remove()):l.remove(),wr[t]=u}catch{return r}}const Ri={};function at(t,e,r){var n,i;const s=(n=Ri[t])==null?void 0:n[r];if(s)return s.call(e);const o=Os(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?((Ri[t]||(Ri[t]={}))[r]=l,l.call(e)):e[r]}const Ei={};function Nl(t,e,r){const n=`${t}.${String(r)}`;if(Ei[n])return Ei[n].bind(e);const s=Os(t)[r];return typeof s!="function"?e[r]:(Ei[n]=s,s.bind(e))}function Pd(t){return at("Node",t,"ownerDocument")}function $d(t){return at("Node",t,"childNodes")}function jd(t){return at("Node",t,"parentNode")}function Bd(t){return at("Node",t,"parentElement")}function Fd(t){return at("Node",t,"textContent")}function Ud(t){return at("Node",t,"firstChild")}function Wd(t){return at("Node",t,"lastChild")}function zd(t){return at("Node",t,"nextSibling")}function Hd(t){return at("Node",t,"previousSibling")}function qd(t,e){return Nl("Node",t,"contains")(e)}function Vd(t){return Nl("Node",t,"getRootNode")()}function Gd(t){return!t||!("host"in t)?null:at("ShadowRoot",t,"host")}function Kd(t){return t.styleSheets}function Yd(t){return!t||!("shadowRoot"in t)?null:at("Element",t,"shadowRoot")}function Jd(t,e){return at("Element",t,"querySelector")(e)}function Xd(t,e){return at("Element",t,"querySelectorAll")(e)}function Qd(){const t=Os("MutationObserver");la++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--la!==0))return;const r=cs.MutationObserver;if(r)try{r()}finally{delete wr.MutationObserver,delete cs.MutationObserver}}]}let Dl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Dl=()=>new Date().getTime());function Zd(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const ef={ownerDocument:Pd,childNodes:$d,parentNode:jd,parentElement:Bd,textContent:Fd,firstChild:Ud,lastChild:Wd,nextSibling:zd,previousSibling:Hd,contains:qd,getRootNode:Vd,host:Gd,styleSheets:Kd,shadowRoot:Yd,querySelector:Jd,querySelectorAll:Xd,nowTimestamp:Dl,mutationObserverCtor:Qd,patch:Zd};let tf=class{constructor(){sa(this,"idNodeMap",new Map),sa(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));const n=ef.shadowRoot(e);n&&this.removeNodeFromMap(n)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function rf(){return new tf}function nf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sf(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Xr={exports:{}},ca;function of(){if(ca)return Xr.exports;ca=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return Xr.exports=e(),Xr.exports.createColors=e,Xr.exports}const af={},lf=Object.freeze(Object.defineProperty({__proto__:null,default:af},Symbol.toStringTag,{value:"Module"})),ft=sf(lf);var ki,ua;function Ns(){if(ua)return ki;ua=1;let t=of(),e=ft;class r extends Error{constructor(i,s,o,l,c,u){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),u&&(this.plugin=u),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported),e&&i&&(s=e(s));let o=s.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),u=String(c).length,a,h;if(i){let{bold:d,gray:f,red:m}=t.createColors(!0);a=p=>d(m(p)),h=p=>f(p)}else a=h=d=>d;return o.slice(l,c).map((d,f)=>{let m=l+1+f,p=" "+(" "+m).slice(-u)+" | ";if(m===this.line){let y=h(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(p)+d+`
|
|
31
|
+
`+y+a("^")}return" "+h(p)+d}).join(`
|
|
32
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
33
|
+
|
|
34
|
+
`+i+`
|
|
35
|
+
`),this.name+": "+this.message+i}}return ki=r,r.default=r,ki}var Qr={},da;function Ds(){return da||(da=1,Qr.isClean=Symbol("isClean"),Qr.my=Symbol("my")),Qr}var Mi,fa;function _l(){if(fa)return Mi;fa=1;const t={after:`
|
|
36
|
+
`,beforeClose:`
|
|
37
|
+
`,beforeComment:`
|
|
38
|
+
`,beforeDecl:`
|
|
39
|
+
`,beforeOpen:" ",beforeRule:`
|
|
40
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(i){this.builder=i}atrule(i,s){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let c=(i.raws.between||"")+(s?";":"");this.builder(o+l+c,i)}}beforeAfter(i,s){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):s==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,c=0;for(;l&&l.type!=="root";)c+=1,l=l.parent;if(o.includes(`
|
|
41
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<c;a++)o+=u}return o}block(i,s){let o=this.raw(i,"between","beforeOpen");this.builder(s+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let s=i.nodes.length-1;for(;s>0&&i.nodes[s].type==="comment";)s-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let c=i.nodes[l],u=this.raw(c,"before");u&&this.builder(u),this.stringify(c,s!==l||o)}}comment(i){let s=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+s+i.text+o+"*/",i)}decl(i,s){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),s&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,s,o){let l;if(o||(o=s),s&&(l=i.raws[s],typeof l<"u"))return l;let c=i.parent;if(o==="before"&&(!c||c.type==="root"&&c.first===i||c&&c.type==="document"))return"";if(!c)return t[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let a="raw"+e(o);this[a]?l=this[a](u,i):u.walk(h=>{if(l=h.raws[s],typeof l<"u")return!1})}return typeof l>"u"&&(l=t[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return s=o.raws.after,s.includes(`
|
|
42
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(i,s){let o;return i.walkComments(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
43
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,s){let o;return i.walkDecls(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
44
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let s;return i.walk(o=>{if(o.type!=="decl"&&(s=o.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(i){let s;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before<"u")return s=o.raws.before,s.includes(`
|
|
45
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(i){let s;return i.walkDecls(o=>{if(typeof o.raws.between<"u")return s=o.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(s=o.raws.after,typeof s<"u"))return!1}),s}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
46
|
+
`);return s=c[c.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(s=o.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(i,s){let o=i[s],l=i.raws[s];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,s){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,s)}}return Mi=r,r.default=r,Mi}var Ti,ha;function Rn(){if(ha)return Ti;ha=1;let t=_l();function e(r,n){new t(n).stringify(r)}return Ti=e,e.default=e,Ti}var Ai,pa;function En(){if(pa)return Ai;pa=1;let{isClean:t,my:e}=Ds(),r=Ns(),n=_l(),i=Rn();function s(l,c){let u=new l.constructor;for(let a in l){if(!Object.prototype.hasOwnProperty.call(l,a)||a==="proxyCache")continue;let h=l[a],d=typeof h;a==="parent"&&d==="object"?c&&(u[a]=c):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(f=>s(f,u)):(d==="object"&&h!==null&&(h=s(h)),u[a]=h)}return u}class o{constructor(c={}){this.raws={},this[t]=!1,this[e]=!0;for(let u in c)if(u==="nodes"){this.nodes=[];for(let a of c[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=c[u]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let u=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let u in c)this[u]=c[u];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let u=s(this);for(let a in c)u[a]=c[a];return u}cloneAfter(c={}){let u=this.clone(c);return this.parent.insertAfter(this,u),u}cloneBefore(c={}){let u=this.clone(c);return this.parent.insertBefore(this,u),u}error(c,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(c,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(c)}getProxyProcessor(){return{get(c,u){return u==="proxyOf"?c:u==="root"?()=>c.root().toProxy():c[u]},set(c,u,a){return c[u]===a||(c[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&c.markDirty()),!0}}}markDirty(){if(this[t]){this[t]=!1;let c=this;for(;c=c.parent;)c[t]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c,u){let a=this.source.start;if(c.index)a=this.positionInside(c.index,u);else if(c.word){u=this.toString();let h=u.indexOf(c.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(c,u){let a=u||this.toString(),h=this.source.start.column,d=this.source.start.line;for(let f=0;f<c;f++)a[f]===`
|
|
47
|
+
`?(h=1,d+=1):h+=1;return{column:h,line:d}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(c.word){let h=this.toString(),d=h.indexOf(c.word);d!==-1&&(u=this.positionInside(d,h),a=this.positionInside(d+c.word.length,h))}else c.start?u={column:c.start.column,line:c.start.line}:c.index&&(u=this.positionInside(c.index)),c.end?a={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?a=this.positionInside(c.endIndex):c.index&&(a=this.positionInside(c.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(c,u){return new n().raw(this,c,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let u=this,a=!1;for(let h of c)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,u){let a={},h=u==null;u=u||new Map;let d=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))a[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,u):p);else if(typeof m=="object"&&m.toJSON)a[f]=m.toJSON(null,u);else if(f==="source"){let p=u.get(m.input);p==null&&(p=d,u.set(m.input,d),d++),a[f]={end:m.end,inputId:p,start:m.start}}else a[f]=m}return h&&(a.inputs=[...u.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=i){c.stringify&&(c=c.stringify);let u="";return c(this,a=>{u+=a}),u}warn(c,u,a){let h={node:this};for(let d in a)h[d]=a[d];return c.warn(u,h)}get proxyOf(){return this}}return Ai=o,o.default=o,Ai}var Ii,ma;function kn(){if(ma)return Ii;ma=1;let t=En();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Ii=e,e.default=e,Ii}var Oi,ga;function cf(){if(ga)return Oi;ga=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Oi={nanoid:(n=21)=>{let i="",s=n;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s;for(;l--;)o+=n[Math.random()*n.length|0];return o}},Oi}var Ni,ya;function Ll(){if(ya)return Ni;ya=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ft,{existsSync:r,readFileSync:n}=ft,{dirname:i,join:s}=ft;function o(c){return Buffer?Buffer.from(c,"base64").toString():window.atob(c)}class l{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,d=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(d.test(u)||f.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return o(u.substr(RegExp.lastMatch.length));let m=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),d=u.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,d)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ni=l,l.default=l,Ni}var Di,ba;function Mn(){if(ba)return Di;ba=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ft,{fileURLToPath:r,pathToFileURL:n}=ft,{isAbsolute:i,resolve:s}=ft,{nanoid:o}=cf(),l=ft,c=Ns(),u=Ll(),a=Symbol("fromOffsetCache"),h=!!(t&&e),d=!!(s&&i);class f{constructor(p,y={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,y.from&&(!d||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=s(y.from)),d&&h){let v=new u(this.css,y);if(v.text){this.map=v;let w=v.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(p,y,v,w={}){let b,C,S;if(y&&typeof y=="object"){let k=y,I=v;if(typeof k.offset=="number"){let B=this.fromOffset(k.offset);y=B.line,v=B.col}else y=k.line,v=k.column;if(typeof I.offset=="number"){let B=this.fromOffset(I.offset);C=B.line,S=B.col}else C=I.line,S=I.column}else if(!v){let k=this.fromOffset(y);y=k.line,v=k.col}let x=this.origin(y,v,C,S);return x?b=new c(p,x.endLine===void 0?x.line:{column:x.column,line:x.line},x.endLine===void 0?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,w.plugin):b=new c(p,C===void 0?y:{column:v,line:y},C===void 0?v:{column:S,line:C},this.css,this.file,w.plugin),b.input={column:v,endColumn:S,endLine:C,line:y,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let y,v;if(this[a])v=this[a];else{let b=this.css.split(`
|
|
48
|
+
`);v=new Array(b.length);let C=0;for(let S=0,x=b.length;S<x;S++)v[S]=C,C+=b[S].length+1;this[a]=v}y=v[v.length-1];let w=0;if(p>=y)w=v.length-1;else{let b=v.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<v[C])b=C-1;else if(p>=v[C+1])w=C+1;else{w=C;break}}return{col:p-v[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:s(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,y,v,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:y,line:p});if(!C.source)return!1;let S;typeof v=="number"&&(S=b.originalPositionFor({column:w,line:v}));let x;i(C.source)?x=n(C.source):x=new URL(C.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let k={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:x.toString()};if(x.protocol==="file:")if(r)k.file=r(x);else throw new Error("file: protocol is not available in this PostCSS build");let I=b.sourceContentFor(C.source);return I&&(k.source=I),k}toJSON(){let p={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(p[y]=this[y]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Di=f,f.default=f,l&&l.registerInput&&l.registerInput(f),Di}var _i,va;function Pl(){if(va)return _i;va=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ft,{dirname:r,relative:n,resolve:i,sep:s}=ft,{pathToFileURL:o}=ft,l=Mn(),c=!!(t&&e),u=!!(r&&i&&n&&s);class a{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
49
|
+
`;this.css.includes(`\r
|
|
50
|
+
`)&&(f=`\r
|
|
51
|
+
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===!1?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&c&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new e({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 e({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,v;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(d+=y.length,v=w.lastIndexOf(`
|
|
52
|
+
`),f=w.length-v):f+=w.length,b&&C!=="start"){let S=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==S.last||S.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return _i=a,_i}var Li,wa;function Tn(){if(wa)return Li;wa=1;let t=En();class e extends t{constructor(n){super(n),this.type="comment"}}return Li=e,e.default=e,Li}var Pi,Sa;function Wt(){if(Sa)return Pi;Sa=1;let{isClean:t,my:e}=Ds(),r=kn(),n=Tn(),i=En(),s,o,l,c;function u(d){return d.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function a(d){if(d[t]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)a(f)}class h extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,y;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],y=f(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[m]+=1;return delete this.indexes[m],y}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(y=>typeof y=="function"?(v,w)=>y(v.toProxy(),w):y)):m==="every"||m==="some"?p=>f[m]((y,...v)=>p(y.toProxy(),...v)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),y=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let w of y)this.proxyOf.nodes.splice(p+1,0,w);let v;for(let w in this.indexes)v=this.indexes[w],p<v&&(this.indexes[w]=v+y.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),y=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],y).reverse();p=this.index(f);for(let b of v)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+v.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=u(s(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new o(f)];else if(f.name)f=[new l(f)];else if(f.text)f=[new n(f)];else throw new Error("Unknown node type in node creation");return f.map(y=>(y[e]||h.rebuild(y),y=y.proxyOf,y.parent&&y.parent.removeChild(y),y[t]&&a(y),typeof y.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(y.raws.before=m.raws.before.replace(/\S/g,"")),y.parent=this.proxyOf,y))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(y=>{m.props&&!m.props.includes(y.prop)||m.fast&&!y.value.includes(m.fast)||(y.value=y.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let y;try{y=f(m,p)}catch(v){throw m.addToError(v)}return y!==!1&&m.walk&&(y=m.walk(f)),y})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="atrule")return m(p,y)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="decl")return m(p,y)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="rule")return m(p,y)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=d=>{s=d},h.registerRule=d=>{o=d},h.registerAtRule=d=>{l=d},h.registerRoot=d=>{c=d},Pi=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,l.prototype):d.type==="rule"?Object.setPrototypeOf(d,o.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,c.prototype),d[e]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},Pi}var $i,xa;function _s(){if(xa)return $i;xa=1;let t=Wt(),e,r;class n extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},$i=n,n.default=n,$i}var ji,Ca;function $l(){if(Ca)return ji;Ca=1;let t={};return ji=function(r){t[r]||(t[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},ji}var Bi,Ra;function jl(){if(Ra)return Bi;Ra=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Bi=t,t.default=t,Bi}var Fi,Ea;function Ls(){if(Ea)return Fi;Ea=1;let t=jl();class e{constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Fi=e,e.default=e,Fi}var Ui,ka;function uf(){if(ka)return Ui;ka=1;const t=39,e=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,u=91,a=93,h=40,d=41,f=123,m=125,p=59,y=42,v=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,x=/[\da-f]/i;return Ui=function(I,B={}){let D=I.css.valueOf(),H=B.ignoreErrors,z,A,be,fe,ne,F,ue,j,X,T,U=D.length,_=0,te=[],ie=[];function xe(){return _}function se(ee){throw I.error("Unclosed "+ee,_)}function le(){return ie.length===0&&_>=U}function pe(ee){if(ie.length)return ie.pop();if(_>=U)return;let Te=ee?ee.ignoreUnclosed:!1;switch(z=D.charCodeAt(_),z){case i:case s:case l:case c:case o:{A=_;do A+=1,z=D.charCodeAt(A);while(z===s||z===i||z===l||z===c||z===o);T=["space",D.slice(_,A)],_=A-1;break}case u:case a:case f:case m:case v:case p:case d:{let re=String.fromCharCode(z);T=[re,re,_];break}case h:{if(j=te.length?te.pop()[1]:"",X=D.charCodeAt(_+1),j==="url"&&X!==t&&X!==e&&X!==s&&X!==i&&X!==l&&X!==o&&X!==c){A=_;do{if(F=!1,A=D.indexOf(")",A+1),A===-1)if(H||Te){A=_;break}else se("bracket");for(ue=A;D.charCodeAt(ue-1)===r;)ue-=1,F=!F}while(F);T=["brackets",D.slice(_,A+1),_,A],_=A}else A=D.indexOf(")",_+1),fe=D.slice(_,A+1),A===-1||S.test(fe)?T=["(","(",_]:(T=["brackets",fe,_,A],_=A);break}case t:case e:{be=z===t?"'":'"',A=_;do{if(F=!1,A=D.indexOf(be,A+1),A===-1)if(H||Te){A=_+1;break}else se("string");for(ue=A;D.charCodeAt(ue-1)===r;)ue-=1,F=!F}while(F);T=["string",D.slice(_,A+1),_,A],_=A;break}case w:{b.lastIndex=_+1,b.test(D),b.lastIndex===0?A=D.length-1:A=b.lastIndex-2,T=["at-word",D.slice(_,A+1),_,A],_=A;break}case r:{for(A=_,ne=!0;D.charCodeAt(A+1)===r;)A+=1,ne=!ne;if(z=D.charCodeAt(A+1),ne&&z!==n&&z!==s&&z!==i&&z!==l&&z!==c&&z!==o&&(A+=1,x.test(D.charAt(A)))){for(;x.test(D.charAt(A+1));)A+=1;D.charCodeAt(A+1)===s&&(A+=1)}T=["word",D.slice(_,A+1),_,A],_=A;break}default:{z===n&&D.charCodeAt(_+1)===y?(A=D.indexOf("*/",_+2)+1,A===0&&(H||Te?A=D.length:se("comment")),T=["comment",D.slice(_,A+1),_,A],_=A):(C.lastIndex=_+1,C.test(D),C.lastIndex===0?A=D.length-1:A=C.lastIndex-2,T=["word",D.slice(_,A+1),_,A],te.push(T),_=A);break}}return _++,T}function ke(ee){ie.push(ee)}return{back:ke,endOfFile:le,nextToken:pe,position:xe}},Ui}var Wi,Ma;function Ps(){if(Ma)return Wi;Ma=1;let t=Wt();class e extends t{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Wi=e,e.default=e,t.registerAtRule(e),Wi}var zi,Ta;function Lr(){if(Ta)return zi;Ta=1;let t=Wt(),e,r;class n extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of c)u.raws.before=o.raws.before}return c}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},zi=n,n.default=n,t.registerRoot(n),zi}var Hi,Aa;function Bl(){if(Aa)return Hi;Aa=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let r=[" ",`
|
|
53
|
+
`," "];return t.split(e,r)},split(e,r,n){let i=[],s="",o=!1,l=0,c=!1,u="",a=!1;for(let h of e)a?a=!1:h==="\\"?a=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&i.push(s.trim()),i}};return Hi=t,t.default=t,Hi}var qi,Ia;function $s(){if(Ia)return qi;Ia=1;let t=Wt(),e=Bl();class r extends t{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return qi=r,r.default=r,t.registerRule(r),qi}var Vi,Oa;function df(){if(Oa)return Vi;Oa=1;let t=kn(),e=uf(),r=Tn(),n=Ps(),i=Lr(),s=$s();const o={empty:!0,space:!0};function l(u){for(let a=u.length-1;a>=0;a--){let h=u[a],d=h[3]||h[2];if(d)return d}}class c{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let d,f,m,p=!1,y=!1,v=[],w=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){y=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,f=v[m];f&&f[0]==="space";)f=v[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(a);break}else v.push(a);else v.push(a);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),p&&(a=v[v.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),y&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=a[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(a){let h=0,d,f,m;for(let[p,y]of a.entries()){if(d=y,f=d[0],f==="("&&(h+=1),f===")"&&(h-=1),h===0&&f===":")if(!m)this.doubleColon(d);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=e(this.input)}decl(a,h){let d=new t;this.init(d,a[0][2]);let f=a[a.length-1];for(f[0]===";"&&(this.semicolon=!0,a.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let w=a[0][0];if(w===":"||w==="space"||w==="comment")break;d.prop+=a.shift()[1]}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],y;for(;a.length&&(y=a[0][0],!(y!=="space"&&y!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let w=a.length-1;w>=0;w--){if(m=a[w],m[1].toLowerCase()==="!important"){d.important=!0;let b=this.stringFrom(a,w);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),C="";for(let S=w;S>0;S--){let x=b[S][0];if(C.trim().indexOf("!")===0&&x!=="space")break;C=b.pop()[1]+C}C.trim().indexOf("!")===0&&(d.important=!0,d.raws.important=C,a=b)}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(d.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new s;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}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(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,d=null,f=!1,m=null,p=[],y=a[1].startsWith("--"),v=[],w=a;for(;w;){if(d=w[0],v.push(w),d==="("||d==="[")m||(m=w),p.push(d==="("?")":"]");else if(y&&f&&d==="{")m||(m=w),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(v,y);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!y)for(;v.length&&(w=v[v.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,y)}else this.unknownWord(v)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,d,f){let m,p,y=d.length,v="",w=!0,b,C;for(let S=0;S<y;S+=1)m=d[S],p=m[0],p==="space"&&S===y-1&&!f?w=!1:p==="comment"?(C=d[S-1]?d[S-1][0]:"empty",b=d[S+1]?d[S+1][0]:"empty",!o[C]&&!o[b]?v.slice(-1)===","?w=!1:v+=m[1]:w=!1):v+=m[1];if(!w){let S=d.reduce((x,k)=>x+k[1],"");a.raws[h]={raw:S,value:v}}a[h]=v}rule(a){a.pop();let h=new s;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let h,d="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],h==="space");)d=a.pop()[1]+d;return d}stringFrom(a,h){let d="";for(let f=h;f<a.length;f++)d+=a[f][1];return a.splice(h,a.length-h),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Vi=c,Vi}var Gi,Na;function js(){if(Na)return Gi;Na=1;let t=Wt(),e=df(),r=Mn();function n(i,s){let o=new r(i,s),l=new e(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
54
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
55
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
56
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return Gi=n,n.default=n,t.registerParse(n),Gi}var Ki,Da;function Fl(){if(Da)return Ki;Da=1;let{isClean:t,my:e}=Ds(),r=Pl(),n=Rn(),i=Wt(),s=_s(),o=$l(),l=Ls(),c=js(),u=Lr();const a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,x=a[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[x,x+"-"+S,f,x+"Exit",x+"Exit-"+S]:S?[x,x+"-"+S,x+"Exit",x+"Exit-"+S]:C.append?[x,f,x+"Exit"]:[x,x+"Exit"]}function y(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[t]=!1,C.nodes&&C.nodes.forEach(S=>v(S)),C}let w={};class b{constructor(S,x,k){this.stringified=!1,this.processed=!1;let I;if(typeof x=="object"&&x!==null&&(x.type==="root"||x.type==="document"))I=v(x);else if(x instanceof b||x instanceof l)I=v(x.root),x.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=x.map);else{let B=c;k.syntax&&(B=k.syntax.parse),k.parser&&(B=k.parser),B.parse&&(B=B.parse);try{I=B(x,k)}catch(D){this.processed=!0,this.error=D}I&&!I[e]&&i.rebuild(I)}this.result=new l(S,I,k),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(B=>typeof B=="object"&&B.prepare?{...B,...B.prepare(this.result)}:B)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,x){let k=this.result.lastPlugin;try{if(x&&x.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=k.postcssPlugin,S.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let I=k.postcssPlugin,B=k.postcssVersion,D=this.result.processor.version,H=B.split("."),z=D.split(".");(H[0]!==z[0]||parseInt(H[1])>parseInt(z[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+D+", but "+I+" uses "+B+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(x,k,I)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([x,I])};for(let x of this.plugins)if(typeof x=="object")for(let k in x){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${x.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[k])if(typeof x[k]=="object")for(let I in x[k])I==="*"?S(x,k,x[k][I]):S(x,k+"-"+I.toLowerCase(),x[k][I]);else typeof x[k]=="function"&&S(x,k,x[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let x=this.plugins[S],k=this.runOnRoot(x);if(m(k))try{await k}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];){S[t]=!0;let x=[y(S)];for(;x.length>0;){let k=this.visitTick(x);if(m(k))try{await k}catch(I){let B=x[x.length-1].node;throw this.handleError(I,B)}}}if(this.listeners.OnceExit)for(let[x,k]of this.listeners.OnceExit){this.result.lastPlugin=x;try{if(S.type==="document"){let I=S.nodes.map(B=>k(B,this.helpers));await Promise.all(I)}else await k(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let x=this.result.root.nodes.map(k=>S.Once(k,this.helpers));return m(x[0])?Promise.all(x):x}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(x){throw this.handleError(x)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,x=n;S.syntax&&(x=S.syntax.stringify),S.stringifier&&(x=S.stringifier),x.stringify&&(x=x.stringify);let I=new r(x,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 S of this.plugins){let x=this.runOnRoot(S);if(m(x))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];)S[t]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let x of S.nodes)this.visitSync(this.listeners.OnceExit,x);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,x){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(S,x)}toString(){return this.css}visitSync(S,x){for(let[k,I]of S){this.result.lastPlugin=k;let B;try{B=I(x,this.helpers)}catch(D){throw this.handleError(D,x.proxyOf)}if(x.type!=="root"&&x.type!=="document"&&!x.parent)return!0;if(m(B))throw this.getAsyncError()}}visitTick(S){let x=S[S.length-1],{node:k,visitors:I}=x;if(k.type!=="root"&&k.type!=="document"&&!k.parent){S.pop();return}if(I.length>0&&x.visitorIndex<I.length){let[D,H]=I[x.visitorIndex];x.visitorIndex+=1,x.visitorIndex===I.length&&(x.visitors=[],x.visitorIndex=0),this.result.lastPlugin=D;try{return H(k.toProxy(),this.helpers)}catch(z){throw this.handleError(z,k)}}if(x.iterator!==0){let D=x.iterator,H;for(;H=k.nodes[k.indexes[D]];)if(k.indexes[D]+=1,!H[t]){H[t]=!0,S.push(y(H));return}x.iterator=0,delete k.indexes[D]}let B=x.events;for(;x.eventIndex<B.length;){let D=B[x.eventIndex];if(x.eventIndex+=1,D===f){k.nodes&&k.nodes.length&&(k[t]=!0,x.iterator=k.getIterator());return}else if(this.listeners[D]){x.visitors=this.listeners[D];return}}S.pop()}walkSync(S){S[t]=!0;let x=p(S);for(let k of x)if(k===f)S.nodes&&S.each(I=>{I[t]||this.walkSync(I)});else{let I=this.listeners[k];if(I&&this.visitSync(I,S.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=C=>{w=C},Ki=b,b.default=b,u.registerLazyResult(b),s.registerLazyResult(b),Ki}var Yi,_a;function ff(){if(_a)return Yi;_a=1;let t=Pl(),e=Rn(),r=$l(),n=js();const i=Ls();class s{constructor(l,c,u){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=u,this._map=void 0;let a,h=e;this.result=new i(this._processor,a,this._opts),this.result.css=c;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new t(h,a,this._opts,c);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(l,c)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=n;try{l=c(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Yi=s,s.default=s,Yi}var Ji,La;function hf(){if(La)return Ji;La=1;let t=ff(),e=Fl(),r=_s(),n=Lr();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.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(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new t(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Ji=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),Ji}var Xi,Pa;function pf(){if(Pa)return Xi;Pa=1;let t=kn(),e=Ll(),r=Tn(),n=Ps(),i=Mn(),s=Lr(),o=$s();function l(c,u){if(Array.isArray(c))return c.map(d=>l(d));let{inputs:a,...h}=c;if(a){u=[];for(let d of a){let f={...d,__proto__:i.prototype};f.map&&(f.map={...f.map,__proto__:e.prototype}),u.push(f)}}if(h.nodes&&(h.nodes=c.nodes.map(d=>l(d,u))),h.source){let{inputId:d,...f}=h.source;h.source=f,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new s(h);if(h.type==="decl")return new t(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+c.type)}return Xi=l,l.default=l,Xi}var Qi,$a;function mf(){if($a)return Qi;$a=1;let t=Ns(),e=kn(),r=Fl(),n=Wt(),i=hf(),s=Rn(),o=pf(),l=_s(),c=jl(),u=Tn(),a=Ps(),h=Ls(),d=Mn(),f=js(),m=Bl(),p=$s(),y=Lr(),v=En();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new i(b)}return w.plugin=function(C,S){let x=!1;function k(...B){console&&console.warn&&!x&&(x=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
57
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
58
|
+
https://www.w3ctech.com/topic/2226`));let D=S(...B);return D.postcssPlugin=C,D.postcssVersion=new i().version,D}let I;return Object.defineProperty(k,"postcss",{get(){return I||(I=k()),I}}),k.process=function(B,D,H){return w([k(H)]).process(B,D)},k},w.stringify=s,w.parse=f,w.fromJSON=o,w.list=m,w.comment=b=>new u(b),w.atRule=b=>new a(b),w.decl=b=>new e(b),w.rule=b=>new p(b),w.root=b=>new y(b),w.document=b=>new l(b),w.CssSyntaxError=t,w.Declaration=e,w.Container=n,w.Processor=i,w.Document=l,w.Comment=u,w.Warning=c,w.AtRule=a,w.Result=h,w.Input=d,w.Rule=p,w.Root=y,w.Node=v,r.registerPostcss(w),Qi=w,w.default=w,Qi}var gf=mf();const Fe=nf(gf);Fe.stringify;Fe.fromJSON;Fe.plugin;Fe.parse;Fe.list;Fe.document;Fe.comment;Fe.atRule;Fe.rule;Fe.decl;Fe.root;Fe.CssSyntaxError;Fe.Declaration;Fe.Container;Fe.Processor;Fe.Document;Fe.Comment;Fe.Warning;Fe.AtRule;Fe.Result;Fe.Input;Fe.Rule;Fe.Root;Fe.Node;var Ce=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Ce||{});function yf(t){const e={},r=/;(?![^(]*\))/g,n=/:(.+)/,i=/\/\*.*?\*\//g;return t.replace(i,"").split(r).forEach(function(s){if(s){const o=s.split(n);o.length>1&&(e[us(o[0].trim())]=o[1].trim())}}),e}function ja(t){const e=[];for(const r in t){const n=t[r];if(typeof n!="string")continue;const i=Sf(r);e.push(`${i}: ${n};`)}return e.join(" ")}const bf=/-([a-z])/g,vf=/^--[a-zA-Z0-9-]+$/,us=t=>vf.test(t)?t:t.replace(bf,(e,r)=>r?r.toUpperCase():""),wf=/\B([A-Z])/g,Sf=t=>t.replace(wf,"-$1").toLowerCase();class pt{constructor(...e){G(this,"parentElement",null),G(this,"parentNode",null),G(this,"ownerDocument"),G(this,"firstChild",null),G(this,"lastChild",null),G(this,"previousSibling",null),G(this,"nextSibling",null),G(this,"ELEMENT_NODE",1),G(this,"TEXT_NODE",3),G(this,"nodeType"),G(this,"nodeName"),G(this,"RRNodeType")}get childNodes(){const e=[];let r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof pt){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,r){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"}}class Bs extends pt{constructor(...e){super(e),G(this,"nodeType",9),G(this,"nodeName","#document"),G(this,"compatMode","CSS1Compat"),G(this,"RRNodeType",Ce.Document),G(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===Ce.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(r=>r.RRNodeType===Ce.Element&&r.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(r=>r.RRNodeType===Ce.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const r=e.RRNodeType;if((r===Ce.Element||r===Ce.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=Fs(this,e);return n.parentElement=null,n}insertBefore(e,r){const n=e.RRNodeType;if((n===Ce.Element||n===Ce.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=ql(this,e,r);return i.parentElement=null,i}removeChild(e){return Vl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let r;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const n=this.createDocumentType("html",r,"");this.open(),this.appendChild(n)}}createDocument(e,r,n){return new Bs}createDocumentType(e,r,n){const i=new Ul(e,r,n);return i.ownerDocument=this,i}createElement(e){const r=new An(e);return r.ownerDocument=this,r}createElementNS(e,r){return this.createElement(r)}createTextNode(e){const r=new Wl(e);return r.ownerDocument=this,r}createComment(e){const r=new zl(e);return r.ownerDocument=this,r}createCDATASection(e){const r=new Hl(e);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class Ul extends pt{constructor(e,r,n){super(),G(this,"nodeType",10),G(this,"RRNodeType",Ce.DocumentType),G(this,"name"),G(this,"publicId"),G(this,"systemId"),G(this,"textContent",null),this.name=e,this.publicId=r,this.systemId=n,this.nodeName=e}toString(){return"RRDocumentType"}}class An extends pt{constructor(e){super(),G(this,"nodeType",1),G(this,"RRNodeType",Ce.Element),G(this,"tagName"),G(this,"attributes",{}),G(this,"shadowRoot",null),G(this,"scrollLeft"),G(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(r=>e+=r.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Rf(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?yf(this.attributes.style):{},r=/\B([A-Z])/g;return e.setProperty=(n,i,s)=>{if(r.test(n))return;const o=us(n);i?e[o]=i:delete e[o],s==="important"&&(e[o]+=" !important"),this.attributes.style=ja(e)},e.removeProperty=n=>{if(r.test(n))return"";const i=us(n),s=e[i]||"";return delete e[i],this.attributes.style=ja(e),s},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,r){this.attributes[e]=r}setAttributeNS(e,r,n){this.setAttribute(r,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Fs(this,e)}insertBefore(e,r){return ql(this,e,r)}removeChild(e){return Vl(this,e)}attachShadow(e){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(e){return!0}toString(){let e="";for(const r in this.attributes)e+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${e}`}}class xf extends An{constructor(){super(...arguments),G(this,"currentTime"),G(this,"volume"),G(this,"paused"),G(this,"muted"),G(this,"playbackRate"),G(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Cf extends An{constructor(){super(...arguments),G(this,"tagName","DIALOG"),G(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Wl extends pt{constructor(e){super(),G(this,"nodeType",3),G(this,"nodeName","#text"),G(this,"RRNodeType",Ce.Text),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class zl extends pt{constructor(e){super(),G(this,"nodeType",8),G(this,"nodeName","#comment"),G(this,"RRNodeType",Ce.Comment),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Hl extends pt{constructor(e){super(),G(this,"nodeName","#cdata-section"),G(this,"nodeType",4),G(this,"RRNodeType",Ce.CDATA),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Rf{constructor(e,r){if(G(this,"onChange"),G(this,"classes",[]),G(this,"add",(...n)=>{for(const i of n){const s=String(i);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))}),G(this,"remove",(...n)=>{this.classes=this.classes.filter(i=>n.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const n=e.trim().split(/\s+/);this.classes.push(...n)}this.onChange=r}}function Fs(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function ql(t,e,r){if(!r)return Fs(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function Vl(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var st=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(st||{});const ds={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ef={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let bt=null;function pn(t,e,r,n=e.mirror||e.ownerDocument.mirror){t=kf(t,e,r,n),Gl(t,e,r,n),Mf(t,e,r)}function kf(t,e,r,n){var i;if(r.afterAppend&&!bt&&(bt=new WeakSet,setTimeout(()=>{bt=null},0)),!Us(t,e)){const s=mn(e,r.mirror,n);(i=t.parentNode)==null||i.replaceChild(s,t),t=s}switch(e.RRNodeType){case Ce.Document:{if(!Qt(t,e,r.mirror,n)){const s=n.getMeta(e);s&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,s),bt==null||bt.add(t))}break}case Ce.Element:{const s=t,o=e;switch(o.tagName){case"IFRAME":{const l=t.contentDocument;if(!l)break;pn(l,e.contentDocument,r,n);break}}o.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),Gl(s.shadowRoot,o.shadowRoot,r,n)),Tf(s,o,n);break}}return t}function Mf(t,e,r){var n;switch(e.RRNodeType){case Ce.Document:{const i=e.scrollData;i&&r.applyScroll(i,!0);break}case Ce.Element:{const i=t,s=e;switch(s.scrollData&&r.applyScroll(s.scrollData,!0),s.inputData&&r.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":{const o=t,l=s;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,t));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=s,c=o.open,u=o.matches("dialog:modal"),a=l.open,h=l.isModal,d=u!==h,f=c!==a;if((d||c&&f)&&o.close(),a&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case Ce.Text:case Ce.Comment:case Ce.CDATA:{t.textContent!==e.data&&(t.textContent=e.data);break}}bt!=null&&bt.has(t)&&(bt.delete(t),(n=r.afterAppend)==null||n.call(r,t,r.mirror.getId(t)))}function Tf(t,e,r){const n=t.attributes,i=e.attributes;for(const s in i){const o=i[s],l=r.getMeta(e);if(l!=null&&l.isSVG&&ds[s])t.setAttributeNS(ds[s],s,o);else if(e.tagName==="CANVAS"&&s==="rr_dataURL"){const c=document.createElement("img");c.src=o,c.onload=()=>{const u=t.getContext("2d");u&&u.drawImage(c,0,0,c.width,c.height)}}else{if(e.tagName==="IFRAME"&&s==="srcdoc")continue;try{t.setAttribute(s,o)}catch(c){console.warn(c)}}}for(const{name:s}of Array.from(n))s in i||t.removeAttribute(s);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}function Gl(t,e,r,n){const i=Array.from(t.childNodes),s=e.childNodes;if(i.length===0&&s.length===0)return;let o=0,l=i.length-1,c=0,u=s.length-1,a=i[o],h=i[l],d=s[c],f=s[u],m,p;for(;o<=l&&c<=u;)if(a===void 0)a=i[++o];else if(h===void 0)h=i[--l];else if(Qt(a,d,r.mirror,n))a=i[++o],d=s[++c];else if(Qt(h,f,r.mirror,n))h=i[--l],f=s[--u];else if(Qt(a,f,r.mirror,n)){try{t.insertBefore(a,h.nextSibling)}catch(w){console.warn(w)}a=i[++o],f=s[--u]}else if(Qt(h,d,r.mirror,n)){try{t.insertBefore(h,a)}catch(w){console.warn(w)}h=i[--l],d=s[++c]}else{if(!m){m={};for(let b=o;b<=l;b++){const C=i[b];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=b)}}p=m[n.getId(d)];const w=i[p];if(p!==void 0&&w&&Qt(w,d,r.mirror,n)){try{t.insertBefore(w,a)}catch(b){console.warn(b)}i[p]=void 0}else{const b=mn(d,r.mirror,n);t.nodeName==="#document"&&a&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&a.nodeType===a.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&a.nodeType===a.ELEMENT_NODE)&&(t.removeChild(a),r.mirror.removeNodeFromMap(a),a=i[++o]);try{t.insertBefore(b,a||null)}catch(C){console.warn(C)}}d=s[++c]}if(o>l){const w=s[u+1];let b=null;for(w&&(b=r.mirror.getNode(n.getId(w)));c<=u;++c){const C=mn(s[c],r.mirror,n);try{t.insertBefore(C,b)}catch(S){console.warn(S)}}}else if(c>u)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==t))try{t.removeChild(w),r.mirror.removeNodeFromMap(w)}catch(b){console.warn(b)}}let y=t.firstChild,v=e.firstChild;for(;y!==null&&v!==null;)pn(y,v,r,n),y=y.nextSibling,v=v.nextSibling}function mn(t,e,r){const n=r.getId(t),i=r.getMeta(t);let s=null;if(n>-1&&(s=e.getNode(n)),s!==null&&Us(s,t))return s;switch(t.RRNodeType){case Ce.Document:s=new Document;break;case Ce.DocumentType:s=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case Ce.Element:{let o=t.tagName.toLowerCase();o=Ef[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?s=document.createElementNS(ds.svg,o):s=document.createElement(t.tagName);break}case Ce.Text:s=document.createTextNode(t.data);break;case Ce.Comment:s=document.createComment(t.data);break;case Ce.CDATA:s=document.createCDATASection(t.data);break}i&&e.add(s,{...i});try{bt==null||bt.add(s)}catch{}return s}function Us(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function Qt(t,e,r,n){const i=r.getId(t),s=n.getId(e);return i===-1||i!==s?!1:Us(t,e)}class ar extends Bs{constructor(e){super(),G(this,"UNSERIALIZED_STARTING_ID",-2),G(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),G(this,"mirror",Ff()),G(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,r,n){return new ar}createDocumentType(e,r,n){const i=new Af(e,r,n);return i.ownerDocument=this,i}createElement(e){const r=e.toUpperCase();let n;switch(r){case"AUDIO":case"VIDEO":n=new If(r);break;case"IFRAME":n=new _f(r,this.mirror);break;case"CANVAS":n=new Nf(r);break;case"STYLE":n=new Df(r);break;case"DIALOG":n=new Of(r);break;default:n=new In(r);break}return n.ownerDocument=this,n}createComment(e){const r=new Pf(e);return r.ownerDocument=this,r}createCDATASection(e){const r=new $f(e);return r.ownerDocument=this,r}createTextNode(e){const r=new Lf(e);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Af=Ul;class In extends An{constructor(){super(...arguments),G(this,"inputData",null),G(this,"scrollData",null)}}class If extends xf{}class Of extends Cf{}class Nf extends In{constructor(){super(...arguments),G(this,"rr_dataURL",null),G(this,"canvasMutations",[])}getContext(){return null}}class Df extends In{constructor(){super(...arguments),G(this,"rules",[])}}class _f extends In{constructor(e,r){super(e),G(this,"contentDocument",new ar),this.contentDocument.mirror=r}}const Lf=Wl,Pf=zl,$f=Hl;function jf(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function Kl(t,e,r,n){let i;switch(t.nodeType){case st.DOCUMENT_NODE:n&&n.nodeName==="IFRAME"?i=n.contentDocument:(i=e,i.compatMode=t.compatMode);break;case st.DOCUMENT_TYPE_NODE:{const o=t;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case st.ELEMENT_NODE:{const o=t,l=jf(o);i=e.createElement(l);const c=i;for(const{name:u,value:a}of Array.from(o.attributes))c.attributes[u]=a;o.scrollLeft&&(c.scrollLeft=o.scrollLeft),o.scrollTop&&(c.scrollTop=o.scrollTop);break}case st.TEXT_NODE:i=e.createTextNode(t.textContent||"");break;case st.CDATA_SECTION_NODE:i=e.createCDATASection(t.data);break;case st.COMMENT_NODE:i=e.createComment(t.textContent||"");break;case st.DOCUMENT_FRAGMENT_NODE:i=n.attachShadow({mode:"open"});break;default:return null}let s=r.getMeta(t);return e instanceof ar&&(s||(s=Yl(i,e.unserializedId),r.add(t,s)),e.mirror.add(i,{...s})),i}function Bf(t,e=rf(),r=new ar){function n(i,s){const o=Kl(i,r,e,s);if(o!==null)if((s==null?void 0:s.nodeName)!=="IFRAME"&&i.nodeType!==st.DOCUMENT_FRAGMENT_NODE&&(s==null||s.appendChild(o),o.parentNode=s,o.parentElement=s),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&n(l,o)}else(i.nodeType===st.DOCUMENT_NODE||i.nodeType===st.ELEMENT_NODE||i.nodeType===st.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===st.ELEMENT_NODE&&i.shadowRoot&&n(i.shadowRoot,o),i.childNodes.forEach(l=>n(l,o)))}return n(t,null),r}function Ff(){return new Uf}class Uf{constructor(){G(this,"idNodeMap",new Map),G(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Yl(t,e){switch(t.RRNodeType){case Ce.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case Ce.DocumentType:{const r=t;return{id:e,type:t.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case Ce.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ce.Text:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case Ce.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case Ce.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}const Ba={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fa={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Sr={},fs={};let Ua=0;const Wf=()=>!!globalThis.Zone;function Ws(t){if(Sr[t])return Sr[t];const e=globalThis[t],r=e.prototype,n=t in Ba?Ba[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in Fa?Fa[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!Wf())return Sr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),fs[t]=()=>l.remove()):l.remove(),Sr[t]=u}catch{return r}}const Zi={};function lt(t,e,r){var n,i;const s=(n=Zi[t])==null?void 0:n[r];if(s)return s.call(e);const o=Ws(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?((Zi[t]||(Zi[t]={}))[r]=l,l.call(e)):e[r]}const es={};function Jl(t,e,r){const n=`${t}.${String(r)}`;if(es[n])return es[n].bind(e);const s=Ws(t)[r];return typeof s!="function"?e[r]:(es[n]=s,s.bind(e))}function zf(t){return lt("Node",t,"ownerDocument")}function Hf(t){return lt("Node",t,"childNodes")}function qf(t){return lt("Node",t,"parentNode")}function Vf(t){return lt("Node",t,"parentElement")}function Gf(t){return lt("Node",t,"textContent")}function Kf(t){return lt("Node",t,"firstChild")}function Yf(t){return lt("Node",t,"lastChild")}function Jf(t){return lt("Node",t,"nextSibling")}function Xf(t){return lt("Node",t,"previousSibling")}function Qf(t,e){return Jl("Node",t,"contains")(e)}function Zf(t){return Jl("Node",t,"getRootNode")()}function eh(t){return!t||!("host"in t)?null:lt("ShadowRoot",t,"host")}function th(t){return t.styleSheets}function rh(t){return!t||!("shadowRoot"in t)?null:lt("Element",t,"shadowRoot")}function nh(t,e){return lt("Element",t,"querySelector")(e)}function ih(t,e){return lt("Element",t,"querySelectorAll")(e)}function Xl(){const t=Ws("MutationObserver");Ua++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--Ua!==0))return;const r=fs.MutationObserver;if(r)try{r()}finally{delete Sr.MutationObserver,delete fs.MutationObserver}}]}let Or=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Or=()=>new Date().getTime());function zt(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const de={ownerDocument:zf,childNodes:Hf,parentNode:qf,parentElement:Vf,textContent:Gf,firstChild:Kf,lastChild:Yf,nextSibling:Jf,previousSibling:Xf,contains:Qf,getRootNode:Zf,host:eh,styleSheets:th,shadowRoot:rh,querySelector:nh,querySelectorAll:ih,nowTimestamp:Or,mutationObserverCtor:Xl,patch:zt};function Qe(t,e,r=document){const n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}const Zt=`Please stop import mirror directly. Instead of that,\r
|
|
59
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
60
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Wa={map:{},getId(){return console.error(Zt),-1},getNode(){return console.error(Zt),null},removeNodeFromMap(){console.error(Zt)},has(){return console.error(Zt),!1},reset(){console.error(Zt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wa=new Proxy(Wa,{get(t,e,r){return e==="map"&&console.error(Zt),Reflect.get(t,e,r)}}));function Nr(t,e,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=e-(o-i),c=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),i=o,t.apply(c,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,t.apply(c,s)},l))}}function On(t,e,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>On(t,e,s||{},!0)}function Ql(t){var e,r,n,i;const s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((e=de.parentElement(s.body))==null?void 0:e.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=de.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function Zl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ec(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function tc(t){return t?t.nodeType===t.ELEMENT_NODE?t:de.parentElement(t):null}function rt(t,e,r,n){if(!t)return!1;const i=tc(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(hn(i,e,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function sh(t,e){return e.getId(t)!==-1}function ts(t,e,r){return t.tagName==="TITLE"&&r.headTitleMutations?!0:e.getId(t)===fn}function rc(t,e){if(kr(t))return!1;const r=e.getId(t);if(!e.has(r))return!0;const n=de.parentNode(t);return n&&n.nodeType===t.DOCUMENT_NODE?!1:n?rc(n,e):!0}function hs(t){return!!t.changedTouches}function nc(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function oh(t){const e={},r=(i,s)=>{const o={value:i,parent:s,children:[]};return e[i.node.id]=o,o},n=[];for(const i of t){const{nextId:s,parentId:o}=i;if(s&&s in e){const l=e[s];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,r(i,l.parent))}else{const c=n.indexOf(l);n.splice(c,0,r(i,null))}continue}if(o in e){const l=e[o];l.children.push(r(i,l));continue}n.push(r(i,null))}return n}function ic(t,e){e(t.value);for(let r=t.children.length-1;r>=0;r--)ic(t.children[r],e)}function Ar(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function sc(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function oc(t,e){var r,n;const i=(n=(r=t.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=i.getBoundingClientRect(),o=oc(i,e),l=s.height/i.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Bt(t){return t?t instanceof pt&&"shadowRoot"in t?!!t.shadowRoot:!!de.shadowRoot(t):!1}function xr(t,e){const r=t==null?void 0:t[e[0]];return r?e.length===1?r:xr(r.cssRules,e.slice(1)):null}function za(t){const e=[...t],r=e.pop();return{positions:e,index:r}}function ah(t){const e=new Set,r=[];for(let n=t.length;n--;){const i=t[n];e.has(i.id)||(r.push(i),e.add(i.id))}return r}class ac{constructor(){$(this,"id",1),$(this,"styleIDMap",new WeakMap),$(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function lc(t){var e;let r=null;return"getRootNode"in t&&((e=de.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&de.host(de.getRootNode(t))&&(r=de.host(de.getRootNode(t))),r}function lh(t){let e=t,r;for(;r=lc(e);)e=r;return e}function ch(t){const e=de.ownerDocument(t);if(!e)return!1;const r=lh(t);return de.contains(e,r)}function ps(t){const e=de.ownerDocument(t);return e?de.contains(e,t)||ch(t):!1}var Z=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t[t.Annotation=8]="Annotation",t))(Z||{}),K=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(K||{}),Oe=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Oe||{}),Ct=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Ct||{}),Mt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Mt||{}),Dt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Dt||{}),Me=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Annotation="annotation",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(Me||{}),Rt=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Rt||{});const Ha=(t,e)=>`${t}@${e}`;class uh{constructor(){$(this,"frozen",!1),$(this,"locked",!1),$(this,"texts",[]),$(this,"attributes",[]),$(this,"attributeMap",new WeakMap),$(this,"removes",[]),$(this,"mapRemoves",[]),$(this,"movedMap",{}),$(this,"addedSet",new Set),$(this,"movedSet",new Set),$(this,"droppedSet",new Set),$(this,"removesSubTreeCache",new Set),$(this,"mutationCb"),$(this,"blockClass"),$(this,"blockSelector"),$(this,"maskTextClass"),$(this,"maskTextSelector"),$(this,"inlineStylesheet"),$(this,"maskInputOptions"),$(this,"maskTextFn"),$(this,"maskInputFn"),$(this,"keepIframeSrcFn"),$(this,"recordCanvas"),$(this,"inlineImages"),$(this,"slimDOMOptions"),$(this,"dataURLOptions"),$(this,"doc"),$(this,"mirror"),$(this,"iframeManager"),$(this,"stylesheetManager"),$(this,"shadowDomManager"),$(this,"processedNodeManager"),$(this,"unattachedDoc"),$(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),$(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet){const f=de.parentNode(d);this.removesSubTreeCache.has(f)&&!this.movedSet.has(f)||this.addedSet.add(d)}let n=null,i=null,s=-1,o=null,l=!1;const c=new Set,u=this.addedSet.values();let a=u.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(de.previousSibling(n)))o=n,n=de.previousSibling(n);else{for(this.addedSet.has(a.value)||(a=u.next()),n=a.value;;){if(i=de.parentNode(n),this.addedSet.has(i)){n=i;continue}break}if(c.has(i))i=null;else if(i){if(ps(i)?(l=qa(this.droppedSet,i)||this.removesSubTreeCache.has(i),l&&qa(this.movedSet,n)&&(l=!1)):l=!0,this.addedSet.has(de.lastChild(i)))n=de.lastChild(i),o=null;else for(;;){if(o=de.nextSibling(n),this.addedSet.has(o)){n=o;continue}break}if(s=kr(i)?this.mirror.getId(lc(n)):this.mirror.getId(i),s===-1&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=de.host(i);s=this.mirror.getId(p)}}}if(this.addedSet.delete(n),!i||s===-1){c.add(n);continue}else if(l){this.droppedSet.add(n);continue}let d=!1;if(n.nodeType===Node.TEXT_NODE){const p=i.tagName;if(p==="TEXTAREA")continue;p==="STYLE"&&r.has(s)&&(d=!0)}let f=o?this.mirror.getId(o):null;for(;f===fn;)o=o&&de.nextSibling(o),f=o&&this.mirror.getId(o);if(f===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",o),n=null;continue}const m=rr(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Ar(p,this.mirror)&&this.iframeManager.addIframe(p),sc(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Bt(n)&&this.shadowDomManager.addShadowRoot(de.shadowRoot(n),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:d});m&&(e.push({parentId:s,nextId:f,node:m}),r.add(m.id))}const h={texts:this.texts.map(d=>{const f=d.node,m=de.parentNode(f);return m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m),{id:this.mirror.getId(f),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:f}=d;if(typeof f.style=="string"){const m=JSON.stringify(d.styleDiff),p=JSON.stringify(d._unchangedStyles);m.length<f.style.length&&(m+p).split("var(").length===f.style.split("var(").length&&(f.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:f}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:e};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.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(h))}),$(this,"genTextAreaValueMutation",e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r));const n=Array.from(de.childNodes(e),i=>de.textContent(i)||"").join("");r.attributes.value=cn({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:un(e),value:n,maskInputFn:this.maskInputFn})}),$(this,"processMutation",e=>{if(!ts(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const r=de.textContent(e.target);!rt(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:xl(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,tc(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{const r=e.target,n=kt(r.tagName);let i=e.attributeName,s=e.target.getAttribute(i);if(i==="value"){const l=un(r);s=cn({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:s,maskInputFn:this.maskInputFn})}if(rt(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n==="iframe"&&i==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)i="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),i==="type"&&n==="input"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Sl(n,i))if(o.attributes[i]=wl(this.doc,n,kt(i),s),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const c of Array.from(r.style)){const u=r.style.getPropertyValue(c),a=r.style.getPropertyPriority(c);u!==l.style.getPropertyValue(c)||a!==l.style.getPropertyPriority(c)?a===""?o.styleDiff[c]=u:o.styleDiff[c]=[u,a]:o._unchangedStyles[c]=[u,a]}for(const c of Array.from(l.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}else i==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(rt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{ps(r)||this.shadowDomManager.removeShadowRootsIn(r);const n=this.mirror.getId(r),i=kr(e.target)?this.mirror.getId(de.host(e.target)):this.mirror.getId(e.target);rt(e.target,this.blockClass,this.blockSelector,!1)||ts(r,this.mirror,this.slimDOMOptions)||!sh(r,this.mirror)||(this.addedSet.has(r)?(ms(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||rc(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ha(n,i)]?ms(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:kr(e.target)&&Mr(e.target)?!0:void 0}),dh(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),$(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ts(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Ha(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);rt(e,this.blockClass,this.blockSelector,!1)||(de.childNodes(e).forEach(n=>this.genAdds(n)),Bt(e)&&de.childNodes(de.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(r=>{this[r]=e[r]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}}function ms(t,e){t.delete(e),de.childNodes(e).forEach(r=>ms(t,r))}function dh(t,e){const r=[t];for(;r.length;){const n=r.pop();e.has(n)||(e.add(n),de.childNodes(n).forEach(i=>r.push(i)))}}function qa(t,e){return t.size===0?!1:cc(t,e)}function cc(t,e){if(t.has(e))return!0;const r=de.parentNode(e);return r?cc(t,r):!1}let Ir;function fh(t){Ir=t}function hh(){Ir=void 0}const Ee=t=>Ir?(...r)=>{try{return t(...r)}catch(n){if(Ir&&Ir(n)===!0)return;throw n}}:t,sr=new Set;function Pr(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function uc(t,e){const r=new uh;sr.add(r),r.init(t);const[n,i]=Xl(),s=new n(Ee(r.processMutations.bind(r)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{s.disconnect(),sr.delete(r),i()}}function ph({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const c=Nr(Ee(h=>{const d=Date.now()-l;t(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),s),u=Ee(Nr(Ee(h=>{const d=Pr(h),{clientX:f,clientY:m}=hs(h)?h.changedTouches[0]:h;l||(l=Or()),o.push({x:f,y:m,id:n.getId(d),timeOffset:Or()-l}),c(typeof DragEvent<"u"&&h instanceof DragEvent?K.Drag:h instanceof MouseEvent?K.MouseMove:K.TouchMove)}),i,{trailing:!1})),a=[Qe("mousemove",u,r),Qe("touchmove",u,r),Qe("drag",u,r)];return Ee(()=>{a.forEach(h=>h())})}function mh({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const u=a=>h=>{const d=Pr(h);if(rt(d,n,i,!0))return;let f=null,m=a;if("pointerType"in h){switch(h.pointerType){case"mouse":f=Ct.Mouse;break;case"touch":f=Ct.Touch;break;case"pen":f=Ct.Pen;break}f===Ct.Touch?Oe[a]===Oe.MouseDown?m="TouchStart":Oe[a]===Oe.MouseUp&&(m="TouchEnd"):Ct.Pen}else hs(h)&&(f=Ct.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===Ct.Touch||m.startsWith("Mouse")&&f===Ct.Mouse)&&(f=null)):Oe[a]===Oe.Click&&(f=c,c=null);const p=hs(h)?h.changedTouches[0]:h;if(!p)return;const y=r.getId(d),{clientX:v,clientY:w}=p;Ee(t)({type:Oe[m],id:y,x:v,y:w,...f!==null&&{pointerType:f}})};return Object.keys(Oe).filter(a=>Number.isNaN(Number(a))&&!a.endsWith("_Departed")&&o[a]!==!1).forEach(a=>{let h=kt(a);const d=u(a);if(window.PointerEvent)switch(Oe[a]){case Oe.MouseDown:case Oe.MouseUp:h=h.replace("mouse","pointer");break;case Oe.TouchStart:case Oe.TouchEnd:return}l.push(Qe(h,d,e))}),Ee(()=>{l.forEach(a=>a())})}function dc({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=Ee(Nr(Ee(l=>{const c=Pr(l);if(!c||rt(c,n,i,!0))return;const u=r.getId(c);if(c===e&&e.defaultView){const a=Ql(e.defaultView);t({id:u,x:a.left,y:a.top})}else t({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return Qe("scroll",o,e)}function gh({viewportResizeCb:t},{win:e}){let r=-1,n=-1;const i=Ee(Nr(Ee(()=>{const s=Zl(),o=ec();(r!==s||n!==o)&&(t({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return Qe("resize",i,e)}const yh=["INPUT","TEXTAREA","SELECT"],Va=new WeakMap;function bh({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:a}){function h(w){let b=Pr(w);const C=w.isTrusted,S=b&&b.tagName;if(b&&S==="OPTION"&&(b=de.parentElement(b)),!b||!S||yh.indexOf(S)<0||rt(b,n,i,!0)||b.classList.contains(s)||o&&b.matches(o))return;let x=b.value,k=!1;const I=un(b)||"";I==="radio"||I==="checkbox"?k=b.checked:(l[S.toLowerCase()]||l[I])&&(x=cn({element:b,maskInputOptions:l,tagName:S,type:I,value:x,maskInputFn:c})),d(b,a?{text:x,isChecked:k,userTriggered:C}:{text:x,isChecked:k});const B=b.name;I==="radio"&&B&&k&&e.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(D=>{if(D!==b){const H=D.value;d(D,a?{text:H,isChecked:!k,userTriggered:!1}:{text:H,isChecked:!k})}})}function d(w,b){const C=Va.get(w);if(!C||C.text!==b.text||C.isChecked!==b.isChecked){Va.set(w,b);const S=r.getId(w);Ee(t)({...b,id:S})}}const m=(u.input==="last"?["change"]:["input","change"]).map(w=>Qe(w,Ee(h),e)),p=e.defaultView;if(!p)return()=>{m.forEach(w=>w())};const y=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),v=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&m.push(...v.map(w=>On(w[0],w[1],{set(){Ee(h)({target:this,isTrusted:!1})}},!1,p))),Ee(()=>{m.forEach(w=>w())})}function gn(t){const e=[];function r(n,i){if(Zr("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Zr("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Zr("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Zr("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(t,e)}function Nt(t,e,r){let n,i;return t?(t.ownerNode?n=e.getId(t.ownerNode):i=r.getId(t),{styleId:i,id:n}):{}}function vh({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Ee((a,h,d)=>{const[f,m]=d,{id:p,styleId:y}=Nt(h,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&t({id:p,styleId:y,adds:[{rule:f,index:m}]}),a.apply(h,d)})}),n.CSSStyleSheet.prototype.addRule=function(a,h,d=this.cssRules.length){const f=`${a} { ${h} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Nt(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,removes:[{index:f}]}),a.apply(h,d)})}),n.CSSStyleSheet.prototype.removeRule=function(a){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[a])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Nt(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replace:f}),a.apply(h,d)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Nt(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replaceSync:f}),a.apply(h,d)})}));const c={};en("CSSGroupingRule")?c.CSSGroupingRule=n.CSSGroupingRule:(en("CSSMediaRule")&&(c.CSSMediaRule=n.CSSMediaRule),en("CSSConditionRule")&&(c.CSSConditionRule=n.CSSConditionRule),en("CSSSupportsRule")&&(c.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(c).forEach(([a,h])=>{u[a]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[a].insertRule,{apply:Ee((d,f,m)=>{const[p,y]=m,{id:v,styleId:w}=Nt(f.parentStyleSheet,e,r.styleMirror);return(v&&v!==-1||w&&w!==-1)&&t({id:v,styleId:w,adds:[{rule:p,index:[...gn(f),y||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(u[a].deleteRule,{apply:Ee((d,f,m)=>{const[p]=m,{id:y,styleId:v}=Nt(f.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||v&&v!==-1)&&t({id:y,styleId:v,removes:[{index:[...gn(f),p]}]}),d.apply(f,m)})})}),Ee(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=s,o&&(n.CSSStyleSheet.prototype.replace=o),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([a,h])=>{h.prototype.insertRule=u[a].insertRule,h.prototype.deleteRule=u[a].deleteRule})})}function fc({mirror:t,stylesheetManager:e},r){var n,i,s;let o=null;r.nodeName==="#document"?o=t.getId(r):o=t.getId(de.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,c=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var u;return(u=c.get)==null?void 0:u.call(this)},set(u){var a;const h=(a=c.set)==null?void 0:a.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),Ee(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function wh({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ee((l,c,u)=>{var a;const[h,d,f]=u;if(r.has(h))return s.apply(c,[h,d,f]);const{id:m,styleId:p}=Nt((a=c.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,set:{property:h,value:d,priority:f},index:gn(c.parentRule)}),l.apply(c,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Ee((l,c,u)=>{var a;const[h]=u;if(r.has(h))return o.apply(c,[h]);const{id:d,styleId:f}=Nt((a=c.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:h},index:gn(c.parentRule)}),l.apply(c,u)})}),Ee(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Sh({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=Ee(c=>Nr(Ee(u=>{const a=Pr(u);if(!a||rt(a,e,r,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:p}=a;t({type:c,id:n.getId(a),currentTime:h,volume:d,muted:f,playbackRate:m,loop:p})}),i.media||500)),l=[Qe("play",o(Dt.Play),s),Qe("pause",o(Dt.Pause),s),Qe("seeked",o(Dt.Seeked),s),Qe("volumechange",o(Dt.VolumeChange),s),Qe("ratechange",o(Dt.RateChange),s)];return Ee(()=>{l.forEach(c=>c())})}function xh({fontCb:t,doc:e}){const r=e.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(c,u,a){const h=new s(c,u,a);return i.set(h,{family:c,buffer:typeof u!="string",descriptors:a,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=zt(e.fonts,"add",function(l){return function(c){return setTimeout(Ee(()=>{const u=i.get(c);u&&(t(u),i.delete(c))}),0),l.apply(this,[c])}});return n.push(()=>{r.FontFace=s}),n.push(o),Ee(()=>{n.forEach(l=>l())})}function Ch(t){const{doc:e,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=t;let o=!0;const l=Ee(()=>{const c=e.getSelection();if(!c||o&&(c!=null&&c.isCollapsed))return;o=c.isCollapsed||!1;const u=[],a=c.rangeCount||0;for(let h=0;h<a;h++){const d=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:p,endOffset:y}=d;rt(f,n,i,!0)||rt(p,n,i,!0)||u.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:y})}s({ranges:u})});return l(),Qe("selectionchange",l)}function Rh({doc:t,customElementCb:e}){const r=t.defaultView;return!r||!r.customElements?()=>{}:zt(r.customElements,"define",function(i){return function(s,o,l){try{e({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function Eh(t,e){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:a,canvasMutationCb:h,fontCb:d,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),r(...p)},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p)},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),s(...p)},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},t.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),a(...p)},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},t.fontCb=(...p)=>{e.font&&e.font(...p),d(...p)},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),f(...p)},t.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p)}}function kh(t,e={}){const r=t.doc.defaultView;if(!r)return()=>{};Eh(t,e);let n;t.recordDOM&&(n=uc(t,t.doc));const i=ph(t),s=mh(t),o=dc(t),l=gh(t,{win:r}),c=bh(t),u=Sh(t);let a=()=>{},h=()=>{},d=()=>{},f=()=>{};t.recordDOM&&(a=vh(t,{win:r}),h=fc(t,t.doc),d=wh(t,{win:r}),t.collectFonts&&(f=xh(t)));const m=Ch(t),p=Rh(t),y=[];for(const v of t.plugins)y.push(v.observer(v.callback,r,v.options));return Ee(()=>{n==null||n(),i(),s(),o(),l(),c(),u(),a(),h(),d(),f(),m(),p(),y.forEach(v=>v())})}function Zr(t){return typeof window[t]<"u"}function en(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Ga{constructor(e){$(this,"iframeIdToRemoteIdMap",new WeakMap),$(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,r,n,i){const s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(e,r){const n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return r.map(s=>this.getId(e,s,n,i))}getRemoteId(e,r,n){const i=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(e,r){const n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}}class Mh{constructor(e){$(this,"iframes",new WeakMap),$(this,"crossOriginIframeMap",new WeakMap),$(this,"crossOriginIframeMirror",new Ga(vl)),$(this,"crossOriginIframeStyleMirror"),$(this,"crossOriginIframeRootIdMap",new WeakMap),$(this,"mirror"),$(this,"mutationCb"),$(this,"wrappedEmit"),$(this,"loadListener"),$(this,"unloadListener"),$(this,"attachedWindows",new Map),$(this,"messageHandler",r=>this.handleMessage(r)),$(this,"stylesheetManager"),$(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ga(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addUnloadListener(e){this.unloadListener=e}attachIframe(e,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(e),(n=this.loadListener)==null||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(e=>e())}watchIframeWindow(e){const r=e.contentWindow;if(!r||this.attachedWindows.has(r))return;const n=[],i=()=>{this.attachedWindows.delete(r),n.forEach(s=>{try{s()}catch{}})};this.attachedWindows.set(r,i),this.recordCrossOriginIframes&&n.push(Qe("message",this.messageHandler,r)),n.push(Qe("pagehide",s=>{var o;if(s.persisted)return;const l=r.document;i(),(o=this.unloadListener)==null||o.call(this,l)},r))}handleMessage(e){const r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case Z.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:Z.IncrementalSnapshot,data:{source:K.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Annotation:case Z.Plugin:return r;case Z.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case Z.IncrementalSnapshot:switch(r.data.source){case K.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case K.Drag:case K.TouchMove:case K.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case K.ViewportResize:return!1;case K.MediaInteraction:case K.MouseInteraction:case K.Scroll:case K.CanvasMutation:case K.Input:return this.replaceIds(r.data,e,["id"]),r;case K.StyleSheetRule:case K.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case K.Font:return r;case K.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),r;case K.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),r}}return!1}replace(e,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=e.getIds(n,r[s]):r[s]=e.getId(n,r[s]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(e,r){e.type!==Rt.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class Th{constructor(e){$(this,"shadowDoms",new Map),$(this,"mutationCb"),$(this,"scrollCb"),$(this,"bypassOptions"),$(this,"mirror"),$(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,r){if(!Mr(e)||this.shadowDoms.has(e))return;const n=[];this.shadowDoms.set(e,n);const i=uc({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(i),n.push(dc({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(de.host(e))),n.push(fc({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRootsIn(e){if(this.shadowDoms.size===0)return;const r=de.shadowRoot(e);r&&(this.shadowDoms.has(r)&&this.removeShadowRoot(r),this.removeShadowRootsIn(r)),de.childNodes(e).forEach(n=>this.removeShadowRootsIn(n))}removeShadowRoot(e){const r=this.shadowDoms.get(e);this.shadowDoms.delete(e),r==null||r.forEach(rs)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){const n=this;this.restoreHandlers.push(zt(e.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=de.shadowRoot(this);return l&&ps(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(rs),this.restoreHandlers=[];const e=this.shadowDoms;this.shadowDoms=new Map,e.forEach(r=>r.forEach(rs))}}function rs(t){try{t()}catch{}}var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var tn=0;tn<nr.length;tn++)Cr[nr.charCodeAt(tn)]=tn;var Ah=function(t){var e=new Uint8Array(t),r,n=e.length,i="";for(r=0;r<n;r+=3)i+=nr[e[r]>>2],i+=nr[(e[r]&3)<<4|e[r+1]>>4],i+=nr[(e[r+1]&15)<<2|e[r+2]>>6],i+=nr[e[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Ih=function(t){var e=t.length*.75,r=t.length,n,i=0,s,o,l,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var u=new ArrayBuffer(e),a=new Uint8Array(u);for(n=0;n<r;n+=4)s=Cr[t.charCodeAt(n)],o=Cr[t.charCodeAt(n+1)],l=Cr[t.charCodeAt(n+2)],c=Cr[t.charCodeAt(n+3)],a[i++]=s<<2|o>>4,a[i++]=(o&15)<<4|l>>2,a[i++]=(l&3)<<6|c&63;return u};const Ka=new Map;function Oh(t,e){let r=Ka.get(t);return r||(r=new Map,Ka.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}const hc=(t,e,r)=>{if(!t||!(mc(t,e)||typeof t=="object"))return;const n=t.constructor.name,i=Oh(r,n);let s=i.indexOf(t);return s===-1&&(s=i.length,i.push(t)),s};function sn(t,e,r){if(t instanceof Array)return t.map(n=>sn(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const n=t.constructor.name,i=Ah(t);return{rr_type:n,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[sn(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const n=t.constructor.name,{src:i}=t;return{rr_type:n,src:i}}else if(t instanceof HTMLCanvasElement){const n="HTMLImageElement",i=t.toDataURL();return{rr_type:n,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[sn(t.data,e,r),t.width,t.height]};if(mc(t,e)||typeof t=="object"){const n=t.constructor.name,i=hc(t,e,r);return{rr_type:n,index:i}}}}return t}const pc=(t,e,r)=>t.map(n=>sn(n,e,r)),mc=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>t instanceof e[i]);function Nh(t,e,r,n){const i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=zt(e.CanvasRenderingContext2D.prototype,o,function(c){return function(...u){return rt(this.canvas,r,n,!0)||setTimeout(()=>{const a=pc(u,e,this);t(this.canvas,{type:Mt["2D"],property:o,args:a})},0),c.apply(this,u)}});i.push(l)}catch{const l=On(e.CanvasRenderingContext2D.prototype,o,{set(c){t(this.canvas,{type:Mt["2D"],property:o,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Dh(t){return t==="experimental-webgl"?"webgl":t}function Ya(t,e,r,n){const i=[];try{const s=zt(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...c){if(!rt(this,e,r,!0)){const u=Dh(l);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(c[0]&&typeof c[0]=="object"){const a=c[0];a.preserveDrawingBuffer||(a.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...c])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function Ja(t,e,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(t);for(const c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const u=zt(t,c,function(a){return function(...h){const d=a.apply(this,h);if(hc(d,s,this),"tagName"in this.canvas&&!rt(this.canvas,n,i,!0)){const f=pc(h,s,this),m={type:e,property:c,args:f};r(this.canvas,m)}return d}});o.push(u)}catch{const u=On(t,c,{set(a){r(this.canvas,{type:e,property:c,args:[a],setter:!0})}});o.push(u)}return o}function _h(t,e,r,n){const i=[];return typeof e.WebGLRenderingContext<"u"&&i.push(...Ja(e.WebGLRenderingContext.prototype,Mt.WebGL,t,r,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Ja(e.WebGL2RenderingContext.prototype,Mt.WebGL2,t,r,n,e)),()=>{i.forEach(s=>s())}}const gc=`(function() {
|
|
61
|
+
"use strict";
|
|
62
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
63
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
64
|
+
for (var i = 0; i < chars.length; i++) {
|
|
65
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
66
|
+
}
|
|
67
|
+
var encode = function(arraybuffer) {
|
|
68
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
69
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
70
|
+
base64 += chars[bytes[i2] >> 2];
|
|
71
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
72
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
73
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
74
|
+
}
|
|
75
|
+
if (len % 3 === 2) {
|
|
76
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
77
|
+
} else if (len % 3 === 1) {
|
|
78
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
79
|
+
}
|
|
80
|
+
return base64;
|
|
81
|
+
};
|
|
82
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
83
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
84
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
85
|
+
const id = \`\${width}-\${height}\`;
|
|
86
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
87
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
88
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
89
|
+
offscreen.getContext("2d");
|
|
90
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
91
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
92
|
+
const base64 = encode(arrayBuffer);
|
|
93
|
+
transparentBlobMap.set(id, base64);
|
|
94
|
+
return base64;
|
|
95
|
+
} else {
|
|
96
|
+
return "";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const worker = self;
|
|
100
|
+
worker.onmessage = async function(e) {
|
|
101
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
102
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
103
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
104
|
+
width,
|
|
105
|
+
height,
|
|
106
|
+
dataURLOptions
|
|
107
|
+
);
|
|
108
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
109
|
+
const ctx = offscreen.getContext("2d");
|
|
110
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
111
|
+
bitmap.close();
|
|
112
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
113
|
+
const type = blob.type;
|
|
114
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
115
|
+
const base64 = encode(arrayBuffer);
|
|
116
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
117
|
+
lastBlobMap.set(id, base64);
|
|
118
|
+
return worker.postMessage({ id });
|
|
119
|
+
}
|
|
120
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
121
|
+
worker.postMessage({
|
|
122
|
+
id,
|
|
123
|
+
type,
|
|
124
|
+
base64,
|
|
125
|
+
width,
|
|
126
|
+
height
|
|
127
|
+
});
|
|
128
|
+
lastBlobMap.set(id, base64);
|
|
129
|
+
} else {
|
|
130
|
+
return worker.postMessage({ id: e.data.id });
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
})();
|
|
134
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
135
|
+
`,Xa=typeof self<"u"&&self.Blob&&new Blob([gc],{type:"text/javascript;charset=utf-8"});function Lh(t){let e;try{if(e=Xa&&(self.URL||self.webkitURL).createObjectURL(Xa),!e)throw"";const r=new Worker(e,{name:t==null?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(gc),{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class Ph{constructor(e){$(this,"pendingCanvasMutations",new Map),$(this,"rafStamps",{latestId:0,invokeId:null}),$(this,"mirror"),$(this,"mutationCb"),$(this,"resetObservers"),$(this,"frozen",!1),$(this,"locked",!1),$(this,"processMutation",(c,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(u)});const{sampling:r="all",win:n,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&r==="all"&&this.initCanvasMutationObserver(n,i,s),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,s,{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,r,n,i,s){const o=Ya(r,n,i,!0),l=new Map,c=new Lh;c.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:y,type:v,width:w,height:b}=m.data;this.mutationCb({id:p,type:Mt["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:v}]},0,0]}]})};const u=1e3/e;let a=0,h;const d=()=>{const m=[];return r.document.querySelectorAll("canvas").forEach(p=>{rt(p,n,i,!0)||m.push(p)}),m},f=m=>{if(a&&m-a<u){h=requestAnimationFrame(f);return}a=m,d().forEach(async p=>{var y;const v=this.mirror.getId(p);if(l.get(v)||p.width===0||p.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(p.__context)){const b=p.getContext(p.__context);((y=b==null?void 0:b.getContextAttributes())==null?void 0:y.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const w=await createImageBitmap(p);c.postMessage({id:v,bitmap:w,width:p.width,height:p.height,dataURLOptions:s.dataURLOptions},[w])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Ya(e,r,n,!1),s=Nh(this.processMutation.bind(this),e,r,n),o=_h(this.processMutation.bind(this),e,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;const i=n.map(o=>{const{type:l,...c}=o;return c}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(e)}}class $h{constructor(e){$(this,"trackedLinkElements",new WeakSet),$(this,"mutationCb"),$(this,"adoptedStyleSheetCb"),$(this,"styleMirror",new ac),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,c)=>({rule:gl(l,s.href),index:c}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class jh{constructor(){$(this,"nodeMap",new WeakMap),$(this,"active",!1)}inOtherBuffer(e,r){const n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==r)}add(e,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}destroy(){}}let He,on,Ot,Dr=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((bo=t.contentWindow)==null?void 0:bo.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const ut=yl();function ht(t={}){const{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:a=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:y,packFn:v,sampling:w={},dataURLOptions:b={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:x=!1,recordCrossOriginIframes:k=!1,recordAfter:I=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:B=!1,collectFonts:D=!1,inlineImages:H=!1,plugins:z,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:be=new Set([]),errorHandler:fe}=t;fh(fe);const ne=k?window.parent===window:!0;let F=!1;if(!ne)try{window.parent.document&&(F=!1)}catch{F=!0}if(ne&&!e)throw new Error("emit function is required");if(!ne&&!F)return()=>{};C!==void 0&&w.mousemove===void 0&&(w.mousemove=C),ut.reset();const ue=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},j=Cl(f);nc();let X,T=0;const U=ee=>{for(const Te of z||[])Te.eventProcessor&&(ee=Te.eventProcessor(ee));return v&&!F&&(ee=v(ee)),ee};He=(ee,Te)=>{const re=ee;if(re.timestamp=Or(),re.type!==Z.FullSnapshot&&!(re.type===Z.IncrementalSnapshot&&re.data.source===K.Mutation)){Ot.unfreeze();for(const Ue of sr)if(Ue.isFrozen())Ue.unfreeze();else break}if(ne)e==null||e(U(re),Te);else if(F){const Ue={type:"rrweb",event:U(re),origin:window.location.origin,isCheckout:Te};window.parent.postMessage(Ue,"*")}if(re.type===Z.FullSnapshot)X=re,T=0;else if(re.type===Z.IncrementalSnapshot){if(re.data.source===K.Mutation&&re.data.isAttachIframe)return;T++;const Ue=n&&T>=n,ae=r&&re.timestamp-X.timestamp>r;(Ue||ae)&&on(!0)}};const _=ee=>{He({type:Z.IncrementalSnapshot,data:{source:K.Mutation,...ee}})},te=ee=>He({type:Z.IncrementalSnapshot,data:{source:K.Scroll,...ee}}),ie=ee=>He({type:Z.IncrementalSnapshot,data:{source:K.CanvasMutation,...ee}}),xe=ee=>He({type:Z.IncrementalSnapshot,data:{source:K.AdoptedStyleSheet,...ee}}),se=new $h({mutationCb:_,adoptedStyleSheetCb:xe}),le=new Mh({mirror:ut,mutationCb:_,stylesheetManager:se,recordCrossOriginIframes:k,wrappedEmit:He});for(const ee of z||[])ee.getMirror&&ee.getMirror({nodeMirror:ut,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});const pe=new jh;Ot=new Ph({recordCanvas:x,mutationCb:ie,win:window,blockClass:i,blockSelector:s,mirror:ut,sampling:w.canvas,dataURLOptions:b});const ke=new Th({mutationCb:_,scrollCb:te,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:a,maskInputOptions:ue,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:x,inlineImages:H,sampling:w,slimDOMOptions:j,iframeManager:le,stylesheetManager:se,canvasManager:Ot,keepIframeSrcFn:A,processedNodeManager:pe},mirror:ut});on=(ee=!1)=>{if(!S)return;He({type:Z.Meta,data:{href:window.location.href,width:ec(),height:Zl()}},ee),se.reset(),ke.init(),Ot.lock(),sr.forEach(re=>re.lock());const Te=nd(document,{mirror:ut,blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:a,maskAllInputs:ue,maskTextFn:p,maskInputFn:m,slimDOM:j,dataURLOptions:b,recordCanvas:x,inlineImages:H,onSerialize:re=>{Ar(re,ut)&&le.addIframe(re),sc(re,ut)&&se.trackLinkElement(re),Bt(re)&&ke.addShadowRoot(de.shadowRoot(re),document)},onIframeLoad:(re,Ue)=>{le.attachIframe(re,Ue),ke.observeAttachShadow(re)},onStylesheetLoad:(re,Ue)=>{se.attachLinkElement(re,Ue)},keepIframeSrcFn:A});if(!Te)return console.warn("Failed to snapshot the document");He({type:Z.FullSnapshot,data:{node:Te,initialOffset:Ql(window)}},ee),Ot.unlock(),sr.forEach(re=>re.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&se.adoptStyleSheets(document.adoptedStyleSheets,ut.getId(document))};try{const ee=[],Te=ae=>{var Pe;return Ee(kh)({mutationCb:_,mousemoveCb:(ve,gt)=>He({type:Z.IncrementalSnapshot,data:{source:gt,positions:ve}}),mouseInteractionCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.MouseInteraction,...ve}}),scrollCb:te,viewportResizeCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.ViewportResize,...ve}}),inputCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.Input,...ve}}),mediaInteractionCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.MediaInteraction,...ve}}),styleSheetRuleCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.StyleSheetRule,...ve}}),styleDeclarationCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.StyleDeclaration,...ve}}),canvasMutationCb:ie,fontCb:ve=>He({type:Z.IncrementalSnapshot,data:{source:K.Font,...ve}}),selectionCb:ve=>{He({type:Z.IncrementalSnapshot,data:{source:K.Selection,...ve}})},customElementCb:ve=>{He({type:Z.IncrementalSnapshot,data:{source:K.CustomElement,...ve}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:ue,inlineStylesheet:a,sampling:w,recordDOM:S,recordCanvas:x,inlineImages:H,userTriggeredOnInput:B,collectFonts:D,doc:ae,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:A,blockSelector:s,slimDOMOptions:j,dataURLOptions:b,mirror:ut,iframeManager:le,stylesheetManager:se,shadowDomManager:ke,processedNodeManager:pe,canvasManager:Ot,ignoreCSSAttributes:be,plugins:((Pe=z==null?void 0:z.filter(ve=>ve.observer))==null?void 0:Pe.map(ve=>({observer:ve.observer,options:ve.options,callback:gt=>He({type:Z.Plugin,data:{plugin:ve.name,payload:gt}})})))||[]},y)},re=new Map;le.addLoadListener(ae=>{try{const Pe=ae.contentDocument;if(re.has(Pe))return;re.set(Pe,Te(Pe))}catch(Pe){console.warn(Pe)}}),le.addUnloadListener(ae=>{const Pe=re.get(ae);Pe&&(re.delete(ae),Pe(),ke.removeShadowRootsIn(ae),ut.removeNodeFromMap(ae))});const Ue=()=>{on(),ee.push(Te(document)),Dr=!0};return["interactive","complete"].includes(document.readyState)?Ue():(ee.push(Qe("DOMContentLoaded",()=>{He({type:Z.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&Ue()})),ee.push(Qe("load",()=>{He({type:Z.Load,data:{}}),I==="load"&&Ue()},window))),()=>{[...ee,...re.values()].forEach(ae=>{try{ae()}catch(Pe){String(Pe).toLowerCase().includes("cross-origin")||console.warn(Pe)}}),re.clear(),le.destroy(),pe.destroy(),ke.reset(),Ot.reset(),Dr=!1,hh()}}catch(ee){console.warn(ee)}}ht.addCustomEvent=(t,e)=>{if(!Dr)throw new Error("please add custom event after start recording");He({type:Z.Custom,data:{tag:t,payload:e}})};ht.addAnnotation=t=>{if(!Dr)throw new Error("please add annotation after recording started");He({type:Z.Annotation,data:t})};ht.freezePage=()=>{Ot.freeze(),sr.forEach(t=>t.freeze())};ht.takeFullSnapshot=t=>{if(!Dr)throw new Error("please take full snapshot after start recording");on(t)};ht.mirror=ut;function Bh(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}function Fh(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;const r=t.HTMLElement||t.Element,n=468,i={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;function o(v){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(v)}const l=o(t.navigator.userAgent)?1:0;function c(v,w){this.scrollLeft=v,this.scrollTop=w}function u(v){return .5*(1-Math.cos(Math.PI*v))}function a(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(v,w){if(w==="Y")return v.clientHeight+l<v.scrollHeight;if(w==="X")return v.clientWidth+l<v.scrollWidth}function d(v,w){const b=t.getComputedStyle(v,null)["overflow"+w];return b==="auto"||b==="scroll"}function f(v){const w=h(v,"Y")&&d(v,"Y"),b=h(v,"X")&&d(v,"X");return w||b}function m(v){for(;v!==e.body&&f(v)===!1;)v=v.parentNode||v.host;return v}function p(v){const w=s();let b,C,S,x=(w-v.startTime)/n;x=x>1?1:x,b=u(x),C=v.startX+(v.x-v.startX)*b,S=v.startY+(v.y-v.startY)*b,v.method.call(v.scrollable,C,S),(C!==v.x||S!==v.y)&&t.requestAnimationFrame(p.bind(t,v))}function y(v,w,b){let C,S,x,k;const I=s();v===e.body?(C=t,S=t.scrollX||t.pageXOffset,x=t.scrollY||t.pageYOffset,k=i.scroll):(C=v,S=v.scrollLeft,x=v.scrollTop,k=c),p({scrollable:C,method:k,startTime:I,startX:S,startY:x,x:w,y:b})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(a(arguments[0])===!0){i.scroll.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:t.scrollY||t.pageYOffset);return}y.call(t,e.body,arguments[0].left!==void 0?~~arguments[0].left:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:t.scrollY||t.pageYOffset)}},t.scrollBy=function(){if(arguments[0]!==void 0){if(a(arguments[0])){i.scrollBy.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}y.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(a(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,w=arguments[0].top;y.call(this,this,typeof v>"u"?this.scrollLeft:~~v,typeof w>"u"?this.scrollTop:~~w)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(a(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(a(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=m(this),w=v.getBoundingClientRect(),b=this.getBoundingClientRect();v!==e.body?(y.call(this,v,v.scrollLeft+b.left-w.left,v.scrollTop+b.top-w.top),t.getComputedStyle(v).position!=="fixed"&&t.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):t.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class Uh{constructor(e=[],r){$(this,"timeOffset",0),$(this,"speed"),$(this,"actions"),$(this,"raf",null),$(this,"lastTimestamp"),this.actions=e,this.speed=r.speed}addAction(e){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const n=this.findActionIndex(e);this.actions.splice(n,0,e)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let r=0,n=this.actions.length-1;for(;r<=n;){const i=Math.floor((r+n)/2);if(this.actions[i].delay<e.delay)r=i+1;else if(this.actions[i].delay>e.delay)n=i-1;else return i+1}return r}}function Qa(t,e){if(t.type===Z.IncrementalSnapshot&&t.data.source===K.MouseMove&&t.data.positions&&t.data.positions.length){const r=t.data.positions[0].timeOffset,n=t.timestamp+r;return t.delay=n-e,n-e}return t.delay=t.timestamp-e,t.delay}/*! *****************************************************************************
|
|
136
|
+
Copyright (c) Microsoft Corporation.
|
|
137
|
+
|
|
138
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
139
|
+
purpose with or without fee is hereby granted.
|
|
140
|
+
|
|
141
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
142
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
143
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
144
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
145
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
146
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
147
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
148
|
+
***************************************************************************** */function Za(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(e===void 0||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(l){i={error:l}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}var ir;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(ir||(ir={}));var yc={type:"xstate.init"};function ns(t){return t===void 0?[]:[].concat(t)}function er(t){return{type:"xstate.assign",assignment:t}}function el(t,e){return typeof(t=typeof t=="string"&&e&&e[t]?e[t]:t)=="string"?{type:t}:typeof t=="function"?{type:t.name,exec:t}:t}function yn(t){return function(e){return t===e}}function bc(t){return typeof t=="string"?{type:t}:t}function tl(t,e){return{value:t,context:e,actions:[],changed:!1,matches:yn(t)}}function rl(t,e,r){var n=e,i=!1;return[t.filter(function(s){if(s.type==="xstate.assign"){i=!0;var o=Object.assign({},n);return typeof s.assignment=="function"?o=s.assignment(n,r):Object.keys(s.assignment).forEach(function(l){o[l]=typeof s.assignment[l]=="function"?s.assignment[l](n,r):s.assignment[l]}),n=o,!1}return!0}),n,i]}function vc(t,e){e===void 0&&(e={});var r=Za(rl(ns(t.states[t.initial].entry).map(function(o){return el(o,e.actions)}),t.context,yc),2),n=r[0],i=r[1],s={config:t,_options:e,initialState:{value:t.initial,actions:n,context:i,matches:yn(t.initial)},transition:function(o,l){var c,u,a=typeof o=="string"?{value:o,context:t.context}:o,h=a.value,d=a.context,f=bc(l),m=t.states[h];if(m.on){var p=ns(m.on[f.type]);try{for(var y=function(F){var ue=typeof Symbol=="function"&&Symbol.iterator,j=ue&&F[ue],X=0;if(j)return j.call(F);if(F&&typeof F.length=="number")return{next:function(){return F&&X>=F.length&&(F=void 0),{value:F&&F[X++],done:!F}}};throw new TypeError(ue?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),v=y.next();!v.done;v=y.next()){var w=v.value;if(w===void 0)return tl(h,d);var b=typeof w=="string"?{target:w}:w,C=b.target,S=b.actions,x=S===void 0?[]:S,k=b.cond,I=k===void 0?function(){return!0}:k,B=C===void 0,D=C??h,H=t.states[D];if(I(d,f)){var z=Za(rl((B?ns(x):[].concat(m.exit,x,H.entry).filter(function(F){return F})).map(function(F){return el(F,s._options.actions)}),d,f),3),A=z[0],be=z[1],fe=z[2],ne=C??h;return{value:ne,context:be,actions:A,changed:C!==h||A.length>0||fe,matches:yn(ne)}}}}catch(F){c={error:F}}finally{try{v&&!v.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}}return tl(h,d)}};return s}var nl=function(t,e){return t.actions.forEach(function(r){var n=r.exec;return n&&n(t.context,e)})};function wc(t){var e=t.initialState,r=ir.NotStarted,n=new Set,i={_machine:t,send:function(s){r===ir.Running&&(e=t.transition(e,s),nl(e,bc(s)),n.forEach(function(o){return o(e)}))},subscribe:function(s){return n.add(s),s(e),{unsubscribe:function(){return n.delete(s)}}},start:function(s){if(s){var o=typeof s=="object"?s:{context:t.config.context,value:s};e={value:o.value,actions:[],context:o.context,matches:yn(o.value)}}return r=ir.Running,nl(e,yc),i},stop:function(){return r=ir.Stopped,n.clear(),i},get state(){return e},get status(){return r}};return i}function Wh(t,e){for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.type===Z.Meta&&n.timestamp<=e)return t.slice(r)}return t}function zh(t,{getCastFn:e,applyEventsSynchronously:r,emitter:n}){const i=vc({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:er({lastPlayedEvent:(s,o)=>o.type==="CAST_EVENT"?o.payload.event:s.lastPlayedEvent}),recordTimeOffset:er((s,o)=>{let l=s.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),{...s,timeOffset:l,baselineTime:s.events[0].timestamp+l}}),play(s){var o;const{timer:l,events:c,baselineTime:u,lastPlayedEvent:a}=s;l.clear();for(const m of c)Qa(m,u);const h=Wh(c,u);let d=a==null?void 0:a.timestamp;(a==null?void 0:a.type)===Z.IncrementalSnapshot&&a.data.source===K.MouseMove&&(d=a.timestamp+((o=a.data.positions[0])==null?void 0:o.timeOffset)),u<(d||0)&&n.emit(Me.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<u&&(m.timestamp<=d||m===a)))if(m.timestamp<u)f.push(m);else{const p=e(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(f),n.emit(Me.Flush),l.start()},pause(s){s.timer.clear()},resetLastPlayedEvent:er(s=>({...s,lastPlayedEvent:null})),startLive:er({baselineTime:(s,o)=>(s.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:er((s,o)=>{const{baselineTime:l,timer:c,events:u}=s;if(o.type==="ADD_EVENT"){const{event:a}=o.payload;Qa(a,l);let h=u.length-1;if(!u[h]||u[h].timestamp<=a.timestamp)u.push(a);else{let m=-1,p=0;for(;p<=h;){const y=Math.floor((p+h)/2);u[y].timestamp<=a.timestamp?p=y+1:h=y-1}m===-1&&(m=p),u.splice(m,0,a)}const d=a.timestamp<l,f=e(a,d);d?f():c.isActive()&&c.addAction({doAction:()=>{f()},delay:a.delay})}return{...s,events:u}})}});return wc(i)}function Hh(t){const e=vc({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,n)=>{"payload"in n&&r.timer.setSpeed(n.payload.speed)},recordSpeed:er({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return wc(e)}const qh=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"],il=new Map;function Sc(t,e){let r=il.get(t);return r||(r=new Map,il.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}function _t(t,e,r){return async n=>{if(n&&typeof n=="object"&&"rr_type"in n)if(r&&(r.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){const i=await _t(t,e,r)(n.args);return await createImageBitmap.apply(null,i)}else if("index"in n){if(r||e===null)return n;const{rr_type:i,index:s}=n;return Sc(e,i)[s]}else if("args"in n){const{rr_type:i,args:s}=n,o=window[i];return new o(...await Promise.all(s.map(_t(t,e,r))))}else{if("base64"in n)return Ih(n.base64);if("src"in n){const i=t.get(n.src);if(i)return i;{const s=new Image;return s.src=n.src,t.set(n.src,s),s}}else if("data"in n&&n.rr_type==="Blob"){const i=await Promise.all(n.data.map(_t(t,e,r)));return new Blob(i,{type:n.type})}}else if(Array.isArray(n))return await Promise.all(n.map(_t(t,e,r)));return n}}function Vh(t,e){try{return e===Mt.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch{return null}}const Gh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Kh(t,e){if(!(e!=null&&e.constructor))return;const{name:r}=e.constructor;if(!Gh.includes(r))return;const n=Sc(t,r);n.includes(e)||n.push(e)}async function Yh({mutation:t,target:e,type:r,imageMap:n,errorHandler:i}){try{const s=Vh(e,r);if(!s)return;if(t.setter){s[t.property]=t.args[0];return}const o=s[t.property],l=await Promise.all(t.args.map(_t(n,s))),c=o.apply(s,l);Kh(s,c);const u=!1}catch(s){i(t,s)}}async function Jh({event:t,mutations:e,target:r,imageMap:n,errorHandler:i}){const s=r.getContext("2d");if(!s){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async c=>Promise.all(c.args.map(_t(n,s))));(await Promise.all(o)).forEach((c,u)=>{const a=e[u];try{if(a.setter){s[a.property]=a.args[0];return}const h=s[a.property];a.property==="drawImage"&&typeof a.args[0]=="string"?(n.get(t),h.apply(s,a.args)):h.apply(s,c)}catch(h){i(a,h)}})}async function sl({event:t,mutation:e,target:r,imageMap:n,canvasEventMap:i,errorHandler:s}){try{const o=i.get(t)||e,l="commands"in o?o.commands:[o];if([Mt.WebGL,Mt.WebGL2].includes(e.type)){for(let c=0;c<l.length;c++){const u=l[c];await Yh({mutation:u,type:e.type,target:r,imageMap:n,errorHandler:s})}return}await Jh({event:t,mutations:l,target:r,imageMap:n,errorHandler:s})}catch(o){s(e,o)}}class Xh{constructor(e){$(this,"mediaMap",new Map),$(this,"warn"),$(this,"service"),$(this,"speedService"),$(this,"emitter"),$(this,"getCurrentTime"),$(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(Me.Start,this.start.bind(this)),this.emitter.on(Me.SkipStart,this.start.bind(this)),this.emitter.on(Me.Pause,this.pause.bind(this)),this.emitter.on(Me.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((r,n)=>{this.syncTargetWithState(n),e.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:r,mediaState:n}){if(n.isPlaying){const s=(e-n.lastInteractionTimeOffset)/1e3*n.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=n.currentTimeAtLastInteraction+s;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const r=()=>{this.metadataCallbackMap.delete(e);const n=this.mediaMap.get(e);n&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,r),e.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:r,mutation:n}){const i=this.mediaMap.get(e),{type:s,playbackRate:o,currentTime:l,muted:c,volume:u,loop:a}=n;return{isPlaying:s===Dt.Play||s!==Dt.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:l??(i==null?void 0:i.currentTimeAtLastInteraction)??0,lastInteractionTimeOffset:r,playbackRate:o??(i==null?void 0:i.playbackRate)??1,volume:u??(i==null?void 0:i.volume)??1,muted:c??(i==null?void 0:i.muted)??e.getAttribute("muted")===null,loop:a??(i==null?void 0:i.loop)??e.getAttribute("loop")===null}}syncTargetWithState(e){const r=this.mediaMap.get(e);if(!r)return;const{muted:n,loop:i,volume:s,isPlaying:o}=r,l=this.service.state.matches("paused"),c=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r}),e.volume!==s&&(e.volume=s),e.muted=n,e.loop=i,e.playbackRate!==c&&(e.playbackRate=c),o&&!l?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,r,n){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,s=n.getMeta(i);if(!s||!("attributes"in s))return;const o=this.service.state.matches("paused"),l=s.attributes;let c=!1;l.rr_mediaState?c=l.rr_mediaState==="played":c=i.getAttribute("autoplay")!==null,c&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let a=!1;typeof l.rr_mediaMuted=="boolean"?a=l.rr_mediaMuted:a=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:c,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:u,volume:d,muted:a,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:r,mutation:n}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:n})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function rn(t,e){if(t.nodeName!=="DIALOG"||t instanceof pt)return;const r=t,n=r.open,i=n&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=s==="modal";if(!(n&&!(i&&s==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}n&&r.close(),o&&(l?r.showModal():r.show())}}function Qh(t,e){if(t.nodeName!=="DIALOG"||t instanceof pt)return;const r=t;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}e.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const Zh=5*1e3,ep=Bh,ol="[replayer]",is={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function al(t){return t.type==Z.IncrementalSnapshot&&(t.data.source==K.TouchMove||t.data.source==K.MouseInteraction&&t.data.type==Oe.TouchStart)}class tp{constructor(e,r){if($(this,"wrapper"),$(this,"iframe"),$(this,"UNSAFE_replayCanvas",!1),$(this,"service"),$(this,"speedService"),$(this,"config"),$(this,"usingVirtualDom",!1),$(this,"virtualDom",new ar),$(this,"mouse"),$(this,"mouseTail",null),$(this,"tailPositions",[]),$(this,"emitter",ep()),$(this,"nextUserInteractionEvent"),$(this,"legacy_missingNodeRetryMap",{}),$(this,"cache",na()),$(this,"imageMap",new Map),$(this,"canvasEventMap",new Map),$(this,"mirror",yl()),$(this,"styleMirror",new ac),$(this,"mediaManager"),$(this,"firstFullSnapshot",null),$(this,"newDocumentQueue",[]),$(this,"mousePos",null),$(this,"touchActive",null),$(this,"lastMouseDownEvent",null),$(this,"lastHoveredRootNode"),$(this,"lastSelectionData",null),$(this,"constructedStyleMutations",[]),$(this,"adoptedStyleSheets",[]),$(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const c of[this.mouseTail,this.iframe])c&&(c.setAttribute("width",String(l.width)),c.setAttribute("height",String(l.height)))}),$(this,"applyEventsSynchronously",l=>{for(const c of l){switch(c.type){case Z.DomContentLoaded:case Z.Load:continue;case Z.FullSnapshot:case Z.Meta:case Z.Plugin:case Z.IncrementalSnapshot:break}this.getCastFn(c,!0)()}}),$(this,"getCastFn",(l,c=!1)=>{let u;switch(l.type){case Z.DomContentLoaded:case Z.Load:break;case Z.Annotation:u=()=>this.emitter.emit(Me.Annotation,l);break;case Z.Custom:u=()=>{this.emitter.emit(Me.CustomEvent,l)};break;case Z.Meta:u=()=>this.emitter.emit(Me.Resize,{width:l.data.width,height:l.data.height});break;case Z.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,c),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case Z.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,c),!c&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/Zh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(Me.SkipStart,d)}}};break}return()=>{u&&u();for(const d of this.config.plugins||[])d.handler&&d.handler(l,c,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Me.Finish))};let f=50;l.type===Z.IncrementalSnapshot&&l.data.source===K.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(Me.EventCast,l)}}),!(r!=null&&r.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:is,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Me.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(Me.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(c,u,a)=>{sl({event:c,mutation:u,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,u)=>{c.source===K.StyleSheetRule?this.applyStyleSheetRule(c,u):c.source===K.StyleDeclaration&&this.applyStyleDeclaration(c,u)},afterAppend:(c,u)=>{for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(c,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{pn(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(c){this.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],a=mn(u.node,this.mirror,this.virtualDom.mirror);pn(a,u.node,l,this.virtualDom.mirror),u.node=a}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,c]=this.lastMouseDownEvent;l.dispatchEvent(c)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Me.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Uh([],{speed:this.config.speed});this.service=zh({events:e.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,c)=>l.timestamp-c.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(Me.StateChange,{player:l})}),this.speedService=Hh({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(Me.StateChange,{speed:l})}),this.mediaManager=new Xh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const s=this.service.state.context.events.find(l=>l.type===Z.Meta),o=this.service.state.context.events.find(l=>l.type===Z.FullSnapshot);if(s){const{width:l,height:c}=s.data;setTimeout(()=>{this.emitter.emit(Me.Resize,{width:l,height:c})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(al)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,r){return this.emitter.on(e,r),this}off(e,r){return this.emitter.off(e,r),this}setConfig(e){Object.keys(e).forEach(r=>{e[r],this.config[r]=e[r]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:r.timestamp,totalTime:r.timestamp-e.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:r}=this.service.state.context;return e-r[0].timestamp}getMirror(){return this.mirror}play(e=0){var r,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(Me.Start)}pause(e){var r,n;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(Me.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(Me.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Me.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const r=this.config.unpackFn?this.config.unpackFn(e):e;al(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=na()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Id({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Fh(this.iframe.contentWindow,this.iframe.contentDocument),nc(this.iframe.contentWindow))}rebuildFullSnapshot(e,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const n=[],i=new Set,s=(c,u)=>{if(c.nodeName==="DIALOG"&&i.add(c),this.collectIframeAndAttachDocument(n,c),this.mediaManager.isSupportedMediaElement(c)){const{events:a}=this.service.state.context;this.mediaManager.addMediaElements(c,e.timestamp-a[0].timestamp,this.mirror)}for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(c,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Ad(e.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),s(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:c,builtNode:u}of n)this.attachDocumentToIframe(c,u),this.newDocumentQueue=this.newDocumentQueue.filter(a=>a!==c);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(c=>rn(c)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Me.FullsnapshotRebuilded,e),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,r){var n;const i=qh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Yl(s,this.virtualDom.unserializedId)),e.insertBefore(s,r),s.rules.push({source:K.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const s=document.createElement("style");e.insertBefore(s,r);for(let o=0;o<i.length;o++)(n=s.sheet)==null||n.insertRule(i[o],o)}}attachDocumentToIframe(e,r){const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],s=new Set,o=(l,c)=>{l.nodeName==="DIALOG"&&s.add(l),this.collectIframeAndAttachDocument(i,l);const u=n.getMeta(l);if((u==null?void 0:u.type)===Rt.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:a,head:h}=r.contentDocument;this.insertStyleRules(a,h)}if(!this.usingVirtualDom)for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(l,{id:c,replayer:this})};Tr(e.node,{doc:r.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:c}of i)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);s.forEach(l=>rn(l))}collectIframeAndAttachDocument(e,r){if(Ar(r,this.mirror)){const n=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));n&&e.push({mutationInQueue:n,builtNode:r})}}waitForStylesheetLoad(){var e;const r=(e=this.iframe.contentDocument)==null?void 0:e.head;if(r){const n=new Set;let i,s=this.service.state;const o=()=>{s=this.service.state};this.emitter.on(Me.Start,o),this.emitter.on(Me.Pause,o);const l=()=>{this.emitter.off(Me.Start,o),this.emitter.off(Me.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(n.add(c),c.addEventListener("load",()=>{n.delete(c),n.size===0&&i!==-1&&(s.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Me.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Me.LoadStylesheetStart),i=setTimeout(()=>{s.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const r of this.service.state.context.events)r.type===Z.IncrementalSnapshot&&r.data.source===K.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(e)}preloadImages(e,r){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(r)){const n=document.createElement("canvas"),i=n.getContext("2d"),s=i==null?void 0:i.createImageData(n.width,n.height);i==null||i.putImageData(s,0,0)}}async deserializeAndPreloadCanvasEvents(e,r){if(!this.canvasEventMap.has(r)){const n={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async s=>{const o=await Promise.all(s.args.map(_t(this.imageMap,null,n)));return{...s,args:o}}));n.isUnchanged===!1&&this.canvasEventMap.set(r,{...e,commands:i})}else{const i=await Promise.all(e.args.map(_t(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(r,{...e,args:i})}}}applyIncremental(e,r){var n,i,s;const{data:o}=e;switch(o.source){case K.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case K.Drag:case K.TouchMove:case K.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const c={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(c)}),this.timer.addAction({doAction(){},delay:e.delay-((n=o.positions[0])==null?void 0:n.timeOffset)});break;case K.MouseInteraction:{if(o.id===-1)break;const l=new Event(kt(Oe[o.type])),c=this.mirror.getNode(o.id);if(!c)return this.debugNodeNotFound(o,o.id);this.emitter.emit(Me.MouseInteraction,{type:o.type,target:c});const{triggerFocus:u}=this.config;switch(o.type){case Oe.Blur:"blur"in c&&c.blur();break;case Oe.Focus:u&&c.focus&&c.focus({preventScroll:!0});break;case Oe.Click:case Oe.TouchStart:case Oe.TouchEnd:case Oe.MouseDown:case Oe.MouseUp:r?(o.type===Oe.TouchStart?this.touchActive=!0:o.type===Oe.TouchEnd&&(this.touchActive=!1),o.type===Oe.MouseDown?this.lastMouseDownEvent=[c,l]:o.type===Oe.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===Oe.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===Oe.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===Oe.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===Oe.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(l));break;case Oe.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(l)}break}case K.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case K.ViewportResize:this.emitter.emit(Me.Resize,{width:o.width,height:o.height});break;case K.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case K.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const c=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:c,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case K.StyleSheetRule:case K.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case K.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);sl({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case K.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(s=this.iframe.contentDocument)==null||s.fonts.add(l)}catch(l){this.warn(l)}break}case K.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case K.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Bf(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const a=this.legacy_missingNodeRetryMap[u],h=Kl(a.node,this.virtualDom,this.mirror);h&&(a.node=h)}catch(a){this.warn(a)}const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>n.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return;let d=n.getNode(u.parentId);if(!d)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Bt(d)&&(d=d.shadowRoot),n.removeNodeFromMap(h),d)try{d.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&d.nodeName==="STYLE"&&((a=d.rules)==null?void 0:a.length)>0&&(d.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw f}});const i={...this.legacy_missingNodeRetryMap},s=[],o=u=>{let a=null;return u.nextId&&(a=n.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!a},l=u=>{var a,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=n.getNode(u.parentId);if(!d)return u.node.type===Rt.Document?this.newDocumentQueue.push(u):s.push(u);u.node.isShadow&&(Bt(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(u.previousId&&(f=n.getNode(u.previousId)),u.nextId&&(m=n.getNode(u.nextId)),o(u))return s.push(u);if(u.node.rootId&&!n.getNode(u.node.rootId))return;const p=u.node.rootId?n.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ar(d,n)){this.attachDocumentToIframe(u,d);return}const y=(b,C)=>{if(!this.usingVirtualDom){rn(b);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(b,{id:C,replayer:this})}},v=Tr(u.node,{doc:p,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:y});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:v,mutation:u};return}const w=n.getMeta(d);if(w&&w.type===Rt.Element&&u.node.type===Rt.Text){const b=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(w.tagName==="textarea")for(const C of b)C.nodeType===d.TEXT_NODE&&d.removeChild(C);else if(w.tagName==="style"&&b.length===1)for(const C of b)C.nodeType===d.TEXT_NODE&&!n.hasNode(C)&&(v.textContent=C.textContent,d.removeChild(C))}else if((w==null?void 0:w.type)===Rt.Document){const b=d;u.node.type===Rt.DocumentType&&((a=b.childNodes[0])==null?void 0:a.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),v.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?d.insertBefore(v,f.nextSibling):m&&m.parentNode?d.contains(m)?d.insertBefore(v,m):d.insertBefore(v,null):d.appendChild(v),y(v,u.node.id),this.usingVirtualDom&&v.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),Ar(v,this.mirror)){const b=this.mirror.getId(v),C=this.newDocumentQueue.find(S=>S.parentId===b);C&&(this.attachDocumentToIframe(C,v),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,d,v,u)};e.adds.forEach(u=>{l(u)});const c=Date.now();for(;s.length;){const u=oh(s);if(s.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const a of u)n.getNode(a.value.parentId)?ic(a,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",a)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),ah(e.texts).forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const d=h.parentElement;if(u.value&&d&&d.tagName==="STYLE"?h.textContent=Cn(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const f=h.parentNode;((a=f==null?void 0:f.rules)==null?void 0:a.length)>0&&(f.rules=[])}}),e.attributes.forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return e.removes.find(d=>d.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const d in u.attributes)if(typeof d=="string"){const f=u.attributes[d];if(f===null)h.removeAttribute(d),d==="open"&&Qh(h,u);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=n.getMeta(h),p=Tr({...m,attributes:{...m.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);const y=h.nextSibling,v=h.parentNode;if(p&&v){v.removeChild(h),v.insertBefore(p,y),n.replace(u.id,p);break}}catch{}if(d==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(y=>m.removeChild(y));const p=(a=h.ownerDocument)==null?void 0:a.createTextNode(f);p&&m.appendChild(p)}else h.setAttribute(d,f);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&rn(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=f,p=h;for(const y in m)if(m[y]===!1)p.style.removeProperty(y);else if(m[y]instanceof Array){const v=m[y];p.style.setProperty(y,v[0],v[1])}else{const v=m[y];p.style.setProperty(y,v)}}}})}applyScroll(e,r){var n,i;const s=this.mirror.getNode(e.id);if(!s)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(s);if(s===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Rt.Document)(i=s.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else try{s.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"})}catch{}}applyInput(e){const r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);try{r.checked=e.isChecked,r.value=e.text}catch{}}applySelection(e){try{const r=new Set,n=e.ranges.map(({start:i,startOffset:s,end:o,endOffset:l})=>{const c=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!c||!u)return;const a=new Range;a.setStart(c,s),a.setEnd(u,l);const h=c.ownerDocument,d=h==null?void 0:h.getSelection();return d&&r.add(d),{range:a,selection:d}});r.forEach(i=>i.removeAllRanges()),n.forEach(i=>{var s;return i&&((s=i.selection)==null?void 0:s.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var r;let n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=((r=this.mirror.getNode(e.id))==null?void 0:r.sheet)||null),n&&(e.source===K.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===K.StyleDeclaration&&this.applyStyleDeclaration(e,n))}applyStyleSheetRule(e,r){var n,i,s,o;if((n=e.adds)==null||n.forEach(({rule:l,index:c})=>{try{if(Array.isArray(c)){const{positions:u,index:a}=za(c),h=xr(r.cssRules,u);h==null||h.insertRule(l,a)}else{const u=c===void 0?void 0:Math.min(c,r.cssRules.length);r==null||r.insertRule(l,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:u}=za(l),a=xr(r.cssRules,c);a==null||a.deleteRule(u||0)}else r==null||r.deleteRule(l)}catch{}}),typeof e.replace=="string")try{(s=r.replace)==null||s.call(r,e.replace)}catch{}if(typeof e.replaceSync=="string")try{(o=r.replaceSync)==null||o.call(r,e.replaceSync)}catch{}}applyStyleDeclaration(e,r){if(e.set){const n=xr(r.rules,e.index);n!=null&&n.style&&n.style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){const n=xr(r.rules,e.index);n!=null&&n.style&&n.style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){var r;const n=this.mirror.getNode(e.id);if(!n)return;(r=e.styles)==null||r.forEach(l=>{var c;let u=null,a=null;if(Bt(n)?a=((c=n.ownerDocument)==null?void 0:c.defaultView)||null:n.nodeName==="#document"&&(a=n.defaultView),!!a)try{u=new a.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:K.StyleSheetRule,adds:l.rules},u)}catch{}});const i=10;let s=0;const o=(l,c)=>{const u=c.map(a=>this.styleMirror.getStyle(a)).filter(a=>a!==null);Bt(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==c.length&&s<i&&(setTimeout(()=>o(l,c),0+100*s),s++)};o(n,e.styleIds)}legacy_resolveMissingNode(e,r,n,i){const{previousId:s,nextId:o}=i,l=s&&e[s],c=o&&e[o];if(l){const{node:u,mutation:a}=l;r.insertBefore(u,n),delete e[a.node.id],delete this.legacy_missingNodeRetryMap[a.node.id],(a.previousId||a.nextId)&&this.legacy_resolveMissingNode(e,r,u,a)}if(c){const{node:u,mutation:a}=c;r.insertBefore(u,n.nextSibling),delete e[a.node.id],delete this.legacy_missingNodeRetryMap[a.node.id],(a.previousId||a.nextId)&&this.legacy_resolveMissingNode(e,r,u,a)}}moveAndHover(e,r,n,i,s){const o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(s,n);const l=oc(o,this.iframe),c=e*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:c,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:r,lineWidth:n,strokeStyle:i,duration:s}=this.config.mouseTail===!0?is:Object.assign({},is,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=n,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>l.lineTo(c.x,c.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},s/this.speedService.state.context.timer.speed)}hoverElements(e){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(e){return e.type!==Z.IncrementalSnapshot?!1:e.data.source>K.Mutation&&e.data.source<=K.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Me.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,r){this.warn(`Node with id '${r}' not found. `,e)}warnCanvasMutationFailed(e,r){this.warn("Has error on canvas update",r,"canvas mutation:",e)}debugNodeNotFound(e,r){this.debug(`Node with id '${r}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(ol,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(ol,...e)}}const{addCustomEvent:kp,addAnnotation:Mp}=ht,{freezePage:Tp}=ht,{takeFullSnapshot:Ap}=ht,rp=["authorization","cookie","set-cookie","x-api-key","proxy-authorization","x-auth-token","x-csrf-token","x-xsrf-token","x-signature","x-hmac-signature","x-pin-token","x-otp-token","x-biometric-token","x-core-banking-key","x-client-secret"],np=["password","passwd","passcode","pin","mpin","atm_pin","otp","otp_code","token","access_token","accesstoken","refresh_token","refreshtoken","id_token","authorization","secret","client_secret","api_key","apikey","private_key","signature","digital_signature","biometric","biometric_data","pan","card_number","cardnumber","credit_card","creditcard","debit_card","cvv","cvc","cvv2","cid","expiry_date","track_data","account_number","accountnumber","account_no","no_rekening","norek","nomor_rekening","iban","swift_code","saldo","balance","available_balance","ledger_balance","nik","no_ktp","npwp","ssn","tax_id","mother_maiden_name","nama_gadis_ibu_kandung","ibu_kandung","date_of_birth","tanggal_lahir"],ip=/^(token|access_token|refresh_token|auth|key|api_key|secret|password|pin|mpin|otp|cvv|pan|card|account|account_no|norek|no_rekening|nik|npwp|signature|session|session_id|jwt)$/i,sp=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g,op=/\b(?:\d[ -]*?){13,19}\b/g,ap=/\b\d{16}\b/g,lp=/\b([A-Za-z0-9._%+-])([A-Za-z0-9._%+-]*?)@([A-Za-z0-9.-]+\.[A-Za-z]{2,})\b/g,cp=/\b(\+62|62|0)8(\d{1,2})(\d{4,7})(\d{2,3})\b/g;function xc(t){if(t.length<13||t.length>19||/^(\d)\1+$/.test(t))return!1;let e=0,r=!1;for(let n=t.length-1;n>=0;n--){let i=parseInt(t.charAt(n),10);r&&(i*=2,i>9&&(i-=9)),e+=i,r=!r}return e%10===0}function Ve(t,e){if(!t||t.length<5)return t;let r=0,n=t.replace(sp,()=>(r++,"[REDACTED_JWT_TOKEN]"));return n=n.replace(op,i=>{const s=i.replace(/\D/g,"");if(s.length>=13&&s.length<=19){const o=/^\d{4}[ -]\d{4}[ -]\d{4}[ -]\d{4}$/.test(i.trim());if(xc(s)||o){r++;const l=s.slice(0,4),c=s.slice(-4);return`${l}-****-****-${c}`}}return i}),n=n.replace(ap,i=>(r++,`${i.slice(0,4)}********${i.slice(-4)}`)),n=n.replace(lp,(i,s,o,l)=>(r++,`${s}***@${l}`)),n=n.replace(cp,(i,s,o,l,c)=>(r++,`${s}8${o}****${c}`)),r>0&&e&&e(r),n}function an(t,e){var r;if(!t)return t;try{const n=typeof window<"u"&&((r=window.location)!=null&&r.origin)?window.location.origin:"https://localhost",i=new URL(t,n);let s=0;return i.searchParams.forEach((o,l)=>{ip.test(l.trim())&&(i.searchParams.set(l,"[REDACTED_QUERY_PARAM]"),s++)}),s>0&&e&&e(s),/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)?i.toString():`${i.pathname}${i.search}${i.hash}`}catch{return Ve(t,e)}}async function or(t){var o,l,c;if(typeof window>"u"||!((o=window.crypto)!=null&&o.subtle))return"crypto-subtle-unavailable";const e=JSON.stringify({domEventsCount:t.domEvents.length,firstDomTimestamp:((l=t.domEvents[0])==null?void 0:l.timestamp)??0,lastDomTimestamp:((c=t.domEvents[t.domEvents.length-1])==null?void 0:c.timestamp)??0,networkLogs:t.networkLogs,consoleLogs:t.consoleLogs??[],errorLogs:t.errorLogs??[]}),n=new TextEncoder().encode(e),i=await window.crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(i)).map(u=>u.toString(16).padStart(2,"0")).join("")}function ss(t){let e="";for(let r=0;r<t.byteLength;r++)e+=String.fromCharCode(t[r]);return window.btoa(e)}function os(t){const e=window.atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function Cc(t,e,r){const n=new TextEncoder,i=await window.crypto.subtle.importKey("raw",n.encode(t),{name:"PBKDF2"},!1,["deriveKey"]);return window.crypto.subtle.deriveKey({name:"PBKDF2",salt:e,iterations:r,hash:"SHA-256"},i,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function zs(t,e){const n=window.crypto.getRandomValues(new Uint8Array(16)),i=window.crypto.getRandomValues(new Uint8Array(12)),s=await Cc(e,n,1e5),o=new TextEncoder,l=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},s,o.encode(t));return{rewindlogEncrypted:!0,version:"1.0",algorithm:"AES-256-GCM",kdf:"PBKDF2-SHA256",iterations:1e5,saltBase64:ss(n),ivBase64:ss(i),ciphertextBase64:ss(new Uint8Array(l)),exportedAt:new Date().toISOString(),complianceProfile:"BANKING_PCI_DSS_V4_OJK_UUPDP"}}async function Hs(t,e){const r=os(t.saltBase64),n=os(t.ivBase64),i=os(t.ciphertextBase64),s=await Cc(e,r,t.iterations||1e5),o=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:n},s,i);return new TextDecoder().decode(o)}function up(t){return typeof t=="object"&&t!==null&&t.rewindlogEncrypted===!0&&typeof t.ciphertextBase64=="string"}function nn(t){const e=Math.max(0,Math.floor(t)),r=Math.floor(e/1e3),n=Math.floor(r/60),i=r%60;return`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`}function Xt(t){if(!t)return"-";try{return new Date(t).toLocaleTimeString("id-ID",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return new Date(t).toLocaleTimeString()}}function Rr(t){try{const e=new URL(t,"https://localhost");return`${e.hostname==="localhost"?"Server Lokal":e.hostname}${e.pathname}`}catch{return t}}function ll(t){const e=t.status;return e===0?"Gagal terhubung ke server (Koneksi terputus / diblokir / timeout).":e>=200&&e<300?t.durationMs>1500?`Berhasil (Kode ${e}), namun respons server cukup lambat (${(t.durationMs/1e3).toFixed(2)} detik).`:`Berhasil diproses oleh server dengan cepat (${t.durationMs} ms).`:e===400?"Ditolak oleh server (Kode 400): Format data yang dikirim tidak sesuai.":e===401||e===403?`Akses ditolak (Kode ${e}): Sesi login habis atau pengguna tidak memiliki hak akses.`:e===404?"Data atau layanan tidak ditemukan di server (Kode 404).":e===429?"Terlalu banyak permintaan dalam waktu singkat (Kode 429 - Rate Limit).":e>=500?`Terjadi gangguan internal pada Server Backend (Kode ${e}).`:`Respons server dengan kode status ${e}.`}function mt(t){var D,H,z,A,be,fe,ne,F,ue;const e=t.domEvents??[],r=t.networkLogs??[],n=t.consoleLogs??[],i=t.errorLogs??[],s=t.breadcrumbs??[],o=((D=e[0])==null?void 0:D.timestamp)??((H=t.metadata)==null?void 0:H.sessionStartedAt)??Date.now(),l=((z=e[e.length-1])==null?void 0:z.timestamp)??((A=t.metadata)==null?void 0:A.exportedTimestamp)??o,c=Math.max(0,l-o),u=Math.max(1,Math.round(c/1e3)),a=u>=60?`${Math.floor(u/60)} menit ${u%60} detik`:`${u} detik`,h=r.filter(j=>j.status===0||j.status>=400),d=r.filter(j=>j.status>=200&&j.status<400&&j.durationMs>=1500),f=r.filter(j=>j.status>=200&&j.status<400),m=r.length>0?Math.round(r.reduce((j,X)=>j+(X.durationMs||0),0)/r.length):0,p=n.filter(j=>j.level==="error"),y=n.filter(j=>j.level==="warn"),v=i.length+p.length,w=((fe=(be=t.metadata)==null?void 0:be.securityAudit)==null?void 0:fe.totalRedactionsCount)??r.length*2;let b="SEHAT",C="Sistem & Koneksi Berjalan Normal",S="",x="",k="Tim Support / Operasional (Verifikasi Alur Pengguna)";const I=[];if(h.length>0||i.length>0?(b="KRITIS",C="Terdeteksi Gangguan Teknis Saat Pengguna Menggunakan Aplikasi"):(p.length>0||d.length>0||y.length>0)&&(b="PERLU_PERHATIAN",C="Aplikasi Berjalan Namun Ditemukan Peringatan / Respons Lambat"),h.length>0){const j=h[0],X=Rr(j.url);S=`Saat pengguna melakukan aktivitas di layar, aplikasi gagal berkomunikasi dengan server pada layanan "${X}" (${ll(j)}).`,x=j.status>=500||j.status===0?`Gangguan berasal dari sisi Server Backend / Jaringan API (${j.method} ${X} menghasilkan status ${j.status||"ERR"}), bukan karena kesalahan klik pengguna.`:`Permintaan ditolak oleh server (Status ${j.status}) pada layanan ${X}. Perlu pengecekan validasi data atau hak akses sesi pengguna.`,k=j.status>=500||j.status===0?"Tim Backend / Core Banking API & Infrastruktur":"Tim Aplikasi (Frontend & Backend)",I.push(`Periksa layanan API "${X}" pada waktu ${Xt(j.timestamp)}.`,"Gunakan tab Network di Replay Studio untuk melihat detail payload yang sudah disensor secara aman.")}else if(i.length>0||p.length>0){const j=((ne=i[0])==null?void 0:ne.message)||((F=p[0])==null?void 0:F.message)||"Kesalahan internal aplikasi";S=`Seluruh koneksi jaringan ke server berhasil (${f.length}/${r.length} sukses), namun terjadi kendala internal pada tampilan/sistem aplikasi: "${j}".`,x="Koneksi API normal, tetapi terdapat error logika pada aplikasi web (Frontend/Controller) atau ketidaksesuaian data saat memproses transaksi.",k="Tim Frontend Web / Core Application Engineer",I.push("Putar ulang video di Replay Studio dan klik penanda merah pada timeline untuk melihat detik persis munculnya error.",`Tinjau pesan error: "${j}".`)}else if(d.length>0){const j=[...d].sort((X,T)=>T.durationMs-X.durationMs)[0];S=`Tidak ada error yang menghentikan sistem, tetapi server membutuhkan waktu ${(j.durationMs/1e3).toFixed(2)} detik untuk memproses permintaan ke "${Rr(j.url)}". Hal ini dapat membuat tombol atau layar terasa lambat bagi pengguna.`,x=`Kinerja respons API melambat (${j.durationMs} ms, di atas batas normal 1.500 ms).`,k="Tim Backend Performance / Database",I.push(`Optimalkan waktu respons endpoint "${Rr(j.url)}".`,"Tambahkan indikator loading pada layar agar pengguna tidak mengira tombol macet.")}else S=`Selama ${a} rekaman berlangsung, pengguna melakukan ${e.length} interaksi layar dan ${r.length} panggilan data ke server. Seluruh koneksi jaringan berhasil (100% sukses) tanpa ditemukan error sistem.`,x="Tidak ditemukan kegagalan sistem maupun gangguan jaringan. Jika pengguna melaporkan kendala, kemungkinan berkaitan dengan tampilan/aturan bisnis (business rule) yang dapat dilihat langsung pada rekaman video.",k="Tim Product / Customer Support / QA",I.push("Tonton pemutaran ulang video (Replay) untuk melihat apa yang dilihat pengguna di layar.","Konfirmasi apakah hasil di layar sudah sesuai dengan ekspektasi prosedur operasional (SOP).");const B=[];return B.push({id:"step_start",timestamp:o,relativeTimeLabel:"00:00",timeClockLabel:Xt(o),category:"start",badgeText:"MULAI REKAMAN",titlePlain:"Sesi Rekaman Layar Dimulai",detailPlain:`Pengguna membuka halaman aplikasi (${(ue=t.metadata)!=null&&ue.viewport?`Resolusi layar ${t.metadata.viewport.width}x${t.metadata.viewport.height}`:"Tampilan Web"}).`}),s.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`bc_${X}`,timestamp:j.timestamp,relativeTimeLabel:nn(T),timeClockLabel:Xt(j.timestamp),category:j.category==="security"?"security":"user-action",badgeText:j.category==="security"?"KEAMANAN BANK":"AKTIVITAS PENGGUNA",titlePlain:j.category==="security"?"Perlindungan Keamanan & Privasi Aktif":"Interaksi Pengguna di Layar",detailPlain:j.message})}),r.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o),U=j.status===0||j.status>=400,_=!U&&j.durationMs>=1500,te=Rr(j.url),ie=j.method==="POST"?"Mengirim data transaksi ke":j.method==="PUT"||j.method==="PATCH"?"Memperbarui data pada":j.method==="DELETE"?"Menghapus data pada":"Mengambil data dari";B.push({id:j.id||`net_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:nn(T),timeClockLabel:Xt(j.timestamp),category:U?"network-fail":_?"network-slow":"network-ok",badgeText:U?`GAGAL KONEKSI (${j.status||"ERR"})`:_?`KONEKSI LAMBAT (${(j.durationMs/1e3).toFixed(1)}s)`:`KONEKSI SUKSES (${j.status})`,titlePlain:`${ie} ${te}`,detailPlain:ll(j),technicalNote:`${(j.type||"http").toUpperCase()} ${j.method} ${j.url} • ${j.durationMs}ms`})}),n.forEach((j,X)=>{if(j.level!=="warn"&&j.level!=="error")return;const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`con_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:nn(T),timeClockLabel:Xt(j.timestamp),category:j.level==="error"?"error":"warning",badgeText:j.level==="error"?" LOG ERROR":"PERINGATAN SISTEM",titlePlain:j.level==="error"?"Aplikasi Mencatat Pesan Error Internal":"Aplikasi Mencatat Peringatan (Warning)",detailPlain:j.message})}),i.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`err_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:nn(T),timeClockLabel:Xt(j.timestamp),category:"error",badgeText:"ERROR SISTEM",titlePlain:"Terjadi Gangguan Eksekusi pada Aplikasi",detailPlain:j.message,technicalNote:j.type})}),B.sort((j,X)=>j.timestamp-X.timestamp),{overallStatus:b,statusHeadline:C,plainExplanation:S,rootCauseDiagnosis:x,recommendedTeam:k,recommendedActionSteps:I,keyMetrics:{sessionDurationLabel:a,totalUserInteractions:e.length,totalNetworkRequests:r.length,successfulNetworkRequests:f.length,failedNetworkRequests:h.length,slowNetworkRequests:d.length,averageNetworkDurationMs:m,systemErrorsCount:v,consoleWarningsCount:y.length,protectedPiiCount:w},storyline:B}}function lr(t){var h,d,f;const e=mt(t),r=t.issue,n=t.metadata,i=e.overallStatus==="KRITIS"?"#dc2626":e.overallStatus==="PERLU_PERHATIAN"?"#d97706":"#059669",s=e.overallStatus==="KRITIS"?"#fef2f2":e.overallStatus==="PERLU_PERHATIAN"?"#fffbeb":"#ecfdf5",o=m=>m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),l=`<!doctype html>
|
|
149
|
+
<html lang="id">
|
|
150
|
+
<head>
|
|
151
|
+
<meta charset="UTF-8" />
|
|
152
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
153
|
+
<title>Laporan Insiden RewindLog — ${o((n==null?void 0:n.reportId)||"Bug Report")}</title>
|
|
154
|
+
<style>
|
|
155
|
+
* { box-sizing: border-box; }
|
|
156
|
+
body {
|
|
157
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
158
|
+
background: #f8fafc;
|
|
159
|
+
color: #0f172a;
|
|
160
|
+
margin: 0;
|
|
161
|
+
padding: 32px 20px;
|
|
162
|
+
line-height: 1.55;
|
|
163
|
+
}
|
|
164
|
+
.container {
|
|
165
|
+
max-width: 920px;
|
|
166
|
+
margin: 0 auto;
|
|
167
|
+
background: #ffffff;
|
|
168
|
+
border: 1px solid #e2e8f0;
|
|
169
|
+
border-radius: 12px;
|
|
170
|
+
padding: 32px;
|
|
171
|
+
box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
|
|
172
|
+
}
|
|
173
|
+
.top-bar {
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
align-items: flex-start;
|
|
177
|
+
border-bottom: 2px solid #f1f5f9;
|
|
178
|
+
padding-bottom: 20px;
|
|
179
|
+
margin-bottom: 24px;
|
|
180
|
+
gap: 16px;
|
|
181
|
+
flex-wrap: wrap;
|
|
182
|
+
}
|
|
183
|
+
.badge {
|
|
184
|
+
display: inline-block;
|
|
185
|
+
background: #eff6ff;
|
|
186
|
+
color: #1d4ed8;
|
|
187
|
+
border: 1px solid #bfdbfe;
|
|
188
|
+
font-size: 12px;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
padding: 4px 10px;
|
|
191
|
+
border-radius: 999px;
|
|
192
|
+
text-transform: uppercase;
|
|
193
|
+
margin-bottom: 8px;
|
|
194
|
+
}
|
|
195
|
+
h1 { margin: 0 0 6px 0; font-size: 24px; color: #0f172a; }
|
|
196
|
+
h2 { margin: 24px 0 12px 0; font-size: 17px; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
|
|
197
|
+
.verdict-box {
|
|
198
|
+
background: ${s};
|
|
199
|
+
border: 2px solid ${i};
|
|
200
|
+
border-radius: 10px;
|
|
201
|
+
padding: 18px 20px;
|
|
202
|
+
margin-bottom: 24px;
|
|
203
|
+
}
|
|
204
|
+
.verdict-title {
|
|
205
|
+
font-size: 18px;
|
|
206
|
+
font-weight: 800;
|
|
207
|
+
color: ${i};
|
|
208
|
+
margin-bottom: 6px;
|
|
209
|
+
}
|
|
210
|
+
.grid-4 {
|
|
211
|
+
display: grid;
|
|
212
|
+
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
|
213
|
+
gap: 12px;
|
|
214
|
+
margin-bottom: 24px;
|
|
215
|
+
}
|
|
216
|
+
.metric-card {
|
|
217
|
+
background: #f8fafc;
|
|
218
|
+
border: 1px solid #e2e8f0;
|
|
219
|
+
border-radius: 8px;
|
|
220
|
+
padding: 14px;
|
|
221
|
+
}
|
|
222
|
+
.metric-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; }
|
|
223
|
+
.metric-value { font-size: 20px; font-weight: 800; color: #0f172a; margin-top: 4px; }
|
|
224
|
+
.info-box {
|
|
225
|
+
background: #f8fafc;
|
|
226
|
+
border-left: 4px solid #2563eb;
|
|
227
|
+
padding: 14px 18px;
|
|
228
|
+
border-radius: 6px;
|
|
229
|
+
margin-bottom: 16px;
|
|
230
|
+
}
|
|
231
|
+
.timeline {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
gap: 10px;
|
|
235
|
+
}
|
|
236
|
+
.step {
|
|
237
|
+
border: 1px solid #e2e8f0;
|
|
238
|
+
border-radius: 8px;
|
|
239
|
+
padding: 12px 16px;
|
|
240
|
+
background: #ffffff;
|
|
241
|
+
}
|
|
242
|
+
.step-header {
|
|
243
|
+
display: flex;
|
|
244
|
+
justify-content: space-between;
|
|
245
|
+
align-items: center;
|
|
246
|
+
font-size: 12px;
|
|
247
|
+
color: #64748b;
|
|
248
|
+
margin-bottom: 4px;
|
|
249
|
+
}
|
|
250
|
+
.step-badge {
|
|
251
|
+
font-weight: 700;
|
|
252
|
+
color: #1e293b;
|
|
253
|
+
background: #f1f5f9;
|
|
254
|
+
padding: 2px 8px;
|
|
255
|
+
border-radius: 4px;
|
|
256
|
+
}
|
|
257
|
+
.step-title { font-weight: 700; font-size: 14px; color: #0f172a; }
|
|
258
|
+
.step-detail { font-size: 13px; color: #334155; margin-top: 2px; }
|
|
259
|
+
.print-btn {
|
|
260
|
+
background: #0f172a;
|
|
261
|
+
color: #ffffff;
|
|
262
|
+
border: none;
|
|
263
|
+
border-radius: 6px;
|
|
264
|
+
padding: 10px 16px;
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 6px;
|
|
270
|
+
transition: background 0.15s ease;
|
|
271
|
+
}
|
|
272
|
+
.print-btn:hover {
|
|
273
|
+
background: #334155;
|
|
274
|
+
}
|
|
275
|
+
.top-actions {
|
|
276
|
+
display: flex;
|
|
277
|
+
gap: 8px;
|
|
278
|
+
flex-wrap: wrap;
|
|
279
|
+
}
|
|
280
|
+
.filter-bar {
|
|
281
|
+
display: flex;
|
|
282
|
+
gap: 8px;
|
|
283
|
+
margin-bottom: 14px;
|
|
284
|
+
flex-wrap: wrap;
|
|
285
|
+
}
|
|
286
|
+
.filter-btn {
|
|
287
|
+
background: #f1f5f9;
|
|
288
|
+
color: #475569;
|
|
289
|
+
border: 1px solid #cbd5e1;
|
|
290
|
+
padding: 6px 14px;
|
|
291
|
+
border-radius: 20px;
|
|
292
|
+
font-size: 12px;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
}
|
|
296
|
+
.filter-btn.active {
|
|
297
|
+
background: #2563eb;
|
|
298
|
+
color: #ffffff;
|
|
299
|
+
border-color: #2563eb;
|
|
300
|
+
}
|
|
301
|
+
@media print {
|
|
302
|
+
body { background: #fff; padding: 0; }
|
|
303
|
+
.container { border: none; box-shadow: none; padding: 0; }
|
|
304
|
+
.print-btn, .top-actions, .filter-bar { display: none !important; }
|
|
305
|
+
}
|
|
306
|
+
</style>
|
|
307
|
+
</head>
|
|
308
|
+
<body>
|
|
309
|
+
<div class="container">
|
|
310
|
+
<div class="top-bar">
|
|
311
|
+
<div>
|
|
312
|
+
<span class="badge">Laporan Insiden RewindLog • Standalone Portable Viewer</span>
|
|
313
|
+
<h1>${o((r==null?void 0:r.title)||"Laporan Kendala Operasional Aplikasi")}</h1>
|
|
314
|
+
<div style="font-size: 13px; color: #64748b;">
|
|
315
|
+
ID Laporan: <strong>${o((n==null?void 0:n.reportId)||"-")}</strong> •
|
|
316
|
+
Waktu Ekspor: <strong>${o(n!=null&&n.exportedAt?new Date(n.exportedAt).toLocaleString("id-ID"):"-")}</strong> •
|
|
317
|
+
Pelapor: <strong>${o(((h=n==null?void 0:n.user)==null?void 0:h.name)||"Operator Cabang")} (${o(((d=n==null?void 0:n.user)==null?void 0:d.role)||"-")})</strong>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
<div class="top-actions">
|
|
321
|
+
<button class="print-btn" onclick="window.print()">🖨️ Cetak / PDF</button>
|
|
322
|
+
<button class="print-btn" style="background: #0284c7;" onclick="downloadRawJsonPayload()">📥 Unduh JSON</button>
|
|
323
|
+
<button class="print-btn" style="background: #16a34a;" onclick="copyTicketText()">📋 Salin Tiket</button>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
<div class="verdict-box">
|
|
328
|
+
<div class="verdict-title">Status: ${o(e.overallStatus)} — ${o(e.statusHeadline)}</div>
|
|
329
|
+
<div style="font-size: 14px; color: #1e293b; margin-bottom: 10px;">
|
|
330
|
+
<strong>Penjelasan Singkat (Bahasa Awam):</strong><br/>
|
|
331
|
+
${o(e.plainExplanation)}
|
|
332
|
+
</div>
|
|
333
|
+
<div style="font-size: 13px; color: #334155;">
|
|
334
|
+
<strong>Diagnosis Penyebab:</strong> ${o(e.rootCauseDiagnosis)}<br/>
|
|
335
|
+
<strong>Rekomendasi Tim Penanganan:</strong> <span style="font-weight: 700; text-decoration: underline;">${o(e.recommendedTeam)}</span>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
${r!=null&&r.description?`<div class="info-box">
|
|
340
|
+
<strong>Catatan Pelapor / Kronologi Keluhan:</strong><br/>
|
|
341
|
+
${o(r.description)}
|
|
342
|
+
</div>`:""}
|
|
343
|
+
|
|
344
|
+
<div class="grid-4">
|
|
345
|
+
<div class="metric-card">
|
|
346
|
+
<div class="metric-label">Durasi Sesi Rekaman</div>
|
|
347
|
+
<div class="metric-value">${o(e.keyMetrics.sessionDurationLabel)}</div>
|
|
348
|
+
<div style="font-size: 12px; color: #64748b;">${e.keyMetrics.totalUserInteractions} interaksi layar</div>
|
|
349
|
+
</div>
|
|
350
|
+
<div class="metric-card">
|
|
351
|
+
<div class="metric-label">Koneksi ke Server (API)</div>
|
|
352
|
+
<div class="metric-value">${e.keyMetrics.successfulNetworkRequests} / ${e.keyMetrics.totalNetworkRequests} Sukses</div>
|
|
353
|
+
<div style="font-size: 12px; color: #64748b;">Rata-rata respons ${e.keyMetrics.averageNetworkDurationMs} ms</div>
|
|
354
|
+
</div>
|
|
355
|
+
<div class="metric-card">
|
|
356
|
+
<div class="metric-label">Error & Peringatan</div>
|
|
357
|
+
<div class="metric-value">${e.keyMetrics.systemErrorsCount} Error</div>
|
|
358
|
+
<div style="font-size: 12px; color: #64748b;">${e.keyMetrics.consoleWarningsCount} peringatan sistem</div>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="metric-card">
|
|
361
|
+
<div class="metric-label">Keamanan Data Bank</div>
|
|
362
|
+
<div class="metric-value">${e.keyMetrics.protectedPiiCount} Disensor</div>
|
|
363
|
+
<div style="font-size: 12px; color: #059669; font-weight: 600;">✓ PCI-DSS & OJK Aman</div>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<h2>Langkah Tindak Lanjut yang Disarankan</h2>
|
|
368
|
+
<ul>
|
|
369
|
+
${e.recommendedActionSteps.map(m=>`<li style="margin-bottom: 6px; font-size: 14px;">${o(m)}</li>`).join("")}
|
|
370
|
+
</ul>
|
|
371
|
+
|
|
372
|
+
<h2>Kronologi Kejadian Langkah-demi-Langkah (Interaktif)</h2>
|
|
373
|
+
<div class="filter-bar">
|
|
374
|
+
<button class="filter-btn active" onclick="filterTimeline('all', this)">Semua Langkah (${e.storyline.length})</button>
|
|
375
|
+
<button class="filter-btn" onclick="filterTimeline('critical', this)">Hanya Error & API Gagal</button>
|
|
376
|
+
<button class="filter-btn" onclick="filterTimeline('network', this)">Aktivitas Jaringan (API)</button>
|
|
377
|
+
<button class="filter-btn" onclick="filterTimeline('action', this)">Interaksi Pengguna</button>
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<div class="timeline" id="timelineContainer">
|
|
381
|
+
${e.storyline.map(m=>`<div class="step" data-category="${o(m.category)}">
|
|
382
|
+
<div class="step-header">
|
|
383
|
+
<span class="step-badge">${o(m.badgeText)}</span>
|
|
384
|
+
<span>Pukul ${o(m.timeClockLabel)} (Detik ke-${o(m.relativeTimeLabel)})</span>
|
|
385
|
+
</div>
|
|
386
|
+
<div class="step-title">${o(m.titlePlain)}</div>
|
|
387
|
+
<div class="step-detail">${o(m.detailPlain)}</div>
|
|
388
|
+
${m.technicalNote?`<div style="font-size: 11px; color: #64748b; margin-top: 4px; font-family: monospace;">Info Teknis: ${o(m.technicalNote)}</div>`:""}
|
|
389
|
+
</div>`).join("")}
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<div style="margin-top: 28px; padding-top: 16px; border-top: 1px solid #e2e8f0; font-size: 12px; color: #64748b; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;">
|
|
393
|
+
<div>
|
|
394
|
+
<strong>Bukti Kepatuhan Keamanan Perbankan (SHA-256):</strong> ${o(((f=n==null?void 0:n.securityAudit)==null?void 0:f.integrityHashSha256)||"Signed at export")}
|
|
395
|
+
</div>
|
|
396
|
+
<div>
|
|
397
|
+
<span style="color: #059669; font-weight: 600;">✓ RewindLog Standalone Edition (Nol Server Diperlukan)</span>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<script id="rewindlog-raw-payload" type="application/json">
|
|
403
|
+
${JSON.stringify(t).replace(/<\//g,"<\\/")}
|
|
404
|
+
<\/script>
|
|
405
|
+
|
|
406
|
+
<script>
|
|
407
|
+
function downloadRawJsonPayload() {
|
|
408
|
+
var raw = document.getElementById('rewindlog-raw-payload').textContent;
|
|
409
|
+
var blob = new Blob([raw], { type: 'application/json' });
|
|
410
|
+
var url = URL.createObjectURL(blob);
|
|
411
|
+
var a = document.createElement('a');
|
|
412
|
+
a.href = url;
|
|
413
|
+
a.download = 'rewindlog-${(n==null?void 0:n.reportId)||Date.now()}.json';
|
|
414
|
+
document.body.appendChild(a);
|
|
415
|
+
a.click();
|
|
416
|
+
document.body.removeChild(a);
|
|
417
|
+
setTimeout(function() { URL.revokeObjectURL(url); }, 1000);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function filterTimeline(type, btn) {
|
|
421
|
+
document.querySelectorAll('.filter-btn').forEach(function(b) { b.classList.remove('active'); });
|
|
422
|
+
btn.classList.add('active');
|
|
423
|
+
var steps = document.querySelectorAll('#timelineContainer .step');
|
|
424
|
+
steps.forEach(function(el) {
|
|
425
|
+
var cat = el.getAttribute('data-category');
|
|
426
|
+
if (type === 'all') {
|
|
427
|
+
el.style.display = 'block';
|
|
428
|
+
} else if (type === 'critical') {
|
|
429
|
+
el.style.display = (cat === 'error' || cat === 'network-fail') ? 'block' : 'none';
|
|
430
|
+
} else if (type === 'network') {
|
|
431
|
+
el.style.display = (cat.indexOf('network') !== -1) ? 'block' : 'none';
|
|
432
|
+
} else if (type === 'action') {
|
|
433
|
+
el.style.display = (cat === 'user-action' || cat === 'start') ? 'block' : 'none';
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function copyTicketText() {
|
|
439
|
+
var title = ${JSON.stringify((r==null?void 0:r.title)||"Kendala Operasional")};
|
|
440
|
+
var status = ${JSON.stringify(e.overallStatus)};
|
|
441
|
+
var text = '🚨 [LAPORAN REWINDLOG] ' + title + ' (' + status + ')\\n' +
|
|
442
|
+
'ID: ${o((n==null?void 0:n.reportId)||"-")}\\n' +
|
|
443
|
+
'Waktu: ${o(n!=null&&n.exportedAt?new Date(n.exportedAt).toLocaleString("id-ID"):"-")}\\n' +
|
|
444
|
+
'Ringkasan: ' + ${JSON.stringify(e.plainExplanation)} + '\\n' +
|
|
445
|
+
'Penyebab: ' + ${JSON.stringify(e.rootCauseDiagnosis)} + '\\n' +
|
|
446
|
+
'Rekomendasi Tim: ' + ${JSON.stringify(e.recommendedTeam)};
|
|
447
|
+
navigator.clipboard.writeText(text).then(function() {
|
|
448
|
+
alert('Ringkasan tiket berhasil disalin ke clipboard!');
|
|
449
|
+
}).catch(function() {
|
|
450
|
+
alert('Gagal menyalin ke clipboard.');
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
<\/script>
|
|
454
|
+
</body>
|
|
455
|
+
</html>`,c=new Blob([l],{type:"text/html;charset=utf-8"}),u=URL.createObjectURL(c),a=document.createElement("a");a.href=u,a.download=`rewindlog-laporan-mudah-dibaca-${Date.now()}.html`,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(u),1e3)}function Rc(t){var o,l,c,u;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 **KRITIS (ON-CALL ALERT)**":e.overallStatus==="PERLU_PERHATIAN"?"🟡 **PERLU PERHATIAN**":"🟢 **NORMAL / SEHAT**",s=e.storyline.slice(-5).map(a=>`* **[${a.timeClockLabel}]** \`${a.badgeText}\`: ${a.titlePlain} — *${a.detailPlain}*`).join(`
|
|
456
|
+
`);return[`### 🚨 [ON-CALL INCIDENT] RewindLog Alert: ${(n==null?void 0:n.title)||"Kendala Operasional Aplikasi"}`,`**ID Insiden:** \`${(r==null?void 0:r.reportId)||"N/A"}\` | **Status:** ${i}`,`**Rekomendasi Tim On-Call:** 🎯 **${e.recommendedTeam}**`,`**Pelapor:** **${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"}** (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) | **Waktu:** ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,`**URL Terdampak:** \`${(r==null?void 0:r.url)||"-"}\``,"","> **Ringkasan Kejadian (Bahasa Awam):**",`> ${e.plainExplanation.replace(/\n/g,`
|
|
457
|
+
> `)}`,"","**Diagnosis Akar Masalah:**",`${e.rootCauseDiagnosis}`,"","**Metrik & Kepatuhan Bank:**",`* **Koneksi API:** ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} Berhasil (Rata-rata ${e.keyMetrics.averageNetworkDurationMs} ms)`,`* **Error Sistem:** ${e.keyMetrics.systemErrorsCount} Error runtime, ${e.keyMetrics.consoleWarningsCount} peringatan`,`* **Keamanan Data (PCI-DSS & OJK):** 🛡️ ${e.keyMetrics.protectedPiiCount} data sensitif nasabah otomatis disensor`,"","**5 Langkah Terakhir Sebelum Kendala:**",s,"",`*SHA-256 Tamper-Proof Seal: \`${((u=(c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)==null?void 0:u.slice(0,32))||"Signed"}...\`*`].join(`
|
|
458
|
+
`)}function Ec(t){var c,u,a;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 KRITIS":e.overallStatus==="PERLU_PERHATIAN"?"🟡 PERLU PERHATIAN":"🟢 SEHAT",s=(c=t.networkLogs)==null?void 0:c.filter(h=>h.status===0||h.status>=400).slice(-1)[0],o=(u=t.errorLogs)==null?void 0:u.slice(-1)[0],l=o?`Error: ${o.message.slice(0,60)}`:s?`API Fail: ${s.method} ${Rr(s.url)} (${s.status})`:e.statusHeadline;return[`🚨 [RewindLog ${i}] ${(n==null?void 0:n.title)||"Kendala Operasional"} @ ${(r==null?void 0:r.url)||"Aplikasi"}`,`↳ Detail: ${l} | Tim: ${e.recommendedTeam} | Durasi: ${e.keyMetrics.sessionDurationLabel} | Pelapor: ${((a=r==null?void 0:r.user)==null?void 0:a.name)||"Operator"} | 🛡️ PCI-DSS Disensor`].join(`
|
|
459
|
+
`)}function kc(t){var o,l,c;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"#ffebe6":e.overallStatus==="PERLU_PERHATIAN"?"#fff0b3":"#e3fcef",s=e.storyline.slice(-6).map(u=>`* [${u.timeClockLabel} / +${u.relativeTimeLabel}] *${u.badgeText}*: ${u.titlePlain} - ${u.detailPlain}`).join(`
|
|
460
|
+
`);return[`h2. 🚨 Laporan Insiden RewindLog: ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`{panel:title=Status Insiden: ${e.overallStatus} - ${e.statusHeadline}|bgColor=${i}}`,`*ID Laporan:* ${(r==null?void 0:r.reportId)||"N/A"}`,`*Rekomendasi Tim Penanganan:* *${e.recommendedTeam}*`,`*Pelapor:* ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"})`,`*Waktu Kejadian:* ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,`*Halaman URL:* ${(r==null?void 0:r.url)||"-"}`,"{panel}","","h3. 📋 Penjelasan Singkat (Non-Teknis)",`${e.plainExplanation}`,"","h3. 🔍 Diagnosis Akar Masalah",`${e.rootCauseDiagnosis}`,"","h3. 📊 Metrik Sesi Pengguna",`* *Durasi & Interaksi:* ${e.keyMetrics.sessionDurationLabel} (${e.keyMetrics.totalUserInteractions} interaksi layar)`,`* *Koneksi API:* ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses (Rata-rata respons: ${e.keyMetrics.averageNetworkDurationMs} ms)`,`* *Error & Peringatan:* ${e.keyMetrics.systemErrorsCount} error, ${e.keyMetrics.consoleWarningsCount} peringatan sistem`,`* *Kepatuhan Data Bank (OJK / PCI-DSS):* 🛡️ ${e.keyMetrics.protectedPiiCount} data sensitif disensor otomatis`,"","h3. ⏱️ 6 Langkah Terakhir Sebelum Kendala Terjadi",s,"","h3. 🔒 Verifikasi Keamanan SHA-256",`{code}${((c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)||"Signed at runtime"}{code}`].join(`
|
|
461
|
+
`)}function Mc(t){var o,l,c,u;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?":red_circle: *KRITIS*":e.overallStatus==="PERLU_PERHATIAN"?":warning: *PERLU PERHATIAN*":":white_check_mark: *SEHAT*",s=e.storyline.slice(-5).map(a=>`• \`+${a.relativeTimeLabel}\` *${a.badgeText}*: ${a.titlePlain} — _${a.detailPlain}_`).join(`
|
|
462
|
+
`);return[`🚨 *LAPORAN INSIDEN REWINDLOG* | \`${(r==null?void 0:r.reportId)||"N/A"}\``,`*Status:* ${i} — *${e.statusHeadline}*`,`*Judul:* ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`*Rekomendasi Tim:* :dart: \`${e.recommendedTeam}\``,`*Pelapor:* *${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"}* (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) | ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleTimeString("id-ID"):"-"}`,`*URL:* \`${(r==null?void 0:r.url)||"-"}\``,"",">>> *Penjelasan Singkat (Non-Teknis):*",`${e.plainExplanation}`,"","*Diagnosis Akar Masalah:*",`${e.rootCauseDiagnosis}`,"","*Metrik Sesi:*",`• Durasi Layar: *${e.keyMetrics.sessionDurationLabel}* (${e.keyMetrics.totalUserInteractions} aksi)`,`• API: *${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests}* sukses (${e.keyMetrics.averageNetworkDurationMs} ms avg)`,`• Error: *${e.keyMetrics.systemErrorsCount}* | Warning: *${e.keyMetrics.consoleWarningsCount}*`,`• Proteksi PII (PCI-DSS & OJK): :shield: *${e.keyMetrics.protectedPiiCount}* data rahasia disensor`,"","*Kronologi Langkah Terakhir:*",s,"",`_SHA-256 Tamper-Proof Hash: \`${((u=(c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)==null?void 0:u.slice(0,32))||"Signed"}...\`_`].join(`
|
|
463
|
+
`)}function gs(t){var o,l;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 KRITIS":e.overallStatus==="PERLU_PERHATIAN"?"🟡 PERLU PERHATIAN":"🟢 SEHAT",s=e.storyline.slice(-5).map(c=>`• [${c.timeClockLabel}] *${c.badgeText}*: ${c.titlePlain}`).join(`
|
|
464
|
+
`);return["🚨 *LAPORAN INSIDEN REWINDLOG*","━━━━━━━━━━━━━━━━━━━━━━━━━━",`*ID Laporan:* ${(r==null?void 0:r.reportId)||"N/A"}`,`*Status:* ${i} - ${e.statusHeadline}`,`*Judul:* ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`*Tim Penanganan:* 🎯 ${e.recommendedTeam}`,`*Pelapor:* ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"})`,`*Waktu:* ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,"","📋 *KRONOLOGI MASALAH (BAHASA AWAM):*",`${e.plainExplanation}`,"","🔍 *DIAGNOSIS PENYEBAB:*",`${e.rootCauseDiagnosis}`,"","📊 *RINGKASAN TEKNIS:*",`• Durasi Sesi: ${e.keyMetrics.sessionDurationLabel}`,`• API Server: ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses`,`• Error Terdeteksi: ${e.keyMetrics.systemErrorsCount} error`,`• Sensor Data Bank: 🛡️ ${e.keyMetrics.protectedPiiCount} data rahasia otomatis disensor (PCI-DSS/OJK)`,"","⏱️ *LANGKAH SEBELUM GANGGUAN:*",s,"","🔒 *Verifikasi Integritas:* SHA-256 Valid"].join(`
|
|
465
|
+
`)}function Tc(t){var o,l,c;const e=t.executiveSummary??mt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 **KRITIS**":e.overallStatus==="PERLU_PERHATIAN"?"🟡 **PERLU PERHATIAN**":"🟢 **SEHAT**",s=e.storyline.slice(-6).map(u=>`1. **[${u.timeClockLabel} / +${u.relativeTimeLabel}]** \`${u.badgeText}\`: ${u.titlePlain} - *${u.detailPlain}*`).join(`
|
|
466
|
+
`);return[`# 🚨 Laporan Insiden RewindLog: ${(n==null?void 0:n.title)||"Kendala Operasional"}`,"","| Parameter | Nilai |","| :--- | :--- |",`| **Status Insiden** | ${i} — ${e.statusHeadline} |`,`| **ID Laporan** | \`${(r==null?void 0:r.reportId)||"N/A"}\` |`,`| **Rekomendasi Tim** | **${e.recommendedTeam}** |`,`| **Pelapor** | ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) |`,`| **Waktu Kejadian** | ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"} |`,`| **URL Halaman** | \`${(r==null?void 0:r.url)||"-"}\` |`,"","## 📋 Penjelasan Singkat (Non-Teknis)",`> ${e.plainExplanation.replace(/\n/g,`
|
|
467
|
+
> `)}`,"","## 🔍 Diagnosis Akar Masalah",`${e.rootCauseDiagnosis}`,"","## 📊 Metrik Sesi Pengguna",`- **Durasi & Interaksi:** ${e.keyMetrics.sessionDurationLabel} (${e.keyMetrics.totalUserInteractions} interaksi layar)`,`- **Koneksi API:** ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses (rata-rata respons: ${e.keyMetrics.averageNetworkDurationMs} ms)`,`- **Error & Peringatan:** ${e.keyMetrics.systemErrorsCount} error, ${e.keyMetrics.consoleWarningsCount} peringatan`,`- **Keamanan Data (PCI-DSS & OJK):** 🛡️ ${e.keyMetrics.protectedPiiCount} data rahasia nasabah disensor otomatis`,"","## ⏱️ Kronologi Langkah Terakhir",s,"","## 🛡️ Tanda Tangan Integritas (SHA-256)","```text",`${((c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)||"Signed"}`,"```"].join(`
|
|
468
|
+
`)}function Et(t,e="whatsapp"){switch(e){case"whatsapp":return gs(t);case"teams":return Rc(t);case"slack":return Mc(t);case"jira":return kc(t);case"markdown":return Tc(t);case"compact":return Ec(t);default:return gs(t)}}const cl="2.0.0-banking-enterprise",dp=6,fp=6e4,hp=50,pp=100,mp=50,gp=100,yp=65536;class qs{constructor(e={}){_e(this,"mode");_e(this,"domEvents",[[]]);_e(this,"networkLogs",[]);_e(this,"consoleLogs",[]);_e(this,"errorLogs",[]);_e(this,"breadcrumbs",[]);_e(this,"config");_e(this,"redactedHeaders");_e(this,"redactedBodyKeys");_e(this,"user",null);_e(this,"tags",{});_e(this,"totalRedactionsCount",0);_e(this,"stopRrwebRecorder",null);_e(this,"originalFetch",null);_e(this,"originalXHROpen",null);_e(this,"originalXHRSend",null);_e(this,"originalXHRSetRequestHeader",null);_e(this,"originalConsole",{});_e(this,"boundErrorHandler",null);_e(this,"boundRejectionHandler",null);_e(this,"boundUnloadHandler",null);_e(this,"isStarted",!1);_e(this,"sessionStartedAt",Date.now());_e(this,"lastCheckoutAt",Date.now());_e(this,"listeners",new Set);this.mode=e.mode??"enterprise";const r=this.mode==="lite"?void 0:"/api/v1/rewindlog/ingest";this.config={mode:this.mode,ticketFormat:e.ticketFormat??"whatsapp",checkoutEveryNms:e.checkoutEveryNms??fp,maxDomBlocks:e.maxDomBlocks??dp,maxNetworkLogs:e.maxNetworkLogs??hp,maxConsoleLogs:e.maxConsoleLogs??pp,maxErrorLogs:e.maxErrorLogs??mp,maxBreadcrumbs:e.maxBreadcrumbs??gp,maxBodyLength:e.maxBodyLength??yp,bankingComplianceMode:e.bankingComplianceMode??!0,maskAllInputs:e.maskAllInputs??!1,blockClass:e.blockClass??"rewindlog-block",maskTextClass:e.maskTextClass??"rewindlog-mask",captureConsole:e.captureConsole??!0,captureExceptions:e.captureExceptions??!0,wipeMemoryOnUnload:e.wipeMemoryOnUnload??!0,ignoreUrls:e.ignoreUrls??["/api/v1/rewindlog","/healthz","/readyz","/metrics"],environment:e.environment??"production",release:e.release??"2.0.0",endpointUrl:e.endpointUrl??r},this.setTag("edition",this.mode==="lite"?"lite-ephemeral-ram":"enterprise-infra-storage"),this.redactedHeaders=new Set([...rp,...(e.additionalRedactedHeaders??[]).map(n=>n.trim().toLowerCase())]),this.redactedBodyKeys=new Set([...np,...(e.additionalRedactedBodyKeys??[]).map(n=>n.trim().toLowerCase())]),e.user&&(this.user=this.sanitizeUserObject(e.user))}start(){this.isStarted||typeof window>"u"||(this.isStarted=!0,this.sessionStartedAt=Date.now(),this.lastCheckoutAt=Date.now(),this.initDomRecorder(),this.initNetworkInterceptor(),this.config.captureConsole&&this.initConsoleInterceptor(),this.config.captureExceptions&&this.initExceptionInterceptor(),this.config.wipeMemoryOnUnload&&(this.boundUnloadHandler=()=>{this.purgeMemory(!1)},window.addEventListener("pagehide",this.boundUnloadHandler)),this.addBreadcrumb({category:"security",message:"RewindLog Banking-Grade SDK initialized (PCI-DSS v4.0 / OJK / UU-PDP mode)",data:{environment:this.config.environment,bankingComplianceMode:this.config.bankingComplianceMode,maskAllInputs:this.config.maskAllInputs}}),this.notifyListeners())}stop(){this.isStarted&&(this.stopRrwebRecorder&&(this.stopRrwebRecorder(),this.stopRrwebRecorder=null),this.originalFetch&&(window.fetch=this.originalFetch,this.originalFetch=null),this.originalXHROpen&&(XMLHttpRequest.prototype.open=this.originalXHROpen,this.originalXHROpen=null),this.originalXHRSend&&(XMLHttpRequest.prototype.send=this.originalXHRSend,this.originalXHRSend=null),this.originalXHRSetRequestHeader&&(XMLHttpRequest.prototype.setRequestHeader=this.originalXHRSetRequestHeader,this.originalXHRSetRequestHeader=null),this.boundUnloadHandler&&(window.removeEventListener("pagehide",this.boundUnloadHandler),this.boundUnloadHandler=null),this.restoreConsole(),this.restoreExceptionInterceptor(),this.isStarted=!1,this.notifyListeners())}setMaskAllInputs(e){this.config.maskAllInputs!==e&&(this.config.maskAllInputs=e,this.isStarted&&(this.stopRrwebRecorder&&(this.stopRrwebRecorder(),this.stopRrwebRecorder=null),this.domEvents.push([]),this.domEvents.length>this.config.maxDomBlocks&&this.domEvents.shift(),this.initDomRecorder()),this.addBreadcrumb({category:"security",message:`Strict DOM maskAllInputs set to ${e}`}),this.notifyListeners())}purgeMemory(e=!0){if(this.domEvents=[[]],this.networkLogs=[],this.consoleLogs=[],this.errorLogs=[],this.breadcrumbs=[],this.totalRedactionsCount=0,this.lastCheckoutAt=Date.now(),e&&this.isStarted){try{ht.takeFullSnapshot(!0)}catch{}this.addBreadcrumb({category:"security",message:"In-memory Ring Buffers cryptographically purged (Session Zeroized)"})}this.notifyListeners()}setUser(e){var r;this.user=e?this.sanitizeUserObject(e):null,this.addBreadcrumb({category:"lifecycle",message:e?`Authenticated operator set (${(r=this.user)==null?void 0:r.id})`:"User context cleared"}),this.notifyListeners()}sanitizeUserObject(e){return{...e,email:e.email?this.config.bankingComplianceMode?Ve(e.email,r=>this.incrementRedactions(r)):e.email:void 0}}setTag(e,r){this.tags[e]=this.config.bankingComplianceMode?Ve(r,n=>this.incrementRedactions(n)):r,this.notifyListeners()}addBreadcrumb(e){const r=this.config.bankingComplianceMode?Ve(e.message,n=>this.incrementRedactions(n)):e.message;this.breadcrumbs.push({id:this.generateId("bc"),timestamp:Date.now(),...e,message:r}),this.breadcrumbs.length>this.config.maxBreadcrumbs&&this.breadcrumbs.shift(),this.notifyListeners()}captureException(e,r){const n=e instanceof Error?e:new Error(String(e)),i=r?`${r}: ${n.message}`:n.message;this.recordErrorLog({id:this.generateId("err"),type:"manual",message:this.config.bankingComplianceMode?Ve(i,s=>this.incrementRedactions(s)):i,stack:n.stack?this.config.bankingComplianceMode?Ve(n.stack):n.stack:void 0,timestamp:Date.now()})}subscribe(e){return this.listeners.add(e),e(this.getStats()),()=>{this.listeners.delete(e)}}getStats(){const e=this.domEvents.map(i=>i.length),r=e.reduce((i,s)=>i+s,0),n=Math.max(1,Math.round((r*340+this.networkLogs.length*1400+this.consoleLogs.length*220+this.errorLogs.length*450)/1024));return{mode:this.mode,isEphemeralRamOnly:this.mode==="lite",hasEndpointConfigured:!!this.config.endpointUrl,ticketFormat:this.config.ticketFormat,isRecording:this.isStarted,bankingComplianceMode:this.config.bankingComplianceMode,maskAllInputs:this.config.maskAllInputs,activeDomBlocks:this.domEvents.length,maxDomBlocks:this.config.maxDomBlocks,domBlockSizes:e,totalDomEvents:r,networkLogsCount:this.networkLogs.length,maxNetworkLogs:this.config.maxNetworkLogs,consoleLogsCount:this.consoleLogs.length,errorLogsCount:this.errorLogs.length,breadcrumbsCount:this.breadcrumbs.length,totalRedactionsCount:this.totalRedactionsCount,estimatedMemoryKB:n,sessionStartedAt:this.sessionStartedAt,lastCheckoutAt:this.lastCheckoutAt}}getMode(){return this.mode}getTicketFormat(){return this.config.ticketFormat}setTicketFormat(e){this.config.ticketFormat=e,this.notifyListeners()}setMode(e){this.mode!==e&&(this.mode=e,this.config.mode=e,e==="lite"?this.config.endpointUrl=void 0:this.config.endpointUrl=this.config.endpointUrl||"/api/v1/rewindlog/ingest",this.setTag("edition",e==="lite"?"lite-ephemeral-ram":"enterprise-infra-storage"),this.addBreadcrumb({category:"lifecycle",message:`Switched RewindLog operating mode to ${e.toUpperCase()} edition`,data:{mode:e}}),this.notifyListeners())}getQuickShareTicket(e="whatsapp",r){const n=this.getSnapshot(r);return Et(n,e)}exportStandaloneHtmlReport(e){const r=this.getSnapshot(e);lr(r)}forceCheckout(){if(this.isStarted)try{ht.takeFullSnapshot(!0)}catch{}}initDomRecorder(){try{const e=ht({emit:(r,n)=>{n&&(this.domEvents.push([]),this.lastCheckoutAt=Date.now(),this.domEvents.length>this.config.maxDomBlocks&&this.domEvents.shift()),this.domEvents.length===0&&this.domEvents.push([]),this.domEvents[this.domEvents.length-1].push(r),this.notifyListeners()},checkoutEveryNms:this.config.checkoutEveryNms,maskAllInputs:this.config.maskAllInputs,maskInputOptions:{password:!0,tel:this.config.bankingComplianceMode,email:this.config.bankingComplianceMode},maskInputFn:(r,n)=>{if(!r)return r;if(this.config.maskAllInputs)return"•".repeat(Math.min(r.length,12));const i=n?`${n.getAttribute("name")||""} ${n.getAttribute("id")||""} ${n.getAttribute("placeholder")||""} ${n.getAttribute("autocomplete")||""}`.toLowerCase():"";return/(password|pin|mpin|otp|cvv|cvc|pan|card|rekening|norek|nik|npwp|secret|token|saldo|balance)/.test(i)?(this.incrementRedactions(1),"•".repeat(Math.min(r.length,10))):this.config.bankingComplianceMode?Ve(r,s=>this.incrementRedactions(s)):r},maskTextSelector:this.config.bankingComplianceMode?"*":void 0,maskTextFn:r=>!r||!this.config.bankingComplianceMode?r:Ve(r,n=>this.incrementRedactions(n)),blockClass:this.config.blockClass,maskTextClass:this.config.maskTextClass});this.stopRrwebRecorder=e??null}catch(e){this.safeConsoleError("[RewindLog] Failed to initialize DOM recorder:",e)}}initNetworkInterceptor(){this.patchFetch(),this.patchXHR()}shouldIgnoreUrl(e){return e?this.config.endpointUrl&&e.includes(this.config.endpointUrl)?!0:this.config.ignoreUrls.some(r=>typeof r=="string"?e.includes(r):r.test(e)):!1}patchFetch(){if(typeof window.fetch!="function")return;const e=window.fetch.bind(window);this.originalFetch=e,window.fetch=async(r,n)=>{const i=performance.now(),s=Date.now();let o="GET",l="",c={},u=null;try{typeof r=="string"?l=r:r instanceof URL?l=r.toString():r instanceof Request&&(l=r.url,o=r.method||"GET",c=this.sanitizeHeaders(r.headers)),n!=null&&n.method?o=n.method.toUpperCase():o=o.toUpperCase(),n!=null&&n.headers&&(c={...c,...this.sanitizeHeaders(n.headers)}),(n==null?void 0:n.body)!==void 0&&(n==null?void 0:n.body)!==null&&(u=this.sanitizeBodyText(this.serializeBody(n.body)))}catch{}if(this.shouldIgnoreUrl(l))return e(r,n);const a=this.config.bankingComplianceMode?an(l,h=>this.incrementRedactions(h)):l;try{const h=await e(r,n),d=Math.round(performance.now()-i),f=this.sanitizeHeaders(h.headers);try{h.clone().text().then(p=>{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:this.sanitizeBodyText(p),durationMs:d,timestamp:s})}).catch(()=>{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:"[Unable to read response stream]",durationMs:d,timestamp:s})})}catch{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:"[Response clone failed]",durationMs:d,timestamp:s})}return h}catch(h){const d=Math.round(performance.now()-i),f=h instanceof Error?h.message:"Network Request Failed";throw this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:0,ok:!1,requestHeaders:c,requestBody:u,responseBody:`Network Error: ${f}`,durationMs:d,timestamp:s,error:f}),h}}}patchXHR(){if(typeof XMLHttpRequest>"u")return;const e=this,r=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.send,i=XMLHttpRequest.prototype.setRequestHeader;this.originalXHROpen=r,this.originalXHRSend=n,this.originalXHRSetRequestHeader=i,XMLHttpRequest.prototype.open=function(s,o,l=!0,c,u){return this._rewindMethod=(s||"GET").toUpperCase(),this._rewindUrl=typeof o=="string"?o:o.toString(),this._rewindHeaders={},r.call(this,s,o,l,c??null,u??null)},XMLHttpRequest.prototype.setRequestHeader=function(s,o){try{this._rewindHeaders||(this._rewindHeaders={});const l=s.trim().toLowerCase();e.redactedHeaders.has(l)?e.incrementRedactions(1):this._rewindHeaders[s]=e.config.bankingComplianceMode?Ve(o,c=>e.incrementRedactions(c)):o}catch{}return i.call(this,s,o)},XMLHttpRequest.prototype.send=function(s){const o=this._rewindUrl||"";if(e.shouldIgnoreUrl(o))return n.call(this,s);const l=e.config.bankingComplianceMode?an(o,a=>e.incrementRedactions(a)):o;this._rewindStartTime=performance.now();const c=Date.now();this._rewindRequestBody=e.sanitizeBodyText(e.serializeBody(s));const u=()=>{var a;try{const h=this._rewindStartTime?Math.round(performance.now()-this._rewindStartTime):0;let d=null;this.responseType===""||this.responseType==="text"?d=typeof this.responseText=="string"?this.responseText:null:this.responseType==="json"?d=this.response!==void 0?JSON.stringify(this.response):null:d=`[${this.responseType} payload]`;const f=((a=this.getAllResponseHeaders)==null?void 0:a.call(this))||"",m=e.parseRawXHRHeaders(f);e.recordNetworkLog({id:e.generateId("net"),type:"xhr",method:this._rewindMethod||"GET",url:l,status:this.status,ok:this.status>=200&&this.status<300,requestHeaders:this._rewindHeaders,responseHeaders:m,requestBody:this._rewindRequestBody??null,responseBody:e.sanitizeBodyText(d),durationMs:h,timestamp:c})}catch{}finally{this.removeEventListener("loadend",u)}};return this.addEventListener("loadend",u),n.call(this,s)}}initConsoleInterceptor(){["log","info","warn","error"].forEach(r=>{var i;const n=(i=console[r])==null?void 0:i.bind(console);typeof n=="function"&&(this.originalConsole[r]=n,console[r]=(...s)=>{try{const o=s.map(c=>this.formatConsoleArg(c)),l=o.join(" ");if(!l.startsWith("[RewindLog]")){const c=this.config.bankingComplianceMode?Ve(l,u=>this.incrementRedactions(u)):l;this.consoleLogs.push({id:this.generateId("con"),level:r,message:this.truncateString(c,4e3),args:o.map(u=>this.truncateString(this.config.bankingComplianceMode?Ve(u):u,2e3)),timestamp:Date.now()}),this.consoleLogs.length>this.config.maxConsoleLogs&&this.consoleLogs.shift(),this.notifyListeners()}}catch{}n(...s)})})}restoreConsole(){["log","info","warn","error"].forEach(r=>{this.originalConsole[r]&&(console[r]=this.originalConsole[r])}),this.originalConsole={}}initExceptionInterceptor(){this.boundErrorHandler=e=>{const r=e.message||"Uncaught Window Error";this.recordErrorLog({id:this.generateId("err"),type:"uncaught-error",message:this.config.bankingComplianceMode?Ve(r,n=>this.incrementRedactions(n)):r,stack:e.error instanceof Error&&e.error.stack?this.config.bankingComplianceMode?Ve(e.error.stack):e.error.stack:void 0,source:e.filename,lineno:e.lineno,colno:e.colno,timestamp:Date.now()})},this.boundRejectionHandler=e=>{const r=e.reason,n=r instanceof Error?r.message:typeof r=="string"?r:"Unhandled Promise Rejection";this.recordErrorLog({id:this.generateId("err"),type:"unhandled-rejection",message:this.config.bankingComplianceMode?Ve(n,i=>this.incrementRedactions(i)):n,stack:r instanceof Error&&r.stack?this.config.bankingComplianceMode?Ve(r.stack):r.stack:void 0,timestamp:Date.now()})},window.addEventListener("error",this.boundErrorHandler),window.addEventListener("unhandledrejection",this.boundRejectionHandler)}restoreExceptionInterceptor(){this.boundErrorHandler&&(window.removeEventListener("error",this.boundErrorHandler),this.boundErrorHandler=null),this.boundRejectionHandler&&(window.removeEventListener("unhandledrejection",this.boundRejectionHandler),this.boundRejectionHandler=null)}sanitizeHeaders(e){const r={};if(!e)return r;try{const n=(i,s)=>{if(this.redactedHeaders.has(i.trim().toLowerCase())){this.incrementRedactions(1);return}r[i]=this.config.bankingComplianceMode?Ve(s,o=>this.incrementRedactions(o)):s};if(e instanceof Headers)e.forEach((i,s)=>n(s,i));else if(Array.isArray(e))for(const[i,s]of e)n(i,s);else if(typeof e=="object")for(const[i,s]of Object.entries(e))s!==void 0&&n(i,String(s))}catch{}return r}parseRawXHRHeaders(e){const r={};if(!e)return r;const n=e.trim().split(/[\r\n]+/);for(const i of n){const s=i.split(": "),o=s.shift(),l=s.join(": ");o&&(this.redactedHeaders.has(o.trim().toLowerCase())?this.incrementRedactions(1):r[o.trim()]=this.config.bankingComplianceMode?Ve(l,c=>this.incrementRedactions(c)):l)}return r}sanitizeBodyText(e){if(e==null)return null;const r=e.trim();if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{const i=JSON.parse(r),s=this.scrubJsonValue(i,0);return this.truncateString(JSON.stringify(s,null,2),this.config.maxBodyLength)}catch{}const n=this.config.bankingComplianceMode?Ve(e,i=>this.incrementRedactions(i)):e;return this.truncateString(n,this.config.maxBodyLength)}scrubJsonValue(e,r){if(r>8||e===null||e===void 0)return e;if(typeof e=="string")return this.config.bankingComplianceMode?Ve(e,n=>this.incrementRedactions(n)):e;if(Array.isArray(e))return e.map(n=>this.scrubJsonValue(n,r+1));if(typeof e=="object"){const n={};for(const[i,s]of Object.entries(e)){const o=i.trim().toLowerCase();this.redactedBodyKeys.has(o)?(this.incrementRedactions(1),n[i]="[REDACTED_BANKING_PII]"):n[i]=this.scrubJsonValue(s,r+1)}return n}return e}serializeBody(e){if(e==null)return null;if(typeof e=="string")return e;if(e instanceof URLSearchParams){const r={};return e.forEach((n,i)=>{this.redactedBodyKeys.has(i.trim().toLowerCase())?(this.incrementRedactions(1),r[i]="[REDACTED_BANKING_PII]"):r[i]=this.config.bankingComplianceMode?Ve(n,s=>this.incrementRedactions(s)):n}),new URLSearchParams(r).toString()}if(e instanceof FormData){const r={};return e.forEach((n,i)=>{this.redactedBodyKeys.has(i.trim().toLowerCase())?(this.incrementRedactions(1),r[i]="[REDACTED_BANKING_PII]"):r[i]=typeof n=="string"?this.config.bankingComplianceMode?Ve(n,s=>this.incrementRedactions(s)):n:`[File: ${n.name}]`}),JSON.stringify(r)}return e instanceof Blob?`[Blob: ${e.type||"unknown"}, ${e.size} bytes]`:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?`[Binary data: ${e.byteLength} bytes]`:"[Stream or Document Body]"}formatConsoleArg(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}${e.stack?`
|
|
469
|
+
${e.stack}`:""}`;if(typeof e=="object"&&e!==null)try{return JSON.stringify(this.scrubJsonValue(e,0))}catch{return Object.prototype.toString.call(e)}return String(e)}truncateString(e,r){return e.length<=r?e:`${e.slice(0,r)}... [Truncated ${e.length-r} chars]`}incrementRedactions(e){this.totalRedactionsCount+=e}recordNetworkLog(e){this.networkLogs.push(e),this.networkLogs.length>this.config.maxNetworkLogs&&this.networkLogs.shift(),this.notifyListeners()}recordErrorLog(e){this.errorLogs.push(e),this.errorLogs.length>this.config.maxErrorLogs&&this.errorLogs.shift(),this.notifyListeners()}buildMetadata(e,r,n,i=!1){const s=Date.now(),o=typeof window<"u"?window.location.href:"";return{reportId:this.generateId("rwl"),sdkVersion:cl,environment:this.config.environment,release:this.config.release,exportedAt:new Date(s).toISOString(),exportedTimestamp:s,sessionStartedAt:this.sessionStartedAt,sessionDurationMs:s-this.sessionStartedAt,url:this.config.bankingComplianceMode?an(o):o,userAgent:typeof navigator<"u"?navigator.userAgent:"",language:typeof navigator<"u"?navigator.language:"en",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",viewport:{width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1},user:this.user?{...this.user}:null,tags:{...this.tags},securityAudit:{complianceProfile:"BANKING_PCI_DSS_V4_OJK_UUPDP",piiScrubbingEnabled:this.config.bankingComplianceMode,maskAllDomInputs:this.config.maskAllInputs,domTextPatternMasking:this.config.bankingComplianceMode,urlQuerySanitization:this.config.bankingComplianceMode,totalRedactionsCount:this.totalRedactionsCount,integrityAlgorithm:"SHA-256",integrityHashSha256:n,encryptedAtRest:i},ringBufferStats:{activeDomBlocks:this.domEvents.length,maxDomBlocks:this.config.maxDomBlocks,checkoutIntervalMs:this.config.checkoutEveryNms,totalDomEvents:e,networkLogsCount:this.networkLogs.length,maxNetworkLogs:this.config.maxNetworkLogs,consoleLogsCount:this.consoleLogs.length,errorLogsCount:this.errorLogs.length,estimatedPayloadKB:r}}}getSnapshot(e,r,n=!1){const i=this.domEvents.flat(),s=this.getStats(),o={...e?{issue:e}:{},metadata:this.buildMetadata(i.length,s.estimatedMemoryKB,r,n),networkLogs:[...this.networkLogs],consoleLogs:[...this.consoleLogs],errorLogs:[...this.errorLogs],breadcrumbs:[...this.breadcrumbs],domEvents:i};return{executiveSummary:mt(o),...o}}exportBugReport(e){const r=(e==null?void 0:e.download)??!0,n=e!=null&&e.title||e!=null&&e.description||e!=null&&e.severity||e!=null&&e.stepsToReproduce?{title:e.title,description:e.description,severity:e.severity??"high",stepsToReproduce:e.stepsToReproduce,reportedBy:e.reportedBy??this.user??void 0}:void 0,i=this.getSnapshot(n);return r&&typeof document<"u"&&or(i).then(s=>{i.metadata.securityAudit.integrityHashSha256=s,this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${i.metadata.exportedTimestamp}.json`)}).catch(()=>{this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${i.metadata.exportedTimestamp}.json`)}),i}async exportSecureBankingReport(e){const r=e.title||e.description||e.severity||e.stepsToReproduce?{title:e.title,description:e.description,severity:e.severity??"high",stepsToReproduce:e.stepsToReproduce,reportedBy:e.reportedBy??this.user??void 0}:void 0,n=!!(e.passphrase&&e.passphrase.trim().length>0),i=this.getSnapshot(r,void 0,n),s=await or(i);if(i.metadata.securityAudit.integrityHashSha256=s,(e.download??!0)&&typeof document<"u"){const l=i.metadata.exportedTimestamp;if(n&&e.passphrase){const c=await zs(JSON.stringify(i),e.passphrase.trim());this.triggerFileDownload(JSON.stringify(c,null,2),`rewindlog-encrypted-${l}.json`)}else this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${l}.json`)}return{payload:i,sha256Hex:s,encrypted:n}}triggerFileDownload(e,r){try{const n=new Blob([e],{type:"application/json"}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=r,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>{URL.revokeObjectURL(i)},1e3)}catch(n){this.safeConsoleError("[RewindLog] Failed to trigger file download:",n)}}async sendBugReport(e,r){const n=e||this.config.endpointUrl||"/api/v1/rewindlog/ingest",i=this.getSnapshot(r),s=await or(i);i.metadata.securityAudit.integrityHashSha256=s;const l=await(this.originalFetch??window.fetch.bind(window))(n,{method:"POST",headers:{"Content-Type":"application/json","X-RewindLog-Version":cl,"X-RewindLog-Integrity-SHA256":s},body:JSON.stringify(i)});let c={};try{c=await l.json()}catch{}return{ok:l.ok,status:l.status,payload:i,fileName:c.fileName,reportId:c.reportId,sha256:c.sha256??s}}notifyListeners(){if(this.listeners.size===0)return;const e=this.getStats();this.listeners.forEach(r=>{try{r(e)}catch{}})}safeConsoleError(...e){(this.originalConsole.error??console.error)(...e)}generateId(e){return`${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,7)}`}}var ys={exports:{}},gr={},bs={exports:{}},ge={};/**
|
|
470
|
+
* @license React
|
|
471
|
+
* react.production.min.js
|
|
472
|
+
*
|
|
473
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
474
|
+
*
|
|
475
|
+
* This source code is licensed under the MIT license found in the
|
|
476
|
+
* LICENSE file in the root directory of this source tree.
|
|
477
|
+
*/var ul;function bp(){if(ul)return ge;ul=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),h=Symbol.iterator;function d(T){return T===null||typeof T!="object"?null:(T=h&&T[h]||T["@@iterator"],typeof T=="function"?T:null)}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,p={};function y(T,U,_){this.props=T,this.context=U,this.refs=p,this.updater=_||f}y.prototype.isReactComponent={},y.prototype.setState=function(T,U){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,U,"setState")},y.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function v(){}v.prototype=y.prototype;function w(T,U,_){this.props=T,this.context=U,this.refs=p,this.updater=_||f}var b=w.prototype=new v;b.constructor=w,m(b,y.prototype),b.isPureReactComponent=!0;var C=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function I(T,U,_){var te,ie={},xe=null,se=null;if(U!=null)for(te in U.ref!==void 0&&(se=U.ref),U.key!==void 0&&(xe=""+U.key),U)S.call(U,te)&&!k.hasOwnProperty(te)&&(ie[te]=U[te]);var le=arguments.length-2;if(le===1)ie.children=_;else if(1<le){for(var pe=Array(le),ke=0;ke<le;ke++)pe[ke]=arguments[ke+2];ie.children=pe}if(T&&T.defaultProps)for(te in le=T.defaultProps,le)ie[te]===void 0&&(ie[te]=le[te]);return{$$typeof:t,type:T,key:xe,ref:se,props:ie,_owner:x.current}}function B(T,U){return{$$typeof:t,type:T.type,key:U,ref:T.ref,props:T.props,_owner:T._owner}}function D(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function H(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(_){return U[_]})}var z=/\/+/g;function A(T,U){return typeof T=="object"&&T!==null&&T.key!=null?H(""+T.key):U.toString(36)}function be(T,U,_,te,ie){var xe=typeof T;(xe==="undefined"||xe==="boolean")&&(T=null);var se=!1;if(T===null)se=!0;else switch(xe){case"string":case"number":se=!0;break;case"object":switch(T.$$typeof){case t:case e:se=!0}}if(se)return se=T,ie=ie(se),T=te===""?"."+A(se,0):te,C(ie)?(_="",T!=null&&(_=T.replace(z,"$&/")+"/"),be(ie,U,_,"",function(ke){return ke})):ie!=null&&(D(ie)&&(ie=B(ie,_+(!ie.key||se&&se.key===ie.key?"":(""+ie.key).replace(z,"$&/")+"/")+T)),U.push(ie)),1;if(se=0,te=te===""?".":te+":",C(T))for(var le=0;le<T.length;le++){xe=T[le];var pe=te+A(xe,le);se+=be(xe,U,_,pe,ie)}else if(pe=d(T),typeof pe=="function")for(T=pe.call(T),le=0;!(xe=T.next()).done;)xe=xe.value,pe=te+A(xe,le++),se+=be(xe,U,_,pe,ie);else if(xe==="object")throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return se}function fe(T,U,_){if(T==null)return T;var te=[],ie=0;return be(T,te,"","",function(xe){return U.call(_,xe,ie++)}),te}function ne(T){if(T._status===-1){var U=T._result;U=U(),U.then(function(_){(T._status===0||T._status===-1)&&(T._status=1,T._result=_)},function(_){(T._status===0||T._status===-1)&&(T._status=2,T._result=_)}),T._status===-1&&(T._status=0,T._result=U)}if(T._status===1)return T._result.default;throw T._result}var F={current:null},ue={transition:null},j={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:ue,ReactCurrentOwner:x};function X(){throw Error("act(...) is not supported in production builds of React.")}return ge.Children={map:fe,forEach:function(T,U,_){fe(T,function(){U.apply(this,arguments)},_)},count:function(T){var U=0;return fe(T,function(){U++}),U},toArray:function(T){return fe(T,function(U){return U})||[]},only:function(T){if(!D(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ge.Component=y,ge.Fragment=r,ge.Profiler=i,ge.PureComponent=w,ge.StrictMode=n,ge.Suspense=c,ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,ge.act=X,ge.cloneElement=function(T,U,_){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var te=m({},T.props),ie=T.key,xe=T.ref,se=T._owner;if(U!=null){if(U.ref!==void 0&&(xe=U.ref,se=x.current),U.key!==void 0&&(ie=""+U.key),T.type&&T.type.defaultProps)var le=T.type.defaultProps;for(pe in U)S.call(U,pe)&&!k.hasOwnProperty(pe)&&(te[pe]=U[pe]===void 0&&le!==void 0?le[pe]:U[pe])}var pe=arguments.length-2;if(pe===1)te.children=_;else if(1<pe){le=Array(pe);for(var ke=0;ke<pe;ke++)le[ke]=arguments[ke+2];te.children=le}return{$$typeof:t,type:T.type,key:ie,ref:xe,props:te,_owner:se}},ge.createContext=function(T){return T={$$typeof:o,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:s,_context:T},T.Consumer=T},ge.createElement=I,ge.createFactory=function(T){var U=I.bind(null,T);return U.type=T,U},ge.createRef=function(){return{current:null}},ge.forwardRef=function(T){return{$$typeof:l,render:T}},ge.isValidElement=D,ge.lazy=function(T){return{$$typeof:a,_payload:{_status:-1,_result:T},_init:ne}},ge.memo=function(T,U){return{$$typeof:u,type:T,compare:U===void 0?null:U}},ge.startTransition=function(T){var U=ue.transition;ue.transition={};try{T()}finally{ue.transition=U}},ge.unstable_act=X,ge.useCallback=function(T,U){return F.current.useCallback(T,U)},ge.useContext=function(T){return F.current.useContext(T)},ge.useDebugValue=function(){},ge.useDeferredValue=function(T){return F.current.useDeferredValue(T)},ge.useEffect=function(T,U){return F.current.useEffect(T,U)},ge.useId=function(){return F.current.useId()},ge.useImperativeHandle=function(T,U,_){return F.current.useImperativeHandle(T,U,_)},ge.useInsertionEffect=function(T,U){return F.current.useInsertionEffect(T,U)},ge.useLayoutEffect=function(T,U){return F.current.useLayoutEffect(T,U)},ge.useMemo=function(T,U){return F.current.useMemo(T,U)},ge.useReducer=function(T,U,_){return F.current.useReducer(T,U,_)},ge.useRef=function(T){return F.current.useRef(T)},ge.useState=function(T){return F.current.useState(T)},ge.useSyncExternalStore=function(T,U,_){return F.current.useSyncExternalStore(T,U,_)},ge.useTransition=function(){return F.current.useTransition()},ge.version="18.3.1",ge}var Er={exports:{}};/**
|
|
478
|
+
* @license React
|
|
479
|
+
* react.development.js
|
|
480
|
+
*
|
|
481
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
482
|
+
*
|
|
483
|
+
* This source code is licensed under the MIT license found in the
|
|
484
|
+
* LICENSE file in the root directory of this source tree.
|
|
485
|
+
*/Er.exports;var dl;function vp(){return dl||(dl=1,function(t,e){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r="18.3.1",n=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function w(g){if(g===null||typeof g!="object")return null;var R=y&&g[y]||g[v];return typeof R=="function"?R:null}var b={current:null},C={transition:null},S={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},x={current:null},k={},I=null;function B(g){I=g}k.setExtraStackFrame=function(g){I=g},k.getCurrentStack=null,k.getStackAddendum=function(){var g="";I&&(g+=I);var R=k.getCurrentStack;return R&&(g+=R()||""),g};var D=!1,H=!1,z=!1,A=!1,be=!1,fe={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:C,ReactCurrentOwner:x};fe.ReactDebugCurrentFrame=k,fe.ReactCurrentActQueue=S;function ne(g){{for(var R=arguments.length,O=new Array(R>1?R-1:0),P=1;P<R;P++)O[P-1]=arguments[P];ue("warn",g,O)}}function F(g){{for(var R=arguments.length,O=new Array(R>1?R-1:0),P=1;P<R;P++)O[P-1]=arguments[P];ue("error",g,O)}}function ue(g,R,O){{var P=fe.ReactDebugCurrentFrame,q=P.getStackAddendum();q!==""&&(R+="%s",O=O.concat([q]));var oe=O.map(function(J){return String(J)});oe.unshift("Warning: "+R),Function.prototype.apply.call(console[g],console,oe)}}var j={};function X(g,R){{var O=g.constructor,P=O&&(O.displayName||O.name)||"ReactClass",q=P+"."+R;if(j[q])return;F("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",R,P),j[q]=!0}}var T={isMounted:function(g){return!1},enqueueForceUpdate:function(g,R,O){X(g,"forceUpdate")},enqueueReplaceState:function(g,R,O,P){X(g,"replaceState")},enqueueSetState:function(g,R,O,P){X(g,"setState")}},U=Object.assign,_={};Object.freeze(_);function te(g,R,O){this.props=g,this.context=R,this.refs=_,this.updater=O||T}te.prototype.isReactComponent={},te.prototype.setState=function(g,R){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,R,"setState")},te.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};{var ie={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},xe=function(g,R){Object.defineProperty(te.prototype,g,{get:function(){ne("%s(...) is deprecated in plain JavaScript React classes. %s",R[0],R[1])}})};for(var se in ie)ie.hasOwnProperty(se)&&xe(se,ie[se])}function le(){}le.prototype=te.prototype;function pe(g,R,O){this.props=g,this.context=R,this.refs=_,this.updater=O||T}var ke=pe.prototype=new le;ke.constructor=pe,U(ke,te.prototype),ke.isPureReactComponent=!0;function ee(){var g={current:null};return Object.seal(g),g}var Te=Array.isArray;function re(g){return Te(g)}function Ue(g){{var R=typeof Symbol=="function"&&Symbol.toStringTag,O=R&&g[Symbol.toStringTag]||g.constructor.name||"Object";return O}}function ae(g){try{return Pe(g),!1}catch{return!0}}function Pe(g){return""+g}function ve(g){if(ae(g))return F("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ue(g)),Pe(g)}function gt(g,R,O){var P=g.displayName;if(P)return P;var q=R.displayName||R.name||"";return q!==""?O+"("+q+")":O}function vt(g){return g.displayName||"Context"}function Ke(g){if(g==null)return null;if(typeof g.tag=="number"&&F("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case s:return"Fragment";case i:return"Portal";case l:return"Profiler";case o:return"StrictMode";case h:return"Suspense";case d:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case u:var R=g;return vt(R)+".Consumer";case c:var O=g;return vt(O._context)+".Provider";case a:return gt(g,g.render,"ForwardRef");case f:var P=g.displayName||null;return P!==null?P:Ke(g.type)||"Memo";case m:{var q=g,oe=q._payload,J=q._init;try{return Ke(J(oe))}catch{return null}}}return null}var wt=Object.prototype.hasOwnProperty,Tt={key:!0,ref:!0,__self:!0,__source:!0},nt,Lt,St;St={};function N(g){if(wt.call(g,"ref")){var R=Object.getOwnPropertyDescriptor(g,"ref").get;if(R&&R.isReactWarning)return!1}return g.ref!==void 0}function Q(g){if(wt.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function Ae(g,R){var O=function(){nt||(nt=!0,F("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};O.isReactWarning=!0,Object.defineProperty(g,"key",{get:O,configurable:!0})}function Ze(g,R){var O=function(){Lt||(Lt=!0,F("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};O.isReactWarning=!0,Object.defineProperty(g,"ref",{get:O,configurable:!0})}function tt(g){if(typeof g.ref=="string"&&x.current&&g.__self&&x.current.stateNode!==g.__self){var R=Ke(x.current.type);St[R]||(F('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R,g.ref),St[R]=!0)}}var ct=function(g,R,O,P,q,oe,J){var ce={$$typeof:n,type:g,key:R,ref:O,props:J,_owner:oe};return ce._store={},Object.defineProperty(ce._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ce,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.defineProperty(ce,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(ce.props),Object.freeze(ce)),ce};function Ht(g,R,O){var P,q={},oe=null,J=null,ce=null,Re=null;if(R!=null){N(R)&&(J=R.ref,tt(R)),Q(R)&&(ve(R.key),oe=""+R.key),ce=R.__self===void 0?null:R.__self,Re=R.__source===void 0?null:R.__source;for(P in R)wt.call(R,P)&&!Tt.hasOwnProperty(P)&&(q[P]=R[P])}var De=arguments.length-2;if(De===1)q.children=O;else if(De>1){for(var je=Array(De),Be=0;Be<De;Be++)je[Be]=arguments[Be+2];Object.freeze&&Object.freeze(je),q.children=je}if(g&&g.defaultProps){var ze=g.defaultProps;for(P in ze)q[P]===void 0&&(q[P]=ze[P])}if(oe||J){var Ge=typeof g=="function"?g.displayName||g.name||"Unknown":g;oe&&Ae(q,Ge),J&&Ze(q,Ge)}return ct(g,oe,J,ce,Re,x.current,q)}function cr(g,R){var O=ct(g.type,R,g.ref,g._self,g._source,g._owner,g.props);return O}function ur(g,R,O){if(g==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var P,q=U({},g.props),oe=g.key,J=g.ref,ce=g._self,Re=g._source,De=g._owner;if(R!=null){N(R)&&(J=R.ref,De=x.current),Q(R)&&(ve(R.key),oe=""+R.key);var je;g.type&&g.type.defaultProps&&(je=g.type.defaultProps);for(P in R)wt.call(R,P)&&!Tt.hasOwnProperty(P)&&(R[P]===void 0&&je!==void 0?q[P]=je[P]:q[P]=R[P])}var Be=arguments.length-2;if(Be===1)q.children=O;else if(Be>1){for(var ze=Array(Be),Ge=0;Ge<Be;Ge++)ze[Ge]=arguments[Ge+2];q.children=ze}return ct(g.type,oe,J,ce,Re,De,q)}function yt(g){return typeof g=="object"&&g!==null&&g.$$typeof===n}var $r=".",Nn=":";function dr(g){var R=/[=:]/g,O={"=":"=0",":":"=2"},P=g.replace(R,function(q){return O[q]});return"$"+P}var fr=!1,At=/\/+/g;function qt(g){return g.replace(At,"$&/")}function Pt(g,R){return typeof g=="object"&&g!==null&&g.key!=null?(ve(g.key),dr(""+g.key)):R.toString(36)}function $t(g,R,O,P,q){var oe=typeof g;(oe==="undefined"||oe==="boolean")&&(g=null);var J=!1;if(g===null)J=!0;else switch(oe){case"string":case"number":J=!0;break;case"object":switch(g.$$typeof){case n:case i:J=!0}}if(J){var ce=g,Re=q(ce),De=P===""?$r+Pt(ce,0):P;if(re(Re)){var je="";De!=null&&(je=qt(De)+"/"),$t(Re,R,je,"",function(eu){return eu})}else Re!=null&&(yt(Re)&&(Re.key&&(!ce||ce.key!==Re.key)&&ve(Re.key),Re=cr(Re,O+(Re.key&&(!ce||ce.key!==Re.key)?qt(""+Re.key)+"/":"")+De)),R.push(Re));return 1}var Be,ze,Ge=0,Je=P===""?$r:P+Nn;if(re(g))for(var Gr=0;Gr<g.length;Gr++)Be=g[Gr],ze=Je+Pt(Be,Gr),Ge+=$t(Be,R,O,ze,q);else{var Kn=w(g);if(typeof Kn=="function"){var mo=g;Kn===mo.entries&&(fr||ne("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),fr=!0);for(var Qc=Kn.call(mo),go,Zc=0;!(go=Qc.next()).done;)Be=go.value,ze=Je+Pt(Be,Zc++),Ge+=$t(Be,R,O,ze,q)}else if(oe==="object"){var yo=String(g);throw new Error("Objects are not valid as a React child (found: "+(yo==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":yo)+"). If you meant to render a collection of children, use an array instead.")}}return Ge}function Vt(g,R,O){if(g==null)return g;var P=[],q=0;return $t(g,P,"","",function(oe){return R.call(O,oe,q++)}),P}function jr(g){var R=0;return Vt(g,function(){R++}),R}function Dn(g,R,O){Vt(g,function(){R.apply(this,arguments)},O)}function Br(g){return Vt(g,function(R){return R})||[]}function Fr(g){if(!yt(g))throw new Error("React.Children.only expected to receive a single React element child.");return g}function _n(g){var R={$$typeof:u,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};R.Provider={$$typeof:c,_context:R};var O=!1,P=!1,q=!1;{var oe={$$typeof:u,_context:R};Object.defineProperties(oe,{Provider:{get:function(){return P||(P=!0,F("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),R.Provider},set:function(J){R.Provider=J}},_currentValue:{get:function(){return R._currentValue},set:function(J){R._currentValue=J}},_currentValue2:{get:function(){return R._currentValue2},set:function(J){R._currentValue2=J}},_threadCount:{get:function(){return R._threadCount},set:function(J){R._threadCount=J}},Consumer:{get:function(){return O||(O=!0,F("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),R.Consumer}},displayName:{get:function(){return R.displayName},set:function(J){q||(ne("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",J),q=!0)}}}),R.Consumer=oe}return R._currentRenderer=null,R._currentRenderer2=null,R}var jt=-1,Gt=0,hr=1,Ln=2;function Pn(g){if(g._status===jt){var R=g._result,O=R();if(O.then(function(oe){if(g._status===Gt||g._status===jt){var J=g;J._status=hr,J._result=oe}},function(oe){if(g._status===Gt||g._status===jt){var J=g;J._status=Ln,J._result=oe}}),g._status===jt){var P=g;P._status=Gt,P._result=O}}if(g._status===hr){var q=g._result;return q===void 0&&F(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
486
|
+
|
|
487
|
+
Your code should look like:
|
|
488
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
489
|
+
|
|
490
|
+
Did you accidentally put curly braces around the import?`,q),"default"in q||F(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
491
|
+
|
|
492
|
+
Your code should look like:
|
|
493
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,q),q.default}else throw g._result}function $n(g){var R={_status:jt,_result:g},O={$$typeof:m,_payload:R,_init:Pn};{var P,q;Object.defineProperties(O,{defaultProps:{configurable:!0,get:function(){return P},set:function(oe){F("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),P=oe,Object.defineProperty(O,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return q},set:function(oe){F("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),q=oe,Object.defineProperty(O,"propTypes",{enumerable:!0})}}})}return O}function jn(g){g!=null&&g.$$typeof===f?F("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof g!="function"?F("forwardRef requires a render function but was given %s.",g===null?"null":typeof g):g.length!==0&&g.length!==2&&F("forwardRef render functions accept exactly two parameters: props and ref. %s",g.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),g!=null&&(g.defaultProps!=null||g.propTypes!=null)&&F("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var R={$$typeof:a,render:g};{var O;Object.defineProperty(R,"displayName",{enumerable:!1,configurable:!0,get:function(){return O},set:function(P){O=P,!g.name&&!g.displayName&&(g.displayName=P)}})}return R}var E;E=Symbol.for("react.module.reference");function W(g){return!!(typeof g=="string"||typeof g=="function"||g===s||g===l||be||g===o||g===h||g===d||A||g===p||D||H||z||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===f||g.$$typeof===c||g.$$typeof===u||g.$$typeof===a||g.$$typeof===E||g.getModuleId!==void 0))}function V(g,R){W(g)||F("memo: The first argument must be a component. Instead received: %s",g===null?"null":typeof g);var O={$$typeof:f,type:g,compare:R===void 0?null:R};{var P;Object.defineProperty(O,"displayName",{enumerable:!1,configurable:!0,get:function(){return P},set:function(q){P=q,!g.name&&!g.displayName&&(g.displayName=q)}})}return O}function Y(){var g=b.current;return g===null&&F(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
494
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
495
|
+
2. You might be breaking the Rules of Hooks
|
|
496
|
+
3. You might have more than one copy of React in the same app
|
|
497
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),g}function Ie(g){var R=Y();if(g._context!==void 0){var O=g._context;O.Consumer===g?F("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):O.Provider===g&&F("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return R.useContext(g)}function Ne(g){var R=Y();return R.useState(g)}function we(g,R,O){var P=Y();return P.useReducer(g,R,O)}function me(g){var R=Y();return R.useRef(g)}function Ye(g,R){var O=Y();return O.useEffect(g,R)}function We(g,R){var O=Y();return O.useInsertionEffect(g,R)}function qe(g,R){var O=Y();return O.useLayoutEffect(g,R)}function it(g,R){var O=Y();return O.useCallback(g,R)}function It(g,R){var O=Y();return O.useMemo(g,R)}function xt(g,R,O){var P=Y();return P.useImperativeHandle(g,R,O)}function et(g,R){{var O=Y();return O.useDebugValue(g,R)}}function pr(){var g=Y();return g.useTransition()}function Bn(g){var R=Y();return R.useDeferredValue(g)}function Fn(){var g=Y();return g.useId()}function Dc(g,R,O){var P=Y();return P.useSyncExternalStore(g,R,O)}var mr=0,Gs,Ks,Ys,Js,Xs,Qs,Zs;function eo(){}eo.__reactDisabledLog=!0;function _c(){{if(mr===0){Gs=console.log,Ks=console.info,Ys=console.warn,Js=console.error,Xs=console.group,Qs=console.groupCollapsed,Zs=console.groupEnd;var g={configurable:!0,enumerable:!0,value:eo,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}mr++}}function Lc(){{if(mr--,mr===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},g,{value:Gs}),info:U({},g,{value:Ks}),warn:U({},g,{value:Ys}),error:U({},g,{value:Js}),group:U({},g,{value:Xs}),groupCollapsed:U({},g,{value:Qs}),groupEnd:U({},g,{value:Zs})})}mr<0&&F("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Un=fe.ReactCurrentDispatcher,Wn;function Ur(g,R,O){{if(Wn===void 0)try{throw Error()}catch(q){var P=q.stack.trim().match(/\n( *(at )?)/);Wn=P&&P[1]||""}return`
|
|
498
|
+
`+Wn+g}}var zn=!1,Wr;{var Pc=typeof WeakMap=="function"?WeakMap:Map;Wr=new Pc}function to(g,R){if(!g||zn)return"";{var O=Wr.get(g);if(O!==void 0)return O}var P;zn=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=Un.current,Un.current=null,_c();try{if(R){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Je){P=Je}Reflect.construct(g,[],J)}else{try{J.call()}catch(Je){P=Je}g.call(J.prototype)}}else{try{throw Error()}catch(Je){P=Je}g()}}catch(Je){if(Je&&P&&typeof Je.stack=="string"){for(var ce=Je.stack.split(`
|
|
499
|
+
`),Re=P.stack.split(`
|
|
500
|
+
`),De=ce.length-1,je=Re.length-1;De>=1&&je>=0&&ce[De]!==Re[je];)je--;for(;De>=1&&je>=0;De--,je--)if(ce[De]!==Re[je]){if(De!==1||je!==1)do if(De--,je--,je<0||ce[De]!==Re[je]){var Be=`
|
|
501
|
+
`+ce[De].replace(" at new "," at ");return g.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",g.displayName)),typeof g=="function"&&Wr.set(g,Be),Be}while(De>=1&&je>=0);break}}}finally{zn=!1,Un.current=oe,Lc(),Error.prepareStackTrace=q}var ze=g?g.displayName||g.name:"",Ge=ze?Ur(ze):"";return typeof g=="function"&&Wr.set(g,Ge),Ge}function $c(g,R,O){return to(g,!1)}function jc(g){var R=g.prototype;return!!(R&&R.isReactComponent)}function zr(g,R,O){if(g==null)return"";if(typeof g=="function")return to(g,jc(g));if(typeof g=="string")return Ur(g);switch(g){case h:return Ur("Suspense");case d:return Ur("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case a:return $c(g.render);case f:return zr(g.type,R,O);case m:{var P=g,q=P._payload,oe=P._init;try{return zr(oe(q),R,O)}catch{}}}return""}var ro={},no=fe.ReactDebugCurrentFrame;function Hr(g){if(g){var R=g._owner,O=zr(g.type,g._source,R?R.type:null);no.setExtraStackFrame(O)}else no.setExtraStackFrame(null)}function Bc(g,R,O,P,q){{var oe=Function.call.bind(wt);for(var J in g)if(oe(g,J)){var ce=void 0;try{if(typeof g[J]!="function"){var Re=Error((P||"React class")+": "+O+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Re.name="Invariant Violation",Re}ce=g[J](R,J,P,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(De){ce=De}ce&&!(ce instanceof Error)&&(Hr(q),F("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",P||"React class",O,J,typeof ce),Hr(null)),ce instanceof Error&&!(ce.message in ro)&&(ro[ce.message]=!0,Hr(q),F("Failed %s type: %s",O,ce.message),Hr(null))}}}function Kt(g){if(g){var R=g._owner,O=zr(g.type,g._source,R?R.type:null);B(O)}else B(null)}var Hn;Hn=!1;function io(){if(x.current){var g=Ke(x.current.type);if(g)return`
|
|
502
|
+
|
|
503
|
+
Check the render method of \``+g+"`."}return""}function Fc(g){if(g!==void 0){var R=g.fileName.replace(/^.*[\\\/]/,""),O=g.lineNumber;return`
|
|
504
|
+
|
|
505
|
+
Check your code at `+R+":"+O+"."}return""}function Uc(g){return g!=null?Fc(g.__source):""}var so={};function Wc(g){var R=io();if(!R){var O=typeof g=="string"?g:g.displayName||g.name;O&&(R=`
|
|
506
|
+
|
|
507
|
+
Check the top-level render call using <`+O+">.")}return R}function oo(g,R){if(!(!g._store||g._store.validated||g.key!=null)){g._store.validated=!0;var O=Wc(R);if(!so[O]){so[O]=!0;var P="";g&&g._owner&&g._owner!==x.current&&(P=" It was passed a child from "+Ke(g._owner.type)+"."),Kt(g),F('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,P),Kt(null)}}}function ao(g,R){if(typeof g=="object"){if(re(g))for(var O=0;O<g.length;O++){var P=g[O];yt(P)&&oo(P,R)}else if(yt(g))g._store&&(g._store.validated=!0);else if(g){var q=w(g);if(typeof q=="function"&&q!==g.entries)for(var oe=q.call(g),J;!(J=oe.next()).done;)yt(J.value)&&oo(J.value,R)}}}function lo(g){{var R=g.type;if(R==null||typeof R=="string")return;var O;if(typeof R=="function")O=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===a||R.$$typeof===f))O=R.propTypes;else return;if(O){var P=Ke(R);Bc(O,g.props,"prop",P,g)}else if(R.PropTypes!==void 0&&!Hn){Hn=!0;var q=Ke(R);F("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&F("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function zc(g){{for(var R=Object.keys(g.props),O=0;O<R.length;O++){var P=R[O];if(P!=="children"&&P!=="key"){Kt(g),F("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),Kt(null);break}}g.ref!==null&&(Kt(g),F("Invalid attribute `ref` supplied to `React.Fragment`."),Kt(null))}}function co(g,R,O){var P=W(g);if(!P){var q="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var oe=Uc(R);oe?q+=oe:q+=io();var J;g===null?J="null":re(g)?J="array":g!==void 0&&g.$$typeof===n?(J="<"+(Ke(g.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):J=typeof g,F("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,q)}var ce=Ht.apply(this,arguments);if(ce==null)return ce;if(P)for(var Re=2;Re<arguments.length;Re++)ao(arguments[Re],g);return g===s?zc(ce):lo(ce),ce}var uo=!1;function Hc(g){var R=co.bind(null,g);return R.type=g,uo||(uo=!0,ne("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(R,"type",{enumerable:!1,get:function(){return ne("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:g}),g}}),R}function qc(g,R,O){for(var P=ur.apply(this,arguments),q=2;q<arguments.length;q++)ao(arguments[q],P.type);return lo(P),P}function Vc(g,R){var O=C.transition;C.transition={};var P=C.transition;C.transition._updatedFibers=new Set;try{g()}finally{if(C.transition=O,O===null&&P._updatedFibers){var q=P._updatedFibers.size;q>10&&ne("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),P._updatedFibers.clear()}}}var fo=!1,qr=null;function Gc(g){if(qr===null)try{var R=("require"+Math.random()).slice(0,7),O=t&&t[R];qr=O.call(t,"timers").setImmediate}catch{qr=function(q){fo===!1&&(fo=!0,typeof MessageChannel>"u"&&F("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var oe=new MessageChannel;oe.port1.onmessage=q,oe.port2.postMessage(void 0)}}return qr(g)}var Yt=0,ho=!1;function po(g){{var R=Yt;Yt++,S.current===null&&(S.current=[]);var O=S.isBatchingLegacy,P;try{if(S.isBatchingLegacy=!0,P=g(),!O&&S.didScheduleLegacyUpdate){var q=S.current;q!==null&&(S.didScheduleLegacyUpdate=!1,Gn(q))}}catch(ze){throw Vr(R),ze}finally{S.isBatchingLegacy=O}if(P!==null&&typeof P=="object"&&typeof P.then=="function"){var oe=P,J=!1,ce={then:function(ze,Ge){J=!0,oe.then(function(Je){Vr(R),Yt===0?qn(Je,ze,Ge):ze(Je)},function(Je){Vr(R),Ge(Je)})}};return!ho&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){J||(ho=!0,F("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),ce}else{var Re=P;if(Vr(R),Yt===0){var De=S.current;De!==null&&(Gn(De),S.current=null);var je={then:function(ze,Ge){S.current===null?(S.current=[],qn(Re,ze,Ge)):ze(Re)}};return je}else{var Be={then:function(ze,Ge){ze(Re)}};return Be}}}}function Vr(g){g!==Yt-1&&F("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Yt=g}function qn(g,R,O){{var P=S.current;if(P!==null)try{Gn(P),Gc(function(){P.length===0?(S.current=null,R(g)):qn(g,R,O)})}catch(q){O(q)}else R(g)}}var Vn=!1;function Gn(g){if(!Vn){Vn=!0;var R=0;try{for(;R<g.length;R++){var O=g[R];do O=O(!0);while(O!==null)}g.length=0}catch(P){throw g=g.slice(R+1),P}finally{Vn=!1}}}var Kc=co,Yc=qc,Jc=Hc,Xc={map:Vt,forEach:Dn,count:jr,toArray:Br,only:Fr};e.Children=Xc,e.Component=te,e.Fragment=s,e.Profiler=l,e.PureComponent=pe,e.StrictMode=o,e.Suspense=h,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fe,e.act=po,e.cloneElement=Yc,e.createContext=_n,e.createElement=Kc,e.createFactory=Jc,e.createRef=ee,e.forwardRef=jn,e.isValidElement=yt,e.lazy=$n,e.memo=V,e.startTransition=Vc,e.unstable_act=po,e.useCallback=it,e.useContext=Ie,e.useDebugValue=et,e.useDeferredValue=Bn,e.useEffect=Ye,e.useId=Fn,e.useImperativeHandle=xt,e.useInsertionEffect=We,e.useLayoutEffect=qe,e.useMemo=It,e.useReducer=we,e.useRef=me,e.useState=Ne,e.useSyncExternalStore=Dc,e.useTransition=pr,e.version=r,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Er,Er.exports)),Er.exports}process.env.NODE_ENV==="production"?bs.exports=bp():bs.exports=vp();var Se=bs.exports;/**
|
|
508
|
+
* @license React
|
|
509
|
+
* react-jsx-runtime.production.min.js
|
|
510
|
+
*
|
|
511
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
512
|
+
*
|
|
513
|
+
* This source code is licensed under the MIT license found in the
|
|
514
|
+
* LICENSE file in the root directory of this source tree.
|
|
515
|
+
*/var fl;function wp(){if(fl)return gr;fl=1;var t=Se,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var a,h={},d=null,f=null;u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(f=c.ref);for(a in c)n.call(c,a)&&!s.hasOwnProperty(a)&&(h[a]=c[a]);if(l&&l.defaultProps)for(a in c=l.defaultProps,c)h[a]===void 0&&(h[a]=c[a]);return{$$typeof:e,type:l,key:d,ref:f,props:h,_owner:i.current}}return gr.Fragment=r,gr.jsx=o,gr.jsxs=o,gr}var yr={};/**
|
|
516
|
+
* @license React
|
|
517
|
+
* react-jsx-runtime.development.js
|
|
518
|
+
*
|
|
519
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
520
|
+
*
|
|
521
|
+
* This source code is licensed under the MIT license found in the
|
|
522
|
+
* LICENSE file in the root directory of this source tree.
|
|
523
|
+
*/var hl;function Sp(){return hl||(hl=1,process.env.NODE_ENV!=="production"&&function(){var t=Se,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function y(E){if(E===null||typeof E!="object")return null;var W=m&&E[m]||E[p];return typeof W=="function"?W:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(E){{for(var W=arguments.length,V=new Array(W>1?W-1:0),Y=1;Y<W;Y++)V[Y-1]=arguments[Y];b("error",E,V)}}function b(E,W,V){{var Y=v.ReactDebugCurrentFrame,Ie=Y.getStackAddendum();Ie!==""&&(W+="%s",V=V.concat([Ie]));var Ne=V.map(function(we){return String(we)});Ne.unshift("Warning: "+W),Function.prototype.apply.call(console[E],console,Ne)}}var C=!1,S=!1,x=!1,k=!1,I=!1,B;B=Symbol.for("react.module.reference");function D(E){return!!(typeof E=="string"||typeof E=="function"||E===n||E===s||I||E===i||E===u||E===a||k||E===f||C||S||x||typeof E=="object"&&E!==null&&(E.$$typeof===d||E.$$typeof===h||E.$$typeof===o||E.$$typeof===l||E.$$typeof===c||E.$$typeof===B||E.getModuleId!==void 0))}function H(E,W,V){var Y=E.displayName;if(Y)return Y;var Ie=W.displayName||W.name||"";return Ie!==""?V+"("+Ie+")":V}function z(E){return E.displayName||"Context"}function A(E){if(E==null)return null;if(typeof E.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case a:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case l:var W=E;return z(W)+".Consumer";case o:var V=E;return z(V._context)+".Provider";case c:return H(E,E.render,"ForwardRef");case h:var Y=E.displayName||null;return Y!==null?Y:A(E.type)||"Memo";case d:{var Ie=E,Ne=Ie._payload,we=Ie._init;try{return A(we(Ne))}catch{return null}}}return null}var be=Object.assign,fe=0,ne,F,ue,j,X,T,U;function _(){}_.__reactDisabledLog=!0;function te(){{if(fe===0){ne=console.log,F=console.info,ue=console.warn,j=console.error,X=console.group,T=console.groupCollapsed,U=console.groupEnd;var E={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}fe++}}function ie(){{if(fe--,fe===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:be({},E,{value:ne}),info:be({},E,{value:F}),warn:be({},E,{value:ue}),error:be({},E,{value:j}),group:be({},E,{value:X}),groupCollapsed:be({},E,{value:T}),groupEnd:be({},E,{value:U})})}fe<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var xe=v.ReactCurrentDispatcher,se;function le(E,W,V){{if(se===void 0)try{throw Error()}catch(Ie){var Y=Ie.stack.trim().match(/\n( *(at )?)/);se=Y&&Y[1]||""}return`
|
|
524
|
+
`+se+E}}var pe=!1,ke;{var ee=typeof WeakMap=="function"?WeakMap:Map;ke=new ee}function Te(E,W){if(!E||pe)return"";{var V=ke.get(E);if(V!==void 0)return V}var Y;pe=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ne;Ne=xe.current,xe.current=null,te();try{if(W){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(et){Y=et}Reflect.construct(E,[],we)}else{try{we.call()}catch(et){Y=et}E.call(we.prototype)}}else{try{throw Error()}catch(et){Y=et}E()}}catch(et){if(et&&Y&&typeof et.stack=="string"){for(var me=et.stack.split(`
|
|
525
|
+
`),Ye=Y.stack.split(`
|
|
526
|
+
`),We=me.length-1,qe=Ye.length-1;We>=1&&qe>=0&&me[We]!==Ye[qe];)qe--;for(;We>=1&&qe>=0;We--,qe--)if(me[We]!==Ye[qe]){if(We!==1||qe!==1)do if(We--,qe--,qe<0||me[We]!==Ye[qe]){var it=`
|
|
527
|
+
`+me[We].replace(" at new "," at ");return E.displayName&&it.includes("<anonymous>")&&(it=it.replace("<anonymous>",E.displayName)),typeof E=="function"&&ke.set(E,it),it}while(We>=1&&qe>=0);break}}}finally{pe=!1,xe.current=Ne,ie(),Error.prepareStackTrace=Ie}var It=E?E.displayName||E.name:"",xt=It?le(It):"";return typeof E=="function"&&ke.set(E,xt),xt}function re(E,W,V){return Te(E,!1)}function Ue(E){var W=E.prototype;return!!(W&&W.isReactComponent)}function ae(E,W,V){if(E==null)return"";if(typeof E=="function")return Te(E,Ue(E));if(typeof E=="string")return le(E);switch(E){case u:return le("Suspense");case a:return le("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case c:return re(E.render);case h:return ae(E.type,W,V);case d:{var Y=E,Ie=Y._payload,Ne=Y._init;try{return ae(Ne(Ie),W,V)}catch{}}}return""}var Pe=Object.prototype.hasOwnProperty,ve={},gt=v.ReactDebugCurrentFrame;function vt(E){if(E){var W=E._owner,V=ae(E.type,E._source,W?W.type:null);gt.setExtraStackFrame(V)}else gt.setExtraStackFrame(null)}function Ke(E,W,V,Y,Ie){{var Ne=Function.call.bind(Pe);for(var we in E)if(Ne(E,we)){var me=void 0;try{if(typeof E[we]!="function"){var Ye=Error((Y||"React class")+": "+V+" type `"+we+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[we]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ye.name="Invariant Violation",Ye}me=E[we](W,we,Y,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(We){me=We}me&&!(me instanceof Error)&&(vt(Ie),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",V,we,typeof me),vt(null)),me instanceof Error&&!(me.message in ve)&&(ve[me.message]=!0,vt(Ie),w("Failed %s type: %s",V,me.message),vt(null))}}}var wt=Array.isArray;function Tt(E){return wt(E)}function nt(E){{var W=typeof Symbol=="function"&&Symbol.toStringTag,V=W&&E[Symbol.toStringTag]||E.constructor.name||"Object";return V}}function Lt(E){try{return St(E),!1}catch{return!0}}function St(E){return""+E}function N(E){if(Lt(E))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nt(E)),St(E)}var Q=v.ReactCurrentOwner,Ae={key:!0,ref:!0,__self:!0,__source:!0},Ze,tt;function ct(E){if(Pe.call(E,"ref")){var W=Object.getOwnPropertyDescriptor(E,"ref").get;if(W&&W.isReactWarning)return!1}return E.ref!==void 0}function Ht(E){if(Pe.call(E,"key")){var W=Object.getOwnPropertyDescriptor(E,"key").get;if(W&&W.isReactWarning)return!1}return E.key!==void 0}function cr(E,W){typeof E.ref=="string"&&Q.current}function ur(E,W){{var V=function(){Ze||(Ze=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};V.isReactWarning=!0,Object.defineProperty(E,"key",{get:V,configurable:!0})}}function yt(E,W){{var V=function(){tt||(tt=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};V.isReactWarning=!0,Object.defineProperty(E,"ref",{get:V,configurable:!0})}}var $r=function(E,W,V,Y,Ie,Ne,we){var me={$$typeof:e,type:E,key:W,ref:V,props:we,_owner:Ne};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function Nn(E,W,V,Y,Ie){{var Ne,we={},me=null,Ye=null;V!==void 0&&(N(V),me=""+V),Ht(W)&&(N(W.key),me=""+W.key),ct(W)&&(Ye=W.ref,cr(W,Ie));for(Ne in W)Pe.call(W,Ne)&&!Ae.hasOwnProperty(Ne)&&(we[Ne]=W[Ne]);if(E&&E.defaultProps){var We=E.defaultProps;for(Ne in We)we[Ne]===void 0&&(we[Ne]=We[Ne])}if(me||Ye){var qe=typeof E=="function"?E.displayName||E.name||"Unknown":E;me&&ur(we,qe),Ye&&yt(we,qe)}return $r(E,me,Ye,Ie,Y,Q.current,we)}}var dr=v.ReactCurrentOwner,fr=v.ReactDebugCurrentFrame;function At(E){if(E){var W=E._owner,V=ae(E.type,E._source,W?W.type:null);fr.setExtraStackFrame(V)}else fr.setExtraStackFrame(null)}var qt;qt=!1;function Pt(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function $t(){{if(dr.current){var E=A(dr.current.type);if(E)return`
|
|
528
|
+
|
|
529
|
+
Check the render method of \``+E+"`."}return""}}function Vt(E){return""}var jr={};function Dn(E){{var W=$t();if(!W){var V=typeof E=="string"?E:E.displayName||E.name;V&&(W=`
|
|
530
|
+
|
|
531
|
+
Check the top-level render call using <`+V+">.")}return W}}function Br(E,W){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var V=Dn(W);if(jr[V])return;jr[V]=!0;var Y="";E&&E._owner&&E._owner!==dr.current&&(Y=" It was passed a child from "+A(E._owner.type)+"."),At(E),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,Y),At(null)}}function Fr(E,W){{if(typeof E!="object")return;if(Tt(E))for(var V=0;V<E.length;V++){var Y=E[V];Pt(Y)&&Br(Y,W)}else if(Pt(E))E._store&&(E._store.validated=!0);else if(E){var Ie=y(E);if(typeof Ie=="function"&&Ie!==E.entries)for(var Ne=Ie.call(E),we;!(we=Ne.next()).done;)Pt(we.value)&&Br(we.value,W)}}}function _n(E){{var W=E.type;if(W==null||typeof W=="string")return;var V;if(typeof W=="function")V=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===h))V=W.propTypes;else return;if(V){var Y=A(W);Ke(V,E.props,"prop",Y,E)}else if(W.PropTypes!==void 0&&!qt){qt=!0;var Ie=A(W);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jt(E){{for(var W=Object.keys(E.props),V=0;V<W.length;V++){var Y=W[V];if(Y!=="children"&&Y!=="key"){At(E),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),At(null);break}}E.ref!==null&&(At(E),w("Invalid attribute `ref` supplied to `React.Fragment`."),At(null))}}var Gt={};function hr(E,W,V,Y,Ie,Ne){{var we=D(E);if(!we){var me="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(me+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ye=Vt();Ye?me+=Ye:me+=$t();var We;E===null?We="null":Tt(E)?We="array":E!==void 0&&E.$$typeof===e?(We="<"+(A(E.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):We=typeof E,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",We,me)}var qe=Nn(E,W,V,Ie,Ne);if(qe==null)return qe;if(we){var it=W.children;if(it!==void 0)if(Y)if(Tt(it)){for(var It=0;It<it.length;It++)Fr(it[It],E);Object.freeze&&Object.freeze(it)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Fr(it,E)}if(Pe.call(W,"key")){var xt=A(E),et=Object.keys(W).filter(function(Fn){return Fn!=="key"}),pr=et.length>0?"{key: someKey, "+et.join(": ..., ")+": ...}":"{key: someKey}";if(!Gt[xt+pr]){var Bn=et.length>0?"{"+et.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
532
|
+
let props = %s;
|
|
533
|
+
<%s {...props} />
|
|
534
|
+
React keys must be passed directly to JSX without using spread:
|
|
535
|
+
let props = %s;
|
|
536
|
+
<%s key={someKey} {...props} />`,pr,xt,Bn,xt),Gt[xt+pr]=!0}}return E===n?jt(qe):_n(qe),qe}}function Ln(E,W,V){return hr(E,W,V,!0)}function Pn(E,W,V){return hr(E,W,V,!1)}var $n=Pn,jn=Ln;yr.Fragment=n,yr.jsx=$n,yr.jsxs=jn}()),yr}process.env.NODE_ENV==="production"?ys.exports=wp():ys.exports=Sp();var M=ys.exports;const xp=({sdk:t,stats:e,onExportSuccess:r,onOpenReplayStudio:n,ticketFormat:i})=>{const[s,o]=Se.useState(!1),[l,c]=Se.useState(""),[u,a]=Se.useState(null),[h,d]=Se.useState(i||(e==null?void 0:e.ticketFormat)||"whatsapp"),[f,m]=Se.useState(!1),[p,y]=Se.useState(null),[v,w]=Se.useState(!1),b=((e==null?void 0:e.errorLogsCount)??0)>0,C=((e==null?void 0:e.mode)??"enterprise")==="lite",S=H=>{switch(H){case"teams":return"Microsoft Teams";case"slack":return"Slack";case"whatsapp":return"WhatsApp";case"jira":return"Jira";case"markdown":return"Markdown";case"compact":return"Ringkasan Cepat";default:return"WhatsApp"}},x=H=>{t&&(t.setMode(H),y(null))},k=()=>{if(!t)return;const H=t.exportBugReport({title:l.trim()||(C?"Laporan Kendala (Mode Lite RAM)":"Laporan Kendala Enterprise"),description:l.trim()||void 0,severity:b?"critical":"high",download:!0});r(H),c(""),o(!1)},I=()=>{if(!t)return;const H=t.getSnapshot({title:l.trim()||(C?"Laporan Kendala (Mode Lite Standalone)":"Laporan Kendala Operasional"),description:l.trim()||void 0,severity:b?"critical":"high"});lr(H),o(!1)},B=async(H=h)=>{if(!t)return;const z=t.getSnapshot({title:l.trim()||(C?"Laporan Kendala Operasional (Lite)":"Laporan Kendala Operasional"),description:l.trim()||void 0,severity:b?"critical":"high"}),A=Et(z,H);try{await navigator.clipboard.writeText(A);const be=H==="whatsapp"?"WhatsApp":H.toUpperCase();a(`✓ Laporan berhasil disalin untuk ${be}! Tinggal tempel ke chat.`),setTimeout(()=>a(null),3500)}catch{a("Gagal mengakses clipboard."),setTimeout(()=>a(null),2500)}},D=async()=>{var H;if(!(!t||f)){m(!0),y(null);try{const z=await t.sendBugReport(void 0,{title:l.trim()||"Laporan Insiden dari Widget Enterprise",description:l.trim()||void 0,severity:b?"critical":"high"});z.ok?(y({reportId:z.reportId||z.payload.metadata.reportId,sha256:((H=z.sha256)==null?void 0:H.slice(0,16))||"Verified"}),r(z.payload),setTimeout(()=>{c("")},1500)):alert(`Gagal mengirim ke infra: status ${z.status}`)}catch(z){alert(`Gagal koneksi ke server ingest infra: ${z instanceof Error?z.message:String(z)}`)}finally{m(!1)}}};return M.jsxs("div",{className:"rewindlog-block",style:ye.floatingRoot,children:[s&&M.jsxs("div",{style:ye.drawerCard,children:[M.jsxs("div",{style:ye.drawerHeader,children:[M.jsxs("div",{children:[M.jsxs("div",{style:ye.headerTitleRow,children:[M.jsx("span",{style:ye.headerIcon,children:b?"🚨":"🛟"}),M.jsx("h4",{style:ye.drawerTitle,children:"Laporkan Masalah"})]}),M.jsx("p",{style:ye.drawerSubtitle,children:"🛡️ Privasi Terjaga • Rekaman 5 Menit Terakhir Disertakan"})]}),M.jsx("button",{type:"button",onClick:()=>o(!1),style:ye.closeBtn,title:"Tutup",children:"✕"})]}),M.jsx("div",{style:ye.inputContainer,children:M.jsx("textarea",{rows:2,value:l,onChange:H=>c(H.target.value),placeholder:"Ceritakan singkat kendalanya... (misal: tombol bayar tidak merespons)",style:ye.textarea})}),M.jsxs("div",{style:ye.trustBadgeRow,children:[M.jsxs("span",{children:["📹 ",(e==null?void 0:e.totalDomEvents)??0," Aksi Layar"]}),M.jsxs("span",{children:["🌐 ",(e==null?void 0:e.networkLogsCount)??0," Koneksi API"]}),M.jsx("span",{style:{color:"#34d399"},children:"✓ Data Nasabah Disensor"})]}),u&&M.jsx("div",{style:ye.copiedAlert,children:u}),p&&M.jsxs("div",{style:ye.infraSuccessAlert,children:["✓ ",M.jsx("strong",{children:"Terkirim ke Server Tim Teknis!"}),M.jsx("br",{}),M.jsxs("span",{style:{fontSize:"0.72rem",color:"#93c5fd"},children:["ID Tiket: ",p.reportId]})]}),M.jsxs("div",{style:ye.actionStack,children:[C?M.jsxs(M.Fragment,{children:[M.jsxs("button",{type:"button",onClick:()=>B(h),style:ye.litePrimaryBtn,children:["📋 Salin Laporan ke ",S(h)]}),M.jsxs("div",{style:ye.secondaryRow,children:[M.jsx("button",{type:"button",onClick:I,style:ye.secondaryBtn,title:"Unduh laporan dalam format file dokumen HTML yang bisa dibuka offline",children:"📄 Unduh HTML"}),M.jsx("button",{type:"button",onClick:()=>w(H=>!H),style:ye.toggleAdvancedBtn,children:v?"▲ Tutup Opsi":"⚙️ Opsi Lain"})]})]}):M.jsxs(M.Fragment,{children:[M.jsx("button",{type:"button",onClick:D,disabled:f,style:{...ye.primaryEnterpriseBtn,opacity:f?.7:1},children:f?"⏳ Mengirim Laporan...":"🚀 Kirim Laporan ke Tim Teknis"}),M.jsxs("div",{style:ye.secondaryRow,children:[M.jsx("button",{type:"button",onClick:()=>B(h),style:ye.secondaryBtn,children:"📋 Salin Tiket"}),M.jsx("button",{type:"button",onClick:()=>{o(!1),n()},style:ye.secondaryBtn,children:"▶ Reka Ulang"}),M.jsx("button",{type:"button",onClick:()=>w(H=>!H),style:ye.toggleAdvancedBtn,children:v?"▲":"⚙️"})]})]}),v&&M.jsxs("div",{style:ye.advancedDrawer,children:[M.jsx("div",{style:ye.advancedSectionHeader,children:"Pilihan Format Tiket:"}),M.jsx("div",{style:ye.formatSelectorRow,children:["whatsapp","teams","slack","jira","markdown","compact"].map(H=>M.jsx("button",{type:"button",onClick:()=>{d(H),B(H)},style:{...ye.formatPill,...h===H?ye.formatPillActive:{}},children:H==="whatsapp"?"WA":H==="teams"?"Teams":H==="compact"?"1-Line":H.toUpperCase()},H))}),M.jsx("div",{style:ye.advancedSectionHeader,children:"Mode Operasi SDK:"}),M.jsxs("div",{style:ye.modeTabs,children:[M.jsx("button",{type:"button",onClick:()=>x("lite"),style:{...ye.modeTabBtn,...C?ye.modeTabActiveLite:{}},children:"⚡ Lite (RAM Sementara)"}),M.jsx("button",{type:"button",onClick:()=>x("enterprise"),style:{...ye.modeTabBtn,...C?{}:ye.modeTabActiveEnterprise},children:"🏢 Enterprise (Server)"})]}),M.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",gap:"0.4rem"},children:[M.jsx("button",{type:"button",onClick:k,style:ye.utilityBtn,children:"📦 Unduh JSON Mentah"}),M.jsx("button",{type:"button",onClick:I,style:ye.utilityBtn,children:"📄 Unduh Dokumen HTML"})]})]})]})]}),M.jsxs("button",{type:"button",onClick:()=>o(H=>!H),style:{...ye.triggerPill,backgroundColor:b?"#dc2626":C?"#059669":"#0284c7"},"aria-label":"Buka formulir lapor kendala",children:[M.jsx("span",{style:ye.pulseDot}),M.jsx("span",{children:b?"🚨 Ada Kendala? Lapor di Sini":"🛟 Lapor Kendala"})]})]})},ye={floatingRoot:{position:"fixed",right:"20px",bottom:"20px",zIndex:950,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"0.55rem",fontFamily:"Inter, system-ui, -apple-system, sans-serif"},triggerPill:{display:"flex",alignItems:"center",gap:"0.5rem",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"9999px",padding:"0.65rem 1.15rem",fontSize:"0.84rem",fontWeight:700,cursor:"pointer",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.35)",transition:"all 0.2s ease"},pulseDot:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#ffffff",boxShadow:"0 0 8px rgba(255, 255, 255, 0.9)"},drawerCard:{width:"340px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"1rem",padding:"1.15rem",boxShadow:"0 20px 45px rgba(0, 0, 0, 0.7)",color:"#f8fafc",animation:"fadeIn 0.15s ease-out"},drawerHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.75rem"},headerTitleRow:{display:"flex",alignItems:"center",gap:"0.45rem"},headerIcon:{fontSize:"1.1rem"},drawerTitle:{margin:0,fontSize:"1rem",fontWeight:700,color:"#f8fafc"},drawerSubtitle:{margin:"0.2rem 0 0 0",fontSize:"0.72rem",color:"#94a3b8",lineHeight:1.3},closeBtn:{backgroundColor:"transparent",border:"none",color:"#64748b",fontSize:"1.15rem",cursor:"pointer",padding:"2px 4px",lineHeight:1,transition:"color 0.15s ease"},inputContainer:{marginBottom:"0.65rem"},textarea:{width:"100%",boxSizing:"border-box",padding:"0.6rem 0.75rem",borderRadius:"0.5rem",border:"1px solid #334155",backgroundColor:"#1e293b",color:"#f8fafc",fontSize:"0.82rem",outline:"none",resize:"none",lineHeight:1.4},trustBadgeRow:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",color:"#94a3b8",padding:"0.35rem 0.5rem",backgroundColor:"rgba(30, 41, 59, 0.6)",borderRadius:"0.4rem",marginBottom:"0.75rem",fontWeight:500},copiedAlert:{backgroundColor:"#059669",color:"#ffffff",borderRadius:"0.45rem",padding:"0.5rem 0.75rem",fontSize:"0.76rem",fontWeight:700,textAlign:"center",marginBottom:"0.65rem",boxShadow:"0 4px 12px rgba(5, 150, 105, 0.35)"},infraSuccessAlert:{backgroundColor:"rgba(2, 132, 199, 0.2)",border:"1px solid #0284c7",color:"#ffffff",borderRadius:"0.45rem",padding:"0.5rem 0.75rem",fontSize:"0.76rem",fontWeight:600,textAlign:"center",marginBottom:"0.65rem"},actionStack:{display:"flex",flexDirection:"column",gap:"0.5rem"},litePrimaryBtn:{backgroundColor:"#059669",color:"#ffffff",border:"none",borderRadius:"0.5rem",padding:"0.7rem 1rem",fontSize:"0.85rem",fontWeight:700,cursor:"pointer",width:"100%",textAlign:"center",boxShadow:"0 4px 14px rgba(5, 150, 105, 0.35)",transition:"background 0.15s ease"},primaryEnterpriseBtn:{backgroundColor:"#0284c7",color:"#ffffff",border:"none",borderRadius:"0.5rem",padding:"0.7rem 1rem",fontSize:"0.85rem",fontWeight:700,cursor:"pointer",width:"100%",textAlign:"center",boxShadow:"0 4px 14px rgba(2, 132, 199, 0.35)",transition:"background 0.15s ease"},secondaryRow:{display:"flex",gap:"0.45rem"},secondaryBtn:{flex:1,backgroundColor:"#1e293b",color:"#cbd5e1",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.5rem",fontSize:"0.76rem",fontWeight:600,cursor:"pointer",textAlign:"center",transition:"all 0.15s ease"},toggleAdvancedBtn:{backgroundColor:"#1e293b",color:"#94a3b8",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.5rem 0.65rem",fontSize:"0.76rem",fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},advancedDrawer:{marginTop:"0.35rem",padding:"0.65rem",backgroundColor:"#1e293b",borderRadius:"0.5rem",border:"1px solid #334155"},advancedSectionHeader:{fontSize:"0.7rem",color:"#94a3b8",fontWeight:600,marginBottom:"0.35rem"},formatSelectorRow:{display:"flex",gap:"0.3rem",marginBottom:"0.65rem",flexWrap:"wrap"},formatPill:{backgroundColor:"#0f172a",color:"#94a3b8",border:"1px solid #334155",borderRadius:"0.35rem",padding:"0.25rem 0.55rem",fontSize:"0.68rem",fontWeight:600,cursor:"pointer"},formatPillActive:{backgroundColor:"#0284c7",color:"#ffffff",borderColor:"#38bdf8"},modeTabs:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.35rem",backgroundColor:"#0f172a",padding:"3px",borderRadius:"0.4rem"},modeTabBtn:{backgroundColor:"transparent",border:"none",color:"#94a3b8",padding:"0.35rem",fontSize:"0.7rem",fontWeight:600,borderRadius:"0.3rem",cursor:"pointer"},modeTabActiveLite:{backgroundColor:"#059669",color:"#ffffff",fontWeight:700},modeTabActiveEnterprise:{backgroundColor:"#0284c7",color:"#ffffff",fontWeight:700},utilityBtn:{flex:1,backgroundColor:"#0f172a",color:"#cbd5e1",border:"1px solid #334155",borderRadius:"0.35rem",padding:"0.4rem 0.5rem",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",textAlign:"center"}};function br(t){const e=Math.max(0,Math.floor(t)),r=Math.floor(e/1e3),n=Math.floor(r/60),i=r%60,s=Math.floor(e%1e3/100);return`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}.${s}`}const Cp=({report:t,onImportReport:e,onLoadLiveSession:r})=>{var Lt,St;const n=Se.useRef(null),i=Se.useRef(null),s=Se.useRef(null),o=Se.useRef(null),[l,c]=Se.useState(!1),[u,a]=Se.useState(1),[h,d]=Se.useState(!0),[f,m]=Se.useState(0),[p,y]=Se.useState(0),[v,w]=Se.useState(0),[b,C]=Se.useState("summary"),[S,x]=Se.useState(null),[k,I]=Se.useState(null),[B,D]=Se.useState("Sesi Aktif Saat Ini"),[H,z]=Se.useState("unsigned"),[A,be]=Se.useState(null),[fe,ne]=Se.useState(""),[F,ue]=Se.useState(!1),[j,X]=Se.useState(!1),[T,U]=Se.useState([]),[_,te]=Se.useState(!1),[ie,xe]=Se.useState(!1),[se,le]=Se.useState(null),pe=async()=>{const N=!_;if(te(N),N){xe(!0);try{const[Q,Ae]=await Promise.all([fetch("/api/v1/rewindlog/reports"),fetch("/api/v1/rewindlog/license")]);if(Q.ok){const Ze=await Q.json();U(Array.isArray(Ze.reports)?Ze.reports:[])}Ae.ok&&le(await Ae.json())}catch{}finally{xe(!1)}}},ke=async N=>{I(null);try{const Q=await fetch(`/api/v1/rewindlog/reports/${encodeURIComponent(N)}`);if(!Q.ok)throw new Error(`HTTP ${Q.status}`);const Ae=await Q.json();D(`🗄️ Server: ${N}`),te(!1),e(Ae,N)}catch(Q){I(Q instanceof Error?Q.message:"Gagal memuat laporan dari server.")}},ee=(t==null?void 0:t.domEvents)??[],Te=((t==null?void 0:t.networkLogs)??[]).map((N,Q)=>({...N,id:N.id||`net_${Q}`,ok:N.ok!==void 0?N.ok:N.status>=200&&N.status<300})),re=(t==null?void 0:t.consoleLogs)??[],Ue=(t==null?void 0:t.errorLogs)??[],ae=Se.useMemo(()=>t?t.executiveSummary??mt(t):null,[t]);Se.useEffect(()=>{var Q,Ae;if(!t){z("unsigned");return}const N=(Ae=(Q=t.metadata)==null?void 0:Q.securityAudit)==null?void 0:Ae.integrityHashSha256;if(!N){z("unsigned");return}z("checking"),or(t).then(Ze=>{z(Ze===N?"verified":"tampered")}).catch(()=>{z("unsigned")})},[t]),Se.useEffect(()=>{if(n.current){if(s.current){try{s.current.pause(),s.current.destroy()}catch{}s.current=null}if(n.current.innerHTML="",c(!1),m(0),x(Te.length>0?0:null),ee.length<2){y(0),w(0);return}try{const N=new tp(ee,{root:n.current,speed:u,skipInactive:h,showWarning:!1,showDebug:!1,blockClass:"rewindlog-block",mouseTail:{duration:500,lineCap:"round",lineWidth:2,strokeStyle:"#38bdf8"}});N.disableInteract(),s.current=N;const Q=N.getMetaData();w(Q.startTime),y(Math.max(Q.totalTime,1));const Ae=()=>{if(!i.current||!N.wrapper||!N.iframe)return;const Ze=i.current.clientWidth-24,tt=i.current.clientHeight-24,ct=Number(N.iframe.width)||1024,Ht=Number(N.iframe.height)||640,cr=Ze/ct,ur=tt/Ht,yt=Math.min(cr,ur,1);N.wrapper.style.transform=`scale(${yt})`,N.wrapper.style.transformOrigin="top left",N.wrapper.style.width=`${ct}px`,N.wrapper.style.height=`${Ht}px`};return setTimeout(Ae,60),window.addEventListener("resize",Ae),N.on("finish",()=>{c(!1),m(Q.totalTime)}),N.pause(0),()=>{window.removeEventListener("resize",Ae);try{N.pause(),N.destroy()}catch{}}}catch(N){console.error("[RewindLog] Replayer initialization error:",N)}}},[t]),Se.useEffect(()=>{if(!l||!s.current)return;const N=window.setInterval(()=>{if(s.current)try{const Q=s.current.getCurrentTime();Q>=p?(m(p),c(!1)):m(Math.max(0,Q))}catch{}},80);return()=>window.clearInterval(N)},[l,p]);const Pe=()=>{const N=s.current;if(!(!N||ee.length<2))if(l)N.pause(),c(!1);else{const Q=f>=p?0:f;N.play(Q),c(!0)}},ve=N=>{const Q=s.current;if(!Q||ee.length<2)return;const Ae=Math.max(0,Math.min(p,N));m(Ae),l?Q.play(Ae):Q.pause(Ae)},gt=N=>{a(N),s.current&&s.current.setConfig({speed:N})},vt=()=>{const N=!h;d(N),s.current&&s.current.setConfig({skipInactive:N})},Ke=N=>{if(!v)return;const Q=Math.max(0,Math.min(p,N-v));ve(Q)},wt=N=>{var Ze;const Q=(Ze=N.target.files)==null?void 0:Ze[0];if(!Q)return;I(null);const Ae=new FileReader;Ae.onload=()=>{try{const tt=JSON.parse(String(Ae.result));if(up(tt)){be({envelope:tt,fileName:Q.name}),ne("");return}const ct=tt;if(!Array.isArray(ct.domEvents)||!Array.isArray(ct.networkLogs))throw new Error("Format JSON tidak valid: domEvents atau networkLogs tidak ditemukan.");D(Q.name),e(ct,Q.name)}catch(tt){I(tt instanceof Error?tt.message:"Gagal membaca file laporan JSON.")}},Ae.readAsText(Q),N.target.value=""},Tt=async N=>{if(N.preventDefault(),!(!A||!fe.trim())){ue(!0),I(null);try{const Q=await Hs(A.envelope,fe.trim()),Ae=JSON.parse(Q);D(`🔓 ${A.fileName} (Terdekripsi AES-256-GCM)`),be(null),ne(""),e(Ae,A.fileName)}catch{I("Dekripsi AES-256-GCM gagal: Passphrase salah atau file telah dimodifikasi.")}finally{ue(!1)}}},nt=S!==null?Te[S]??null:null;return M.jsxs("div",{style:L.wrapper,children:[M.jsxs("div",{style:L.toolbar,children:[M.jsxs("div",{style:L.toolbarLeft,children:[M.jsxs("span",{style:L.sourceBadge,children:["Sumber: ",B]}),H==="verified"&&M.jsx("span",{style:L.verifiedBadge,children:"✓ SHA-256 Terverifikasi (Asli & Utuh)"}),H==="tampered"&&M.jsx("span",{style:L.tamperedBadge,children:"⚠ Peringatan: Isi File Telah Diubah!"})]}),M.jsxs("div",{style:L.toolbarActions,children:[t&&M.jsxs(M.Fragment,{children:[M.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"whatsapp")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format WhatsApp",children:j?"✓ Tersalin!":"📋 Salin WA"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"jira")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Jira Markup",children:"📋 Jira"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"teams")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Microsoft Teams (On-Call Alert)",children:"📋 Teams"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"slack")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Slack mrkdwn",children:"📋 Slack"})]}),M.jsx("button",{type:"button",onClick:()=>lr(t),style:L.htmlReportBtn,title:"Unduh laporan dalam format dokumen HTML yang mudah dibaca oleh tim Non-Teknis atau disimpan sebagai PDF",children:"📄 Unduh Laporan Visual (HTML / PDF)"})]}),M.jsx("button",{type:"button",onClick:pe,style:L.actionBtnSecondary,title:"Lihat daftar laporan yang tersimpan di penyimpanan server (Folder Report/)",children:"🗄️ Arsip Server (Report/)"}),M.jsx("button",{type:"button",onClick:()=>{D("Sesi Aktif Saat Ini"),r()},style:L.actionBtnSecondary,children:"Muat Sesi Aktif"}),M.jsx("input",{ref:o,type:"file",accept:".json,application/json",onChange:wt,style:{display:"none"}}),M.jsx("button",{type:"button",onClick:()=>{var N;return(N=o.current)==null?void 0:N.click()},style:L.actionBtnPrimary,children:"📂 Buka File Laporan (.json)"})]})]}),k&&M.jsx("div",{style:L.errorAlert,children:k}),_&&M.jsxs("div",{style:L.decryptBox,children:[M.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.6rem"},children:[M.jsxs("div",{children:[M.jsx("strong",{style:{color:"#38bdf8",fontSize:"0.88rem"},children:"🗄️ Daftar Laporan Insiden di Server Infrastruktur (GET /api/v1/rewindlog/reports)"}),se&&M.jsxs("div",{style:{fontSize:"0.74rem",color:se.valid?"#34d399":"#f87171",marginTop:"2px"},children:["🏢 ",se.company," • ",se.isTrial?`Trial (${se.daysRemaining} hari tersisa)`:"Lisensi Enterprise Aktif"]})]}),M.jsx("button",{type:"button",onClick:()=>te(!1),style:L.actionBtnSecondary,children:"Tutup"})]}),ie?M.jsx("div",{style:{fontSize:"0.82rem",color:"#94a3b8"},children:"Memuat arsip server..."}):T.length===0?M.jsx("div",{style:{fontSize:"0.82rem",color:"#94a3b8"},children:"Belum ada laporan tersimpan di server."}):M.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.45rem",maxHeight:"200px",overflowY:"auto"},children:T.map(N=>M.jsxs("div",{onClick:()=>ke(N.fileName),style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.4rem",padding:"0.55rem 0.85rem",cursor:"pointer"},children:[M.jsxs("div",{children:[M.jsxs("div",{style:{fontSize:"0.84rem",fontWeight:700,color:"#f8fafc"},children:["[",N.overallStatus,"] ",N.title," — ",M.jsx("code",{style:{color:"#38bdf8"},children:N.fileName})]}),M.jsxs("div",{style:{fontSize:"0.75rem",color:"#94a3b8"},children:["🎯 ",N.recommendedTeam," • ",N.domEventsCount," DOM Events • ",N.networkLogsCount," Network Calls • ",N.sizeKB," KB"]})]}),M.jsx("span",{style:{fontSize:"0.78rem",fontWeight:700,color:"#38bdf8"},children:"▶ Putar Laporan"})]},N.fileName))})]}),A&&M.jsx("div",{style:L.decryptBox,children:M.jsxs("form",{onSubmit:Tt,style:L.decryptForm,children:[M.jsxs("div",{children:[M.jsxs("strong",{style:{color:"#38bdf8"},children:["🔐 File Laporan Perbankan Terenkripsi (",A.fileName,")"]}),M.jsxs("div",{style:{fontSize:"0.8rem",color:"#94a3b8",marginTop:"0.2rem"},children:["Algoritma: ",A.envelope.algorithm," • KDF:"," ",A.envelope.kdf," (",A.envelope.iterations.toLocaleString()," iterasi)"]})]}),M.jsxs("div",{style:L.decryptInputRow,children:[M.jsx("input",{type:"password",value:fe,onChange:N=>ne(N.target.value),placeholder:"Masukkan Passphrase Dekripsi...",required:!0,style:L.decryptInput}),M.jsx("button",{type:"submit",disabled:F,style:L.actionBtnPrimary,children:F?"Membuka Enkripsi...":"🔓 Buka & Tampilkan Laporan"}),M.jsx("button",{type:"button",onClick:()=>be(null),style:L.actionBtnSecondary,children:"Batal"})]})]})}),ae&&M.jsxs("div",{style:{...L.executiveCard,borderColor:ae.overallStatus==="KRITIS"?"#ef4444":ae.overallStatus==="PERLU_PERHATIAN"?"#f59e0b":"#10b981"},children:[M.jsxs("div",{style:L.executiveTopRow,children:[M.jsxs("div",{style:L.executiveHeadlineGroup,children:[M.jsxs("span",{style:{...L.executiveStatusBadge,backgroundColor:ae.overallStatus==="KRITIS"?"#dc2626":ae.overallStatus==="PERLU_PERHATIAN"?"#d97706":"#059669"},children:["STATUS: ",ae.overallStatus.replace("_"," ")]}),M.jsx("h3",{style:L.executiveHeadline,children:ae.statusHeadline})]}),M.jsxs("div",{style:L.assignedTeamBadge,children:["🎯 ",M.jsx("strong",{children:"Tim Penanganan:"})," ",ae.recommendedTeam]})]}),M.jsxs("p",{style:L.executivePlainText,children:[M.jsx("strong",{children:"Apa yang Terjadi (Bahasa Awam):"})," ",ae.plainExplanation]}),M.jsxs("div",{style:L.executiveDiagnosisBox,children:[M.jsxs("div",{children:[M.jsx("strong",{children:"Diagnosis Penyebab:"})," ",ae.rootCauseDiagnosis]}),M.jsxs("div",{style:L.actionStepsRow,children:[M.jsx("strong",{children:"Saran Tindakan:"})," ",ae.recommendedActionSteps.join(" • ")]})]}),M.jsxs("div",{style:L.executiveMetricsGrid,children:[M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Durasi & Interaksi Layar"}),M.jsxs("strong",{style:L.execMetricValue,children:[ae.keyMetrics.sessionDurationLabel," (",ae.keyMetrics.totalUserInteractions," aksi)"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Koneksi Server (API)"}),M.jsxs("strong",{style:L.execMetricValue,children:[ae.keyMetrics.successfulNetworkRequests,"/",ae.keyMetrics.totalNetworkRequests," Sukses (Rata-rata"," ",ae.keyMetrics.averageNetworkDurationMs," ms)"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Gangguan / Error Aplikasi"}),M.jsxs("strong",{style:{...L.execMetricValue,color:ae.keyMetrics.systemErrorsCount>0?"#fda4af":"#a7f3d0"},children:[ae.keyMetrics.systemErrorsCount," Error •"," ",ae.keyMetrics.consoleWarningsCount," Peringatan"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Keamanan Data Nasabah"}),M.jsxs("strong",{style:{...L.execMetricValue,color:"#38bdf8"},children:["🛡️ ",ae.keyMetrics.protectedPiiCount," Data Rahasia Disensor"]})]})]})]}),M.jsxs("div",{style:L.splitLayout,children:[M.jsxs("div",{style:L.playerPanel,children:[M.jsxs("div",{ref:i,style:L.viewportHost,children:[ee.length<2&&M.jsx("div",{style:L.emptyStage,children:"Belum ada rekaman layar untuk diputar. Lakukan aktivitas di halaman utama atau buka file laporan JSON."}),M.jsx("div",{ref:n,style:L.playerMount})]}),M.jsxs("div",{style:L.controlsBar,children:[M.jsxs("div",{style:L.scrubberContainer,children:[M.jsx("input",{type:"range",min:0,max:Math.max(p,1),value:Math.min(f,Math.max(p,1)),onChange:N=>ve(Number(N.target.value)),style:L.scrubber}),p>0&&M.jsxs("div",{style:L.markersTrack,children:[Te.map((N,Q)=>{const Ae=Math.max(0,Math.min(100,(N.timestamp-v)/p*100));return M.jsx("span",{title:`${N.method} ${N.url} (${N.status})`,onClick:()=>{C("network"),x(Q),Ke(N.timestamp)},style:{...L.timelineMarker,left:`${Ae}%`,backgroundColor:N.ok?"#38bdf8":"#ef4444"}},N.id||Q)}),Ue.map((N,Q)=>{const Ae=Math.max(0,Math.min(100,(N.timestamp-v)/p*100));return M.jsx("span",{title:`Error: ${N.message}`,onClick:()=>{C("errors"),Ke(N.timestamp)},style:{...L.timelineMarker,left:`${Ae}%`,backgroundColor:"#f43f5e",height:"10px"}},N.id||Q)})]})]}),M.jsxs("div",{style:L.transportRow,children:[M.jsxs("div",{style:L.transportLeft,children:[M.jsx("button",{type:"button",onClick:Pe,disabled:ee.length<2,style:L.playButton,children:l?"⏸ Jeda Video":"▶ Putar Rekaman Layar"}),M.jsxs("span",{style:L.timeReadout,children:[br(f)," / ",br(p)]})]}),M.jsxs("div",{style:L.transportRight,children:[M.jsxs("label",{style:L.skipToggle,children:[M.jsx("input",{type:"checkbox",checked:h,onChange:vt}),M.jsx("span",{children:"Lewati Waktu Diam"})]}),M.jsx("div",{style:L.speedGroup,children:[1,2,4].map(N=>M.jsxs("button",{type:"button",onClick:()=>gt(N),style:{...L.speedBtn,backgroundColor:u===N?"#2563eb":"#1e293b",color:u===N?"#ffffff":"#94a3b8"},children:[N,"x"]},N))})]})]})]})]}),M.jsxs("div",{style:L.inspectorPanel,children:[M.jsxs("div",{style:L.inspectorTabs,children:[M.jsxs("button",{type:"button",onClick:()=>C("summary"),style:{...L.tabBtn,borderBottomColor:b==="summary"?"#10b981":"transparent",color:b==="summary"?"#a7f3d0":"#94a3b8"},children:["📋 Kronologi Awam (",(ae==null?void 0:ae.storyline.length)??0,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("network"),style:{...L.tabBtn,borderBottomColor:b==="network"?"#38bdf8":"transparent",color:b==="network"?"#f8fafc":"#94a3b8"},children:["Network (",Te.length,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("console"),style:{...L.tabBtn,borderBottomColor:b==="console"?"#38bdf8":"transparent",color:b==="console"?"#f8fafc":"#94a3b8"},children:["Console (",re.length,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("errors"),style:{...L.tabBtn,borderBottomColor:b==="errors"?"#f43f5e":"transparent",color:b==="errors"?"#f8fafc":"#94a3b8"},children:["Error (",Ue.length,")"]}),M.jsx("button",{type:"button",onClick:()=>C("metadata"),style:{...L.tabBtn,borderBottomColor:b==="metadata"?"#38bdf8":"transparent",color:b==="metadata"?"#f8fafc":"#94a3b8"},children:"Info & Audit"})]}),M.jsxs("div",{style:L.inspectorBody,children:[b==="summary"&&M.jsxs("div",{style:L.logList,children:[M.jsxs("div",{style:L.storylineHint,children:["💡 ",M.jsx("strong",{children:"Panduan Non-Teknis:"})," Berikut urutan kejadian yang dialami pengguna dalam bahasa sehari-hari. Klik langkah mana saja untuk melihat kejadiannya di video sebelah kiri."]}),!ae||ae.storyline.length===0?M.jsx("div",{style:L.emptyInspector,children:"Belum ada kronologi aktivitas."}):ae.storyline.map(N=>{const Q=N.category==="error"||N.category==="network-fail"?"#ef4444":N.category==="warning"||N.category==="network-slow"?"#f59e0b":N.category==="security"?"#10b981":"#38bdf8";return M.jsxs("div",{onClick:()=>Ke(N.timestamp),style:{...L.storyStepCard,borderLeftColor:Q},children:[M.jsxs("div",{style:L.storyStepHeader,children:[M.jsx("span",{style:{...L.storyBadge,color:Q},children:N.badgeText}),M.jsxs("span",{style:L.relTimeText,children:["Pukul ",N.timeClockLabel," • ▶ Menit ",N.relativeTimeLabel]})]}),M.jsx("div",{style:L.storyTitle,children:N.titlePlain}),M.jsx("div",{style:L.storyDetail,children:N.detailPlain}),N.technicalNote&&M.jsxs("div",{style:L.storyTechNote,children:["Teknis: ",N.technicalNote]})]},N.id)})]}),b==="network"&&M.jsx("div",{style:L.networkTabLayout,children:Te.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ada panggilan jaringan (Network) terekam."}):M.jsxs(M.Fragment,{children:[M.jsx("div",{style:L.networkList,children:Te.map((N,Q)=>{const Ae=v?N.timestamp-v:0,Ze=f>=Ae,tt=S===Q;return M.jsxs("div",{onClick:()=>{x(Q),Ke(N.timestamp)},style:{...L.networkRow,backgroundColor:tt?"#1e293b":"transparent",opacity:Ze||f===0?1:.55},children:[M.jsxs("div",{style:L.networkRowTop,children:[M.jsx("span",{style:{...L.statusBadge,backgroundColor:N.status>=200&&N.status<300?"#065f46":N.status>=400||N.status===0?"#7f1d1d":"#334155"},children:N.status||"ERR"}),M.jsx("span",{style:L.methodBadge,children:N.method}),M.jsx("span",{style:L.typeTag,children:N.type.toUpperCase()}),M.jsxs("span",{style:L.durationText,children:[N.durationMs,"ms"]}),M.jsxs("span",{style:L.relTimeText,children:["@",br(Math.max(0,Ae))]})]}),M.jsx("div",{style:L.urlText,title:N.url,children:N.url})]},N.id||Q)})}),nt&&M.jsxs("div",{style:L.networkDetailPane,children:[M.jsx("div",{style:L.detailHeader,children:M.jsxs("strong",{children:[nt.method," ",nt.url]})}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Request Headers (Authorization, Cookie & PIN Token Dihapus):"}),M.jsx("pre",{style:L.codeBlock,children:nt.requestHeaders&&Object.keys(nt.requestHeaders).length>0?JSON.stringify(nt.requestHeaders,null,2):"{ /* Tidak ada header non-sensitif */ }"})]}),nt.requestBody&&M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Request Body (Data Perbankan & PII Disensor):"}),M.jsx("pre",{style:L.codeBlock,children:nt.requestBody})]}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Response Body (Cloned Stream):"}),M.jsx("pre",{style:L.codeBlock,children:nt.responseBody||"[Response body kosong]"})]})]})]})}),b==="console"&&M.jsx("div",{style:L.logList,children:re.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ada log console yang tercatat."}):re.map(N=>{const Q=v?N.timestamp-v:0;return M.jsxs("div",{onClick:()=>Ke(N.timestamp),style:{...L.consoleItem,borderLeftColor:N.level==="error"?"#ef4444":N.level==="warn"?"#f59e0b":"#38bdf8"},children:[M.jsxs("div",{style:L.consoleHeader,children:[M.jsx("span",{style:L.consoleLevel,children:N.level.toUpperCase()}),M.jsxs("span",{style:L.relTimeText,children:["@",br(Math.max(0,Q))," (Klik untuk lompat)"]})]}),M.jsx("pre",{style:L.consoleMessage,children:N.message})]},N.id)})}),b==="errors"&&M.jsx("div",{style:L.logList,children:Ue.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ditemukan exception atau error sistem pada sesi ini."}):Ue.map(N=>{const Q=v?N.timestamp-v:0;return M.jsxs("div",{onClick:()=>Ke(N.timestamp),style:L.errorCard,children:[M.jsxs("div",{style:L.consoleHeader,children:[M.jsx("span",{style:L.errorBadge,children:N.type}),M.jsxs("span",{style:L.relTimeText,children:["@",br(Math.max(0,Q))]})]}),M.jsx("div",{style:L.errorTitle,children:N.message}),N.stack&&M.jsx("pre",{style:L.codeBlock,children:N.stack})]},N.id)})}),b==="metadata"&&M.jsxs("div",{style:L.metadataPane,children:[(t==null?void 0:t.issue)&&M.jsxs("div",{style:L.issueCard,children:[M.jsx("div",{style:L.detailLabel,children:"Catatan Keluhan Pelapor"}),M.jsxs("div",{style:L.issueTitle,children:["[",((Lt=t.issue.severity)==null?void 0:Lt.toUpperCase())||"HIGH","] ",t.issue.title]}),t.issue.description&&M.jsx("p",{style:L.issueDesc,children:t.issue.description})]}),((St=t==null?void 0:t.metadata)==null?void 0:St.securityAudit)&&M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Audit Keamanan & Kepatuhan Perbankan (PCI-DSS v4.0 / OJK / UU-PDP)"}),M.jsx("pre",{style:L.codeBlock,children:JSON.stringify(t.metadata.securityAudit,null,2)})]}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Detail Perangkat & Ring Buffer"}),M.jsx("pre",{style:L.codeBlock,children:JSON.stringify((t==null?void 0:t.metadata)??{note:"File laporan versi awal (berisi domEvents & networkLogs)",domEventsCount:ee.length,networkLogsCount:Te.length},null,2)})]})]})]})]})]})]})},L={wrapper:{display:"flex",flexDirection:"column",gap:"1rem"},toolbar:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",gap:"0.75rem",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",padding:"0.85rem 1.25rem"},toolbarLeft:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.65rem"},sourceBadge:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",color:"#38bdf8",fontSize:"0.76rem",fontWeight:600,padding:"0.25rem 0.65rem",borderRadius:"9999px"},verifiedBadge:{backgroundColor:"#064e3b",border:"1px solid #10b981",color:"#a7f3d0",fontSize:"0.74rem",fontWeight:700,padding:"0.22rem 0.6rem",borderRadius:"9999px"},tamperedBadge:{backgroundColor:"#7f1d1d",border:"1px solid #ef4444",color:"#fecaca",fontSize:"0.74rem",fontWeight:700,padding:"0.22rem 0.6rem",borderRadius:"9999px"},toolbarActions:{display:"flex",flexWrap:"wrap",gap:"0.55rem"},htmlReportBtn:{backgroundColor:"#059669",color:"#ffffff",border:"none",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:700,cursor:"pointer"},actionBtnPrimary:{backgroundColor:"#2563eb",color:"#ffffff",border:"none",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:600,cursor:"pointer"},actionBtnSecondary:{backgroundColor:"#0f172a",color:"#e2e8f0",border:"1px solid #475569",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:600,cursor:"pointer"},errorAlert:{backgroundColor:"#7f1d1d",border:"1px solid #ef4444",color:"#fecaca",padding:"0.75rem 1rem",borderRadius:"0.5rem",fontSize:"0.85rem"},decryptBox:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",borderRadius:"0.65rem",padding:"1rem 1.25rem"},decryptForm:{display:"flex",flexDirection:"column",gap:"0.75rem"},decryptInputRow:{display:"flex",gap:"0.6rem",flexWrap:"wrap"},decryptInput:{flex:1,minWidth:"240px",padding:"0.55rem 0.8rem",borderRadius:"0.4rem",border:"1px solid #475569",backgroundColor:"#1e293b",color:"#f8fafc",fontSize:"0.88rem"},executiveCard:{backgroundColor:"#1e293b",border:"2px solid #10b981",borderRadius:"0.75rem",padding:"1.15rem 1.35rem",display:"flex",flexDirection:"column",gap:"0.75rem"},executiveTopRow:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.75rem"},executiveHeadlineGroup:{display:"flex",alignItems:"center",gap:"0.65rem",flexWrap:"wrap"},executiveStatusBadge:{color:"#ffffff",fontSize:"0.72rem",fontWeight:800,padding:"0.25rem 0.65rem",borderRadius:"0.35rem",letterSpacing:"0.04em"},executiveHeadline:{margin:0,fontSize:"1.05rem",fontWeight:700,color:"#f8fafc"},assignedTeamBadge:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",color:"#e0f2fe",fontSize:"0.8rem",padding:"0.35rem 0.75rem",borderRadius:"0.45rem"},executivePlainText:{margin:0,fontSize:"0.9rem",color:"#e2e8f0",lineHeight:1.55},executiveDiagnosisBox:{backgroundColor:"#0f172a",borderLeft:"3px solid #38bdf8",borderRadius:"0.4rem",padding:"0.65rem 0.85rem",fontSize:"0.83rem",color:"#cbd5e1",display:"flex",flexDirection:"column",gap:"0.3rem"},actionStepsRow:{color:"#93c5fd",fontSize:"0.8rem"},executiveMetricsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"0.65rem"},execMetricBox:{backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.55rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.15rem"},execMetricLabel:{fontSize:"0.7rem",color:"#94a3b8",textTransform:"uppercase",fontWeight:600},execMetricValue:{fontSize:"0.86rem",color:"#f8fafc"},splitLayout:{display:"grid",gridTemplateColumns:"minmax(480px, 1.3fr) minmax(380px, 1fr)",gap:"1rem",minHeight:"560px"},playerPanel:{display:"flex",flexDirection:"column",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",overflow:"hidden"},viewportHost:{position:"relative",flex:1,minHeight:"430px",backgroundColor:"#090d16",padding:"12px",overflow:"hidden"},playerMount:{width:"100%",height:"100%"},emptyStage:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#64748b",fontSize:"0.9rem",textAlign:"center",padding:"2rem"},controlsBar:{borderTop:"1px solid #334155",backgroundColor:"#0f172a",padding:"0.85rem 1rem"},scrubberContainer:{position:"relative",marginBottom:"0.65rem"},scrubber:{width:"100%",cursor:"pointer",accentColor:"#38bdf8"},markersTrack:{position:"relative",height:"8px",marginTop:"2px"},timelineMarker:{position:"absolute",top:0,width:"6px",height:"8px",borderRadius:"2px",transform:"translateX(-50%)",cursor:"pointer"},transportRow:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.5rem"},transportLeft:{display:"flex",alignItems:"center",gap:"0.75rem"},playButton:{backgroundColor:"#0284c7",color:"#ffffff",border:"none",borderRadius:"0.4rem",padding:"0.45rem 0.9rem",fontWeight:600,fontSize:"0.85rem",cursor:"pointer"},timeReadout:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.82rem",color:"#94a3b8"},transportRight:{display:"flex",alignItems:"center",gap:"0.85rem"},skipToggle:{display:"flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",color:"#cbd5e1",cursor:"pointer"},speedGroup:{display:"flex",gap:"0.25rem"},speedBtn:{border:"1px solid #334155",borderRadius:"0.3rem",padding:"0.25rem 0.5rem",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},inspectorPanel:{display:"flex",flexDirection:"column",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",overflow:"hidden",maxHeight:"580px"},inspectorTabs:{display:"flex",backgroundColor:"#0f172a",borderBottom:"1px solid #334155"},tabBtn:{flex:1,backgroundColor:"transparent",border:"none",borderBottom:"2px solid transparent",padding:"0.65rem 0.35rem",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},inspectorBody:{flex:1,overflowY:"auto",padding:"0.75rem"},storylineHint:{backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"0.4rem",padding:"0.55rem 0.7rem",fontSize:"0.76rem",color:"#cbd5e1",lineHeight:1.45},storyStepCard:{backgroundColor:"#0f172a",border:"1px solid #334155",borderLeft:"4px solid #38bdf8",borderRadius:"0.4rem",padding:"0.6rem 0.75rem",cursor:"pointer"},storyStepHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.25rem"},storyBadge:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.03em"},storyTitle:{fontSize:"0.84rem",fontWeight:700,color:"#f8fafc",marginBottom:"0.2rem"},storyDetail:{fontSize:"0.78rem",color:"#cbd5e1",lineHeight:1.4},storyTechNote:{marginTop:"0.3rem",fontSize:"0.7rem",color:"#64748b",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},networkTabLayout:{display:"flex",flexDirection:"column",gap:"0.75rem",height:"100%"},networkList:{display:"flex",flexDirection:"column",gap:"0.35rem",maxHeight:"210px",overflowY:"auto",borderBottom:"1px solid #334155",paddingBottom:"0.5rem"},networkRow:{padding:"0.5rem 0.65rem",borderRadius:"0.4rem",border:"1px solid #334155",cursor:"pointer"},networkRowTop:{display:"flex",alignItems:"center",gap:"0.45rem",marginBottom:"0.25rem"},statusBadge:{fontSize:"0.7rem",fontWeight:700,padding:"0.1rem 0.4rem",borderRadius:"0.25rem",color:"#ffffff"},methodBadge:{fontSize:"0.75rem",fontWeight:700,color:"#e2e8f0"},typeTag:{fontSize:"0.68rem",color:"#94a3b8",backgroundColor:"#0f172a",padding:"0.1rem 0.35rem",borderRadius:"0.25rem"},durationText:{fontSize:"0.75rem",color:"#38bdf8",marginLeft:"auto"},relTimeText:{fontSize:"0.72rem",color:"#64748b",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},urlText:{fontSize:"0.76rem",color:"#cbd5e1",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},networkDetailPane:{flex:1,overflowY:"auto",backgroundColor:"#0f172a",borderRadius:"0.45rem",border:"1px solid #334155",padding:"0.75rem"},detailHeader:{fontSize:"0.8rem",color:"#38bdf8",marginBottom:"0.6rem",wordBreak:"break-all"},detailSection:{marginBottom:"0.75rem"},detailLabel:{fontSize:"0.74rem",fontWeight:600,color:"#94a3b8",marginBottom:"0.3rem",textTransform:"uppercase",letterSpacing:"0.03em"},codeBlock:{margin:0,padding:"0.55rem",backgroundColor:"#090d16",border:"1px solid #1e293b",borderRadius:"0.35rem",fontSize:"0.74rem",color:"#e2e8f0",overflowX:"auto",maxHeight:"150px",overflowY:"auto"},logList:{display:"flex",flexDirection:"column",gap:"0.5rem"},consoleItem:{backgroundColor:"#0f172a",border:"1px solid #334155",borderLeft:"3px solid #38bdf8",borderRadius:"0.35rem",padding:"0.55rem 0.7rem",cursor:"pointer"},consoleHeader:{display:"flex",justifyContent:"space-between",marginBottom:"0.3rem"},consoleLevel:{fontSize:"0.7rem",fontWeight:700,color:"#cbd5e1"},consoleMessage:{margin:0,fontSize:"0.76rem",color:"#e2e8f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},errorCard:{backgroundColor:"#450a0a",border:"1px solid #7f1d1d",borderRadius:"0.4rem",padding:"0.65rem",cursor:"pointer"},errorBadge:{backgroundColor:"#dc2626",color:"#ffffff",fontSize:"0.68rem",fontWeight:700,padding:"0.1rem 0.4rem",borderRadius:"0.25rem",textTransform:"uppercase"},errorTitle:{fontSize:"0.82rem",fontWeight:600,color:"#fecaca",margin:"0.35rem 0"},metadataPane:{display:"flex",flexDirection:"column",gap:"0.75rem"},issueCard:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",borderRadius:"0.45rem",padding:"0.75rem"},issueTitle:{fontSize:"0.9rem",fontWeight:700,color:"#f8fafc",marginBottom:"0.35rem"},issueDesc:{margin:0,fontSize:"0.82rem",color:"#cbd5e1"},emptyInspector:{color:"#64748b",fontSize:"0.85rem",textAlign:"center",padding:"2rem 1rem"}};function Vs(t){if(typeof document>"u")return{destroy:()=>{}};const e=document.getElementById("rewindlog-vanilla-widget-root");e&&e.remove();const r=document.createElement("div");r.id="rewindlog-vanilla-widget-root",r.className="rewindlog-block",r.style.cssText=`
|
|
537
|
+
position: fixed;
|
|
538
|
+
right: 20px;
|
|
539
|
+
bottom: 20px;
|
|
540
|
+
z-index: 999999;
|
|
541
|
+
font-family: Inter, system-ui, -apple-system, sans-serif;
|
|
542
|
+
`;const n=document.createElement("button");n.type="button",n.style.cssText=`
|
|
543
|
+
display: flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
gap: 8px;
|
|
546
|
+
background-color: #0284c7;
|
|
547
|
+
color: #ffffff;
|
|
548
|
+
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
549
|
+
border-radius: 9999px;
|
|
550
|
+
padding: 10px 18px;
|
|
551
|
+
font-size: 13px;
|
|
552
|
+
font-weight: 700;
|
|
553
|
+
cursor: pointer;
|
|
554
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
|
|
555
|
+
transition: transform 0.15s ease, background-color 0.2s ease;
|
|
556
|
+
`,n.innerHTML=`
|
|
557
|
+
<span style="width: 8px; height: 8px; border-radius: 50%; background-color: #ffffff; box-shadow: 0 0 6px #fff;"></span>
|
|
558
|
+
<span>🛟 Lapor Kendala</span>
|
|
559
|
+
`;const i=document.createElement("div");i.style.cssText=`
|
|
560
|
+
display: none;
|
|
561
|
+
position: absolute;
|
|
562
|
+
right: 0;
|
|
563
|
+
bottom: 52px;
|
|
564
|
+
width: 320px;
|
|
565
|
+
background-color: #0f172a;
|
|
566
|
+
border: 1px solid #334155;
|
|
567
|
+
border-radius: 14px;
|
|
568
|
+
padding: 16px;
|
|
569
|
+
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
|
|
570
|
+
color: #f8fafc;
|
|
571
|
+
box-sizing: border-box;
|
|
572
|
+
`;const s=t.getStats(),o=t.getTicketFormat(),l=o==="teams"?"Microsoft Teams":o==="slack"?"Slack":o==="jira"?"Jira":"WhatsApp";i.innerHTML=`
|
|
573
|
+
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;">
|
|
574
|
+
<div>
|
|
575
|
+
<h4 style="margin: 0; font-size: 15px; font-weight: 700; color: #f8fafc;">Laporkan Kendala</h4>
|
|
576
|
+
<p style="margin: 3px 0 0 0; font-size: 11px; color: #94a3b8;">🛡️ Privasi Terjaga • Rekaman 5 Menit Terakhir</p>
|
|
577
|
+
</div>
|
|
578
|
+
<button id="rewindlog-vanilla-close" type="button" style="background: none; border: none; color: #94a3b8; font-size: 16px; cursor: pointer; padding: 2px;">✕</button>
|
|
579
|
+
</div>
|
|
580
|
+
|
|
581
|
+
<textarea id="rewindlog-vanilla-note" rows="2" placeholder="Ceritakan singkat kendalanya... (opsional)" style="
|
|
582
|
+
width: 100%;
|
|
583
|
+
box-sizing: border-box;
|
|
584
|
+
padding: 8px 10px;
|
|
585
|
+
border-radius: 8px;
|
|
586
|
+
border: 1px solid #334155;
|
|
587
|
+
background-color: #1e293b;
|
|
588
|
+
color: #f8fafc;
|
|
589
|
+
font-size: 12px;
|
|
590
|
+
outline: none;
|
|
591
|
+
resize: none;
|
|
592
|
+
margin-bottom: 8px;
|
|
593
|
+
font-family: inherit;
|
|
594
|
+
"></textarea>
|
|
595
|
+
|
|
596
|
+
<div style="display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; padding: 5px 8px; background: rgba(30, 41, 59, 0.6); border-radius: 6px; margin-bottom: 10px;">
|
|
597
|
+
<span>📹 5 Menit Terakhir</span>
|
|
598
|
+
<span style="color: #34d399;">✓ Data Nasabah Disensor</span>
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
<div id="rewindlog-vanilla-feedback" style="display: none; background: #059669; color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 11px; font-weight: 700; text-align: center; margin-bottom: 8px;"></div>
|
|
602
|
+
|
|
603
|
+
<div style="display: flex; flex-direction: column; gap: 6px;">
|
|
604
|
+
<button id="rewindlog-vanilla-copy-btn" type="button" style="
|
|
605
|
+
background-color: #059669;
|
|
606
|
+
color: #ffffff;
|
|
607
|
+
border: none;
|
|
608
|
+
border-radius: 8px;
|
|
609
|
+
padding: 9px 12px;
|
|
610
|
+
font-size: 12px;
|
|
611
|
+
font-weight: 700;
|
|
612
|
+
cursor: pointer;
|
|
613
|
+
width: 100%;
|
|
614
|
+
text-align: center;
|
|
615
|
+
">📋 Salin Laporan ke ${l}</button>
|
|
616
|
+
|
|
617
|
+
<button id="rewindlog-vanilla-html-btn" type="button" style="
|
|
618
|
+
background-color: #1e293b;
|
|
619
|
+
color: #cbd5e1;
|
|
620
|
+
border: 1px solid #334155;
|
|
621
|
+
border-radius: 8px;
|
|
622
|
+
padding: 7px 10px;
|
|
623
|
+
font-size: 11px;
|
|
624
|
+
font-weight: 600;
|
|
625
|
+
cursor: pointer;
|
|
626
|
+
width: 100%;
|
|
627
|
+
text-align: center;
|
|
628
|
+
">📄 Unduh Dokumen Laporan (HTML)</button>
|
|
629
|
+
</div>
|
|
630
|
+
`,r.appendChild(i),r.appendChild(n),document.body.appendChild(r);let c=!1;const u=()=>{c=!c,i.style.display=c?"block":"none"};n.addEventListener("click",u);const a=i.querySelector("#rewindlog-vanilla-close");a&&a.addEventListener("click",()=>{c=!1,i.style.display="none"});const h=i.querySelector("#rewindlog-vanilla-copy-btn"),d=i.querySelector("#rewindlog-vanilla-feedback"),f=i.querySelector("#rewindlog-vanilla-note");h&&h.addEventListener("click",async()=>{const p=f?f.value.trim():"",y=t.getSnapshot({title:p||"Laporan Kendala Aplikasi",description:p||void 0,severity:(s.errorLogsCount??0)>0?"critical":"high"}),v=Et(y,t.getTicketFormat());try{await navigator.clipboard.writeText(v),d&&(d.textContent=`✓ Laporan tersalin untuk ${l}! Tinggal tempel ke chat.`,d.style.display="block",setTimeout(()=>{d.style.display="none"},3500))}catch{alert("Gagal menyalin ke clipboard")}});const m=i.querySelector("#rewindlog-vanilla-html-btn");return m&&m.addEventListener("click",()=>{const p=f?f.value.trim():"",y=t.getSnapshot({title:p||"Laporan Kendala Aplikasi",description:p||void 0,severity:(s.errorLogsCount??0)>0?"critical":"high"});lr(y)}),{destroy:()=>{r.remove()}}}let Ft=null,ln=null;function Ac(t={}){if(Ft)return Ft;const{autoInjectWidget:e=!0,...r}=t,n=new qs(r);return n.start(),Ft=n,e&&typeof document<"u"&&(ln=Vs(n)),n}function Ic(){return Ft}function Oc(){Ft&&(Ft.stop(),Ft=null),ln&&(ln.destroy(),ln=null)}const Nc={init:Ac,getInstance:Ic,destroy:Oc,RewindLogSDK:qs,injectVanillaWidget:Vs,generateExecutiveSummary:mt,exportReadableHtmlReport:lr,formatTicketClipboardSummary:Et,computeTelemetrySha256:or,encryptPayloadWithAesGcm:zs,decryptPayloadWithAesGcm:Hs};typeof window<"u"&&(window.RewindLog=Nc);exports.ReplayStudio=Cp;exports.RewindLogFloatingWidget=xp;exports.RewindLogSDK=qs;exports.computeTelemetrySha256=or;exports.decryptPayloadWithAesGcm=Hs;exports.default=Nc;exports.destroy=Oc;exports.encryptPayloadWithAesGcm=zs;exports.exportReadableHtmlReport=lr;exports.formatCompactOneLiner=Ec;exports.formatJiraTicket=kc;exports.formatMarkdownTicket=Tc;exports.formatSlackTicket=Mc;exports.formatTeamsTicket=Rc;exports.formatTicketClipboardSummary=Et;exports.formatWhatsAppTicket=gs;exports.generateExecutiveSummary=mt;exports.getInstance=Ic;exports.init=Ac;exports.injectVanillaWidget=Vs;exports.passesLuhnCheck=xc;exports.sanitizeBankingUrl=an;exports.scrubBankingFreeText=Ve;
|