@posthog/rrweb 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb.cjs +3 -0
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +3 -0
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +3 -0
- package/dist/rrweb.umd.cjs.map +2 -2
- package/dist/rrweb.umd.min.cjs +1 -1
- package/dist/rrweb.umd.min.cjs.map +2 -2
- package/package.json +1 -1
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var module = { exports };
|
|
|
39
39
|
`),this.css+=h+"/*# sourceMappingURL="+c+" */"}applyPrevMaps(){for(let c of this.previous()){let h=this.toUrl(this.path(c.file)),m=c.root||e(c.file),p;this.mapOpts.sourcesContent===!1?(p=new i(c.text),p.sourcesContent&&(p.sourcesContent=null)):p=c.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let c;for(let h=this.root.nodes.length-1;h>=0;h--)c=this.root.nodes[h],c.type==="comment"&&c.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let c="";return this.stringify(this.root,h=>{c+=h}),[c]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let c=this.previous()[0].consumer();c.file=this.outputFile(),this.map=a.fromSourceMap(c,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let c=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,w;this.stringify(this.root,(y,b,C)=>{if(this.css+=y,b&&C!=="end"&&(p.generated.line=c,p.generated.column=h-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),w=y.match(/\n/g),w?(c+=w.length,g=y.lastIndexOf(`
|
|
40
40
|
`),h=y.length-g):h+=y.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=c,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=c,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(c=>c.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let c=this.mapOpts.annotation;return typeof c!="undefined"&&c!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(c=>c.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(c){if(this.mapOpts.absolute||c.charCodeAt(0)===60||/^\w+:\/\//.test(c))return c;let h=this.memoizedPaths.get(c);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,c);return this.memoizedPaths.set(c,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(c=>{if(c.source&&c.source.input.map){let h=c.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let c=new l(this.originalCSS,this.opts);c.map&&this.previousMaps.push(c.map)}return this.previousMaps}setSourcesContent(){let c={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!c[m]){c[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(c){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(c.source.input.from):this.toUrl(this.path(c.source.input.from))}toBase64(c){return Buffer?Buffer.from(c).toString("base64"):window.btoa(unescape(encodeURIComponent(c)))}toFileUrl(c){let h=this.memoizedFileURLs.get(c);if(h)return h;if(o){let m=o(c).toString();return this.memoizedFileURLs.set(c,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(c){let h=this.memoizedURLs.get(c);if(h)return h;s==="\\"&&(c=c.replace(/\\/g,"/"));let m=encodeURI(c).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(c,m),m}}return ur=n,ur}var cr,Si;function Xn(){if(Si)return cr;Si=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,c=41,h=123,m=125,p=59,g=42,w=58,y=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return cr=function(R,I={}){let O=R.css.valueOf(),F=I.ignoreErrors,D,re,ie,x,Z,P,V,ee,X,be,Ee=O.length,N=0,ge=[],ce=[];function Qe(){return N}function le(k){throw R.error("Unclosed "+k,N)}function he(){return ce.length===0&&N>=Ee}function _e(k){if(ce.length)return ce.pop();if(N>=Ee)return;let te=k?k.ignoreUnclosed:!1;switch(D=O.charCodeAt(N),D){case i:case a:case l:case d:case o:{x=N;do x+=1,D=O.charCodeAt(x);while(D===a||D===i||D===l||D===d||D===o);P=["space",O.slice(N,x)],N=x-1;break}case u:case n:case h:case m:case w:case p:case c:{let j=String.fromCharCode(D);P=[j,j,N];break}case f:{if(be=ge.length?ge.pop()[1]:"",X=O.charCodeAt(N+1),be==="url"&&X!==e&&X!==t&&X!==a&&X!==i&&X!==l&&X!==o&&X!==d){x=N;do{if(V=!1,x=O.indexOf(")",x+1),x===-1)if(F||te){x=N;break}else le("bracket");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["brackets",O.slice(N,x+1),N,x],N=x}else x=O.indexOf(")",N+1),re=O.slice(N,x+1),x===-1||v.test(re)?P=["(","(",N]:(P=["brackets",re,N,x],N=x);break}case e:case t:{Z=D===e?"'":'"',x=N;do{if(V=!1,x=O.indexOf(Z,x+1),x===-1)if(F||te){x=N+1;break}else le("string");for(ee=x;O.charCodeAt(ee-1)===r;)ee-=1,V=!V}while(V);P=["string",O.slice(N,x+1),N,x],N=x;break}case y:{b.lastIndex=N+1,b.test(O),b.lastIndex===0?x=O.length-1:x=b.lastIndex-2,P=["at-word",O.slice(N,x+1),N,x],N=x;break}case r:{for(x=N,ie=!0;O.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(D=O.charCodeAt(x+1),ie&&D!==s&&D!==a&&D!==i&&D!==l&&D!==d&&D!==o&&(x+=1,S.test(O.charAt(x)))){for(;S.test(O.charAt(x+1));)x+=1;O.charCodeAt(x+1)===a&&(x+=1)}P=["word",O.slice(N,x+1),N,x],N=x;break}default:{D===s&&O.charCodeAt(N+1)===g?(x=O.indexOf("*/",N+2)+1,x===0&&(F||te?x=O.length:le("comment")),P=["comment",O.slice(N,x+1),N,x],N=x):(C.lastIndex=N+1,C.test(O),C.lastIndex===0?x=O.length-1:x=C.lastIndex-2,P=["word",O.slice(N,x+1),N,x],ge.push(P),N=x);break}}return N++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},cr}var hr,Ci;function Qn(){if(Ci)return hr;Ci=1;let e=gs(),t=nt(),r=Lt(),s=ot(),i=ws(),a=Xn();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],c=f[3]||f[2];if(c)return c}}class d{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let c,h,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),c=n[0],c==="("||c==="["?y.push(c==="("?")":"]"):c==="{"&&y.length>0?y.push("}"):c===y[y.length-1]&&y.pop(),y.length===0)if(c===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(c==="{"){g=!0;break}else if(c==="}"){if(w.length>0){for(m=w.length-1,h=w[m];h&&h[0]==="space";)h=w[--m];h&&(f.source.end=this.getPosition(h[3]||h[2]),f.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(f.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(f,"params",w),p&&(n=w[w.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let c=0,h;for(let m=f-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(c+=1,c===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let f=0,c,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!c)this.doubleColon(h);else{if(c[0]==="word"&&c[1]==="progid")continue;return p}c=h}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let c=n[1].slice(2,-2);if(/^\s*$/.test(c))f.text="",f.raws.left=c,f.raws.right="";else{let h=c.match(/^(\s*)([^]*\S)(\s*)$/);f.text=h[2],f.raws.left=h[1],f.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let c=new r;this.init(c,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),c.source.end=this.getPosition(h[3]||h[2]||l(n)),c.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),c.raws.before+=n.shift()[1];for(c.source.start=this.getPosition(n[0][2]),c.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;c.prop+=n.shift()[1]}c.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){c.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),c.raws.between+=m[1];(c.prop[0]==="_"||c.prop[0]==="*")&&(c.raws.before+=c.prop[0],c.prop=c.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){c.important=!0;let b=this.stringFrom(n,y);b=this.spacesFromEnd(n)+b,b!==" !important"&&(c.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=y;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(c.important=!0,c.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(c.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(c,"value",p.concat(n),f),c.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}end(n){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(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}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(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,c=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(c=y[0],w.push(y),c==="("||c==="[")m||(m=y),p.push(c==="("?")":"]");else if(g&&h&&c==="{")m||(m=y),p.push("}");else if(p.length===0)if(c===";")if(h){this.decl(w,g);return}else break;else if(c==="{"){this.rule(w);return}else if(c==="}"){this.tokenizer.back(w.pop()),f=!0;break}else c===":"&&(h=!0);else c===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&h){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,f,c,h){let m,p,g=c.length,w="",y=!0,b,C;for(let v=0;v<g;v+=1)m=c[v],p=m[0],p==="space"&&v===g-1&&!h?y=!1:p==="comment"?(C=c[v-1]?c[v-1][0]:"empty",b=c[v+1]?c[v+1][0]:"empty",!o[C]&&!o[b]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let v=c.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:w}}n[f]=w}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)c=n.pop()[1]+c;return c}spacesAndCommentsFromStart(n){let f,c="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)c+=n.shift()[1];return c}spacesFromEnd(n){let f,c="";for(;n.length&&(f=n[n.length-1][0],f==="space");)c=n.pop()[1]+c;return c}stringFrom(n,f){let c="";for(let h=f;h<n.length;h++)c+=n[h][1];return n.splice(f,n.length-f),c}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return hr=d,hr}var fr,Ei;function bs(){if(Ei)return fr;Ei=1;let e=ke(),t=Ft(),r=Qn();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return fr=s,s.default=s,e.registerParse(s),fr}var dr,Ri;function Kn(){if(Ri)return dr;Ri=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return dr=e,e.default=e,dr}var pr,xi;function vs(){if(xi)return pr;xi=1;let e=Kn();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return pr=t,t.default=t,pr}var mr,Mi;function Zn(){if(Mi)return mr;Mi=1;let e={};return mr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},mr}var gr,Oi;function eo(){if(Oi)return gr;Oi=1;let e=ke(),t=ys(),r=Jn(),s=bs(),i=vs(),a=ot(),o=Pt(),{isClean:l,my:d}=ms(),u=Zn();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},c={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,h,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",h,"DocumentExit"]:C.type==="root"?v=["Root",h,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>w(v)),C}let y={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=w(S);else if(S instanceof b||S instanceof i)R=w(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(O){this.processed=!0,this.error=O}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(L({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(O){throw this.handleError(O,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[O,F]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=O;try{return F(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let O=S.iterator,F;for(;F=E.nodes[E.indexes[O]];)if(E.indexes[O]+=1,!F[l]){F[l]=!0,v.push(g(F));return}S.iterator=0,delete E.indexes[O]}let I=S.events;for(;S.eventIndex<I.length;){let O=I[S.eventIndex];if(S.eventIndex+=1,O===h){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[O]){S.visitors=this.listeners[O];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===h)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=C=>{y=C},gr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),gr}var yr,Ni;function Ya(){if(Ni)return yr;Ni=1;let e=Jn(),t=bs();const r=vs();let s=Pt(),i=Zn();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let h=new e(f,n,this._opts,d);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return yr=a,a.default=a,yr}var wr,Ii;function Ja(){if(Ii)return wr;Ii=1;let e=ys(),t=eo(),r=Ya(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return wr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),wr}var br,Di;function to(){if(Di)return br;Di=1;let e=gs(),t=nt(),r=ke(),s=ps(),i=Lt(),a=ys(),o=Ha(),l=Ft(),d=eo(),u=Yn(),n=kt(),f=bs(),c=Ja(),h=vs(),m=ot(),p=ws(),g=Pt(),w=Kn();function y(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new c(b)}return y.plugin=function(C,v){let S=!1;function E(...I){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
41
41
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
42
|
-
https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new c().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Qn(),r=Xn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=to(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=jn(Ka);var el=to();const Y=jn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Pi(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function ki(){return{stylesWithHoverClass:new Map}}function rl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const d={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(o==="option"&&u==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),u.startsWith("rr_")){d[u]=n;continue}const f=o==="textarea"&&u==="value",c=o==="style"&&u==="_cssText";if(c&&i&&typeof n=="string"&&(n=Pi(n,a)),(f||c)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(h){}}for(const u in d){const n=d[u];if(o==="canvas"&&u==="rr_dataURL"){const f=s.createElement("img");f.onload=()=>{const c=l.getContext("2d");c&&c.drawImage(f,0,0,f.width,f.height)},f.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const f=l;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(f=>console.warn("media playback error",f));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case U.Text:return s.createTextNode(e.isStyle&&i?Pi(e.textContent,a):e.textContent);case U.CDATA:return s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(ga(n,e))return s.getNode(e.id)}let d=rl(e,{doc:r,hackCss:a,cache:l});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),s.add(d,e),(e.type===U.Document||e.type===U.Element)&&!i)for(const u of e.childNodes){const n=tt(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ls(d)&&d.shadowRoot)d.shadowRoot.appendChild(n);else if(e.type===U.Document&&u.type==U.Element){const f=n;let c=null;f.childNodes.forEach(h=>{h.nodeName==="BODY"&&(c=h)}),c?(f.removeChild(c),d.appendChild(n),f.appendChild(c)):d.appendChild(n)}else d.appendChild(n);o&&o(n,u.id)}return d}function sl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function il(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function nl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,d=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return sl(l,u=>{s&&s(u),il(u,l)}),d}var ol=Object.defineProperty,al=(e,t,r)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>al(e,typeof t!="symbol"?t+"":t,r),ll=Object.defineProperty,ul=(e,t,r)=>t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>ul(e,typeof t!="symbol"?t+"":t,r);let cl=class{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function hl(){return new cl}function fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Fi;function pl(){if(Fi)return mt.exports;Fi=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const ml={},gl=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"})),pe=dl(gl);var Cr,Ui;function Ss(){if(Ui)return Cr;Ui=1;let e=pl(),t=pe;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
|
|
42
|
+
https://www.w3ctech.com/topic/2226`));let O=v(...I);return O.postcssPlugin=C,O.postcssVersion=new c().version,O}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,O,F){return y([E(F)]).process(I,O)},E},y.stringify=g,y.parse=f,y.fromJSON=o,y.list=u,y.comment=b=>new t(b),y.atRule=b=>new e(b),y.decl=b=>new i(b),y.rule=b=>new p(b),y.root=b=>new m(b),y.document=b=>new a(b),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=c,y.Document=a,y.Comment=t,y.Warning=w,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=p,y.Root=m,y.Node=n,d.registerPostcss(y),br=y,y.default=y,br}var vr,Ai;function Xa(){if(Ai)return vr;Ai=1;let e=nt(),t=Qn(),r=Xn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return vr=s,vr}var Sr,Ti;function Qa(){if(Ti)return Sr;Ti=1;let{Input:e}=to(),t=Xa();return Sr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Sr}var Ka=Qa();const Za=jn(Ka);var el=to();const Y=jn(el);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;const _i={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function tl(e){let t=_i[e.tagName]?_i[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Pi(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Y([$a,Wa]).process(e,{parser:Za}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function ki(){return{stylesWithHoverClass:new Map}}function rl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case U.Document:return s.implementation.createDocument(null,"",null);case U.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case U.Element:{const o=tl(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),l=s.createElement(o));const d={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(o==="option"&&u==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),u.startsWith("rr_")){d[u]=n;continue}const f=o==="textarea"&&u==="value",c=o==="style"&&u==="_cssText";if(c&&i&&typeof n=="string"&&(n=Pi(n,a)),(f||c)&&typeof n=="string"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(h){}}for(const u in d){const n=d[u];if(o==="canvas"&&u==="rr_dataURL"){const f=s.createElement("img");f.onload=()=>{const c=l.getContext("2d");c&&c.drawImage(f,0,0,f.width,f.height)},f.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const f=l;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(f=>console.warn("media playback error",f));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case U.Text:return s.createTextNode(e.isStyle&&i?Pi(e.textContent,a):e.textContent);case U.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case U.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(ga(n,e))return s.getNode(e.id)}let d=rl(e,{doc:r,hackCss:a,cache:l});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===U.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==U.DocumentType&&(e.childNodes[0].type===U.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=r),s.add(d,e),(e.type===U.Document||e.type===U.Element)&&!i)for(const u of e.childNodes){const n=tt(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ls(d)&&d.shadowRoot)d.shadowRoot.appendChild(n);else if(e.type===U.Document&&u.type==U.Element){const f=n;let c=null;f.childNodes.forEach(h=>{h.nodeName==="BODY"&&(c=h)}),c?(f.removeChild(c),d.appendChild(n),f.appendChild(c)):d.appendChild(n)}else d.appendChild(n);o&&o(n,u.id)}return d}function sl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function il(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==U.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function nl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new us}=t,d=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return sl(l,u=>{s&&s(u),il(u,l)}),d}var ol=Object.defineProperty,al=(e,t,r)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>al(e,typeof t!="symbol"?t+"":t,r),ll=Object.defineProperty,ul=(e,t,r)=>t in e?ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>ul(e,typeof t!="symbol"?t+"":t,r);let cl=class{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function hl(){return new cl}function fl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},Fi;function pl(){if(Fi)return mt.exports;Fi=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const ml={},gl=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"})),pe=dl(gl);var Cr,Ui;function Ss(){if(Ui)return Cr;Ui=1;let e=pl(),t=pe;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,d=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);l=g=>h(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),c=String(f).length;return u.slice(n,f).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(h.length>160){let y=20,b=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),v=h.slice(b,C),S=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
|
|
43
43
|
`+S+l("^")}let w=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+d(h)+`
|
|
44
44
|
`+w+l("^")}return" "+o(g)+d(h)}).join(`
|
|
45
45
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|