@spectosh/browser 0.2.5 → 0.3.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/README.md +3 -1
- package/dist/point-4P-cvF8S.cjs +252 -0
- package/dist/point-B5SXBYaU.js +1425 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +35 -28
- package/dist/specto-browser.cjs +1 -1
- package/dist/specto-browser.js +1 -2
- package/dist/src-BDf8wYoH.cjs +138 -0
- package/dist/{src-D-1ogCCr.js → src-mrKmVGmE.js} +1461 -1194
- package/package.json +7 -5
- package/src/index.js +19 -3
- package/src/point/context.js +61 -0
- package/src/point/describe.js +244 -0
- package/src/point/entry.js +475 -0
- package/src/point/index.js +859 -0
- package/src/point/trigger.js +198 -0
- package/src/point/voice.js +131 -0
- package/src/react.js +9 -3
- package/src/recorder.js +115 -28
- package/src/scrub.js +28 -0
- package/types/index.d.ts +42 -1
- package/types/react.d.ts +3 -1
- package/dist/src-DyiwhKUe.cjs +0 -138
package/dist/src-DyiwhKUe.cjs
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,n=(e,n,r)=>t(e,typeof n==`symbol`?n:n+``,r),r=Object.defineProperty,i=(e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,a=(e,t,n)=>i(e,typeof t==`symbol`?t:t+``,n),o=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(o||{}),s={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},c={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},l={},u={},d=()=>!!globalThis.Zone;function f(e){if(l[e])return l[e];let t=globalThis[e],n=t.prototype,r=e in s?s[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in c?c[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!d())return l[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),u[e]=()=>r.remove()):r.remove(),l[e]=a}catch{return n}}var p={};function m(e,t,n){let r=p[e]?.[n];if(r)return r.call(t);let i=f(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((p[e]||(p[e]={}))[n]=a,a.call(t)):t[n]}var h={};function g(e,t,n){let r=`${e}.${String(n)}`;if(h[r])return h[r].bind(t);let i=f(e)[n];return typeof i==`function`?(h[r]=i,i.bind(t)):t[n]}function _(e){return m(`Node`,e,`ownerDocument`)}function v(e){return m(`Node`,e,`childNodes`)}function y(e){return m(`Node`,e,`parentNode`)}function b(e){return m(`Node`,e,`parentElement`)}function x(e){return m(`Node`,e,`textContent`)}function S(e){return m(`Node`,e,`firstChild`)}function C(e){return m(`Node`,e,`lastChild`)}function w(e){return m(`Node`,e,`nextSibling`)}function ee(e){return m(`Node`,e,`previousSibling`)}function T(e,t){return g(`Node`,e,`contains`)(t)}function E(e){return g(`Node`,e,`getRootNode`)()}function D(e){return!e||!(`host`in e)?null:m(`ShadowRoot`,e,`host`)}function O(e){return e.styleSheets}function k(e){return!e||!(`shadowRoot`in e)?null:m(`Element`,e,`shadowRoot`)}function te(e,t){return m(`Element`,e,`querySelector`)(t)}function ne(e,t){return m(`Element`,e,`querySelectorAll`)(t)}function A(){return[f(`MutationObserver`).constructor,u.MutationObserver??(()=>{})]}var re=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(re=()=>new Date().getTime());function ie(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var j={ownerDocument:_,childNodes:v,parentNode:y,parentElement:b,textContent:x,firstChild:S,lastChild:C,nextSibling:w,previousSibling:ee,contains:T,getRootNode:E,host:D,styleSheets:O,shadowRoot:k,querySelector:te,querySelectorAll:ne,nowTimestamp:re,mutationObserverCtor:A,patch:ie};function M(e){return e.nodeType===e.ELEMENT_NODE}function ae(e){let t=e&&`host`in e&&`mode`in e&&j.host(e)||null;return!!(t&&`shadowRoot`in t&&j.shadowRoot(t)===e)}function N(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function oe(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function se(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function P(e){try{let t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),oe(Array.from(t,e=>F(e,n)).join(``))}catch{return null}}function F(e,t){if(le(e)){let t;try{t=P(e.styleSheet)||se(e)}catch{t=e.cssText}return e.styleSheet.href?we(t,e.styleSheet.href):t}{let n=e.cssText;return ue(e)&&e.selectorText.includes(`:`)&&(n=ce(n)),t?we(n,t):n}}function ce(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function le(e){return`styleSheet`in e}function ue(e){return`selectorText`in e}var de=class{constructor(){a(this,`idNodeMap`,new Map),a(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function fe(){return new de}function pe({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:a}){let o=i||``,s=r&&me(r);return(t[n.toLowerCase()]||s&&t[s])&&(o=a?a(o,e):`*`.repeat(o.length)),o}function me(e){return e.toLowerCase()}var he=`__rrweb_original__`;function ge(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=he in i?i[he]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function _e(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?me(t):null}function ve(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function ye(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var be=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?:[a-z+]+:)?\/\//i,Se=/^www\..*/i,Ce=/^(data:)([^,]*),(.*)/i;function we(e,t){return(e||``).replace(be,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(xe.test(s)||Se.test(s)||Ce.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${ye(t)+s}${c})`;let l=s.split(`#`)[0],u=s.substring(l.length),d=t.split(`#`)[0].split(`/`),f=l.split(`/`);d.pop();for(let e of f)if(e===`.`)continue;else e===`..`?d.pop():d.push(e);return`url(${c}${d.join(`/`)}${u}${c})`})}function Te(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,``).replace(/0px/g,`0`)}function Ee(e,t,n=!1){let r=Array.from(t.childNodes),i=[],a=0;if(r.length>1&&e&&typeof e==`string`){let t=Te(e,n),o=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&typeof r[s].textContent==`string`){let c=Te(r[s].textContent,n),l=3;for(;l<c.length&&(c[l].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,l),1)!==-1);l++);for(;l<c.length;l++){let u=c.substring(0,l),d=t.split(u),f=-1;if(d.length===2)f=d[0].length;else if(d.length>2&&d[0]===``&&r[s-1].textContent!==``)f=t.indexOf(u,1);else if(d.length===1){if(u=u.substring(0,u.length-1),d=t.split(u),d.length<=1)return i.push(e),i;l=101}else l===c.length-1&&(f=t.indexOf(u));if(d.length>=2&&l>100){let e=r[s-1].textContent;if(e&&typeof e==`string`){let n=Te(e).length;f=t.indexOf(u,n)}f===-1&&(f=d[0].length)}if(f!==-1){let s=Math.floor(f/o);for(;s>0&&s<e.length;){if(a+=1,a>50*r.length)return i.push(e),i;let c=Te(e.substring(0,s),n);if(c.length===f){i.push(e.substring(0,s)),e=e.substring(s),t=t.substring(f);break}c.length<f?s+=Math.max(1,Math.floor((f-c.length)/o)):s-=Math.max(1,Math.floor((c.length-f)*o))}break}}}}return i.push(e),i}function De(e,t){return Ee(e,t).join(`/* rr_split */`)}var Oe=1,ke=RegExp(`[^a-z0-9-_:]`),Ae=-2;function je(){return Oe++}function Me(e){if(e instanceof HTMLFormElement)return`form`;let t=me(e.tagName);return ke.test(t)?`div`:t}var Ne,Pe,Fe=/^[^ \t\n\r\u000c]+/,Ie=/^[, \t\n\r\u000c]+/;function Le(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Ie),!(n>=t.length);){let a=r(Fe);if(a.slice(-1)===`,`)a=ze(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=ze(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var Re=new WeakMap;function ze(e,t){return!t||t.trim()===``?t:Ve(e,t)}function Be(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Ve(e,t){let n=Re.get(e);if(n||(n=e.createElement(`a`),Re.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function He(e,t,n,r){return r&&(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&[`table`,`td`,`th`].includes(t)?ze(e,r):n===`srcset`?Le(e,r):n===`style`?we(r,Ve(e)):t===`object`&&n===`data`?ze(e,r):r)}function Ue(e,t,n){return[`video`,`audio`].includes(e)&&me(t)===`autoplay`}function We(e,t,n){try{if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Ge(j.parentNode(e),t,n):!1;for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return n?Ge(j.parentNode(e),t,n):!1}function Ke(e,t,n,r){let i;if(M(e)){if(i=e,!j.childNodes(i).length)return!1}else if(j.parentElement(e)===null)return!1;else i=j.parentElement(e);try{if(typeof t==`string`){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ge(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function qe(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=setTimeout(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return setTimeout(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function Je(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{clearTimeout(a),r=!0,t()})}function Ye(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:s,inlineStylesheet:c,maskInputOptions:l={},maskTextFn:u,maskInputFn:d,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g=!1,cssCaptured:_=!1}=t,v=Xe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:o.Document,childNodes:[]}:{type:o.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Qe(e,{doc:n,blockClass:i,blockSelector:a,inlineStylesheet:c,maskInputOptions:l,maskInputFn:d,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:h,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return Ze(e,{doc:n,needsMask:s,maskTextFn:u,rootId:v,cssCaptured:_});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:``,rootId:v};case e.COMMENT_NODE:return{type:o.Comment,textContent:j.textContent(e)||``,rootId:v};default:return!1}}function Xe(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function Ze(e,t){let{needsMask:n,maskTextFn:r,rootId:i,cssCaptured:a}=t,s=j.parentNode(e),c=s&&s.tagName,l=``,u=c===`STYLE`||void 0,d=c===`SCRIPT`||void 0;return d?l=`SCRIPT_PLACEHOLDER`:a||(l=j.textContent(e),u&&l&&(l=we(l,Ve(t.doc)))),!u&&!d&&l&&n&&(l=r?r(l,j.parentElement(e)):l.replace(/[\S]/g,`*`)),{type:o.Text,textContent:l||``,rootId:i}}function Qe(e,t){let{doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskInputFn:c,dataURLOptions:l={},inlineImages:u,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:p=!1,rootId:m}=t,h=We(e,r,i),g=Me(e),_={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];Ue(g,r.name,r.value)||(_[r.name]=He(n,g,me(r.name),r.value))}if(g===`link`&&a){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=P(t)),r&&(delete _.rel,delete _.href,_._cssText=r)}if(g===`style`&&e.sheet){let t=P(e.sheet);t&&(e.childNodes.length>1&&(t=De(t,e)),_._cssText=t)}if([`input`,`textarea`,`select`].includes(g)){let t=e.value,n=e.checked;_.type!==`radio`&&_.type!==`checkbox`&&_.type!==`submit`&&_.type!==`button`&&t?_.value=pe({element:e,type:_e(e),tagName:g,value:t,maskInputOptions:s,maskInputFn:c}):n&&(_.checked=n)}if(g===`option`&&(e.selected&&!s.select?_.selected=!0:delete _.selected),g===`dialog`&&e.open&&(_.rr_open_mode=e.matches(`dialog:modal`)?`modal`:`non-modal`),g===`canvas`&&d){if(e.__context===`2d`)ge(e)||(_.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!(`__context`in e)){let t=e.toDataURL(l.type,l.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(l.type,l.quality)&&(_.rr_dataURL=t)}}if(g===`img`&&u){Ne||(Ne=n.createElement(`canvas`),Pe=Ne.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{Ne.width=t.naturalWidth,Ne.height=t.naturalHeight,Pe.drawImage(t,0,0),_.rr_dataURL=Ne.toDataURL(l.type,l.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?_.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if([`audio`,`video`].includes(g)){let t=_;t.rr_mediaState=e.paused?`paused`:`played`,t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),h){let{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${n}px`}}g===`iframe`&&!f(_.src)&&(e.contentDocument||(_.rr_src=_.src),delete _.src);let y;try{customElements.get(g)&&(y=!0)}catch{}return{type:o.Element,tagName:g,attributes:_,childNodes:[],isSVG:Be(e)||void 0,needBlock:h,rootId:m,isCustom:y}}function I(e){return e==null?``:e.toLowerCase()}function $e(e){return e===!0||e===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e===`all`,headMetaDescKeywords:e===`all`,headTitleMutations:e===`all`}:e||{}}function et(e,t){return!!(t.comment&&e.type===o.Comment||e.type===o.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`&&e.attributes.as===`script`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&ve(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(I(e.attributes.name).match(/^msapplication-tile(image|color)$/)||I(e.attributes.name)===`application-name`||I(e.attributes.rel)===`icon`||I(e.attributes.rel)===`apple-touch-icon`||I(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&I(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(I(e.attributes.property).match(/^(og|twitter|fb):/)||I(e.attributes.name).match(/^(og|twitter):/)||I(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(I(e.attributes.name)===`robots`||I(e.attributes.name)===`googlebot`||I(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(I(e.attributes.name)===`author`||I(e.attributes.name)===`generator`||I(e.attributes.name)===`framework`||I(e.attributes.name)===`publisher`||I(e.attributes.name)===`progid`||I(e.attributes.property).match(/^article:/)||I(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(I(e.attributes.name)===`google-site-verification`||I(e.attributes.name)===`yandex-verification`||I(e.attributes.name)===`csrf-token`||I(e.attributes.name)===`p:domain_verify`||I(e.attributes.name)===`verify-v1`||I(e.attributes.name)===`verification`||I(e.attributes.name)===`shopify-checkout-api-token`))))}function tt(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h={},inlineImages:g=!1,recordCanvas:_=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:w=!1,cssCaptured:ee=!1}=t,{needsMask:T}=t,{preserveWhiteSpace:E=!0}=t;T||=Ke(e,s,c,T===void 0);let D=Ye(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,dataURLOptions:h,inlineImages:g,recordCanvas:_,keepIframeSrcFn:C,newlyAddedElement:w,cssCaptured:ee});if(!D)return console.warn(e,`not serialized`),null;let O;O=r.hasNode(e)?r.getId(e):et(D,m)||!E&&D.type===o.Text&&!D.textContent.replace(/^\s+|\s+$/gm,``).length?Ae:je();let k=Object.assign(D,{id:O});if(r.add(e,k),O===Ae)return null;v&&v(e);let te=!l;if(k.type===o.Element){te&&=!k.needBlock,delete k.needBlock;let t=j.shadowRoot(e);t&&N(t)&&(k.isShadowHost=!0)}if((k.type===o.Document||k.type===o.Element)&&te){m.headWhitespace&&k.type===o.Element&&k.tagName===`head`&&(E=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(k.type!==o.Element||k.tagName!==`textarea`||k.attributes.value===void 0){k.type===o.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText==`string`&&(t.cssCaptured=!0);for(let n of Array.from(j.childNodes(e))){let e=tt(n,t);e&&k.childNodes.push(e)}}let w=null;if(M(e)&&(w=j.shadowRoot(e)))for(let e of Array.from(j.childNodes(w))){let n=tt(e,t);n&&(N(w)&&(n.isShadow=!0),k.childNodes.push(n))}}let ne=j.parentNode(e);return ne&&ae(ne)&&N(ne)&&(k.isShadow=!0),k.type===o.Element&&k.tagName===`iframe`&&qe(e,()=>{let t=e.contentDocument;if(t&&y){let n=tt(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});n&&y(e,n)}},b),k.type===o.Element&&k.tagName===`link`&&typeof k.attributes.rel==`string`&&(k.attributes.rel===`stylesheet`||k.attributes.rel===`preload`&&typeof k.attributes.href==`string`&&ve(k.attributes.href)===`css`)&&Je(e,()=>{if(x){let t=tt(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:u,maskInputOptions:d,maskTextFn:f,maskInputFn:p,slimDOMOptions:m,dataURLOptions:h,inlineImages:g,recordCanvas:_,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&x(e,t)}},S),k}function nt(e,t){let{mirror:n=new de,blockClass:r=`rr-block`,blockSelector:i=null,maskTextClass:a=`rr-mask`,maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:c=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:f,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x=()=>!1}=t;return tt(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:d,maskInputFn:f,slimDOMOptions:$e(p),dataURLOptions:m,inlineImages:c,recordCanvas:l,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:_,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:x,newlyAddedElement:!1})}function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function it(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var at={exports:{}},ot;function st(){if(ot)return at.exports;ot=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return at.exports=t(),at.exports.createColors=t,at.exports}var L=it(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),ct,lt;function ut(){if(lt)return ct;lt=1;let e=st(),t=L;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
2
|
-
`+t+c(`^`)}return` `+l(r)+e}).join(`
|
|
3
|
-
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
4
|
-
|
|
5
|
-
`+e+`
|
|
6
|
-
`,this.name+`: `+this.message+e}}return ct=n,n.default=n,ct}var dt={},ft;function pt(){return ft?dt:(ft=1,dt.isClean=Symbol(`isClean`),dt.my=Symbol(`my`),dt)}var mt,ht;function gt(){if(ht)return mt;ht=1;let e={after:`
|
|
7
|
-
`,beforeClose:`
|
|
8
|
-
`,beforeComment:`
|
|
9
|
-
`,beforeDecl:`
|
|
10
|
-
`,beforeOpen:` `,beforeRule:`
|
|
11
|
-
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
12
|
-
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
13
|
-
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
14
|
-
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
15
|
-
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
16
|
-
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
17
|
-
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return mt=n,n.default=n,mt}var _t,vt;function yt(){if(vt)return _t;vt=1;let e=gt();function t(t,n){new e(n).stringify(t)}return _t=t,t.default=t,_t}var bt,xt;function St(){if(xt)return bt;xt=1;let{isClean:e,my:t}=pt(),n=ut(),r=gt(),i=yt();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
18
|
-
`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return bt=o,o.default=o,bt}var Ct,wt;function Tt(){if(wt)return Ct;wt=1;let e=St();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return Ct=t,t.default=t,Ct}var Et,Dt;function Ot(){return Dt?Et:(Dt=1,Et={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},Et)}var kt,At;function jt(){if(At)return kt;At=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=L,{existsSync:n,readFileSync:r}=L,{dirname:i,join:a}=L;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return kt=s,s.default=s,kt}var Mt,Nt;function Pt(){if(Nt)return Mt;Nt=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=L,{fileURLToPath:n,pathToFileURL:r}=L,{isAbsolute:i,resolve:a}=L,{nanoid:o}=Ot(),s=L,c=ut(),l=jt(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!f||/^\w+:\/\//.test(t.from)||i(t.from)?t.from:a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(`
|
|
19
|
-
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`){if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`)}let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Mt=p,p.default=p,s&&s.registerInput&&s.registerInput(p),Mt}var Ft,It;function Lt(){if(It)return Ft;It=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=L,{dirname:n,relative:r,resolve:i,sep:a}=L,{pathToFileURL:o}=L,s=Pt(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
20
|
-
`;this.css.includes(`\r
|
|
21
|
-
`)&&(t=`\r
|
|
22
|
-
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
23
|
-
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return Ft=u,Ft}var Rt,zt;function Bt(){if(zt)return Rt;zt=1;let e=St();class t extends e{constructor(e){super(e),this.type=`comment`}}return Rt=t,t.default=t,Rt}var Vt,Ht;function Ut(){if(Ht)return Vt;Ht=1;let{isClean:e,my:t}=pt(),n=Tt(),r=Bt(),i=St(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Vt=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Vt}var Wt,Gt;function Kt(){if(Gt)return Wt;Gt=1;let e=Ut(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Wt=r,r.default=r,Wt}var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;let e={};return qt=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},qt}var Xt,Zt;function Qt(){if(Zt)return Xt;Zt=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Xt=e,e.default=e,Xt}var $t,en;function tn(){if(en)return $t;en=1;let e=Qt();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return $t=t,t.default=t,$t}var nn,rn;function an(){if(rn)return nn;rn=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return nn=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function ee(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function T(e){x.push(e)}return{back:T,endOfFile:w,nextToken:ee,position:S}},nn}var on,sn;function cn(){if(sn)return on;sn=1;let e=Ut();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return on=t,t.default=t,e.registerAtRule(t),on}var ln,un;function dn(){if(un)return ln;un=1;let e=Ut(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},ln=r,r.default=r,e.registerRoot(r),ln}var fn,pn;function mn(){if(pn)return fn;pn=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
24
|
-
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return fn=e,e.default=e,fn}var hn,gn;function _n(){if(gn)return hn;gn=1;let e=Ut(),t=mn();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return hn=n,n.default=n,e.registerRule(n),hn}var vn,yn;function bn(){if(yn)return vn;yn=1;let e=Tt(),t=an(),n=Bt(),r=cn(),i=dn(),a=_n(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return vn=c,vn}var xn,Sn;function Cn(){if(Sn)return xn;Sn=1;let e=Ut(),t=bn(),n=Pt();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw process.env.NODE_ENV!==`production`&&e.name===`CssSyntaxError`&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+=`
|
|
25
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?e.message+=`
|
|
26
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(e.message+=`
|
|
27
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),e}return a.root}return xn=r,r.default=r,e.registerParse(r),xn}var wn,Tn;function En(){if(Tn)return wn;Tn=1;let{isClean:e,my:t}=pt(),n=Lt(),r=yt(),i=Ut(),a=Kt(),o=Yt(),s=tn(),c=Cn(),l=dn(),u={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},d={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},f={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return typeof e==`object`&&typeof e.then==`function`}function m(e){let t=!1,n=u[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function h(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:m(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let _={};class v{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=g(n);else if(n instanceof v||n instanceof s)a=g(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=c;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new s(e,a,r),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin)e.plugin=n.postcssPlugin,e.setMessage();else if(n.postcssVersion&&process.env.NODE_ENV!==`production`){let e=n.postcssPlugin,t=n.postcssVersion,r=this.result.processor.version,i=t.split(`.`),a=r.split(`.`);(i[0]!==a[0]||parseInt(i[1])>parseInt(a[1]))&&console.error(`Unknown error from PostCSS plugin. Your current PostCSS version is `+r+`, but `+e+` uses `+t+`. Perhaps this is the source of the error below.`)}}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!d[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[n]){if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(p(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[h(t)];for(;n.length>0;){let e=this.visitTick(n);if(p(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(p(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit){if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){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(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(h(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=m(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.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 v.registerPostcss=e=>{_=e},wn=v,v.default=v,l.registerLazyResult(v),a.registerLazyResult(v),wn}var Dn,On;function kn(){if(On)return Dn;On=1;let e=Lt(),t=yt(),n=Yt(),r=Cn(),i=tn();class a{constructor(n,r,a){r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=a,this._map=void 0;let o,s=t;this.result=new i(this._processor,o,this._opts),this.result.css=r;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let l=new e(s,o,this._opts,r);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!==`production`&&(`from`in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return Dn=a,a.default=a,Dn}var An,jn;function Mn(){if(jn)return An;jn=1;let e=kn(),t=En(),n=Kt(),r=dn();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(typeof n==`object`&&(n.parse||n.stringify)){if(process.env.NODE_ENV!==`production`)throw 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 Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return An=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),An}var Nn,Pn;function Fn(){if(Pn)return Nn;Pn=1;let e=Tt(),t=jt(),n=Bt(),r=cn(),i=Pt(),a=dn(),o=_n();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return Nn=s,s.default=s,Nn}var In,Ln;function Rn(){if(Ln)return In;Ln=1;let e=ut(),t=Tt(),n=En(),r=Ut(),i=Mn(),a=yt(),o=Fn(),s=Kt(),c=Qt(),l=Bt(),u=cn(),d=tn(),f=Pt(),p=Cn(),m=mn(),h=_n(),g=dn(),_=St();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,"postcss",{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),In=v,v.default=v,In}var R=rt(Rn());R.stringify,R.fromJSON,R.plugin,R.parse,R.list,R.document,R.comment,R.atRule,R.rule,R.decl,R.root,R.CssSyntaxError,R.Declaration,R.Container,R.Processor,R.Document,R.Comment,R.Warning,R.AtRule,R.Result,R.Input,R.Rule,R.Root,R.Node;var zn=Object.defineProperty,Bn=(e,t,n)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t,n)=>Bn(e,typeof t==`symbol`?t:t+``,n);Date.now().toString();function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Hn(e){if(e.__esModule)return e;var t=e.default;if(typeof t==`function`){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Un={exports:{}},Wn;function Gn(){if(Wn)return Un.exports;Wn=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Un.exports=t(),Un.exports.createColors=t,Un.exports}var B=Hn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:`Module`}))),Kn,qn;function Jn(){if(qn)return Kn;qn=1;let e=Gn(),t=B;class n extends Error{constructor(e,t,r,i,a,o){super(e),this.name=`CssSyntaxError`,this.reason=e,a&&(this.file=a),i&&(this.source=i),o&&(this.plugin=o),t!==void 0&&r!==void 0&&(typeof t==`number`?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,n)}setMessage(){this.message=this.plugin?this.plugin+`: `:``,this.message+=this.file?this.file:`<css input>`,this.line!==void 0&&(this.message+=`:`+this.line+`:`+this.column),this.message+=`: `+this.reason}showSourceCode(n){if(!this.source)return``;let r=this.source;n??=e.isColorSupported,t&&n&&(r=t(r));let i=r.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),s=String(o).length,c,l;if(n){let{bold:t,gray:n,red:r}=e.createColors(!0);c=e=>t(r(e)),l=e=>n(e)}else c=l=e=>e;return i.slice(a,o).map((e,t)=>{let n=a+1+t,r=` `+(` `+n).slice(-s)+` | `;if(n===this.line){let t=l(r.replace(/\d/g,` `))+e.slice(0,this.column-1).replace(/[^\t]/g,` `);return c(`>`)+l(r)+e+`
|
|
30
|
-
`+t+c(`^`)}return` `+l(r)+e}).join(`
|
|
31
|
-
`)}toString(){let e=this.showSourceCode();return e&&=`
|
|
32
|
-
|
|
33
|
-
`+e+`
|
|
34
|
-
`,this.name+`: `+this.message+e}}return Kn=n,n.default=n,Kn}var Yn={},Xn;function Zn(){return Xn?Yn:(Xn=1,Yn.isClean=Symbol(`isClean`),Yn.my=Symbol(`my`),Yn)}var Qn,$n;function er(){if($n)return Qn;$n=1;let e={after:`
|
|
35
|
-
`,beforeClose:`
|
|
36
|
-
`,beforeComment:`
|
|
37
|
-
`,beforeDecl:`
|
|
38
|
-
`,beforeOpen:` `,beforeRule:`
|
|
39
|
-
`,colon:`: `,commentLeft:` `,commentRight:` `,emptyBody:``,indent:` `,semicolon:!1};function t(e){return e[0].toUpperCase()+e.slice(1)}class n{constructor(e){this.builder=e}atrule(e,t){let n=`@`+e.name,r=e.params?this.rawValue(e,`params`):``;if(e.raws.afterName===void 0?r&&(n+=` `):n+=e.raws.afterName,e.nodes)this.block(e,n+r);else{let i=(e.raws.between||``)+(t?`;`:``);this.builder(n+r+i,e)}}beforeAfter(e,t){let n;n=e.type===`decl`?this.raw(e,null,`beforeDecl`):e.type===`comment`?this.raw(e,null,`beforeComment`):t===`before`?this.raw(e,null,`beforeRule`):this.raw(e,null,`beforeClose`);let r=e.parent,i=0;for(;r&&r.type!==`root`;)i+=1,r=r.parent;if(n.includes(`
|
|
40
|
-
`)){let t=this.raw(e,null,`indent`);if(t.length)for(let e=0;e<i;e++)n+=t}return n}block(e,t){let n=this.raw(e,`between`,`beforeOpen`);this.builder(t+n+`{`,e,`start`);let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,`after`)):r=this.raw(e,`after`,`emptyBody`),r&&this.builder(r),this.builder(`}`,e,`end`)}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type===`comment`;)--t;let n=this.raw(e,`semicolon`);for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,`before`);a&&this.builder(a),this.stringify(i,t!==r||n)}}comment(e){let t=this.raw(e,`left`,`commentLeft`),n=this.raw(e,`right`,`commentRight`);this.builder(`/*`+t+e.text+n+`*/`,e)}decl(e,t){let n=this.raw(e,`between`,`colon`),r=e.prop+n+this.rawValue(e,`value`);e.important&&(r+=e.raws.important||` !important`),t&&(r+=`;`),this.builder(r,e)}document(e){this.body(e)}raw(n,r,i){let a;if(i||=r,r&&(a=n.raws[r],a!==void 0))return a;let o=n.parent;if(i===`before`&&(!o||o.type===`root`&&o.first===n||o&&o.type===`document`))return``;if(!o)return e[i];let s=n.root();if(s.rawCache||={},s.rawCache[i]!==void 0)return s.rawCache[i];if(i===`before`||i===`after`)return this.beforeAfter(n,i);{let e=`raw`+t(i);this[e]?a=this[e](s,n):s.walk(e=>{if(a=e.raws[r],a!==void 0)return!1})}return a===void 0&&(a=e[i]),s.rawCache[i]=a,a}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&e.raws.after!==void 0)return t=e.raws.after,t.includes(`
|
|
41
|
-
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
42
|
-
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeDecl`):n&&=n.replace(/\S/g,``),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(e.raws.before!==void 0)return n=e.raws.before,n.includes(`
|
|
43
|
-
`)&&(n=n.replace(/[^\n]+$/,``)),!1}),n===void 0?n=this.raw(t,null,`beforeRule`):n&&=n.replace(/\S/g,``),n}rawBeforeOpen(e){let t;return e.walk(e=>{if(e.type!==`decl`&&(t=e.raws.between,t!==void 0))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&n.raws.before!==void 0)return t=n.raws.before,t.includes(`
|
|
44
|
-
`)&&(t=t.replace(/[^\n]+$/,``)),!1}),t&&=t.replace(/\S/g,``),t}rawColon(e){let t;return e.walkDecls(e=>{if(e.raws.between!==void 0)return t=e.raws.between.replace(/[^\s:]/g,``),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length===0&&(t=e.raws.after,t!==void 0))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&n.raws.before!==void 0){let e=n.raws.before.split(`
|
|
45
|
-
`);return t=e[e.length-1],t=t.replace(/\S/g,``),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&e.last.type===`decl`&&(t=e.raws.semicolon,t!==void 0))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,`selector`)),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,`end`)}stringify(e,t){if(!this[e.type])throw Error(`Unknown AST node type `+e.type+`. Maybe you need to change PostCSS stringifier.`);this[e.type](e,t)}}return Qn=n,n.default=n,Qn}var tr,nr;function rr(){if(nr)return tr;nr=1;let e=er();function t(t,n){new e(n).stringify(t)}return tr=t,t.default=t,tr}var ir,ar;function or(){if(ar)return ir;ar=1;let{isClean:e,my:t}=Zn(),n=Jn(),r=er(),i=rr();function a(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r===`proxyCache`)continue;let i=e[r],o=typeof i;r===`parent`&&o===`object`?t&&(n[r]=t):r===`source`?n[r]=i:Array.isArray(i)?n[r]=i.map(e=>a(e,n)):(o===`object`&&i!==null&&(i=a(i)),n[r]=i)}return n}class o{constructor(n={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in n)if(e===`nodes`){this.nodes=[];for(let t of n[e])typeof t.clone==`function`?this.append(t.clone()):this.append(t)}else this[e]=n[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new n(e)}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:t===`root`?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`prop`||t===`value`||t===`name`||t===`params`||t===`important`||t===`text`)&&e.markDirty(),!0)}}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)n[t]===`
|
|
46
|
-
`?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex==`number`?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new r().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!==`document`;)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t||=new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||e===`parent`||e===`proxyCache`)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map(e=>typeof e==`object`&&e.toJSON?e.toJSON(null,t):e);else if(typeof r==`object`&&r.toJSON)n[e]=r.toJSON(null,t);else if(e===`source`){let a=t.get(r.input);a??(a=i,t.set(r.input,i),i++),n[e]={end:r.end,inputId:a,start:r.start}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||=new Proxy(this,this.getProxyProcessor()),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t=``;return e(this,e=>{t+=e}),t}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}get proxyOf(){return this}}return ir=o,o.default=o,ir}var sr,cr;function lr(){if(cr)return sr;cr=1;let e=or();class t extends e{constructor(e){e&&e.value!==void 0&&typeof e.value!=`string`&&(e={...e,value:String(e.value)}),super(e),this.type=`decl`}get variable(){return this.prop.startsWith(`--`)||this.prop[0]===`$`}}return sr=t,t.default=t,sr}var ur,dr;function fr(){return dr?ur:(dr=1,ur={nanoid:(e=21)=>{let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r=``,i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}},ur)}var pr,mr;function hr(){if(mr)return pr;mr=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=B,{existsSync:n,readFileSync:r}=B,{dirname:i,join:a}=B;function o(e){return Buffer?Buffer.from(e,`base64`).toString():window.atob(e)}class s{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,`data:`);let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||=new e(this.text),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return o(e.substr(RegExp.lastMatch.length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error(`Unsupported source map encoding `+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,``).trim()}isMap(e){return typeof e==`object`?typeof e.mappings==`string`||typeof e._mappings==`string`||Array.isArray(e.sections):!1}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf(`*/`,n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,`utf-8`).toString().trim()}loadMap(n,r){if(r===!1)return!1;if(r){if(typeof r==`string`)return r;if(typeof r==`function`){let e=r(n);if(e){let t=this.loadFile(e);if(!t)throw Error(`Unable to load previous source map: `+e.toString());return t}}else if(r instanceof e)return t.fromSourceMap(r).toString();else if(r instanceof t)return r.toString();else if(this.isMap(r))return JSON.stringify(r);else throw Error(`Unsupported previous source map format: `+r.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let e=this.annotation;return n&&(e=a(i(n),e)),this.loadFile(e)}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return pr=s,s.default=s,pr}var gr,_r;function vr(){if(_r)return gr;_r=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=B,{fileURLToPath:n,pathToFileURL:r}=B,{isAbsolute:i,resolve:a}=B,{nanoid:o}=fr(),s=B,c=Jn(),l=hr(),u=Symbol(`fromOffsetCache`),d=!!(e&&t),f=!!(a&&i);class p{constructor(e,t={}){if(e==null||typeof e==`object`&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]===``||this.css[0]===``?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!f||/^\w+:\/\//.test(t.from)||i(t.from)?t.from:a(t.from)),f&&d){let e=new l(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id=`<input css `+o(6)+`>`),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let a,o,s;if(t&&typeof t==`object`){let e=t,r=n;if(typeof e.offset==`number`){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if(typeof r.offset==`number`){let e=this.fromOffset(r.offset);o=e.line,s=e.col}else o=r.line,s=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,s);return a=l?new c(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):new c(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:s,line:o},this.css,this.file,i.plugin),a.input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(a.input.url=r(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,n;if(this[u])n=this[u];else{let e=this.css.split(`
|
|
47
|
-
`);n=Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[u]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t=n.length-2,i;for(;r<t;)if(i=r+(t-r>>1),e<n[i])t=i-1;else if(e>=n[i+1])r=i+1;else{r=i;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||`.`,e)}origin(e,t,a,o){if(!this.map)return!1;let s=this.map.consumer(),c=s.originalPositionFor({column:t,line:e});if(!c.source)return!1;let l;typeof a==`number`&&(l=s.originalPositionFor({column:o,line:a}));let u;u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let d={column:c.column,endColumn:l&&l.column,endLine:l&&l.line,line:c.line,url:u.toString()};if(u.protocol===`file:`){if(n)d.file=n(u);else throw Error(`file: protocol is not available in this PostCSS build`)}let f=s.sourceContentFor(c.source);return f&&(d.source=f),d}toJSON(){let e={};for(let t of[`hasBOM`,`css`,`file`,`id`])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return gr=p,p.default=p,s&&s.registerInput&&s.registerInput(p),gr}var yr,br;function xr(){if(br)return yr;br=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=B,{dirname:n,relative:r,resolve:i,sep:a}=B,{pathToFileURL:o}=B,s=vr(),c=!!(e&&t),l=!!(n&&i&&r&&a);class u{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?`data:application/json;base64,`+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation==`string`?this.mapOpts.annotation:typeof this.mapOpts.annotation==`function`?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+`.map`;let t=`
|
|
48
|
-
`;this.css.includes(`\r
|
|
49
|
-
`)&&(t=`\r
|
|
50
|
-
`),this.css+=t+`/*# sourceMappingURL=`+e+` */`}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),i=t.root||n(t.file),a;this.mapOpts.sourcesContent===!1?(a=new e(t.text),a.sourcesContent&&(a.sourcesContent=null)):a=t.consumer(),this.map.applySourceMap(a,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type===`comment`&&e.text.indexOf(`# sourceMappingURL=`)===0&&this.root.removeChild(t)}else this.css&&=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,``)}}generate(){if(this.clearAnnotation(),l&&c&&this.isMap())return this.generateMap();{let e=``;return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,n=1,r=`<no source>`,i={generated:{column:0,line:0},original:{column:0,line:0},source:``},a,o;this.stringify(this.root,(t,s,c)=>{if(this.css+=t,s&&c!==`end`&&(i.generated.line=e,i.generated.column=n-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=t.match(/\n/g),a?(e+=a.length,o=t.lastIndexOf(`
|
|
51
|
-
`),n=t.length-o):n+=t.length,s&&c!==`start`){let t=s.parent||{raws:{}};(!(s.type===`decl`||s.type===`atrule`&&!s.nodes)||s!==t.last||t.raws.semicolon)&&(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=e,i.generated.column=n-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=n-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:this.mapOpts.annotation===void 0?!this.previous().length||this.previous().some(e=>e.annotation):this.mapOpts.annotation}isInline(){if(this.mapOpts.inline!==void 0)return this.mapOpts.inline;let e=this.mapOpts.annotation;return e!==void 0&&e!==!0?!1:!this.previous().length||this.previous().some(e=>e.inline)}isMap(){return this.opts.map===void 0?this.previous().length>0:!!this.opts.map}isSourcesContent(){return this.mapOpts.sourcesContent===void 0?!this.previous().length||this.previous().some(e=>e.withContent()):this.mapOpts.sourcesContent}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):`to.css`}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let a=this.opts.to?n(this.opts.to):`.`;typeof this.mapOpts.annotation==`string`&&(a=n(i(a,this.mapOpts.annotation)));let o=r(a,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new s(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):`<no source>`;this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString(`base64`):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;a===`\\`&&(e=e.replace(/\\/g,`/`));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}return yr=u,yr}var Sr,Cr;function wr(){if(Cr)return Sr;Cr=1;let e=or();class t extends e{constructor(e){super(e),this.type=`comment`}}return Sr=t,t.default=t,Sr}var Tr,Er;function Dr(){if(Er)return Tr;Er=1;let{isClean:e,my:t}=Zn(),n=lr(),r=wr(),i=or(),a,o,s,c;function l(e){return e.map(e=>(e.nodes&&=l(e.nodes),delete e.source,e))}function u(t){if(t[e]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)u(e)}class d extends i{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||=0,this.indexes||={},this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t===`proxyOf`?e:e[t]?t===`each`||typeof t==`string`&&t.startsWith(`walk`)?(...n)=>e[t](...n.map(e=>typeof e==`function`?(t,n)=>e(t.toProxy(),n):e)):t===`every`||t===`some`?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):t===`root`?()=>e.root().toProxy():t===`nodes`?e.nodes.map(e=>e.toProxy()):t===`first`||t===`last`?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t===`name`||t===`params`||t===`selector`)&&e.markDirty(),!0)}}}index(e){return typeof e==`number`?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of r)this.proxyOf.nodes.splice(n+1,0,e);let i;for(let e in this.indexes)i=this.indexes[e],n<i&&(this.indexes[e]=i+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0&&`prepend`,i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);let a;for(let e in this.indexes)a=this.indexes[e],n<=a&&(this.indexes[e]=a+i.length);return this.markDirty(),this}normalize(i,c){if(typeof i==`string`)i=l(a(i).nodes);else if(i===void 0)i=[];else if(Array.isArray(i)){i=i.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type===`root`&&this.type!==`document`){i=i.nodes.slice(0);for(let e of i)e.parent&&e.parent.removeChild(e,`ignore`)}else if(i.type)i=[i];else if(i.prop){if(i.value===void 0)throw Error(`Value field is missed in node creation`);typeof i.value!=`string`&&(i.value=String(i.value)),i=[new n(i)]}else if(i.selector)i=[new o(i)];else if(i.name)i=[new s(i)];else if(i.text)i=[new r(i)];else throw Error(`Unknown node type in node creation`);return i.map(n=>(n[t]||d.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[e]&&u(n),n.raws.before===void 0&&c&&c.raws.before!==void 0&&(n.raws.before=c.raws.before.replace(/\S/g,``)),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,`prepend`).reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{(!t.props||t.props.includes(r.prop))&&(!t.fast||r.value.includes(t.fast))&&(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`atrule`&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type===`atrule`&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`atrule`)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if(t.type===`comment`)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`decl`&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type===`decl`&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`decl`)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type===`rule`&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type===`rule`&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if(e.type===`rule`)return t(e,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return d.registerParse=e=>{a=e},d.registerRule=e=>{o=e},d.registerAtRule=e=>{s=e},d.registerRoot=e=>{c=e},Tr=d,d.default=d,d.rebuild=e=>{e.type===`atrule`?Object.setPrototypeOf(e,s.prototype):e.type===`rule`?Object.setPrototypeOf(e,o.prototype):e.type===`decl`?Object.setPrototypeOf(e,n.prototype):e.type===`comment`?Object.setPrototypeOf(e,r.prototype):e.type===`root`&&Object.setPrototypeOf(e,c.prototype),e[t]=!0,e.nodes&&e.nodes.forEach(e=>{d.rebuild(e)})},Tr}var Or,kr;function Ar(){if(kr)return Or;kr=1;let e=Dr(),t,n;class r extends e{constructor(e){super({type:`document`,...e}),this.nodes||=[]}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Or=r,r.default=r,Or}var jr,Mr;function Nr(){if(Mr)return jr;Mr=1;let e={};return jr=function(t){e[t]||(e[t]=!0,typeof console<`u`&&console.warn&&console.warn(t))},jr}var Pr,Fr;function Ir(){if(Fr)return Pr;Fr=1;class e{constructor(e,t={}){if(this.type=`warning`,this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Pr=e,e.default=e,Pr}var Lr,Rr;function zr(){if(Rr)return Lr;Rr=1;let e=Ir();class t{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type===`warning`)}get content(){return this.css}}return Lr=t,t.default=t,Lr}var Br,Vr;function Hr(){if(Vr)return Br;Vr=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,n=/.[\r\n"'(/\\]/,r=/[\da-f]/i;return Br=function(i,a={}){let o=i.css.valueOf(),s=a.ignoreErrors,c,l,u,d,f,p,m,h,g,_,v=o.length,y=0,b=[],x=[];function S(){return y}function C(e){throw i.error(`Unclosed `+e,y)}function w(){return x.length===0&&y>=v}function ee(i){if(x.length)return x.pop();if(y>=v)return;let a=i?i.ignoreUnclosed:!1;switch(c=o.charCodeAt(y),c){case 10:case 32:case 9:case 13:case 12:l=y;do l+=1,c=o.charCodeAt(l);while(c===32||c===10||c===9||c===13||c===12);_=[`space`,o.slice(y,l)],y=l-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(c);_=[e,e,y];break}case 40:if(h=b.length?b.pop()[1]:``,g=o.charCodeAt(y+1),h===`url`&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){l=y;do{if(p=!1,l=o.indexOf(`)`,l+1),l===-1){if(s||a){l=y;break}C(`bracket`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`brackets`,o.slice(y,l+1),y,l],y=l}else l=o.indexOf(`)`,y+1),d=o.slice(y,l+1),l===-1||n.test(d)?_=[`(`,`(`,y]:(_=[`brackets`,d,y,l],y=l);break;case 39:case 34:u=c===39?`'`:`"`,l=y;do{if(p=!1,l=o.indexOf(u,l+1),l===-1){if(s||a){l=y+1;break}C(`string`)}for(m=l;o.charCodeAt(m-1)===92;)--m,p=!p}while(p);_=[`string`,o.slice(y,l+1),y,l],y=l;break;case 64:e.lastIndex=y+1,e.test(o),l=e.lastIndex===0?o.length-1:e.lastIndex-2,_=[`at-word`,o.slice(y,l+1),y,l],y=l;break;case 92:for(l=y,f=!0;o.charCodeAt(l+1)===92;)l+=1,f=!f;if(c=o.charCodeAt(l+1),f&&c!==47&&c!==32&&c!==10&&c!==9&&c!==13&&c!==12&&(l+=1,r.test(o.charAt(l)))){for(;r.test(o.charAt(l+1));)l+=1;o.charCodeAt(l+1)===32&&(l+=1)}_=[`word`,o.slice(y,l+1),y,l],y=l;break;default:c===47&&o.charCodeAt(y+1)===42?(l=o.indexOf(`*/`,y+2)+1,l===0&&(s||a?l=o.length:C(`comment`)),_=[`comment`,o.slice(y,l+1),y,l],y=l):(t.lastIndex=y+1,t.test(o),l=t.lastIndex===0?o.length-1:t.lastIndex-2,_=[`word`,o.slice(y,l+1),y,l],b.push(_),y=l)}return y++,_}function T(e){x.push(e)}return{back:T,endOfFile:w,nextToken:ee,position:S}},Br}var Ur,Wr;function Gr(){if(Wr)return Ur;Wr=1;let e=Dr();class t extends e{constructor(e){super(e),this.type=`atrule`}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Ur=t,t.default=t,e.registerAtRule(t),Ur}var Kr,qr;function Jr(){if(qr)return Kr;qr=1;let e=Dr(),t,n;class r extends e{constructor(e){super(e),this.type=`root`,this.nodes||=[]}normalize(e,t,n){let r=super.normalize(e);if(t){if(n===`prepend`)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new t(new n,this,e).stringify()}}return r.registerLazyResult=e=>{t=e},r.registerProcessor=e=>{n=e},Kr=r,r.default=r,e.registerRoot(r),Kr}var Yr,Xr;function Zr(){if(Xr)return Yr;Xr=1;let e={comma(t){return e.split(t,[`,`],!0)},space(t){return e.split(t,[` `,`
|
|
52
|
-
`,` `])},split(e,t,n){let r=[],i=``,a=!1,o=0,s=!1,c=``,l=!1;for(let n of e)l?l=!1:n===`\\`?l=!0:s?n===c&&(s=!1):n===`"`||n===`'`?(s=!0,c=n):n===`(`?o+=1:n===`)`?o>0&&--o:o===0&&t.includes(n)&&(a=!0),a?(i!==``&&r.push(i.trim()),i=``,a=!1):i+=n;return(n||i!==``)&&r.push(i.trim()),r}};return Yr=e,e.default=e,Yr}var Qr,$r;function ei(){if($r)return Qr;$r=1;let e=Dr(),t=Zr();class n extends e{constructor(e){super(e),this.type=`rule`,this.nodes||=[]}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:`,`+this.raw(`between`,`beforeOpen`);this.selector=e.join(n)}}return Qr=n,n.default=n,e.registerRule(n),Qr}var ti,ni;function ri(){if(ni)return ti;ni=1;let e=lr(),t=Hr(),n=wr(),r=Gr(),i=Jr(),a=ei(),o={empty:!0,space:!0};function s(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}class c{constructor(e){this.input=e,this.root=new i,this.current=this.root,this.spaces=``,this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new r;t.name=e[1].slice(1),t.name===``&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,a,o=!1,s=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n===`(`||n===`[`?l.push(n===`(`?`)`:`]`):n===`{`&&l.length>0?l.push(`}`):n===l[l.length-1]&&l.pop(),l.length===0){if(n===`;`){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if(n===`{`){s=!0;break}if(n===`}`){if(c.length>0){for(a=c.length-1,i=c[a];i&&i[0]===`space`;)i=c[--a];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}c.push(e)}else c.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(t.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(t,`params`,c),o&&(e=c[c.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between=``)):(t.raws.afterName=``,t.params=``),s&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!==`space`&&(n+=1,n===2)));i--);throw this.input.error(`Missed semicolon`,r[0]===`word`?r[3]+1:r[2])}colon(e){let t=0,n,r,i;for(let[a,o]of e.entries()){if(n=o,r=n[0],r===`(`&&(t+=1),r===`)`&&--t,t===0&&r===`:`){if(!i)this.doubleColon(n);else if(i[0]===`word`&&i[1]===`progid`)continue;else return a}i=n}return!1}comment(e){let t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text=``,t.raws.left=r,t.raws.right=``;else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,n){let r=new e;this.init(r,t[0][2]);let i=t[t.length-1];for(i[0]===`;`&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||s(t)),r.source.end.offset++;t[0][0]!==`word`;)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop=``;t.length;){let e=t[0][0];if(e===`:`||e===`space`||e===`comment`)break;r.prop+=t.shift()[1]}r.raws.between=``;let a;for(;t.length;){if(a=t.shift(),a[0]===`:`){r.raws.between+=a[1];break}a[0]===`word`&&/\w/.test(a[1])&&this.unknownWord([a]),r.raws.between+=a[1]}(r.prop[0]===`_`||r.prop[0]===`*`)&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],c;for(;t.length&&(c=t[0][0],c===`space`||c===`comment`);)o.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(a=t[e],a[1].toLowerCase()===`!important`){r.important=!0;let n=this.stringFrom(t,e);n=this.spacesFromEnd(t)+n,n!==` !important`&&(r.raws.important=n);break}if(a[1].toLowerCase()===`important`){let n=t.slice(0),i=``;for(let t=e;t>0;t--){let e=n[t][0];if(i.trim().indexOf(`!`)===0&&e!==`space`)break;i=n.pop()[1]+i}i.trim().indexOf(`!`)===0&&(r.important=!0,r.raws.important=i,t=n)}if(a[0]!==`space`&&a[0]!==`comment`)break}t.some(e=>e[0]!==`space`&&e[0]!==`comment`)&&(r.raws.between+=o.map(e=>e[1]).join(``),o=[]),this.raw(r,`value`,o.concat(t),n),r.value.includes(`:`)&&!n&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error(`Double colon`,{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new a;this.init(t,e[2]),t.selector=``,t.raws.between=``,this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.spaces=``,this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||``)+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type===`rule`&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces=``)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces=``,e.type!==`comment`&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,i=null,a=[],o=e[1].startsWith(`--`),s=[],c=e;for(;c;){if(n=c[0],s.push(c),n===`(`||n===`[`)i||=c,a.push(n===`(`?`)`:`]`);else if(o&&r&&n===`{`)i||=c,a.push(`}`);else if(a.length===0){if(n===`;`){if(r){this.decl(s,o);return}break}if(n===`{`){this.rule(s);return}if(n===`}`){this.tokenizer.back(s.pop()),t=!0;break}n===`:`&&(r=!0)}else n===a[a.length-1]&&(a.pop(),a.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&r){if(!o)for(;s.length&&(c=s[s.length-1][0],c===`space`||c===`comment`);)this.tokenizer.back(s.pop());this.decl(s,o)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case`space`:this.spaces+=e[1];break;case`;`:this.freeSemicolon(e);break;case`}`:this.end(e);break;case`comment`:this.comment(e);break;case`at-word`:this.atrule(e);break;case`{`:this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,a,s=n.length,c=``,l=!0,u,d;for(let e=0;e<s;e+=1)i=n[e],a=i[0],a===`space`&&e===s-1&&!r?l=!1:a===`comment`?(d=n[e-1]?n[e-1][0]:`empty`,u=n[e+1]?n[e+1][0]:`empty`,!o[d]&&!o[u]?c.slice(-1)===`,`?l=!1:c+=i[1]:l=!1):c+=i[1];if(!l){let r=n.reduce((e,t)=>e+t[1],``);e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new a;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,`selector`,e),this.current=t}spacesAndCommentsFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`||t===`comment`);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n=``;for(;e.length&&(t=e[0][0],t===`space`||t===`comment`);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n=``;for(;e.length&&(t=e[e.length-1][0],t===`space`);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n=``;for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error(`Unclosed block`,e.line,e.column)}unclosedBracket(e){throw this.input.error(`Unclosed bracket`,{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error(`Unexpected }`,{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error(`Unknown word`,{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error(`At-rule without name`,{offset:t[2]},{offset:t[2]+t[1].length})}}return ti=c,ti}var ii,ai;function oi(){if(ai)return ii;ai=1;let e=Dr(),t=ri(),n=vr();function r(e,r){let i=new n(e,r),a=new t(i);try{a.parse()}catch(e){throw process.env.NODE_ENV!==`production`&&e.name===`CssSyntaxError`&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+=`
|
|
53
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(r.from)?e.message+=`
|
|
54
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(r.from)&&(e.message+=`
|
|
55
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),e}return a.root}return ii=r,r.default=r,e.registerParse(r),ii}var si,ci;function li(){if(ci)return si;ci=1;let{isClean:e,my:t}=Zn(),n=xr(),r=rr(),i=Dr(),a=Ar(),o=Nr(),s=zr(),c=oi(),l=Jr(),u={atrule:`AtRule`,comment:`Comment`,decl:`Declaration`,document:`Document`,root:`Root`,rule:`Rule`},d={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},f={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return typeof e==`object`&&typeof e.then==`function`}function m(e){let t=!1,n=u[e.type];return e.type===`decl`?t=e.prop.toLowerCase():e.type===`atrule`&&(t=e.name.toLowerCase()),t&&e.append?[n,n+`-`+t,0,n+`Exit`,n+`Exit-`+t]:t?[n,n+`-`+t,n+`Exit`,n+`Exit-`+t]:e.append?[n,0,n+`Exit`]:[n,n+`Exit`]}function h(e){let t;return t=e.type===`document`?[`Document`,0,`DocumentExit`]:e.type===`root`?[`Root`,0,`RootExit`]:m(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let _={};class v{constructor(e,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n==`object`&&n&&(n.type===`root`||n.type===`document`))a=g(n);else if(n instanceof v||n instanceof s)a=g(n.root),n.map&&(r.map===void 0&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=c;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{a=e(n,r)}catch(e){this.processed=!0,this.error=e}a&&!a[t]&&i.rebuild(a)}this.result=new s(e,a,r),this.helpers={..._,postcss:_,result:this.result},this.plugins=this.processor.plugins.map(e=>typeof e==`object`&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||=this.runAsync(),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error(`Use process(css).then(cb) to work with async plugins`)}handleError(e,t){let n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name===`CssSyntaxError`&&!e.plugin)e.plugin=n.postcssPlugin,e.setMessage();else if(n.postcssVersion&&process.env.NODE_ENV!==`production`){let e=n.postcssPlugin,t=n.postcssVersion,r=this.result.processor.version,i=t.split(`.`),a=r.split(`.`);(i[0]!==a[0]||parseInt(i[1])>parseInt(a[1]))&&console.error(`Unknown error from PostCSS plugin. Your current PostCSS version is `+r+`, but `+e+` uses `+t+`. Perhaps this is the source of the error below.`)}}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if(typeof t==`object`)for(let n in t){if(!d[n]&&/^[A-Z]/.test(n))throw Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[n]){if(typeof t[n]==`object`)for(let r in t[n])r===`*`?e(t,n,t[n][r]):e(t,n+`-`+r.toLowerCase(),t[n][r]);else typeof t[n]==`function`&&e(t,n,t[n])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(p(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let n=[h(t)];for(;n.length>0;){let e=this.visitTick(n);if(p(e))try{await e}catch(e){let t=n[n.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,n]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if(t.type===`document`){let e=t.nodes.map(e=>n(e,this.helpers));await Promise.all(e)}else await n(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e==`object`&&e.Once){if(this.result.root.type===`document`){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if(typeof e==`function`)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=r;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new n(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(p(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit){if(t.type===`document`)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){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(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let e;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if(t.type!==`root`&&t.type!==`document`&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:i}=n;if(r.type!==`root`&&r.type!==`document`&&!r.parent){t.pop();return}if(i.length>0&&n.visitorIndex<i.length){let[e,t]=i[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=e;try{return t(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(n.iterator!==0){let i=n.iterator,a;for(;a=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!a[e]){a[e]=!0,t.push(h(a));return}n.iterator=0,delete r.indexes[i]}let a=n.events;for(;n.eventIndex<a.length;){let t=a[n.eventIndex];if(n.eventIndex+=1,t===0){r.nodes&&r.nodes.length&&(r[e]=!0,n.iterator=r.getIterator());return}if(this.listeners[t]){n.visitors=this.listeners[t];return}}t.pop()}walkSync(t){t[e]=!0;let n=m(t);for(let r of n)if(r===0)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[r];if(e&&this.visitSync(e,t.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 v.registerPostcss=e=>{_=e},si=v,v.default=v,l.registerLazyResult(v),a.registerLazyResult(v),si}var ui,di;function fi(){if(di)return ui;di=1;let e=xr(),t=rr(),n=Nr(),r=oi(),i=zr();class a{constructor(n,r,a){r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=a,this._map=void 0;let o,s=t;this.result=new i(this._processor,o,this._opts),this.result.css=r;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let l=new e(s,o,this._opts,r);if(l.isMap()){let[e,t]=l.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!==`production`&&(`from`in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return`NoWorkResult`}}return ui=a,a.default=a,ui}var pi,mi;function hi(){if(mi)return pi;mi=1;let e=fi(),t=li(),n=Ar(),r=Jr();class i{constructor(e=[]){this.version=`8.4.38`,this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n==`object`&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n==`object`&&n.postcssPlugin)t.push(n);else if(typeof n==`function`)t.push(n);else if(typeof n==`object`&&(n.parse||n.stringify)){if(process.env.NODE_ENV!==`production`)throw 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 Error(n+` is not a PostCSS plugin`);return t}process(n,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new e(this,n,r):new t(this,n,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return pi=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),pi}var gi,_i;function vi(){if(_i)return gi;_i=1;let e=lr(),t=hr(),n=wr(),r=Gr(),i=vr(),a=Jr(),o=ei();function s(c,l){if(Array.isArray(c))return c.map(e=>s(e));let{inputs:u,...d}=c;if(u){l=[];for(let e of u){let n={...e,__proto__:i.prototype};n.map&&={...n.map,__proto__:t.prototype},l.push(n)}}if(d.nodes&&=c.nodes.map(e=>s(e,l)),d.source){let{inputId:e,...t}=d.source;d.source=t,e!=null&&(d.source.input=l[e])}if(d.type===`root`)return new a(d);if(d.type===`decl`)return new e(d);if(d.type===`rule`)return new o(d);if(d.type===`comment`)return new n(d);if(d.type===`atrule`)return new r(d);throw Error(`Unknown node type: `+c.type)}return gi=s,s.default=s,gi}var yi,bi;function xi(){if(bi)return yi;bi=1;let e=Jn(),t=lr(),n=li(),r=Dr(),i=hi(),a=rr(),o=vi(),s=Ar(),c=Ir(),l=wr(),u=Gr(),d=zr(),f=vr(),p=oi(),m=Zr(),h=ei(),g=Jr(),_=or();function v(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new i(e)}return v.plugin=function(e,t){let n=!1;function r(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
56
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith(`cn`)&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
57
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...r);return a.postcssPlugin=e,a.postcssVersion=new i().version,a}let a;return Object.defineProperty(r,"postcss",{get(){return a||=r(),a}}),r.process=function(e,t,n){return v([r(n)]).process(e,t)},r},v.stringify=a,v.parse=p,v.fromJSON=o,v.list=m,v.comment=e=>new l(e),v.atRule=e=>new u(e),v.decl=e=>new t(e),v.rule=e=>new h(e),v.root=e=>new g(e),v.document=e=>new s(e),v.CssSyntaxError=e,v.Declaration=t,v.Container=r,v.Processor=i,v.Document=s,v.Comment=l,v.Warning=c,v.AtRule=u,v.Result=d,v.Input=f,v.Rule=h,v.Root=g,v.Node=_,n.registerPostcss(v),yi=v,v.default=v,yi}var V=Vn(xi());V.stringify,V.fromJSON,V.plugin,V.parse,V.list,V.document,V.comment,V.atRule,V.rule,V.decl,V.root,V.CssSyntaxError,V.Declaration,V.Container,V.Processor,V.Document,V.Comment,V.Warning,V.AtRule,V.Result,V.Input,V.Rule,V.Root,V.Node;var Si=class e{constructor(...e){z(this,`parentElement`,null),z(this,`parentNode`,null),z(this,`ownerDocument`),z(this,`firstChild`,null),z(this,`lastChild`,null),z(this,`previousSibling`,null),z(this,`nextSibling`,null),z(this,`ELEMENT_NODE`,1),z(this,`TEXT_NODE`,3),z(this,`nodeType`),z(this,`nodeName`),z(this,`RRNodeType`)}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`)}insertBefore(e,t){throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`)}removeChild(e){throw Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`)}toString(){return`RRNode`}},Ci={Node:[`childNodes`,`parentNode`,`parentElement`,`textContent`,`ownerDocument`,`firstChild`,`lastChild`,`nextSibling`,`previousSibling`],ShadowRoot:[`host`,`styleSheets`],Element:[`shadowRoot`,`querySelector`,`querySelectorAll`],MutationObserver:[]},wi={Node:[`contains`,`getRootNode`],ShadowRoot:[`getSelection`],Element:[],MutationObserver:[`constructor`]},Ti={},Ei={},Di=()=>!!globalThis.Zone;function Oi(e){if(Ti[e])return Ti[e];let t=globalThis[e],n=t.prototype,r=e in Ci?Ci[e]:void 0,i=!!(r&&r.every(e=>!!(Object.getOwnPropertyDescriptor(n,e)?.get)?.toString().includes(`[native code]`))),a=e in wi?wi[e]:void 0,o=!!(a&&a.every(e=>typeof n[e]==`function`&&n[e]?.toString().includes(`[native code]`)));if(i&&o&&!Di())return Ti[e]=t.prototype,t.prototype;try{let r=document.createElement(`iframe`);r.style.display=`none`,document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let a=i[e].prototype;if(!a)return r.remove(),n;let o=navigator.userAgent;return o.includes(`Safari`)&&!o.includes(`Chrome`)?(r.classList.add(`rr-block`),r.setAttribute(`__rrwebUntaintedMutationObserver`,``),Ei[e]=()=>r.remove()):r.remove(),Ti[e]=a}catch{return n}}var ki={};function H(e,t,n){let r=ki[e]?.[n];if(r)return r.call(t);let i=Oi(e),a=Object.getOwnPropertyDescriptor(i,n)?.get;return a?((ki[e]||(ki[e]={}))[n]=a,a.call(t)):t[n]}var Ai={};function ji(e,t,n){let r=`${e}.${String(n)}`;if(Ai[r])return Ai[r].bind(t);let i=Oi(e)[n];return typeof i==`function`?(Ai[r]=i,i.bind(t)):t[n]}function Mi(e){return H(`Node`,e,`ownerDocument`)}function Ni(e){return H(`Node`,e,`childNodes`)}function Pi(e){return H(`Node`,e,`parentNode`)}function Fi(e){return H(`Node`,e,`parentElement`)}function Ii(e){return H(`Node`,e,`textContent`)}function Li(e){return H(`Node`,e,`firstChild`)}function Ri(e){return H(`Node`,e,`lastChild`)}function zi(e){return H(`Node`,e,`nextSibling`)}function Bi(e){return H(`Node`,e,`previousSibling`)}function Vi(e,t){return ji(`Node`,e,`contains`)(t)}function Hi(e){return ji(`Node`,e,`getRootNode`)()}function Ui(e){return!e||!(`host`in e)?null:H(`ShadowRoot`,e,`host`)}function Wi(e){return e.styleSheets}function Gi(e){return!e||!(`shadowRoot`in e)?null:H(`Element`,e,`shadowRoot`)}function Ki(e,t){return H(`Element`,e,`querySelector`)(t)}function qi(e,t){return H(`Element`,e,`querySelectorAll`)(t)}function Ji(){return[Oi(`MutationObserver`).constructor,Ei.MutationObserver??(()=>{})]}var Yi=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Yi=()=>new Date().getTime());function Xi(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var U={ownerDocument:Mi,childNodes:Ni,parentNode:Pi,parentElement:Fi,textContent:Ii,firstChild:Li,lastChild:Ri,nextSibling:zi,previousSibling:Bi,contains:Vi,getRootNode:Hi,host:Ui,styleSheets:Wi,shadowRoot:Gi,querySelector:Ki,querySelectorAll:qi,nowTimestamp:Yi,mutationObserverCtor:Ji,patch:Xi};function W(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Zi=`Please stop import mirror directly. Instead of that,\r
|
|
58
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
59
|
-
or you can use record.mirror to access the mirror instance during recording.`,Qi={map:{},getId(){return console.error(Zi),-1},getNode(){return console.error(Zi),null},removeNodeFromMap(){console.error(Zi)},has(){return console.error(Zi),!1},reset(){console.error(Zi)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(Qi=new Proxy(Qi,{get(e,t,n){return t===`map`&&console.error(Zi),Reflect.get(e,t,n)}}));function $i(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(clearTimeout(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function ea(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>ea(e,t,a||{},!0)}function ta(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t.documentElement.scrollLeft||t?.body&&U.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body&&U.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function na(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ra(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ia(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function G(e,t,n,r){if(!e)return!1;let i=ia(e);if(!i)return!1;try{if(typeof t==`string`){if(i.classList.contains(t)||r&&i.closest(`.`+t)!==null)return!0}else if(Ge(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function aa(e,t){return t.getId(e)!==-1}function oa(e,t,n){return e.tagName===`TITLE`&&n.headTitleMutations?!0:t.getId(e)===Ae}function sa(e,t){if(ae(e))return!1;let n=t.getId(e);if(!t.has(n))return!0;let r=U.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:!r||sa(r,t)}function ca(e){return!!e.changedTouches}function la(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ua(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function da(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function fa(e){return e?e instanceof Si&&`shadowRoot`in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}var pa=class{constructor(){n(this,`id`,1),n(this,`styleIDMap`,new WeakMap),n(this,`idStyleMap`,new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function ma(e){let t=null;return`getRootNode`in e&&U.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(t=U.host(U.getRootNode(e))),t}function ha(e){let t=e,n;for(;n=ma(t);)t=n;return t}function ga(e){let t=U.ownerDocument(e);if(!t)return!1;let n=ha(e);return U.contains(t,n)}function _a(e){let t=U.ownerDocument(e);return t?U.contains(t,e)||ga(e):!1}var K=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e[e.Asset=7]=`Asset`,e))(K||{}),q=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(q||{}),J=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(J||{}),va=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(va||{}),ya=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(ya||{}),ba=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(ba||{}),xa=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(xa||{}),Sa=(e,t)=>`${e}@${t}`,Ca=class{constructor(){n(this,`frozen`,!1),n(this,`locked`,!1),n(this,`texts`,[]),n(this,`attributes`,[]),n(this,`attributeMap`,new WeakMap),n(this,`removes`,[]),n(this,`mapRemoves`,[]),n(this,`movedMap`,{}),n(this,`addedSet`,new Set),n(this,`movedSet`,new Set),n(this,`droppedSet`,new Set),n(this,`removesSubTreeCache`,new Set),n(this,`mutationCb`),n(this,`blockClass`),n(this,`blockSelector`),n(this,`maskTextClass`),n(this,`maskTextSelector`),n(this,`inlineStylesheet`),n(this,`maskInputOptions`),n(this,`maskTextFn`),n(this,`maskInputFn`),n(this,`keepIframeSrcFn`),n(this,`recordCanvas`),n(this,`inlineImages`),n(this,`slimDOMOptions`),n(this,`dataURLOptions`),n(this,`doc`),n(this,`mirror`),n(this,`iframeManager`),n(this,`stylesheetManager`),n(this,`shadowDomManager`),n(this,`canvasManager`),n(this,`processedNodeManager`),n(this,`unattachedDoc`),n(this,`processMutations`,e=>{e.forEach(this.processMutation),this.emit()}),n(this,`emit`,()=>{if(this.frozen||this.locked)return;let e=[],t=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet){let t=U.parentNode(e);(!this.removesSubTreeCache.has(t)||this.movedSet.has(t))&&this.addedSet.add(e)}let n=null,r=null,i=-1,a=null,o=!1,s=new Set,c=this.addedSet.values(),l=c.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(U.previousSibling(n)))a=n,n=U.previousSibling(n);else{for(this.addedSet.has(l.value)||(l=c.next()),n=l.value;;){if(r=U.parentNode(n),this.addedSet.has(r)){n=r;continue}break}if(s.has(r))r=null;else if(r){if(_a(r)?(o=Ea(this.droppedSet,r)||this.removesSubTreeCache.has(r),o&&Ea(this.movedSet,n)&&(o=!1)):o=!0,this.addedSet.has(U.lastChild(r)))n=U.lastChild(r),a=null;else for(;;){if(a=U.nextSibling(n),this.addedSet.has(a)){n=a;continue}break}if(i=ae(r)?this.mirror.getId(ma(n)):this.mirror.getId(r),i===-1&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=U.host(r);i=this.mirror.getId(e)}}}if(this.addedSet.delete(n),!r||i===-1){s.add(n);continue}if(o){this.droppedSet.add(n);continue}let u=!1;if(n.nodeType===Node.TEXT_NODE){let e=r.tagName;if(e===`TEXTAREA`)continue;e===`STYLE`&&t.has(i)&&(u=!0)}let d=a?this.mirror.getId(a):null;for(;d===Ae;)a&&=U.nextSibling(a),d=a&&this.mirror.getId(a);if(d===-1){console.warn(`Couldn't record new node. Couldn't find mirror id for nextSibling:`,a),n=null;continue}let f=tt(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:e=>{ua(e,this.mirror)&&this.iframeManager.addIframe(e),da(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),fa(n)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:u});f&&(e.push({parentId:i,nextId:d,node:f}),t.add(f.id))}let u={texts:this.texts.map(e=>{let t=e.node,n=U.parentNode(t);return n&&n.tagName===`TEXTAREA`&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(u.texts.length||u.attributes.length||u.removes.length||u.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(u))}),n(this,`genTextAreaValueMutation`,e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(U.childNodes(e),e=>U.textContent(e)||``).join(``);t.attributes.value=pe({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:_e(e),value:n,maskInputFn:this.maskInputFn})}),n(this,`processMutation`,e=>{if(!oa(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case`characterData`:{let t=U.textContent(e.target);!G(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Ke(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ia(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=me(t.tagName),r=e.attributeName,i=e.target.getAttribute(r);if(r===`value`){let e=_e(t);i=pe({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:i,maskInputFn:this.maskInputFn})}if(G(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let a=this.attributeMap.get(e.target);if(n===`iframe`&&r===`src`&&!this.keepIframeSrcFn(i)){if(!t.contentDocument)r=`rr_src`;else return}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r===`type`&&n===`input`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!Ue(n,r)){if(a.attributes[r]=He(this.doc,n,me(r),i),r===`style`){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement(`span`);e.oldValue&&n.setAttribute(`style`,e.oldValue);for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?i===``?a.styleDiff[e]=r:a.styleDiff[e]=[r,i]:a._unchangedStyles[e]=[r,i]}for(let e of Array.from(n.style))t.style.getPropertyValue(e)===``&&(a.styleDiff[e]=!1)}else r===`open`&&t.tagName===`DIALOG`&&(t.matches(`dialog:modal`)?a.attributes.rr_open_mode=`modal`:a.attributes.rr_open_mode=`non-modal`)}break}case`childList`:if(G(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName===`TEXTAREA`){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=ae(e.target)?this.mirror.getId(U.host(e.target)):this.mirror.getId(e.target);G(e.target,this.blockClass,this.blockSelector,!1)||oa(t,this.mirror,this.slimDOMOptions)||!aa(t,this.mirror)||(this.addedSet.has(t)?(wa(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||sa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Sa(n,r)]?wa(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:ae(e.target)&&N(e.target)?!0:void 0}),Ta(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),n(this,`genAdds`,(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(oa(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Sa(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);G(e,this.blockClass,this.blockSelector,!1)||(U.childNodes(e).forEach(e=>this.genAdds(e)),fa(e)&&U.childNodes(U.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){[`mutationCb`,`blockClass`,`blockSelector`,`maskTextClass`,`maskTextSelector`,`inlineStylesheet`,`maskInputOptions`,`maskTextFn`,`maskInputFn`,`keepIframeSrcFn`,`recordCanvas`,`inlineImages`,`slimDOMOptions`,`dataURLOptions`,`doc`,`mirror`,`iframeManager`,`stylesheetManager`,`shadowDomManager`,`canvasManager`,`processedNodeManager`].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function wa(e,t){e.delete(t),U.childNodes(t).forEach(t=>wa(e,t))}function Ta(e,t){let n=[e];for(;n.length;){let e=n.pop();t.has(e)||(t.add(e),U.childNodes(e).forEach(e=>n.push(e)))}}function Ea(e,t){return e.size!==0&&Da(e,t)}function Da(e,t){if(e.has(t))return!0;let n=U.parentNode(t);return n?Da(e,n):!1}var Oa;function ka(e){Oa=e}function Aa(){Oa=void 0}var Y=e=>Oa?(...t)=>{try{return e(...t)}catch(e){if(Oa&&Oa(e)===!0)return;throw e}}:e,ja=[];function Ma(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Na(e,t){let n=new Ca;ja.push(n),n.init(e);let[r,i]=Ji(),a=new r(Y(n.processMutations.bind(n)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[a,i]}function Pa({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=$i(Y(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Y($i(Y(e=>{let t=Ma(e),{clientX:n,clientY:i}=ca(e)?e.changedTouches[0]:e;s||=Yi(),o.push({x:n,y:i,id:r.getId(t),timeOffset:Yi()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?q.Drag:e instanceof MouseEvent?q.MouseMove:q.TouchMove)}),i,{trailing:!1})),u=[W(`mousemove`,l,n),W(`touchmove`,l,n),W(`drag`,l,n)];return Y(()=>{u.forEach(e=>e())})}function Fa({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,s=[],c=null,l=t=>a=>{let o=Ma(a);if(G(o,r,i,!0))return;let s=null,l=t;if(`pointerType`in a){switch(a.pointerType){case`mouse`:s=va.Mouse;break;case`touch`:s=va.Touch;break;case`pen`:s=va.Pen}s===va.Touch?J[t]===J.MouseDown?l=`TouchStart`:J[t]===J.MouseUp&&(l=`TouchEnd`):va.Pen}else ca(a)&&(s=va.Touch);s===null?J[t]===J.Click&&(s=c,c=null):(c=s,(l.startsWith(`Touch`)&&s===va.Touch||l.startsWith(`Mouse`)&&s===va.Mouse)&&(s=null));let u=ca(a)?a.changedTouches[0]:a;if(!u)return;let d=n.getId(o),{clientX:f,clientY:p}=u;Y(e)({type:J[l],id:d,x:f,y:p,...s!==null&&{pointerType:s}})};return Object.keys(J).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&o[e]!==!1).forEach(e=>{let n=me(e),r=l(e);if(window.PointerEvent)switch(J[e]){case J.MouseDown:case J.MouseUp:n=n.replace(`mouse`,`pointer`);break;case J.TouchStart:case J.TouchEnd:return}s.push(W(n,r,t))}),Y(()=>{s.forEach(e=>e())})}function Ia({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:a}){return W(`scroll`,Y($i(Y(a=>{let o=Ma(a);if(!o||G(o,r,i,!0))return;let s=n.getId(o);if(o===t&&t.defaultView){let n=ta(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:o.scrollLeft,y:o.scrollTop})}),a.scroll||100)),t)}function La({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return W(`resize`,Y($i(Y(()=>{let t=na(),i=ra();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Ra=[`INPUT`,`TEXTAREA`,`SELECT`],za=new WeakMap;function Ba({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:s,maskInputFn:c,sampling:l,userTriggeredOnInput:u}){function d(e){let n=Ma(e),l=e.isTrusted,d=n&&n.tagName;if(n&&d===`OPTION`&&(n=U.parentElement(n)),!n||!d||Ra.indexOf(d)<0||G(n,r,i,!0)||n.classList.contains(a)||o&&n.matches(o))return;let p=n.value,m=!1,h=_e(n)||``;h===`radio`||h===`checkbox`?m=n.checked:(s[d.toLowerCase()]||s[h])&&(p=pe({element:n,maskInputOptions:s,tagName:d,type:h,value:p,maskInputFn:c})),f(n,u?{text:p,isChecked:m,userTriggered:l}:{text:p,isChecked:m});let g=n.name;h===`radio`&&g&&m&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==n){let t=e.value;f(e,u?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}})}function f(t,r){let i=za.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){za.set(t,r);let i=n.getId(t);Y(e)({...r,id:i})}}let p=(l.input===`last`?[`change`]:[`input`,`change`]).map(e=>W(e,Y(d),t)),m=t.defaultView;if(!m)return()=>{p.forEach(e=>e())};let h=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,`value`),g=[[m.HTMLInputElement.prototype,`value`],[m.HTMLInputElement.prototype,`checked`],[m.HTMLSelectElement.prototype,`value`],[m.HTMLTextAreaElement.prototype,`value`],[m.HTMLSelectElement.prototype,`selectedIndex`],[m.HTMLOptionElement.prototype,`selected`]];return h&&h.set&&p.push(...g.map(e=>ea(e[0],e[1],{set(){Y(d)({target:this,isTrusted:!1})}},!1,m))),Y(()=>{p.forEach(e=>e())})}function Va(e){let t=[];function n(e,t){if(Qa(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||Qa(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||Qa(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||Qa(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);return t.unshift(r),n(e.parentRule,t)}if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function Ha(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Ua({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Y((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Ha(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){let i=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[i,n])};let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Y((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ha(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Y((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ha(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Y((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ha(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};$a(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:($a(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),$a(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),$a(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Y((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Ha(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Va(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Y((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Ha(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Va(i),o]}]}),r.apply(i,a)})})}),Y(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function Wa({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(U.host(n));let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),Y(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Ga({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Y((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=Ha(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:Va(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Y((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=Ha(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:Va(a.parentRule)}),i.apply(a,s)})}),Y(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Ka({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:i,doc:a}){let o=Y(a=>$i(Y(i=>{let o=Ma(i);if(!o||G(o,t,n,!0))return;let{currentTime:s,volume:c,muted:l,playbackRate:u,loop:d}=o;e({type:a,id:r.getId(o),currentTime:s,volume:c,muted:l,playbackRate:u,loop:d})}),i.media||500)),s=[W(`play`,o(ba.Play),a),W(`pause`,o(ba.Pause),a),W(`seeked`,o(ba.Seeked),a),W(`volumechange`,o(ba.VolumeChange),a),W(`ratechange`,o(ba.RateChange),a)];return Y(()=>{s.forEach(e=>e())})}function qa({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=Xi(t.fonts,`add`,function(t){return function(n){return setTimeout(Y(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Y(()=>{r.forEach(e=>e())})}function Ja(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,selectionCb:a}=e,o=!0,s=Y(()=>{let e=t.getSelection();if(!e||o&&e?.isCollapsed)return;o=e.isCollapsed||!1;let s=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let{startContainer:a,startOffset:o,endContainer:c,endOffset:l}=e.getRangeAt(t);G(a,r,i,!0)||G(c,r,i,!0)||s.push({start:n.getId(a),startOffset:o,end:n.getId(c),endOffset:l})}a({ranges:s})});return s(),W(`selectionchange`,s)}function Ya({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Xi(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,i])}})}function Xa(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:p,customElementCb:m}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),a(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),f(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),m(...e)}}function Za(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};Xa(e,t);let r,i=()=>{};e.recordDOM&&([r,i]=Na(e,e.doc));let a=Pa(e),o=Fa(e),s=Ia(e),c=La(e,{win:n}),l=Ba(e),u=Ka(e),d=()=>{},f=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(d=Ua(e,{win:n}),f=Wa(e,e.doc),p=Ga(e,{win:n}),e.collectFonts&&(m=qa(e)));let h=Ja(e),g=Ya(e),_=[];for(let t of e.plugins)_.push(t.observer(t.callback,n,t.options));return Y(()=>{ja.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g(),_.forEach(e=>e())})}function Qa(e){return window[e]!==void 0}function $a(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}for(var eo=class{constructor(e){n(this,`iframeIdToRemoteIdMap`,new WeakMap),n(this,`iframeRemoteIdToIdMap`,new WeakMap),this.generateIdFn=e}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},to=class{constructor(e){n(this,`iframes`,new WeakMap),n(this,`crossOriginIframeMap`,new WeakMap),n(this,`crossOriginIframeMirror`,new eo(je)),n(this,`crossOriginIframeStyleMirror`),n(this,`crossOriginIframeRootIdMap`,new WeakMap),n(this,`mirror`),n(this,`mutationCb`),n(this,`wrappedEmit`),n(this,`loadListener`),n(this,`stylesheetManager`),n(this,`recordCrossOriginIframes`),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new eo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener(`message`,this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case K.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:K.IncrementalSnapshot,data:{source:q.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case K.Meta:case K.Load:case K.DomContentLoaded:return!1;case K.Plugin:return t;case K.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case K.IncrementalSnapshot:switch(t.data.source){case q.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case q.Drag:case q.TouchMove:case q.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case q.ViewportResize:return!1;case q.MediaInteraction:case q.MouseInteraction:case q.Scroll:case q.CanvasMutation:case q.Input:return this.replaceIds(t.data,e,[`id`]),t;case q.StyleSheetRule:case q.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case q.Font:return t;case q.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case q.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(n=t.data.styles)==null||n.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||typeof t[i]==`number`)&&(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==xa.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},no=class{constructor(e){n(this,`shadowDoms`,new WeakSet),n(this,`mutationCb`),n(this,`scrollCb`),n(this,`bypassOptions`),n(this,`mirror`),n(this,`restoreHandlers`,[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!N(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let[n]=Na({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Ia({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(U.host(e))),this.restoreHandlers.push(Wa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(Xi(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r),a=U.shadowRoot(this);return a&&_a(this)&&n.addShadowRoot(a,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},ro=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,io=typeof Uint8Array>`u`?[]:new Uint8Array(256),ao=0;ao<ro.length;ao++)io[ro.charCodeAt(ao)]=ao;var oo=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=ro[t[n]>>2],i+=ro[(t[n]&3)<<4|t[n+1]>>4],i+=ro[(t[n+1]&15)<<2|t[n+2]>>6],i+=ro[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},so=new Map;function co(e,t){let n=so.get(e);return n||(n=new Map,so.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var lo=(e,t,n)=>{if(!e||!(po(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=co(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function uo(e,t,n){if(e instanceof Array)return e.map(e=>uo(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:oo(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[uo(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:`HTMLImageElement`,src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[uo(e.data,t,n),e.width,e.height]}:po(e,t)||typeof e==`object`?{rr_type:e.constructor.name,index:lo(e,t,n)}:e}var fo=(e,t,n)=>e.map(e=>uo(e,t,n)),po=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function mo(e,t,n,r){let i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!=`function`)continue;let a=Xi(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...a){return G(this.canvas,n,r,!0)||setTimeout(()=>{let n=fo(a,t,this);e(this.canvas,{type:ya[`2D`],property:o,args:n})},0),i.apply(this,a)}});i.push(a)}catch{let n=ea(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:ya[`2D`],property:o,args:[t],setter:!0})}});i.push(n)}return()=>{i.forEach(e=>e())}}function ho(e){return e===`experimental-webgl`?`webgl`:e}function go(e,t,n,r){let i=[];try{let a=Xi(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(i,...a){if(!G(this,t,n,!0)){let e=ho(i);if(`__context`in this||(this.__context=e),r&&[`webgl`,`webgl2`].includes(e)){if(a[0]&&typeof a[0]==`object`){let e=a[0];e.preserveDrawingBuffer||=!0}else a.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[i,...a])}});i.push(a)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{i.forEach(e=>e())}}function _o(e,t,n,r,i,a){let o=[],s=Object.getOwnPropertyNames(e);for(let c of s)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(c))try{if(typeof e[c]!=`function`)continue;let s=Xi(e,c,function(e){return function(...o){let s=e.apply(this,o);if(lo(s,a,this),`tagName`in this.canvas&&!G(this.canvas,r,i,!0)){let e=fo(o,a,this),r={type:t,property:c,args:e};n(this.canvas,r)}return s}});o.push(s)}catch{let r=ea(e,c,{set(e){n(this.canvas,{type:t,property:c,args:[e],setter:!0})}});o.push(r)}return o}function vo(e,t,n,r){let i=[];return t.WebGLRenderingContext!==void 0&&i.push(..._o(t.WebGLRenderingContext.prototype,ya.WebGL,e,n,r,t)),t.WebGL2RenderingContext!==void 0&&i.push(..._o(t.WebGL2RenderingContext.prototype,ya.WebGL2,e,n,r,t)),()=>{i.forEach(e=>e())}}var yo=`(function() {
|
|
60
|
-
"use strict";
|
|
61
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
62
|
-
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
63
|
-
for (var i = 0; i < chars.length; i++) {
|
|
64
|
-
lookup[chars.charCodeAt(i)] = i;
|
|
65
|
-
}
|
|
66
|
-
var encode = function(arraybuffer) {
|
|
67
|
-
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
68
|
-
for (i2 = 0; i2 < len; i2 += 3) {
|
|
69
|
-
base64 += chars[bytes[i2] >> 2];
|
|
70
|
-
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
71
|
-
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
72
|
-
base64 += chars[bytes[i2 + 2] & 63];
|
|
73
|
-
}
|
|
74
|
-
if (len % 3 === 2) {
|
|
75
|
-
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
76
|
-
} else if (len % 3 === 1) {
|
|
77
|
-
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
78
|
-
}
|
|
79
|
-
return base64;
|
|
80
|
-
};
|
|
81
|
-
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
82
|
-
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
83
|
-
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
84
|
-
const id = \`\${width}-\${height}\`;
|
|
85
|
-
if ("OffscreenCanvas" in globalThis) {
|
|
86
|
-
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
87
|
-
const offscreen = new OffscreenCanvas(width, height);
|
|
88
|
-
offscreen.getContext("2d");
|
|
89
|
-
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
90
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
91
|
-
const base64 = encode(arrayBuffer);
|
|
92
|
-
transparentBlobMap.set(id, base64);
|
|
93
|
-
return base64;
|
|
94
|
-
} else {
|
|
95
|
-
return "";
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const worker = self;
|
|
99
|
-
worker.onmessage = async function(e) {
|
|
100
|
-
if ("OffscreenCanvas" in globalThis) {
|
|
101
|
-
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
102
|
-
const transparentBase64 = getTransparentBlobFor(
|
|
103
|
-
width,
|
|
104
|
-
height,
|
|
105
|
-
dataURLOptions
|
|
106
|
-
);
|
|
107
|
-
const offscreen = new OffscreenCanvas(width, height);
|
|
108
|
-
const ctx = offscreen.getContext("2d");
|
|
109
|
-
ctx.drawImage(bitmap, 0, 0);
|
|
110
|
-
bitmap.close();
|
|
111
|
-
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
112
|
-
const type = blob.type;
|
|
113
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
114
|
-
const base64 = encode(arrayBuffer);
|
|
115
|
-
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
116
|
-
lastBlobMap.set(id, base64);
|
|
117
|
-
return worker.postMessage({ id });
|
|
118
|
-
}
|
|
119
|
-
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
120
|
-
worker.postMessage({
|
|
121
|
-
id,
|
|
122
|
-
type,
|
|
123
|
-
base64,
|
|
124
|
-
width,
|
|
125
|
-
height
|
|
126
|
-
});
|
|
127
|
-
lastBlobMap.set(id, base64);
|
|
128
|
-
} else {
|
|
129
|
-
return worker.postMessage({ id: e.data.id });
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
})();
|
|
133
|
-
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
134
|
-
`,bo=typeof self<`u`&&self.Blob&&new Blob([yo],{type:`text/javascript;charset=utf-8`});function xo(e){let t;try{if(t=bo&&(self.URL||self.webkitURL).createObjectURL(bo),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(yo),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var So=class{constructor(e){n(this,`pendingCanvasMutations`,new Map),n(this,`rafStamps`,{latestId:0,invokeId:null}),n(this,`mirror`),n(this,`mutationCb`),n(this,`resetObservers`),n(this,`frozen`,!1),n(this,`locked`,!1),n(this,`processMutation`,(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t=`all`,win:r,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t===`all`&&this.initCanvasMutationObserver(r,i,a),o&&typeof t==`number`&&this.initCanvasFPSObserver(t,r,i,a,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,i){let a=go(t,n,r,!0),o=new Map,s=new xo;s.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!(`base64`in e.data))return;let{base64:n,type:r,width:i,height:a}=e.data;this.mutationCb({id:t,type:ya[`2D`],commands:[{property:`clearRect`,args:[0,0,i,a]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:n}],type:r}]},0,0]}]})};let c=1e3/e,l=0,u,d=()=>{let e=[];return t.document.querySelectorAll(`canvas`).forEach(t=>{G(t,n,r,!0)||e.push(t)}),e},f=e=>{if(l&&e-l<c){u=requestAnimationFrame(f);return}l=e,d().forEach(async e=>{let t=this.mirror.getId(e);if(o.get(t)||e.width===0||e.height===0)return;if(o.set(t,!0),[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);s.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=go(e,t,n,!1),i=mo(this.processMutation.bind(this),e,t,n),a=vo(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}},Co=class{constructor(e){n(this,`trackedLinkElements`,new WeakSet),n(this,`mutationCb`),n(this,`adoptedStyleSheetCb`),n(this,`styleMirror`,new pa),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,n)=>({rule:F(e,t.href),index:n}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},wo=class{constructor(){n(this,`nodeMap`,new WeakMap),n(this,`active`,!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},X,To,Eo,Do=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var Z=fe();function Oo(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,ignoreClass:o=`rr-ignore`,ignoreSelector:s=null,maskTextClass:c=`rr-mask`,maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:g,packFn:_,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:w=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ee=!1,collectFonts:T=!1,inlineImages:E=!1,plugins:D,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:k=new Set([]),errorHandler:te}=e;ka(te);let ne=!C||window.parent===window,A=!1;if(!ne)try{window.parent.document&&(A=!1)}catch{A=!0}if(ne&&!t)throw Error(`emit function is required`);if(!ne&&!A)return()=>{};b!==void 0&&v.mousemove===void 0&&(v.mousemove=b),Z.reset();let re=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===void 0?{password:!0}:f,ie=$e(p);la();let j,M=0,ae=e=>{for(let t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return _&&!A&&(e=_(e)),e};X=(e,i)=>{let a=e;if(a.timestamp=Yi(),ja[0]?.isFrozen()&&a.type!==K.FullSnapshot&&(a.type!==K.IncrementalSnapshot||a.data.source!==q.Mutation)&&ja.forEach(e=>e.unfreeze()),ne)t?.(ae(a),i);else if(A){let e={type:`rrweb`,event:ae(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===K.FullSnapshot)j=a,M=0;else if(a.type===K.IncrementalSnapshot){if(a.data.source===q.Mutation&&a.data.isAttachIframe)return;M++;let e=r&&M>=r,t=n&&a.timestamp-j.timestamp>n;(e||t)&&To(!0)}};let N=e=>{X({type:K.IncrementalSnapshot,data:{source:q.Mutation,...e}})},oe=e=>X({type:K.IncrementalSnapshot,data:{source:q.Scroll,...e}}),se=e=>X({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...e}}),P=new Co({mutationCb:N,adoptedStyleSheetCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...e}})}),F=new to({mirror:Z,mutationCb:N,stylesheetManager:P,recordCrossOriginIframes:C,wrappedEmit:X});for(let e of D||[])e.getMirror&&e.getMirror({nodeMirror:Z,crossOriginIframeMirror:F.crossOriginIframeMirror,crossOriginIframeStyleMirror:F.crossOriginIframeStyleMirror});let ce=new wo;Eo=new So({recordCanvas:S,mutationCb:se,win:window,blockClass:i,blockSelector:a,mirror:Z,sampling:v.canvas,dataURLOptions:y});let le=new no({mutationCb:N,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:re,dataURLOptions:y,maskTextFn:h,maskInputFn:m,recordCanvas:S,inlineImages:E,sampling:v,slimDOMOptions:ie,iframeManager:F,stylesheetManager:P,canvasManager:Eo,keepIframeSrcFn:O,processedNodeManager:ce},mirror:Z});To=(e=!1)=>{if(!x)return;X({type:K.Meta,data:{href:window.location.href,width:ra(),height:na()}},e),P.reset(),le.init(),ja.forEach(e=>e.lock());let t=nt(document,{mirror:Z,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:re,maskTextFn:h,maskInputFn:m,slimDOM:ie,dataURLOptions:y,recordCanvas:S,inlineImages:E,onSerialize:e=>{ua(e,Z)&&F.addIframe(e),da(e,Z)&&P.trackLinkElement(e),fa(e)&&le.addShadowRoot(U.shadowRoot(e),document)},onIframeLoad:(e,t)=>{F.attachIframe(e,t),le.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn(`Failed to snapshot the document`);X({type:K.FullSnapshot,data:{node:t,initialOffset:ta(window)}},e),ja.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Z.getId(document))};try{let e=[],t=e=>Y(Za)({mutationCb:N,mousemoveCb:(e,t)=>X({type:K.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MouseInteraction,...e}}),scrollCb:oe,viewportResizeCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.ViewportResize,...e}}),inputCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Input,...e}}),mediaInteractionCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.MediaInteraction,...e}}),styleSheetRuleCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleSheetRule,...e}}),styleDeclarationCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.StyleDeclaration,...e}}),canvasMutationCb:se,fontCb:e=>X({type:K.IncrementalSnapshot,data:{source:q.Font,...e}}),selectionCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.Selection,...e}})},customElementCb:e=>{X({type:K.IncrementalSnapshot,data:{source:q.CustomElement,...e}})},blockClass:i,ignoreClass:o,ignoreSelector:s,maskTextClass:c,maskTextSelector:l,maskInputOptions:re,inlineStylesheet:u,sampling:v,recordDOM:x,recordCanvas:S,inlineImages:E,userTriggeredOnInput:ee,collectFonts:T,doc:e,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:O,blockSelector:a,slimDOMOptions:ie,dataURLOptions:y,mirror:Z,iframeManager:F,stylesheetManager:P,shadowDomManager:le,processedNodeManager:ce,canvasManager:Eo,ignoreCSSAttributes:k,plugins:(D?.filter(e=>e.observer))?.map(e=>({observer:e.observer,options:e.options,callback:t=>X({type:K.Plugin,data:{plugin:e.name,payload:t}})}))||[]},g);F.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{To(),e.push(t(document)),Do=!0};return[`interactive`,`complete`].includes(document.readyState)?n():(e.push(W(`DOMContentLoaded`,()=>{X({type:K.DomContentLoaded,data:{}}),w===`DOMContentLoaded`&&n()})),e.push(W(`load`,()=>{X({type:K.Load,data:{}}),w===`load`&&n()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes(`cross-origin`)||console.warn(e)}}),ce.destroy(),Do=!1,Aa()}}catch(e){console.warn(e)}}Oo.addCustomEvent=(e,t)=>{if(!Do)throw Error(`please add custom event after start recording`);X({type:K.Custom,data:{tag:e,payload:t}})},Oo.freezePage=()=>{ja.forEach(e=>e.freeze())},Oo.takeFullSnapshot=e=>{if(!Do)throw Error(`please take full snapshot after start recording`);To(e)},Oo.mirror=Z;var ko;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(ko||={});var{addCustomEvent:Ao}=Oo,{freezePage:jo}=Oo,{takeFullSnapshot:Mo}=Oo,No=40,Po=7,Fo=6e4;async function Io(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function Lo({endpoint:e,onEvent:t=()=>{}}){let n=[],r=!1,i=null,a=!1,o=(e,r)=>{if(e.tries++,e.tries>=Po)return n.shift(),t({t:`drop`,b:e.b,reason:`retries`}),s();let a=r>0?r*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);i=setTimeout(()=>{i=null,s()},a)};async function s(){if(r||i||a||!n.length)return;r=!0;let c=n[0];try{let i=await Io(c.json),s=i||c.json,l=i?i.size:c.json.length,u=await fetch(e,{method:`POST`,body:s,credentials:`omit`,mode:`cors`,headers:{"Content-Type":`text/plain;charset=UTF-8`},keepalive:l<Fo});if(u.ok)n.shift(),t({t:`ack`,b:c.b});else{let e=``;try{e=(await u.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)n.length=0,t({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||u.status===401||u.status===403)n.length=0,a=!0,t({t:`stop`,code:e||String(u.status)});else if(u.status===429||u.status>=500)return r=!1,o(c,Number(u.headers.get(`Retry-After`))||0);else n.shift(),t({t:`drop`,b:c.b,reason:String(u.status)})}}catch{return r=!1,o(c,0)}r=!1,s()}return{push(e){a||(n.push({...e,tries:0}),n.length>No&&t({t:`drop`,b:n.shift().b,reason:`overflow`}),s())},nudge(){i&&=(clearTimeout(i),null),s()},stop(){a=!0,n.length=0,i&&clearTimeout(i)},pending:()=>n.length}}var Ro=`https://specto.sh`,zo=/^(localhost|127(?:\.\d{1,3}){3}|\[::1\]|0\.0\.0\.0|[^/:]+\.localhost)(?::\d+)?(?:\/|$)/i;function Bo(e){let t=String(e??``).trim(),n=t.indexOf(`@`);return n<=0?{key:t,host:null}:{key:t.slice(0,n),host:t.slice(n+1).trim()||null}}function Vo(e){let t=String(e??``).trim().replace(/\/+$/,``);if(!t)throw Error(`Specto: host is empty`);/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(zo.test(t)?`http://`:`https://`)+t);let n;try{n=new URL(t)}catch{throw Error(`Specto: "${e}" is not a host — use e.g. eu.specto.sh or https://replay.example.com`)}if(n.protocol!==`https:`&&n.protocol!==`http:`)throw Error(`Specto: host must be http(s) — got "${e}"`);return(n.origin+n.pathname).replace(/\/+$/,``)}function Ho(e={},{fallback:t=null,guessed:n=!1}={}){let{key:r,host:i}=Bo(e.key),a=t=>e.configUrl===!1?null:e.configUrl||String(t).replace(/\/api\/ingest$/,`/api/sdk/config`);if(e.endpoint){let t=String(e.endpoint);return{key:r,endpoint:t,configUrl:a(t),host:null,guessed:!1}}let o=e.host||i;if(!o&&!t)return{key:r,endpoint:`/api/ingest`,configUrl:a(`/api/ingest`),host:null,guessed:!1};let s=Vo(o||t),c=`${s}/api/ingest`;return{key:r,endpoint:c,configUrl:a(c),host:s,guessed:!o&&!!n}}var Uo=`0.2.5`,Wo=e=>(e=e.toLowerCase(),e.startsWith(`data-`)||e===`title`||e===`alt`||e===`placeholder`||e===`aria-label`||e===`value`);function Go(e){if(e&&typeof e==`object`)for(let t of Object.keys(e))Wo(t)&&typeof e[t]==`string`&&e[t]&&(e[t]=`***`)}function Ko(e){e&&typeof e==`object`&&(e.attributes&&Go(e.attributes),Array.isArray(e.childNodes)&&e.childNodes.forEach(Ko))}function qo(e,t){try{e.type===4&&typeof e.data?.href==`string`?e.data.href=$(e.data.href,t):e.type===2&&e.data?.node?Ko(e.data.node):e.type===3&&e.data&&(Array.isArray(e.data.adds)&&e.data.adds.forEach(e=>Ko(e.node)),Array.isArray(e.data.attributes)&&e.data.attributes.forEach(e=>Go(e.attributes)))}catch{}return e}var Jo=[[/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,`[email]`],[/\beyJ[\w-]{6,}\.[\w-]{6,}\.[\w-]{6,}\b/g,`[jwt]`],[/\b(Bearer|Basic)\s+[\w.~+/=-]{8,}/gi,`$1 [token]`],[/\b(?:\d[ -]?){13,19}\b/g,`[number]`],[/\b(sk|pk|rk)_(live|test)_[\w]{8,}\b/g,`[key]`]];function Q(e){let t=String(e??``);for(let[e,n]of Jo)t=t.replace(e,n);return t}function Yo(e){return typeof e==`string`?e:e&&typeof e.href==`string`?e.href:e&&typeof e.url==`string`?e.url:e==null?``:String(e)}var Xo=600,Zo=/(?:^|[-_.])(token|secret|password|passwd|auth|authorization|key|apikey|api[-_]?key|session|sid|code|signature|credential|email)s?$/i,Qo=e=>e.split(/[?&=]/)[0];function $(e,t=!1){let n=String(e??``);try{let e=new URL(n,location.href),r=!1;(e.username||e.password)&&(e.username=``,e.password=``,r=!0),t&&(e.search||Qo(e.hash)!==e.hash)&&(e.search=``,e.hash=Qo(e.hash),r=!0);for(let t of[...e.searchParams.keys()])Zo.test(t)&&(e.searchParams.set(t,`***`),r=!0);if(e.hash){let t=e.hash.replace(/([?&#]|^)([^=&?#]+)=([^&#]*)/g,(e,t,n)=>Zo.test(n)?`${t}${n}=***`:e);t!==e.hash&&(e.hash=t,r=!0)}let i=Q(decodeURIComponent(e.pathname));return i!==decodeURIComponent(e.pathname)&&(e.pathname=i,r=!0),r?(/^[a-z][a-z0-9+.-]*:/i.test(n)?e.href:e.pathname+e.search+e.hash).slice(0,Xo):n.slice(0,Xo)}catch{return Q(t?n.split(`?`)[0]:n).slice(0,Xo)}}var $o=e=>{try{return new URL(e,location.href).href}catch{return String(e??``)}},es=[`content-type`,`content-length`,`content-encoding`,`cache-control`,`etag`,`vary`,`age`,`server-timing`,`x-request-id`];function ts(e){let t={};for(let n of es)try{let r=e(n);r&&(t[n]=String(r).slice(0,200))}catch{}return Object.keys(t).length?t:void 0}function ns(e,t){try{if(!e)return;if(typeof e.get==`function`)return e.get(t)||void 0;if(Array.isArray(e)){let n=e.find(e=>String(e?.[0]).toLowerCase()===t);return n?String(n[1]):void 0}for(let n of Object.keys(e))if(n.toLowerCase()===t)return String(e[n])}catch{}}function rs(e){try{return e==null?void 0:typeof e==`string`?e.length:typeof Blob<`u`&&e instanceof Blob?e.size:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof URLSearchParams<`u`&&e instanceof URLSearchParams?String(e).length:void 0}catch{return}}function is(e,t,n,r=()=>!0){typeof performance<`u`&&performance.getEntriesByName&&setTimeout(()=>{try{if(!r())return;let i=null;for(let e of performance.getEntriesByName(t,`resource`)){let t=Math.abs(e.startTime-n);t<1500&&(!i||t<Math.abs(i.startTime-n))&&(i=e)}if(!i)return;let a=e.detail||={};if(i.transferSize&&(a.xfer=Math.round(i.transferSize)),i.decodedBodySize&&a.resSize==null&&(a.resSize=Math.round(i.decodedBodySize)),i.responseStart>0){let e=i.secureConnectionStart>0?i.secureConnectionStart:i.connectEnd,t={dns:i.domainLookupEnd-i.domainLookupStart,tcp:e-i.connectStart,tls:i.secureConnectionStart>0?i.connectEnd-i.secureConnectionStart:0,ttfb:i.responseStart-i.requestStart,dl:i.responseEnd-i.responseStart};a.timing={};for(let e of Object.keys(t))t[e]>0&&(a.timing[e]=Math.round(t[e]*10)/10);Object.keys(a.timing).length||delete a.timing}}catch{}},300)}function as(e=`rec_`){return e+(typeof crypto<`u`&&crypto.getRandomValues?Array.from(crypto.getRandomValues(new Uint8Array(12))).map(e=>e.toString(16).padStart(2,`0`)).join(``):Math.abs(Date.now()^performance.now()*1e3|0).toString(16)+Math.random().toString(16).slice(2,10))}function os(){if(typeof crypto>`u`||!crypto.getRandomValues)return null;let e=crypto.getRandomValues(new Uint8Array(16));return btoa(String.fromCharCode(...e)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var ss={get(e,t){try{return JSON.parse(window[e].getItem(t))}catch{return null}},set(e,t,n){try{window[e].setItem(t,JSON.stringify(n))}catch{}},del(e,t){try{window[e].removeItem(t)}catch{}}},cs=`specto-optout`,ls=`specto-consent`,us=()=>ss.get(`localStorage`,cs)===!0,ds=()=>ss.get(`localStorage`,ls)===`granted`;function fs(){let e=ss.get(`localStorage`,`specto-vid`);return typeof e!=`string`&&(e=as(`v_`),ss.set(`localStorage`,`specto-vid`,e)),e}var ps=18e5,ms=144e5,hs=4e3;async function gs(e,t){if(!e)return null;try{let n=typeof AbortController<`u`?new AbortController:null,r=n&&setTimeout(()=>n.abort(),3e3),i=await fetch(`${e}?key=${encodeURIComponent(t)}`,{credentials:`omit`,signal:n?.signal});if(r&&clearTimeout(r),i.ok)return await i.json();let a=null;try{a=await i.json()}catch{}return i.status===404&&a?.error===`unknown key`?{unknownKey:!0}:{failed:!0}}catch{return{failed:!0}}}function _s(e={}){if(typeof window>`u`)return{disabled:!0,reason:`no window`,stop(){}};if(window.__spectoRec&&!window.__spectoRec.disabled)return window.__spectoRec;let t=Ho(e,{fallback:e._fallback||null,guessed:!!e._guessed});if(!t.key)throw Error(`Specto: a publishable key is required — copy it from your project's Install page`);let{key:n,endpoint:r,configUrl:i}=t,a={disabled:!0,reason:`starting`,sessionId:null,stop(){},flushNow(){},count:()=>0,identify(){},track(){},sessionUrl:()=>null};if(navigator.doNotTrack===`1`||navigator.globalPrivacyControl)return Object.assign(a,{reason:`dnt`});if(us())return Object.assign(a,{reason:`opted-out`});if(e.consent===`required`&&!ds())return Object.assign(a,{reason:`consent-required`});let o=bs(e,t);window.__spectoRec=o;let s=e=>gs(i,n).then(n=>{if(n?.failed&&t.guessed&&e<3)return setTimeout(()=>s(e+1),e*2e3);o._begin(n)});return s(1),o}var vs=e=>{try{console.warn(`[specto] ${e}`)}catch{}},ys={dom:4e3,console:200,network:300,event:300,identify:20};function bs(e,t){let{key:n,endpoint:r}=t,i=[],a=0,o=!1,s=!1,c=null,l=[],u=performance.now(),d=()=>Math.round(performance.now()-u),f=`specto-session:${n}`,p=null,m={strict:e.privacy===`strict`,console:e.console!==!1,networkDetails:e.networkDetails!==!1},h=null,g=()=>h||m,_=()=>{try{return $(location.pathname,g().strict).slice(0,300)}catch{return}},v=()=>{},y=typeof WeakSet<`u`?new WeakSet:null,b=null,x=!1,S=[],C=null,w=Date.now(),ee=[],T={},E=!1,D=(t,n)=>{if(!s){if(!o){if((T[t]=(T[t]||0)+1)>(ys[t]??100)){t===`dom`&&(E=!0);return}ee.push([t,n]);return}i.push({kind:t,payload:n}),a++,e.onUpdate?.({total:a,kind:t})}},O=()=>ss.set(`sessionStorage`,f,p);function k(e){let t=Date.now(),n=e?null:ss.get(`sessionStorage`,f),r=!!(n&&typeof n.id==`string`&&t-n.active<ps&&t-n.started<ms);if(r)p=n;else{let e=Math.max(0,Math.min(1,h.sampleRate));p={id:as(),sk:os(),b:0,started:t,active:t,sampled:Math.random()<e}}return p.active=t,O(),r}function te(){if(re(),k(!0),!p.sampled)return M.stop(`not-sampled`);try{Oo.takeFullSnapshot(!0)}catch{}}function ne(e){if(!e.length||!p?.sampled)return;let t={b:p.b++,json:JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b-1,sdk:Uo,meta:{page:$(location.pathname),userAgent:navigator.userAgent,visitorId:fs()},events:e})};p.active=Math.max(p.active,w),O(),b?(b.postMessage({t:`upload`,item:t}),x||S.push(t)):C.push(t)}function A(){if(!C){try{b?.terminate()}catch{}b=null,C=Lo({endpoint:r,onEvent:ie});for(let e of S.splice(0))C.push(e)}}function re(){if(!i.length)return;let e=i;i=[],ne(e)}function ie(t){t.t===`stop`?M.stop(t.code):t.t===`rotate`&&te(),e.onDelivery?.(t)}function j(){if(!i.length||!navigator.sendBeacon||!p?.sampled)return;let e=i;i=[];let t=[],a=0,o=()=>{if(!t.length)return;let e=JSON.stringify({key:n,sessionId:p.id,...p.sk?{sk:p.sk}:{},b:p.b++,sdk:Uo,meta:{page:$(location.pathname)},events:t});try{navigator.sendBeacon(r,new Blob([e],{type:`text/plain;charset=UTF-8`}))}catch{}t=[],a=0};for(let n of e){let e=JSON.stringify(n).length;a+e>55e3&&o(),!(e>55e3)&&(t.push(n),a+=e)}o(),O()}let M={disabled:!1,get sessionId(){return p?.id||null},count:()=>a,flushNow:()=>re(),identify(e,t){e!=null&&e!==``&&D(`identify`,{id:String(e).slice(0,256),traits:t&&typeof t==`object`?t:void 0})},track(e,t){e&&D(`event`,{t:d(),type:`custom`,name:String(e).slice(0,120),props:t&&typeof t==`object`?JSON.parse(JSON.stringify(t,(e,t)=>typeof t==`string`?Q(t).slice(0,500):t)):void 0})},captureError(e,t){if(e&&typeof e==`object`&&y){if(y.has(e))return;y.add(e)}let n=Q(String(e&&e.message||e||`error`)).slice(0,500),r=xs(e?.stack),i=t?.componentStack?Q(String(t.componentStack)).split(`
|
|
135
|
-
`).map(e=>e.trim()).filter(Boolean).slice(0,8).join(`
|
|
136
|
-
`).slice(0,800):void 0;D(`event`,{t:d(),type:`error`,message:n,path:_(),...r?{stack:r}:{},...i?{component:i}:{},...t?.source?{source:String(t.source).slice(0,40)}:{}})},sessionUrl(){try{return p?`${t.host||new URL(r,location.href).origin}/#replay/${p.id}`:null}catch{return null}},stop(e){if(s)return;s=!0,M.disabled=!0,M.reason=e||`stopped`;try{c?.()}catch{}for(let e of l.splice(0))try{e()}catch{}re(),b&&!x&&S.length&&A();let t=b;t&&setTimeout(()=>t.terminate(),2e3),window.__spectoRec===M&&delete window.__spectoRec},_begin(i){if(s||o)return;let a=i&&typeof i==`object`?i:{},u=t.host||r;if(a.unknownKey)return M.stop(`unknown-key`),vs(`${u} has no project with the key ${n}, so nothing is recorded. Copy the key from the project's Install page${t.guessed?` — a self-hosted or EU-region project includes its host: pk_…@your-host`:``}.`);if(a.failed&&t.guessed)return M.stop(`unconfirmed`),vs(`couldn't reach ${u} to confirm the key ${n}, so this page isn't recorded.`);if(a.enabled===!1)return M.stop(`recording-disabled`);h={strict:e.privacy===`strict`||a.privacy===`strict`,console:e.console!==!1&&a.captureConsole!==!1,networkDetails:e.networkDetails!==!1&&a.captureNetworkDetails!==!1,sampleRate:Math.min(e.sampleRate??1,typeof a.sampleRate==`number`?a.sampleRate:1)};let d=k(!1);if(!p.sampled)return M.stop(`not-sampled`);let f=h.strict&&!m.strict,g=f||E;o=!0;for(let[e,t]of ee.splice(0)){let n=N(e,t,f,g);n&&D(e,n)}if(g){try{c?.()}catch{}c=ae()}try{if(b=e.createWorker?e.createWorker():null,b){b.onmessage=e=>{let t=e.data||{};if(t.t===`ready`){x=!0,S=[];return}ie(t)},b.onerror=()=>{x||A()},b.postMessage({t:`init`,endpoint:r});let e=setTimeout(()=>{x||A()},hs);l.push(()=>clearTimeout(e))}}catch{b=null}b||(C=Lo({endpoint:r,onEvent:ie})),P(d);let _=setInterval(re,2e3);l.push(()=>clearInterval(_))}};function ae(){let e=g().strict;return Oo({emit:e=>D(`dom`,qo(e,g().strict)),maskAllInputs:!0,maskInputOptions:{password:!0,email:!0,tel:!0,color:!1},maskTextClass:`specto-mask`,maskTextSelector:e?`*`:void 0,blockClass:`specto-block`,recordCanvas:!1,collectFonts:!1,checkoutEveryNms:3e5,sampling:{mousemove:50,scroll:150,input:`last`}})}function N(e,t,n,r){if(e===`dom`)return r?null:t;if(!t||typeof t!=`object`)return t;if(e===`console`){if(!h.console)return null;n&&(t.text=`[masked]`)}else e===`network`?(n&&t.url&&(t.url=$(t.url,!0)),h.networkDetails||delete t.detail):e===`event`&&t.type===`nav`&&n&&t.path&&(t.path=$(t.path,!0).slice(0,300));return t}function oe(){if(c=ae(),m.console)for(let e of[`log`,`info`,`warn`,`error`]){let t=console[e];console[e]=(...n)=>{try{g().console&&D(`console`,{t:d(),level:e,text:g().strict?`[masked]`:Q(n.map(Ts).join(` `)).slice(0,2e3)})}catch{}t.apply(console,n)},l.push(()=>{console[e]=t})}if(m.networkDetails)try{performance.setResourceTimingBufferSize?.(1e3)}catch{}let n=()=>g().networkDetails,i=window.fetch,a=e=>new URL(e,location.href).href.split(/[?#]/)[0],o=new Set;for(let e of[r,t.configUrl])try{e&&o.add(a(e))}catch{}let s=e=>{try{return o.has(a(e))}catch{return!1}},u=new Set((Array.isArray(e.traceOrigins)?e.traceOrigins:[]).map(e=>{try{return new URL(e).origin}catch{return null}}).filter(Boolean)),f=!!e.traces||u.size>0,p=e=>{if(!f)return!1;try{let t=new URL(e,location.href).origin;return t===location.origin||u.has(t)}catch{return!1}},h=e=>{try{let[t,n]=e,r=typeof Request<`u`&&t instanceof Request,i=new Headers(n?.headers??(r?t.headers:void 0)),a=Cs.exec(i.get(`traceparent`)||``);if(a)return[e,a[1].toLowerCase()];let o=Ss(16);return i.set(`traceparent`,`00-${o}-${Ss(8)}-01`),[[t,{...n,headers:i}],o]}catch{return[e,void 0]}};window.fetch=async(...e)=>{if(s(Yo(e[0])))return i.apply(window,e);let t=performance.now(),r=Yo(e[0]),a=$(r,g().strict),o=(e[1]?.method||typeof e[0]!=`string`&&e[0]?.method||`GET`).toUpperCase(),c;p(r)&&([e,c]=h(e));try{let s=await i.apply(window,e),l=c;try{l=l||s.headers.get(`x-trace-id`)||void 0}catch{}let u={t:d(),method:o,url:a,status:s.status,dur:Math.round(performance.now()-t),...l?{traceId:l}:{}};if(n()){let i={initiator:`fetch`};try{s.statusText&&(i.statusText=String(s.statusText).slice(0,80));let t=ts(e=>s.headers.get(e));t&&(i.headers=t),t?.[`content-type`]&&(i.resType=t[`content-type`].split(`;`)[0]);let n=Number(t?.[`content-length`]);t?.[`content-length`]!=null&&Number.isFinite(n)&&(i.resSize=n);let r=ns((e[1]||(typeof e[0]==`object`?e[0]:null))?.headers,`content-type`);r&&(i.reqType=r.split(`;`)[0].slice(0,80));let a=rs(e[1]?.body);a!=null&&(i.reqSize=a)}catch{}u.detail=i,is(u,$o(r),t,n)}return D(`network`,u),s}catch(e){throw D(`network`,{t:d(),method:o,url:a,status:0,dur:Math.round(performance.now()-t),error:!0,...n()?{detail:{initiator:`fetch`,message:Q(String(e?.message||e)).slice(0,200)}}:{}}),e}},l.push(()=>{window.fetch=i});let b=window.XMLHttpRequest,x=b.prototype.open,S=b.prototype.send,C=b.prototype.setRequestHeader;b.prototype.open=function(e,t){return this.__specto={method:String(e).toUpperCase(),url:$(t,g().strict),rawUrl:$o(t),started:0,trace:p(t)},x.apply(this,arguments)},b.prototype.setRequestHeader=function(e,t){let n=String(e).toLowerCase();if(this.__specto&&n===`content-type`&&(this.__specto.reqType=String(t).split(`;`)[0].slice(0,80)),this.__specto&&n===`traceparent`){let e=Cs.exec(String(t));e&&(this.__specto.traceId=e[1].toLowerCase()),this.__specto.trace=!1}return C.apply(this,arguments)},b.prototype.send=function(e){if(this.__specto){if(this.__specto.trace)try{let e=Ss(16);C.call(this,`traceparent`,`00-${e}-${Ss(8)}-01`),this.__specto.traceId=e}catch{}this.__specto.started=performance.now(),n()&&(this.__specto.reqSize=rs(e)),this.addEventListener(`loadend`,()=>{let e=this.__specto,t=e.traceId;try{t=t||this.getResponseHeader(`x-trace-id`)||void 0}catch{}let r={t:d(),method:e.method,url:e.url,status:this.status,dur:Math.round(performance.now()-e.started),...t?{traceId:t}:{},...this.status===0?{error:!0}:{}};if(n()){let t={initiator:`xhr`};try{this.statusText&&(t.statusText=String(this.statusText).slice(0,80));let n=ts(e=>this.getResponseHeader(e));n&&(t.headers=n),n?.[`content-type`]&&(t.resType=n[`content-type`].split(`;`)[0]);let r=Number(n?.[`content-length`]);n?.[`content-length`]!=null&&Number.isFinite(r)&&(t.resSize=r),e.reqType&&(t.reqType=e.reqType),e.reqSize!=null&&(t.reqSize=e.reqSize)}catch{}r.detail=t,is(r,e.rawUrl,e.started,n)}D(`network`,r)})}return S.apply(this,arguments)},l.push(()=>{b.prototype.open=x,b.prototype.send=S,b.prototype.setRequestHeader=C});let w=e=>{let t=e.error||e.reason,n=xs(t?.stack),r={t:d(),type:`error`,message:Q(String(e.message||t?.message||e.reason||`error`)).slice(0,500),path:_(),...n?{stack:n}:{}};setTimeout(()=>{if(t&&typeof t==`object`&&y){if(y.has(t))return;y.add(t)}D(`event`,r)},0)};window.addEventListener(`error`,w),window.addEventListener(`unhandledrejection`,w),l.push(()=>{window.removeEventListener(`error`,w),window.removeEventListener(`unhandledrejection`,w)}),se=()=>{v(),D(`event`,{t:d(),type:`nav`,path:$(location.pathname+location.search+location.hash,g().strict).slice(0,300)})};let ee=history.pushState,T=history.replaceState;history.pushState=function(...e){let t=ee.apply(this,e);try{se()}catch{}return t},history.replaceState=function(...e){let t=T.apply(this,e);try{se()}catch{}return t};let E=()=>se();window.addEventListener(`popstate`,E),window.addEventListener(`hashchange`,E),l.push(()=>{history.pushState=ee,history.replaceState=T,window.removeEventListener(`popstate`,E),window.removeEventListener(`hashchange`,E)})}let se=()=>{};function P(e){let t=()=>{let e=Date.now();if(e-w>ps){w=e,te();return}w=e};for(let e of[`click`,`keydown`,`scroll`,`pointerdown`])window.addEventListener(e,t,{capture:!0,passive:!0}),l.push(()=>window.removeEventListener(e,t,{capture:!0}));if(e||location.hash.length>1)try{se()}catch{}let n=[],r=e=>{let t=performance.now();if(n=n.filter(n=>t-n.t<800&&Math.abs(n.x-e.clientX)<40&&Math.abs(n.y-e.clientY)<40),n.push({t,x:e.clientX,y:e.clientY}),n.length>=3){let t=e.target?.tagName?e.target.tagName.toLowerCase()+(e.target.id?`#`+e.target.id:``):`element`;D(`event`,{t:d(),type:`rage`,target:t.slice(0,80),count:n.length,path:_()}),n=[]}};window.addEventListener(`click`,r,!0),l.push(()=>window.removeEventListener(`click`,r,!0));let i=()=>Math.max(document.documentElement?.scrollHeight||0,document.body?.scrollHeight||0),a=null,o=()=>{let e=i();a&&e>0&&(a.depth=Math.max(a.depth,Math.min(1,(window.scrollY+window.innerHeight)/e)))},s=()=>{a={id:Math.random().toString(36).slice(2,10),path:$(location.pathname,g().strict).slice(0,300),depth:0,clicks:0},o()},c=()=>{a&&D(`event`,{t:d(),type:`scroll`,path:a.path,pv:a.id,depth:Math.round(a.depth*1e3)/1e3,vw:window.innerWidth,dh:i()})};s(),v=()=>{$(location.pathname,g().strict).slice(0,300)!==a?.path&&(c(),s())};let u=!1,f=()=>{u||(u=!0,requestAnimationFrame(()=>{u=!1,o()}))},p=e=>{!a||a.clicks>=300||(a.clicks++,D(`event`,{t:d(),type:`click`,path:a.path,pv:a.id,x:Math.round(e.pageX),y:Math.round(e.pageY),vw:window.innerWidth,dh:i(),sel:ws(e.target)}))};window.addEventListener(`scroll`,f,{passive:!0,capture:!0}),window.addEventListener(`click`,p,!0),l.push(()=>{window.removeEventListener(`scroll`,f,{capture:!0}),window.removeEventListener(`click`,p,!0)});let m=()=>{c(),j()},h=()=>{document.visibilityState===`hidden`&&(c(),j())},y=()=>{b?b.postMessage({t:`nudge`}):C?.nudge()};window.addEventListener(`pagehide`,m),document.addEventListener(`visibilitychange`,h),window.addEventListener(`online`,y),l.push(()=>{window.removeEventListener(`pagehide`,m),document.removeEventListener(`visibilitychange`,h),window.removeEventListener(`online`,y)})}return oe(),M}function xs(e){if(e)return Q(String(e)).split(`
|
|
137
|
-
`).slice(0,6).map(e=>e.replace(/\?[^\s:)]*/g,``).slice(0,300)).join(`
|
|
138
|
-
`)}var Ss=e=>{let t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},Cs=/^00-([0-9a-f]{32})-[0-9a-f]{16}-[0-9a-f]{2}$/i;function ws(e){let t=[];for(let n=e,r=0;n&&n.nodeType===1&&r<3&&n!==document.body&&n!==document.documentElement;n=n.parentElement,r++){let e=String(n.tagName||``).toLowerCase();if(n.id){t.unshift(`${e}#${n.id}`);break}let r=typeof n.className==`string`?n.className.trim().split(/\s+/).filter(e=>e&&!e.startsWith(`specto-`)).slice(0,2):[];t.unshift(r.length?`${e}.${r.join(`.`)}`:e)}return Q(t.join(` > `)||`body`).slice(0,160)}function Ts(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}var Es='(function(){async function e(e){if(typeof CompressionStream>`u`)return null;try{return await new Response(new Blob([e]).stream().pipeThrough(new CompressionStream(`gzip`))).blob()}catch{return null}}function t({endpoint:t,onEvent:n=()=>{}}){let r=[],i=!1,a=null,o=!1,s=(e,t)=>{if(e.tries++,e.tries>=7)return r.shift(),n({t:`drop`,b:e.b,reason:`retries`}),c();let i=t>0?t*1e3:Math.min(3e4,1e3*2**(e.tries-1))*(.75+Math.random()/2);a=setTimeout(()=>{a=null,c()},i)};async function c(){if(i||a||o||!r.length)return;i=!0;let l=r[0];try{let a=await e(l.json),c=a||l.json,u=a?a.size:l.json.length,d=await fetch(t,{method:`POST`,body:c,credentials:`omit`,mode:`cors`,headers:{"Content-Type":`text/plain;charset=UTF-8`},keepalive:u<6e4});if(d.ok)r.shift(),n({t:`ack`,b:l.b});else{let e=``;try{e=(await d.json())?.code||``}catch{}if(e===`session_limit`||e===`session_key`)r.length=0,n({t:`rotate`,code:e});else if(e===`quota_exceeded`||e===`recording_disabled`||d.status===401||d.status===403)r.length=0,o=!0,n({t:`stop`,code:e||String(d.status)});else if(d.status===429||d.status>=500)return i=!1,s(l,Number(d.headers.get(`Retry-After`))||0);else r.shift(),n({t:`drop`,b:l.b,reason:String(d.status)})}}catch{return i=!1,s(l,0)}i=!1,c()}return{push(e){o||(r.push({...e,tries:0}),r.length>40&&n({t:`drop`,b:r.shift().b,reason:`overflow`}),c())},nudge(){a&&=(clearTimeout(a),null),c()},stop(){o=!0,r.length=0,a&&clearTimeout(a)},pending:()=>r.length}}let n=null;self.onmessage=e=>{let r=e.data||{};r.t===`init`?(n=t({endpoint:r.endpoint,onEvent:e=>self.postMessage(e)}),self.postMessage({t:`ready`})):r.t===`upload`?n?.push(r.item):r.t===`nudge`?n?.nudge():r.t===`stop`&&n?.stop()}})();',Ds=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,Es],{type:`text/javascript;charset=utf-8`});function Os(e){let t;try{if(t=Ds&&(self.URL||self.webkitURL).createObjectURL(Ds),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(Es),{name:e?.name})}}var ks=null;function As(e={}){if(!e.key)throw Error(`@spectosh/browser: opts.key is required — your pk_… key from the project's Install page`);return ks=e,_s({createWorker:()=>new Os,_fallback:Ro,_guessed:!0,...e})}var js=()=>typeof window<`u`?window.__spectoRec:null,Ms=(e,t)=>js()?.identify(e,t),Ns=(e,t)=>js()?.track(e,t),Ps=(e,t)=>js()?.captureError?.(e,t),Fs=()=>js()?.sessionUrl?.()||null,Is=()=>js()?.stop();function Ls(){try{localStorage.setItem(`specto-consent`,JSON.stringify(`granted`))}catch{}return ks?As(ks):null}function Rs(){try{localStorage.removeItem(`specto-consent`)}catch{}Is()}function zs(){try{localStorage.setItem(`specto-optout`,`true`)}catch{}Is()}function Bs(){try{localStorage.removeItem(`specto-optout`)}catch{}}var Vs={startRecording:As,identify:Ms,track:Ns,captureError:Ps,sessionUrl:Fs,stopRecording:Is,grantConsent:Ls,revokeConsent:Rs,optOut:zs,optIn:Bs};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return Bo}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Vs}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ns}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return Uo}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Ro}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return As}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return us}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ls}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Rs}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ds}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ms}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Fs}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Is}});
|