@appsurify-testmap/rrdom-nodejs 3.6.0-alpha.1 → 3.11.0-alpha.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/dist/rrdom-nodejs.cjs +23 -0
- package/dist/rrdom-nodejs.cjs.map +1 -1
- package/dist/rrdom-nodejs.js +23 -0
- package/dist/rrdom-nodejs.js.map +1 -1
- package/dist/rrdom-nodejs.umd.cjs +23 -0
- package/dist/rrdom-nodejs.umd.cjs.map +2 -2
- package/dist/rrdom-nodejs.umd.min.cjs +12 -12
- package/dist/rrdom-nodejs.umd.min.cjs.map +3 -3
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrdomNodejs", [], f);} else if ("object" == typeof exports) {exports["rrdomNodejs"] = f();} else {g["rrdomNodejs"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var Sr=Object.defineProperty,vr=Object.defineProperties;var Or=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable;var Ke=(i,e,t)=>e in i?Sr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,S=(i,e)=>{for(var t in e||(e={}))et.call(e,t)&&Ke(i,t,e[t]);if(J)for(var t of J(e))tt.call(e,t)&&Ke(i,t,e[t]);return i},B=(i,e)=>vr(i,Or(e));var ye=(i,e)=>{var t={};for(var r in i)et.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&J)for(var r of J(i))e.indexOf(r)<0&&tt.call(i,r)&&(t[r]=i[r]);return t};var Ar=Object.defineProperty,Nr=(i,e,t)=>e in i?Ar(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>Nr(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Dr=Object.defineProperty,Tr=(i,e,t)=>e in i?Dr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,c=(i,e,t)=>Tr(i,typeof e!="symbol"?e+"":e,t);const Pr=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],$r=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Rt=new WeakSet,_r=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(_r.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();Pr.includes(r)&&Rt.add(this)}};const Mr=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Mr.call(this,i,e,t)};function rt(){document.querySelectorAll("*").forEach(e=>{$r.forEach(t=>{e.hasAttribute(t)&&Rt.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?rt():document.addEventListener("DOMContentLoaded",rt)}catch(i){}const Ir={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(Ir).map(([i,e])=>[e,i]));function Lr(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Br(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var ke={exports:{}},p=String,Ct=function(){return{isColorSupported:!1,reset:p,bold:p,dim:p,italic:p,underline:p,inverse:p,hidden:p,strikethrough:p,black:p,red:p,green:p,yellow:p,blue:p,magenta:p,cyan:p,white:p,gray:p,bgBlack:p,bgRed:p,bgGreen:p,bgYellow:p,bgBlue:p,bgMagenta:p,bgCyan:p,bgWhite:p,blackBright:p,redBright:p,greenBright:p,yellowBright:p,blueBright:p,magentaBright:p,cyanBright:p,whiteBright:p,bgBlackBright:p,bgRedBright:p,bgGreenBright:p,bgYellowBright:p,bgBlueBright:p,bgMagentaBright:p,bgCyanBright:p,bgWhiteBright:p}};ke.exports=Ct();ke.exports.createColors=Ct;var kr=ke.exports;const Ur={},Fr=Object.freeze(Object.defineProperty({__proto__:null,default:Ur},Symbol.toStringTag,{value:"Module"})),C=Br(Fr);let st=kr,it=C,Ce=class Et extends Error{constructor(e,t,r,s,n,l){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),l&&(this.plugin=l),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Et)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=st.isColorSupported);let r=u=>u,s=u=>u,n=u=>u;if(e){let{bold:u,gray:d,red:m}=st.createColors(!0);s=g=>u(m(g)),r=g=>d(g),it&&(n=g=>it(g))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),h=String(o).length;return l.slice(a,o).map((u,d)=>{let m=a+1+d,g=" "+(" "+m).slice(-h)+" | ";if(m===this.line){if(u.length>160){let N=20,f=Math.max(0,this.column-N),L=Math.max(this.column+N,this.endColumn+N),P=u.slice(f,L),me=r(g.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,N-1)).replace(/[^\t]/g," ");return s(">")+r(g)+n(P)+`
|
|
3
3
|
`+me+s("^")}let T=r(g.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(g)+n(u)+`
|
|
4
4
|
`+T+s("^")}return" "+r(g)+n(u)}).join(`
|
|
5
5
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
`,beforeComment:`
|
|
11
11
|
`,beforeDecl:`
|
|
12
12
|
`,beforeOpen:" ",beforeRule:`
|
|
13
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
14
|
-
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return nt[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]!="undefined")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+
|
|
13
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function zr(i){return i[0].toUpperCase()+i.slice(1)}let Ee=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
|
|
14
|
+
`)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<n;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],l=this.raw(n,"before");l&&this.builder(l),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return nt[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]!="undefined")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+zr(r);this[a]?s=this[a](l,e):l.walk(o=>{if(s=o.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=nt[r]),l.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
15
15
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
16
16
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
17
17
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
18
18
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
|
|
19
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var
|
|
20
|
-
`?(t=1,r+=1):t+=1}return s}let Oe=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[k]=!1,this[
|
|
21
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:v(t,this.source.start)},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:v(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(v(t,this.source.start),v(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),s=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:v(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line,offset:v(t,e.end)}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<r.line||s.line===r.line&&s.column<=r.column)&&(s={column:r.column+1,line:r.line,offset:r.offset+1}),{end:s,start:r}}raw(e,t){return new Wr().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return s&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Vr){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}};var he=Oe;Oe.default=Oe;let Gr=he,Ae=class extends Gr{constructor(e){super(e),this.type="comment"}};var ce=Ae;Ae.default=Ae;let qr=he,Ne=class extends qr{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=B(E({},e),{value:String(e.value)})),super(e),this.type="decl"}};var fe=Ne;Ne.default=Ne;let vt=ce,Ot=fe,Jr=he,{isClean:At,my:Nt}=H,Fe,Dt,Tt,ze;function Pt(i){return i.map(e=>(e.nodes&&(e.nodes=Pt(e.nodes)),delete e.source,e))}function $t(i){if(i[At]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)$t(e)}let O=class _t extends Jr{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(n,l)=>s(n.toProxy(),l):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of s)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Pt(Dt(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ot(e)]}else if(e.selector||e.selectors)e=[new ze(e)];else if(e.name)e=[new Fe(e)];else if(e.text)e=[new vt(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Nt]||_t.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[At]&&$t(s),s.raws||(s.raws={}),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}};O.registerParse=i=>{Dt=i};O.registerRule=i=>{ze=i};O.registerAtRule=i=>{Fe=i};O.registerRoot=i=>{Tt=i};var D=O;O.default=O;O.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Fe.prototype):i.type==="rule"?Object.setPrototypeOf(i,ze.prototype):i.type==="decl"?Object.setPrototypeOf(i,Ot.prototype):i.type==="comment"?Object.setPrototypeOf(i,vt.prototype):i.type==="root"&&Object.setPrototypeOf(i,Tt.prototype),i[Nt]=!0,i.nodes&&i.nodes.forEach(e=>{O.rebuild(e)})};let Mt=D,ne=class extends Mt{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var je=ne;ne.default=ne;Mt.registerAtRule(ne);let Yr=D,It,Lt,z=class extends Yr{constructor(e){super(E({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new It(new Lt,this,e).stringify()}};z.registerLazyResult=i=>{It=i};z.registerProcessor=i=>{Lt=i};var We=z;z.default=z;let Qr="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Xr=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Qr[Math.random()*64|0];return e};var Zr={nanoid:Xr};let{existsSync:Kr,readFileSync:es}=C,{dirname:we,join:ts}=C,{SourceMapConsumer:ot,SourceMapGenerator:lt}=C;function rs(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let De=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=we(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ot(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(s)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return rs(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=we(e),Kr(e))return this.mapFile=e,es(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof ot)return lt.fromSourceMap(t).toString();if(t instanceof lt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=ts(we(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Bt=De;De.default=De;let{nanoid:ss}=Zr,{isAbsolute:Te,resolve:Pe}=C,{SourceMapConsumer:is,SourceMapGenerator:ns}=C,{fileURLToPath:at,pathToFileURL:Y}=C,ut=Ue,os=Bt,be=C,Re=Symbol("lineToIndexCache"),ls=!!(is&&ns),ht=!!(Pe&&Te);function ct(i){if(i[Re])return i[Re];let e=i.css.split(`
|
|
22
|
-
`),t=new Array(e.length),r=0;for(let s=0,n=e.length;s<n;s++)t[s]=r,r+=e[s].length+1;return i[
|
|
23
|
-
`," "];return j.split(i,e)},split(i,e,t){let r=[],s="",n=!1,l=0,a=!1,o="",h=!1;for(let u of i)h?h=!1:u==="\\"?h=!0:a?u===o&&(a=!1):u==='"'||u==="'"?(a=!0,o=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&e.includes(u)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=u;return(t||s!=="")&&r.push(s.trim()),r}};var zt=j;j.default=j;let jt=D,
|
|
19
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var St=Ee;Ee.default=Ee;let jr=St;function Se(i,e){new jr(e).stringify(i)}var ue=Se;Se.default=Se;var H={};H.isClean=Symbol("isClean");H.my=Symbol("my");let Wr=Ue,Vr=St,Hr=ue,{isClean:k,my:Gr}=H;function ve(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(l=>ve(l,t)):(n==="object"&&s!==null&&(s=ve(s)),t[r]=s)}return t}function v(i,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,r=1,s=0;for(let n=0;n<i.length;n++){if(r===e.line&&t===e.column){s=n;break}i[n]===`
|
|
20
|
+
`?(t=1,r+=1):t+=1}return s}let Oe=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[k]=!1,this[Gr]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ve(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Wr(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[k]=!0}markDirty(){if(this[k]){this[k]=!1;let e=this;for(;e=e.parent;)e[k]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n=r.slice(v(r,this.source.start),v(r,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,r=this.source.start.line,s="document"in this.source.input?this.source.input.document:this.source.input.css,n=v(s,this.source.start),l=n+e;for(let a=n;a<l;a++)s[a]===`
|
|
21
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:v(t,this.source.start)},s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:v(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(v(t,this.source.start),v(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),s=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:v(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line,offset:v(t,e.end)}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<r.line||s.line===r.line&&s.column<=r.column)&&(s={column:r.column+1,line:r.line,offset:r.offset+1}),{end:s,start:r}}raw(e,t){return new Vr().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let n=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let a=this[l];if(Array.isArray(a))r[l]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)r[l]=a.toJSON(null,t);else if(l==="source"){if(a==null)continue;let o=t.get(a.input);o==null&&(o=n,t.set(a.input,n),n++),r[l]={end:a.end,inputId:o,start:a.start}}else r[l]=a}return s&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Hr){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}};var he=Oe;Oe.default=Oe;let qr=he,Ae=class extends qr{constructor(e){super(e),this.type="comment"}};var ce=Ae;Ae.default=Ae;let Jr=he,Ne=class extends Jr{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=B(S({},e),{value:String(e.value)})),super(e),this.type="decl"}};var fe=Ne;Ne.default=Ne;let vt=ce,Ot=fe,Yr=he,{isClean:At,my:Nt}=H,Fe,Dt,Tt,ze;function Pt(i){return i.map(e=>(e.nodes&&(e.nodes=Pt(e.nodes)),delete e.source,e))}function $t(i){if(i[At]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)$t(e)}let O=class _t extends Yr{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]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(n,l)=>s(n.toProxy(),l):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of s)this.proxyOf.nodes.splice(r+1,0,l);let n;for(let l in this.indexes)n=this.indexes[l],r<n&&(this.indexes[l]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of n)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Pt(Dt(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ot(e)]}else if(e.selector||e.selectors)e=[new ze(e)];else if(e.name)e=[new Fe(e)];else if(e.text)e=[new vt(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Nt]||_t.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[At]&&$t(s),s.raws||(s.raws={}),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}};O.registerParse=i=>{Dt=i};O.registerRule=i=>{ze=i};O.registerAtRule=i=>{Fe=i};O.registerRoot=i=>{Tt=i};var D=O;O.default=O;O.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Fe.prototype):i.type==="rule"?Object.setPrototypeOf(i,ze.prototype):i.type==="decl"?Object.setPrototypeOf(i,Ot.prototype):i.type==="comment"?Object.setPrototypeOf(i,vt.prototype):i.type==="root"&&Object.setPrototypeOf(i,Tt.prototype),i[Nt]=!0,i.nodes&&i.nodes.forEach(e=>{O.rebuild(e)})};let Mt=D,ne=class extends Mt{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var je=ne;ne.default=ne;Mt.registerAtRule(ne);let Qr=D,It,Lt,z=class extends Qr{constructor(e){super(S({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new It(new Lt,this,e).stringify()}};z.registerLazyResult=i=>{It=i};z.registerProcessor=i=>{Lt=i};var We=z;z.default=z;let Xr="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Zr=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Xr[Math.random()*64|0];return e};var Kr={nanoid:Zr};let{existsSync:es,readFileSync:ts}=C,{dirname:we,join:rs}=C,{SourceMapConsumer:ot,SourceMapGenerator:lt}=C;function ss(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let De=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=we(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ot(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,l=e.match(s)||e.match(n);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return ss(e.substr(a[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=we(e),es(e))return this.mapFile=e,ts(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof ot)return lt.fromSourceMap(t).toString();if(t instanceof lt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=rs(we(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Bt=De;De.default=De;let{nanoid:is}=Kr,{isAbsolute:Te,resolve:Pe}=C,{SourceMapConsumer:ns,SourceMapGenerator:os}=C,{fileURLToPath:at,pathToFileURL:Y}=C,ut=Ue,ls=Bt,be=C,xe=Symbol("lineToIndexCache"),as=!!(ns&&os),ht=!!(Pe&&Te);function ct(i){if(i[xe])return i[xe];let e=i.css.split(`
|
|
22
|
+
`),t=new Array(e.length),r=0;for(let s=0,n=e.length;s<n;s++)t[s]=r,r+=e[s].length+1;return i[xe]=t,t}let oe=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!ht||/^\w+:\/\//.test(t.from)||Te(t.from)?this.file=t.from:this.file=Pe(t.from)),ht&&as){let r=new ls(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+is(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,l,a,o,h;if(t&&typeof t=="object"){let d=t,m=r;if(typeof d.offset=="number"){o=d.offset;let g=this.fromOffset(o);t=g.line,r=g.col}else t=d.line,r=d.column,o=this.fromLineAndColumn(t,r);if(typeof m.offset=="number"){a=m.offset;let g=this.fromOffset(a);l=g.line,n=g.col}else l=m.line,n=m.column,a=this.fromLineAndColumn(m.line,m.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let d=this.fromOffset(o);t=d.line,r=d.col}let u=this.origin(t,r,l,n);return u?h=new ut(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):h=new ut(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:n,line:l},this.css,this.file,s.plugin),h.input={column:r,endColumn:n,endLine:l,endOffset:a,line:t,offset:o,source:this.css},this.file&&(Y&&(h.input.url=Y(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(e,t){return ct(this)[e-1]+t-1}fromOffset(e){let t=ct(this),r=t[t.length-1],s=0;if(e>=r)s=t.length-1;else{let n=t.length-2,l;for(;s<n;)if(l=s+(n-s>>1),e<t[l])n=l-1;else if(e>=t[l+1])s=l+1;else{s=l;break}}return{col:e-t[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Pe(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),l=n.originalPositionFor({column:t,line:e});if(!l.source)return!1;let a;typeof r=="number"&&(a=n.originalPositionFor({column:s,line:r}));let o;Te(l.source)?o=Y(l.source):o=new URL(l.source,this.map.consumer().sourceRoot||Y(this.map.mapFile));let h={column:l.column,endColumn:a&&a.column,endLine:a&&a.line,line:l.line,url:o.toString()};if(o.protocol==="file:")if(at)h.file=at(o);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(l.source);return u&&(h.source=u),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=S({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var pe=oe;oe.default=oe;be&&be.registerInput&&be.registerInput(oe);let kt=D,Ut,Ft,_=class extends kt{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of s)n.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ut(new Ft,this,e).stringify()}};_.registerLazyResult=i=>{Ut=i};_.registerProcessor=i=>{Ft=i};var G=_;_.default=_;kt.registerRoot(_);let j={comma(i){return j.split(i,[","],!0)},space(i){let e=[" ",`
|
|
23
|
+
`," "];return j.split(i,e)},split(i,e,t){let r=[],s="",n=!1,l=0,a=!1,o="",h=!1;for(let u of i)h?h=!1:u==="\\"?h=!0:a?u===o&&(a=!1):u==='"'||u==="'"?(a=!0,o=u):u==="("?l+=1:u===")"?l>0&&(l-=1):l===0&&e.includes(u)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=u;return(t||s!=="")&&r.push(s.trim()),r}};var zt=j;j.default=j;let jt=D,us=zt,le=class extends jt{get selectors(){return us.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ve=le;le.default=le;jt.registerRule(le);let hs=je,cs=ce,fs=fe,ps=pe,ms=Bt,ds=G,gs=Ve;function W(i,e){if(Array.isArray(i))return i.map(l=>W(l));let s=i,{inputs:t}=s,r=ye(s,["inputs"]);if(t){e=[];for(let l of t){let a=B(S({},l),{__proto__:ps.prototype});a.map&&(a.map=B(S({},a.map),{__proto__:ms.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(l=>W(l,e))),r.source){let n=r.source,{inputId:l}=n,a=ye(n,["inputId"]);r.source=a,l!=null&&(r.source.input=e[l])}if(r.type==="root")return new ds(r);if(r.type==="decl")return new fs(r);if(r.type==="rule")return new gs(r);if(r.type==="comment")return new cs(r);if(r.type==="atrule")return new hs(r);throw new Error("Unknown node type: "+i.type)}var ys=W;W.default=W;let{dirname:se,relative:Wt,resolve:Vt,sep:Ht}=C,{SourceMapConsumer:Gt,SourceMapGenerator:ie}=C,{pathToFileURL:ft}=C,ws=pe,bs=!!(Gt&&ie),xs=!!(se&&Vt&&Wt&&Ht),Rs=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
24
24
|
`;this.css.includes(`\r
|
|
25
25
|
`)&&(t=`\r
|
|
26
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||se(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Gt(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),bs&&
|
|
27
|
-
`),t=a.length-n):t+=a.length,o&&h!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(s.source=this.sourcePath(o),s.original.line=o.source.end.line,s.original.column=o.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?se(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=se(Vt(r,this.mapOpts.annotation)));let s=Wt(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new
|
|
28
|
-
`.charCodeAt(0),U=" ".charCodeAt(0),Z="\f".charCodeAt(0),K=" ".charCodeAt(0),ee="\r".charCodeAt(0),xs="[".charCodeAt(0),Cs="]".charCodeAt(0),Ss="(".charCodeAt(0),Es=")".charCodeAt(0),vs="{".charCodeAt(0),Os="}".charCodeAt(0),As=";".charCodeAt(0),Ns="*".charCodeAt(0),Ds=":".charCodeAt(0),Ts="@".charCodeAt(0),te=/[\t\n\f\r "#'()/;[\\\]{}]/g,re=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ps=/.[\r\n"'(/\\]/,dt=/[\da-f]/i;var $s=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,l,a,o,h,u,d,m,g,T,N=r.length,f=0,L=[],P=[];function me(){return f}function de($){throw e.error("Unclosed "+$,f)}function xr(){return P.length===0&&f>=N}function Cr($){if(P.length)return P.pop();if(f>=N)return;let ge=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case X:case U:case K:case ee:case Z:{o=f;do o+=1,n=r.charCodeAt(o);while(n===U||n===X||n===K||n===ee||n===Z);u=["space",r.slice(f,o)],f=o-1;break}case xs:case Cs:case vs:case Os:case Ds:case As:case Es:{let Ze=String.fromCharCode(n);u=[Ze,Ze,f];break}case Ss:{if(T=L.length?L.pop()[1]:"",g=r.charCodeAt(f+1),T==="url"&&g!==xe&&g!==pt&&g!==U&&g!==X&&g!==K&&g!==Z&&g!==ee){o=f;do{if(d=!1,o=r.indexOf(")",o+1),o===-1)if(s||ge){o=f;break}else de("bracket");for(m=o;r.charCodeAt(m-1)===Q;)m-=1,d=!d}while(d);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||Ps.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case xe:case pt:{h=n===xe?"'":'"',o=f;do{if(d=!1,o=r.indexOf(h,o+1),o===-1)if(s||ge){o=f+1;break}else de("string");for(m=o;r.charCodeAt(m-1)===Q;)m-=1,d=!d}while(d);u=["string",r.slice(f,o+1),f,o],f=o;break}case Ts:{te.lastIndex=f+1,te.test(r),te.lastIndex===0?o=r.length-1:o=te.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Q:{for(o=f,a=!0;r.charCodeAt(o+1)===Q;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==mt&&n!==U&&n!==X&&n!==K&&n!==ee&&n!==Z&&(o+=1,dt.test(r.charAt(o)))){for(;dt.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===U&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===mt&&r.charCodeAt(f+1)===Ns?(o=r.indexOf("*/",f+2)+1,o===0&&(s||ge?o=r.length:de("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(re.lastIndex=f+1,re.test(r),re.lastIndex===0?o=r.length-1:o=re.lastIndex-2,u=["word",r.slice(f,o+1),f,o],L.push(u),f=o);break}}return f++,u}function Sr($){P.push($)}return{back:Sr,endOfFile:xr,nextToken:Cr,position:me}};let _s=je,Ms=ce,Is=fe,Ls=G,gt=Ve,Bs=$s;const yt={empty:!0,space:!0};function ks(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let Us=class{constructor(e){this.input=e,this.root=new Ls,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 _s;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,l=!1,a=!1,o=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,s=o[n];s&&s[0]==="space";)s=o[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[l,a]of e.entries()){if(s=a,n=s[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(s);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=s}return!1}comment(e){let t=new Ms;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Bs(this.input)}decl(e,t){let r=new Is;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||ks(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(n=e[h],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,h);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),d="";for(let m=h;m>0;m--){let g=u[m][0];if(d.trim().startsWith("!")&&g!=="space")break;d=u.pop()[1]+d}d.trim().startsWith("!")&&(r.important=!0,r.raws.important=d,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(r.raws.between+=l.map(h=>h[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new gt;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],h=e;for(;h;){if(r=h[0],o.push(h),r==="("||r==="[")n||(n=h),l.push(r==="("?")":"]");else if(a&&s&&r==="{")n||(n=h),l.push("}");else if(l.length===0)if(r===";")if(s){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(s=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&s){if(!a)for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,l,a=r.length,o="",h=!0,u,d;for(let m=0;m<a;m+=1)n=r[m],l=n[0],l==="space"&&m===a-1&&!s?h=!1:l==="comment"?(d=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!yt[d]&&!yt[u]?o.slice(-1)===","?h=!1:o+=n[1]:h=!1):o+=n[1];if(!h){let m=r.reduce((g,T)=>g+T[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new gt;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{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})}};var Fs=Us;let zs=D,js=pe,Ws=Fs;function ae(i,e){let t=new js(i,e),r=new Ws(t);try{r.parse()}catch(s){throw s}return r.root}var He=ae;ae.default=ae;zs.registerParse(ae);let $e=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Jt=$e;$e.default=$e;let Vs=Jt,_e=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Vs(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ge=_e;_e.default=_e;let Hs=D,Gs=We,qs=qt,Js=He,wt=Ge,Ys=G,Qs=ue,{isClean:S,my:Xs}=H;const Zs={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ks={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},ei={Once:!0,postcssPlugin:!0,prepare:!0},M=0;function F(i){return typeof i=="object"&&typeof i.then=="function"}function Yt(i){let e=!1,t=Zs[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,M,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,M,t+"Exit"]:[t,t+"Exit"]}function bt(i){let e;return i.type==="document"?e=["Document",M,"DocumentExit"]:i.type==="root"?e=["Root",M,"RootExit"]:e=Yt(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Me(i){return i[S]=!1,i.nodes&&i.nodes.forEach(e=>Me(e)),i}let Ie={},I=class Qt{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Me(t);else if(t instanceof Qt||t instanceof wt)s=Me(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Js;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(l){this.processed=!0,this.error=l}s&&!s[Xs]&&Hs.rebuild(s)}this.result=new wt(e,s,r),this.helpers=B(E({},Ie),{postcss:Ie,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?E(E({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ks[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ei[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(F(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[S];){e[S]=!0;let t=[bt(e)];for(;t.length>0;){let r=this.visitTick(t);if(F(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return F(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Qs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new qs(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(F(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[S];)e[S]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(F(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[l,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[S]){a[S]=!0,e.push(bt(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===M){r.nodes&&r.nodes.length&&(r[S]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[S]=!0;let t=Yt(e);for(let r of t)if(r===M)e.nodes&&e.each(s=>{s[S]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}};I.registerPostcss=i=>{Ie=i};var Xt=I;I.default=I;Ys.registerLazyResult(I);Gs.registerLazyResult(I);let ti=qt,ri=He;const si=Ge;let ii=ue;let Le=class{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=ri;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=ii;this.result=new si(this._processor,s,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new ti(n,s,this._opts,t);if(a.isMap()){let[o,h]=a.generate();o&&(this.result.css=o),h&&(this.result.map=h)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var ni=Le;Le.default=Le;let oi=We,li=Xt,ai=ni,ui=G,V=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ai(this,e,t):new li(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var hi=V;V.default=V;ui.registerProcessor(V);oi.registerProcessor(V);let Zt=je,Kt=ce,ci=D,fi=Ue,er=fe,tr=We,pi=gs,mi=pe,di=Xt,gi=zt,yi=he,wi=He,qe=hi,bi=Ge,rr=G,sr=Ve,Ri=ue,xi=Jt;function y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new qe(i)}y.plugin=function(e,t){let r=!1;function s(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||se(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Gt(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),xs&&bs&&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=ie.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ie({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 ie({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,l;this.stringify(this.root,(a,o,h)=>{if(this.css+=a,o&&h!=="end"&&(s.generated.line=e,s.generated.column=t-1,o.source&&o.source.start?(s.source=this.sourcePath(o),s.original.line=o.source.start.line,s.original.column=o.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),l=a.match(/\n/g),l?(e+=l.length,n=a.lastIndexOf(`
|
|
27
|
+
`),t=a.length-n):t+=a.length,o&&h!=="start"){let u=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==u.last||u.raws.semicolon)&&(o.source&&o.source.end?(s.source=this.sourcePath(o),s.original.line=o.source.end.line,s.original.column=o.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?se(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=se(Vt(r,this.mapOpts.annotation)));let s=Wt(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ws(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ft){let r=ft(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ht==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var qt=Rs;const Re="'".charCodeAt(0),pt='"'.charCodeAt(0),Q="\\".charCodeAt(0),mt="/".charCodeAt(0),X=`
|
|
28
|
+
`.charCodeAt(0),U=" ".charCodeAt(0),Z="\f".charCodeAt(0),K=" ".charCodeAt(0),ee="\r".charCodeAt(0),Cs="[".charCodeAt(0),Es="]".charCodeAt(0),Ss="(".charCodeAt(0),vs=")".charCodeAt(0),Os="{".charCodeAt(0),As="}".charCodeAt(0),Ns=";".charCodeAt(0),Ds="*".charCodeAt(0),Ts=":".charCodeAt(0),Ps="@".charCodeAt(0),te=/[\t\n\f\r "#'()/;[\\\]{}]/g,re=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,$s=/.[\r\n"'(/\\]/,dt=/[\da-f]/i;var _s=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,l,a,o,h,u,d,m,g,T,N=r.length,f=0,L=[],P=[];function me(){return f}function de($){throw e.error("Unclosed "+$,f)}function Rr(){return P.length===0&&f>=N}function Cr($){if(P.length)return P.pop();if(f>=N)return;let ge=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case X:case U:case K:case ee:case Z:{o=f;do o+=1,n=r.charCodeAt(o);while(n===U||n===X||n===K||n===ee||n===Z);u=["space",r.slice(f,o)],f=o-1;break}case Cs:case Es:case Os:case As:case Ts:case Ns:case vs:{let Ze=String.fromCharCode(n);u=[Ze,Ze,f];break}case Ss:{if(T=L.length?L.pop()[1]:"",g=r.charCodeAt(f+1),T==="url"&&g!==Re&&g!==pt&&g!==U&&g!==X&&g!==K&&g!==Z&&g!==ee){o=f;do{if(d=!1,o=r.indexOf(")",o+1),o===-1)if(s||ge){o=f;break}else de("bracket");for(m=o;r.charCodeAt(m-1)===Q;)m-=1,d=!d}while(d);u=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),l=r.slice(f,o+1),o===-1||$s.test(l)?u=["(","(",f]:(u=["brackets",l,f,o],f=o);break}case Re:case pt:{h=n===Re?"'":'"',o=f;do{if(d=!1,o=r.indexOf(h,o+1),o===-1)if(s||ge){o=f+1;break}else de("string");for(m=o;r.charCodeAt(m-1)===Q;)m-=1,d=!d}while(d);u=["string",r.slice(f,o+1),f,o],f=o;break}case Ps:{te.lastIndex=f+1,te.test(r),te.lastIndex===0?o=r.length-1:o=te.lastIndex-2,u=["at-word",r.slice(f,o+1),f,o],f=o;break}case Q:{for(o=f,a=!0;r.charCodeAt(o+1)===Q;)o+=1,a=!a;if(n=r.charCodeAt(o+1),a&&n!==mt&&n!==U&&n!==X&&n!==K&&n!==ee&&n!==Z&&(o+=1,dt.test(r.charAt(o)))){for(;dt.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===U&&(o+=1)}u=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===mt&&r.charCodeAt(f+1)===Ds?(o=r.indexOf("*/",f+2)+1,o===0&&(s||ge?o=r.length:de("comment")),u=["comment",r.slice(f,o+1),f,o],f=o):(re.lastIndex=f+1,re.test(r),re.lastIndex===0?o=r.length-1:o=re.lastIndex-2,u=["word",r.slice(f,o+1),f,o],L.push(u),f=o);break}}return f++,u}function Er($){P.push($)}return{back:Er,endOfFile:Rr,nextToken:Cr,position:me}};let Ms=je,Is=ce,Ls=fe,Bs=G,gt=Ve,ks=_s;const yt={empty:!0,space:!0};function Us(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let Fs=class{constructor(e){this.input=e,this.root=new Bs,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 Ms;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,l=!1,a=!1,o=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,s=o[n];s&&s[0]==="space";)s=o[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[l,a]of e.entries()){if(s=a,n=s[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(s);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=s}return!1}comment(e){let t=new Is;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ks(this.input)}decl(e,t){let r=new Ls;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Us(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(n=e[h],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,h);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),d="";for(let m=h;m>0;m--){let g=u[m][0];if(d.trim().startsWith("!")&&g!=="space")break;d=u.pop()[1]+d}d.trim().startsWith("!")&&(r.important=!0,r.raws.important=d,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(r.raws.between+=l.map(h=>h[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new gt;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,l=[],a=e[1].startsWith("--"),o=[],h=e;for(;h;){if(r=h[0],o.push(h),r==="("||r==="[")n||(n=h),l.push(r==="("?")":"]");else if(a&&s&&r==="{")n||(n=h),l.push("}");else if(l.length===0)if(r===";")if(s){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(s=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(n),t&&s){if(!a)for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,l,a=r.length,o="",h=!0,u,d;for(let m=0;m<a;m+=1)n=r[m],l=n[0],l==="space"&&m===a-1&&!s?h=!1:l==="comment"?(d=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!yt[d]&&!yt[u]?o.slice(-1)===","?h=!1:o+=n[1]:h=!1):o+=n[1];if(!h){let m=r.reduce((g,T)=>g+T[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new gt;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{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})}};var zs=Fs;let js=D,Ws=pe,Vs=zs;function ae(i,e){let t=new Ws(i,e),r=new Vs(t);try{r.parse()}catch(s){throw s}return r.root}var He=ae;ae.default=ae;js.registerParse(ae);let $e=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Jt=$e;$e.default=$e;let Hs=Jt,_e=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Hs(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ge=_e;_e.default=_e;let Gs=D,qs=We,Js=qt,Ys=He,wt=Ge,Qs=G,Xs=ue,{isClean:E,my:Zs}=H;const Ks={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ei={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},ti={Once:!0,postcssPlugin:!0,prepare:!0},M=0;function F(i){return typeof i=="object"&&typeof i.then=="function"}function Yt(i){let e=!1,t=Ks[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,M,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,M,t+"Exit"]:[t,t+"Exit"]}function bt(i){let e;return i.type==="document"?e=["Document",M,"DocumentExit"]:i.type==="root"?e=["Root",M,"RootExit"]:e=Yt(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Me(i){return i[E]=!1,i.nodes&&i.nodes.forEach(e=>Me(e)),i}let Ie={},I=class Qt{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"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Me(t);else if(t instanceof Qt||t instanceof wt)s=Me(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ys;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(l){this.processed=!0,this.error=l}s&&!s[Zs]&&Gs.rebuild(s)}this.result=new wt(e,s,r),this.helpers=B(S({},Ie),{postcss:Ie,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?S(S({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!ei[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ti[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(F(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[E];){e[E]=!0;let t=[bt(e)];for(;t.length>0;){let r=this.visitTick(t);if(F(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return F(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Xs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Js(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(F(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[E];)e[E]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(F(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[l,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator,a;for(;a=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!a[E]){a[E]=!0,e.push(bt(a));return}t.iterator=0,delete r.indexes[l]}let n=t.events;for(;t.eventIndex<n.length;){let l=n[t.eventIndex];if(t.eventIndex+=1,l===M){r.nodes&&r.nodes.length&&(r[E]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[E]=!0;let t=Yt(e);for(let r of t)if(r===M)e.nodes&&e.each(s=>{s[E]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}};I.registerPostcss=i=>{Ie=i};var Xt=I;I.default=I;Qs.registerLazyResult(I);qs.registerLazyResult(I);let ri=qt,si=He;const ii=Ge;let ni=ue;let Le=class{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=si;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=ni;this.result=new ii(this._processor,s,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let a=new ri(n,s,this._opts,t);if(a.isMap()){let[o,h]=a.generate();o&&(this.result.css=o),h&&(this.result.map=h)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var oi=Le;Le.default=Le;let li=We,ai=Xt,ui=oi,hi=G,V=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ui(this,e,t):new ai(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ci=V;V.default=V;hi.registerProcessor(V);li.registerProcessor(V);let Zt=je,Kt=ce,fi=D,pi=Ue,er=fe,tr=We,mi=ys,di=pe,gi=Xt,yi=zt,wi=he,bi=He,qe=ci,xi=Ge,rr=G,sr=Ve,Ri=ue,Ci=Jt;function y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new qe(i)}y.plugin=function(e,t){let r=!1;function s(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
29
29
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
30
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new qe().version,a}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(l,a,o){return y([s(o)]).process(l,a)},s};y.stringify=Ri;y.parse=wi;y.fromJSON=pi;y.list=gi;y.comment=i=>new Kt(i);y.atRule=i=>new Zt(i);y.decl=i=>new er(i);y.rule=i=>new sr(i);y.root=i=>new rr(i);y.document=i=>new tr(i);y.CssSyntaxError=fi;y.Declaration=er;y.Container=ci;y.Processor=qe;y.Document=tr;y.Comment=Kt;y.Warning=xi;y.AtRule=Zt;y.Result=bi;y.Input=mi;y.Rule=sr;y.Root=rr;y.Node=yi;di.registerPostcss(y);var Ci=y;y.default=y;const w=Ir(Ci);w.stringify;w.fromJSON;w.plugin;w.parse;w.list;w.document;w.comment;w.atRule;w.rule;w.decl;w.root;w.CssSyntaxError;w.Declaration;w.Container;w.Processor;w.Document;w.Comment;w.Warning;w.AtRule;w.Result;w.Input;w.Rule;w.Root;w.Node;var R=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(R||{});function Si(i){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,s=/\/\*.*?\*\//g;return i.replace(s,"").split(t).forEach(function(n){if(n){const l=n.split(r);l.length>1&&(e[Be(l[0].trim())]=l[1].trim())}}),e}function Rt(i){const e=[];for(const t in i){const r=i[t];if(typeof r!="string")continue;const s=Ai(t);e.push(`${s}: ${r};`)}return e.join(" ")}const Ei=/-([a-z])/g,vi=/^--[a-zA-Z0-9-]+$/,Be=i=>vi.test(i)?i:i.replace(Ei,(e,t)=>t?t.toUpperCase():""),Oi=/\B([A-Z])/g,Ai=i=>i.replace(Oi,"-$1").toLowerCase();class A{constructor(...e){c(this,"parentElement",null),c(this,"parentNode",null),c(this,"ownerDocument"),c(this,"firstChild",null),c(this,"lastChild",null),c(this,"previousSibling",null),c(this,"nextSibling",null),c(this,"ELEMENT_NODE",1),c(this,"TEXT_NODE",3),c(this,"nodeType"),c(this,"nodeName"),c(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof A){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Je extends A{constructor(...e){super(e),c(this,"nodeType",9),c(this,"nodeName","#document"),c(this,"compatMode","CSS1Compat"),c(this,"RRNodeType",R.Document),c(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===R.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===R.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===R.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===R.Element||t===R.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Qe(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===R.Element||r===R.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===R.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=ur(this,e,t);return s.parentElement=null,s}removeChild(e){return hr(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new Je}createDocumentType(e,t,r){const s=new ir(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=new Ye(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new nr(e);return t.ownerDocument=this,t}createComment(e){const t=new or(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new lr(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ir extends A{constructor(e,t,r){super(),c(this,"nodeType",10),c(this,"RRNodeType",R.DocumentType),c(this,"name"),c(this,"publicId"),c(this,"systemId"),c(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Ye extends A{constructor(e){super(),c(this,"nodeType",1),c(this,"RRNodeType",R.Element),c(this,"tagName"),c(this,"attributes",{}),c(this,"shadowRoot",null),c(this,"scrollLeft"),c(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ar(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Si(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,s,n)=>{if(t.test(r))return;const l=Be(r);s?e[l]=s:delete e[l],n==="important"&&(e[l]+=" !important"),this.attributes.style=Rt(e)},e.removeProperty=r=>{if(t.test(r))return"";const s=Be(r),n=e[s]||"";return delete e[s],this.attributes.style=Rt(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Qe(this,e)}insertBefore(e,t){return ur(this,e,t)}removeChild(e){return hr(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Ni extends Ye{constructor(){super(...arguments),c(this,"currentTime"),c(this,"volume"),c(this,"paused"),c(this,"muted"),c(this,"playbackRate"),c(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class nr extends A{constructor(e){super(),c(this,"nodeType",3),c(this,"nodeName","#text"),c(this,"RRNodeType",R.Text),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class or extends A{constructor(e){super(),c(this,"nodeType",8),c(this,"nodeName","#comment"),c(this,"RRNodeType",R.Comment),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class lr extends A{constructor(e){super(),c(this,"nodeName","#cdata-section"),c(this,"nodeType",4),c(this,"RRNodeType",R.CDATA),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class ar{constructor(e,t){if(c(this,"onChange"),c(this,"classes",[]),c(this,"add",(...r)=>{for(const s of r){const n=String(s);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),c(this,"remove",(...r)=>{this.classes=this.classes.filter(s=>r.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Qe(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function ur(i,e,t){if(!t)return Qe(i,e);if(t.parentNode!==i)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function hr(i,e){if(e.parentNode!==i)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var Xe=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Xe||{});const Di=require("nwsapi"),Ti=require("cssom"),Pi=require("cssstyle");class cr{constructor(){b(this,"scrollLeft",0),b(this,"scrollTop",0)}scrollTo(e){e&&(typeof e.left=="number"&&(this.scrollLeft=e.left),typeof e.top=="number"&&(this.scrollTop=e.top))}}class q extends Je{constructor(){super(...arguments),b(this,"nodeName","#document"),b(this,"_nwsapi")}get nwsapi(){return this._nwsapi||(this._nwsapi=Di({document:this,DOMException:null}),this._nwsapi.configure({LOGERRORS:!1,IDS_DUPES:!0,MIXEDCASE:!0})),this._nwsapi}get documentElement(){return super.documentElement}get body(){return super.body}get head(){return super.head}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}querySelectorAll(e){return this.nwsapi.select(e)}getElementsByTagName(e){return this.documentElement?this.documentElement.getElementsByTagName(e):[]}getElementsByClassName(e){return this.documentElement?this.documentElement.getElementsByClassName(e):[]}getElementById(e){return this.documentElement?this.documentElement.getElementById(e):null}createDocument(e,t,r){return new q}createDocumentType(e,t,r){const s=new fr(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new mr(t);break;case"IFRAME":r=new yr(t);break;case"IMG":r=new pr(t);break;case"CANVAS":r=new dr(t);break;case"STYLE":r=new gr(t);break;default:r=new x(t);break}return r.ownerDocument=this,r}createElementNS(e,t){return this.createElement(t)}createComment(e){const t=new br(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Rr(e);return t.ownerDocument=this,t}createTextNode(e){const t=new wr(e);return t.ownerDocument=this,t}}class fr extends ir{}class x extends Ye{constructor(e){super(e),b(this,"_style"),this._style=new Pi.CSSStyleDeclaration;const t=this._style;Object.defineProperty(this.attributes,"style",{get(){return t.cssText},set(r){t.cssText=r}})}get style(){return this._style}attachShadow(e){return super.attachShadow(e)}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}getAttribute(e){const t=e&&e.toLowerCase();return t in this.attributes?this.attributes[t]:null}setAttribute(e,t){this.attributes[e.toLowerCase()]=t}removeAttribute(e){delete this.attributes[e.toLowerCase()]}get firstElementChild(){for(const e of this.childNodes)if(e.RRNodeType===Xe.Element)return e;return null}get nextElementSibling(){const e=this.parentNode;if(!e)return null;const t=e.childNodes,r=t.indexOf(this);for(let s=r+1;s<t.length;s++)if(t[s]instanceof x)return t[s];return null}querySelectorAll(e){const t=[];return this.ownerDocument!==null&&this.ownerDocument.nwsapi.select(e,this,r=>{r!==this&&t.push(r)}),t}getElementById(e){if(this.id===e)return this;for(const t of this.childNodes)if(t instanceof x){const r=t.getElementById(e);if(r!==null)return r}return null}getElementsByClassName(e){let t=[];const r=new ar(e);this instanceof x&&r.classes.filter(s=>this.classList.classes.some(n=>n===s)).length==r.classes.length&&t.push(this);for(const s of this.childNodes)s instanceof x&&(t=t.concat(s.getElementsByClassName(e)));return t}getElementsByTagName(e){let t=[];const r=e.toUpperCase();this instanceof x&&this.tagName===r&&t.push(this);for(const s of this.childNodes)s instanceof x&&(t=t.concat(s.getElementsByTagName(e)));return t}}class pr extends x{constructor(){super(...arguments),b(this,"src",""),b(this,"width",0),b(this,"height",0),b(this,"onload",null)}}class mr extends Ni{}class dr extends x{getContext(){return null}}class gr extends x{constructor(){super(...arguments),b(this,"_sheet",null)}get sheet(){if(!this._sheet){let e="";for(const t of this.childNodes)t.RRNodeType===Xe.Text&&(e+=t.textContent);this._sheet=Ti.parse(e)}return this._sheet}}class yr extends x{constructor(e){super(e),b(this,"width",""),b(this,"height",""),b(this,"src",""),b(this,"contentDocument",new q),b(this,"contentWindow",new cr);const t=this.contentDocument.createElement("HTML");this.contentDocument.appendChild(t),t.appendChild(this.contentDocument.createElement("HEAD")),t.appendChild(this.contentDocument.createElement("BODY"))}}class wr extends nr{constructor(){super(...arguments),b(this,"nodeName","#text")}}class br extends or{constructor(){super(...arguments),b(this,"nodeName","#comment")}}class Rr extends lr{constructor(){super(...arguments),b(this,"nodeName","#cdata-section")}}function $i(){if(typeof window!="undefined"||"performance"in global)return;const i=require("perf_hooks").performance;global.performance=i}function _i(){if(typeof window!="undefined"||"requestAnimationFrame"in global)return;const i=60,e=1e3/i;let t=null,r=0,s=Object.create(null);function n(){const o=s;s=Object.create(null),t=null,Object.keys(o).forEach(function(h){const u=o[h];u&&u(Date.now())})}function l(o){const h=++r;return s[h]=o,t===null&&(t=setTimeout(n,e)),h}function a(o){delete s[o],Object.keys(s).length===0&&t!==null&&(clearTimeout(t),t=null)}global.requestAnimationFrame=l,global.cancelAnimationFrame=a}function Mi(){typeof Event=="undefined"&&(global.Event=function(){})}function Ii(){typeof Node=="undefined"&&(global.Node=A)}function Li(){if(typeof document!="undefined")return;const i=new q;(()=>{var e,t;i.appendChild(i.createElement("html")),(e=i.documentElement)==null||e.appendChild(i.createElement("head")),(t=i.documentElement)==null||t.appendChild(i.createElement("body"))})(),global.document=i}$i();_i();Mi();Ii();Li();exports.RRCDATASection=Rr;exports.RRCanvasElement=dr;exports.RRComment=br;exports.RRDocument=q;exports.RRDocumentType=fr;exports.RRElement=x;exports.RRIFrameElement=yr;exports.RRImageElement=pr;exports.RRMediaElement=mr;exports.RRStyleElement=gr;exports.RRText=wr;exports.RRWindow=cr;
|
|
30
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new qe().version,a}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(l,a,o){return y([s(o)]).process(l,a)},s};y.stringify=Ri;y.parse=bi;y.fromJSON=mi;y.list=yi;y.comment=i=>new Kt(i);y.atRule=i=>new Zt(i);y.decl=i=>new er(i);y.rule=i=>new sr(i);y.root=i=>new rr(i);y.document=i=>new tr(i);y.CssSyntaxError=pi;y.Declaration=er;y.Container=fi;y.Processor=qe;y.Document=tr;y.Comment=Kt;y.Warning=Ci;y.AtRule=Zt;y.Result=xi;y.Input=di;y.Rule=sr;y.Root=rr;y.Node=wi;gi.registerPostcss(y);var Ei=y;y.default=y;const w=Lr(Ei);w.stringify;w.fromJSON;w.plugin;w.parse;w.list;w.document;w.comment;w.atRule;w.rule;w.decl;w.root;w.CssSyntaxError;w.Declaration;w.Container;w.Processor;w.Document;w.Comment;w.Warning;w.AtRule;w.Result;w.Input;w.Rule;w.Root;w.Node;var x=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(x||{});function Si(i){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,s=/\/\*.*?\*\//g;return i.replace(s,"").split(t).forEach(function(n){if(n){const l=n.split(r);l.length>1&&(e[Be(l[0].trim())]=l[1].trim())}}),e}function xt(i){const e=[];for(const t in i){const r=i[t];if(typeof r!="string")continue;const s=Ni(t);e.push(`${s}: ${r};`)}return e.join(" ")}const vi=/-([a-z])/g,Oi=/^--[a-zA-Z0-9-]+$/,Be=i=>Oi.test(i)?i:i.replace(vi,(e,t)=>t?t.toUpperCase():""),Ai=/\B([A-Z])/g,Ni=i=>i.replace(Ai,"-$1").toLowerCase();class A{constructor(...e){c(this,"parentElement",null),c(this,"parentNode",null),c(this,"ownerDocument"),c(this,"firstChild",null),c(this,"lastChild",null),c(this,"previousSibling",null),c(this,"nextSibling",null),c(this,"ELEMENT_NODE",1),c(this,"TEXT_NODE",3),c(this,"nodeType"),c(this,"nodeName"),c(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof A){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Je extends A{constructor(...e){super(e),c(this,"nodeType",9),c(this,"nodeName","#document"),c(this,"compatMode","CSS1Compat"),c(this,"RRNodeType",x.Document),c(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===x.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===x.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===x.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===x.Element||t===x.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Qe(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===x.Element||r===x.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=ur(this,e,t);return s.parentElement=null,s}removeChild(e){return hr(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new Je}createDocumentType(e,t,r){const s=new ir(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=new Ye(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new nr(e);return t.ownerDocument=this,t}createComment(e){const t=new or(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new lr(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ir extends A{constructor(e,t,r){super(),c(this,"nodeType",10),c(this,"RRNodeType",x.DocumentType),c(this,"name"),c(this,"publicId"),c(this,"systemId"),c(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Ye extends A{constructor(e){super(),c(this,"nodeType",1),c(this,"RRNodeType",x.Element),c(this,"tagName"),c(this,"attributes",{}),c(this,"shadowRoot",null),c(this,"scrollLeft"),c(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ar(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Si(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,s,n)=>{if(t.test(r))return;const l=Be(r);s?e[l]=s:delete e[l],n==="important"&&(e[l]+=" !important"),this.attributes.style=xt(e)},e.removeProperty=r=>{if(t.test(r))return"";const s=Be(r),n=e[s]||"";return delete e[s],this.attributes.style=xt(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Qe(this,e)}insertBefore(e,t){return ur(this,e,t)}removeChild(e){return hr(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class Di extends Ye{constructor(){super(...arguments),c(this,"currentTime"),c(this,"volume"),c(this,"paused"),c(this,"muted"),c(this,"playbackRate"),c(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class nr extends A{constructor(e){super(),c(this,"nodeType",3),c(this,"nodeName","#text"),c(this,"RRNodeType",x.Text),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class or extends A{constructor(e){super(),c(this,"nodeType",8),c(this,"nodeName","#comment"),c(this,"RRNodeType",x.Comment),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class lr extends A{constructor(e){super(),c(this,"nodeName","#cdata-section"),c(this,"nodeType",4),c(this,"RRNodeType",x.CDATA),c(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class ar{constructor(e,t){if(c(this,"onChange"),c(this,"classes",[]),c(this,"add",(...r)=>{for(const s of r){const n=String(s);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),c(this,"remove",(...r)=>{this.classes=this.classes.filter(s=>r.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function Qe(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function ur(i,e,t){if(!t)return Qe(i,e);if(t.parentNode!==i)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function hr(i,e){if(e.parentNode!==i)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var Xe=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Xe||{});const Ti=require("nwsapi"),Pi=require("cssom"),$i=require("cssstyle");class cr{constructor(){b(this,"scrollLeft",0),b(this,"scrollTop",0)}scrollTo(e){e&&(typeof e.left=="number"&&(this.scrollLeft=e.left),typeof e.top=="number"&&(this.scrollTop=e.top))}}class q extends Je{constructor(){super(...arguments),b(this,"nodeName","#document"),b(this,"_nwsapi")}get nwsapi(){return this._nwsapi||(this._nwsapi=Ti({document:this,DOMException:null}),this._nwsapi.configure({LOGERRORS:!1,IDS_DUPES:!0,MIXEDCASE:!0})),this._nwsapi}get documentElement(){return super.documentElement}get body(){return super.body}get head(){return super.head}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}querySelectorAll(e){return this.nwsapi.select(e)}getElementsByTagName(e){return this.documentElement?this.documentElement.getElementsByTagName(e):[]}getElementsByClassName(e){return this.documentElement?this.documentElement.getElementsByClassName(e):[]}getElementById(e){return this.documentElement?this.documentElement.getElementById(e):null}createDocument(e,t,r){return new q}createDocumentType(e,t,r){const s=new fr(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new mr(t);break;case"IFRAME":r=new yr(t);break;case"IMG":r=new pr(t);break;case"CANVAS":r=new dr(t);break;case"STYLE":r=new gr(t);break;default:r=new R(t);break}return r.ownerDocument=this,r}createElementNS(e,t){return this.createElement(t)}createComment(e){const t=new br(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new xr(e);return t.ownerDocument=this,t}createTextNode(e){const t=new wr(e);return t.ownerDocument=this,t}}class fr extends ir{}class R extends Ye{constructor(e){super(e),b(this,"_style"),this._style=new $i.CSSStyleDeclaration;const t=this._style;Object.defineProperty(this.attributes,"style",{get(){return t.cssText},set(r){t.cssText=r}})}get style(){return this._style}attachShadow(e){return super.attachShadow(e)}appendChild(e){return super.appendChild(e)}insertBefore(e,t){return super.insertBefore(e,t)}getAttribute(e){const t=e&&e.toLowerCase();return t in this.attributes?this.attributes[t]:null}setAttribute(e,t){this.attributes[e.toLowerCase()]=t}removeAttribute(e){delete this.attributes[e.toLowerCase()]}get firstElementChild(){for(const e of this.childNodes)if(e.RRNodeType===Xe.Element)return e;return null}get nextElementSibling(){const e=this.parentNode;if(!e)return null;const t=e.childNodes,r=t.indexOf(this);for(let s=r+1;s<t.length;s++)if(t[s]instanceof R)return t[s];return null}querySelectorAll(e){const t=[];return this.ownerDocument!==null&&this.ownerDocument.nwsapi.select(e,this,r=>{r!==this&&t.push(r)}),t}getElementById(e){if(this.id===e)return this;for(const t of this.childNodes)if(t instanceof R){const r=t.getElementById(e);if(r!==null)return r}return null}getElementsByClassName(e){let t=[];const r=new ar(e);this instanceof R&&r.classes.filter(s=>this.classList.classes.some(n=>n===s)).length==r.classes.length&&t.push(this);for(const s of this.childNodes)s instanceof R&&(t=t.concat(s.getElementsByClassName(e)));return t}getElementsByTagName(e){let t=[];const r=e.toUpperCase();this instanceof R&&this.tagName===r&&t.push(this);for(const s of this.childNodes)s instanceof R&&(t=t.concat(s.getElementsByTagName(e)));return t}}class pr extends R{constructor(){super(...arguments),b(this,"src",""),b(this,"width",0),b(this,"height",0),b(this,"onload",null)}}class mr extends Di{}class dr extends R{getContext(){return null}}class gr extends R{constructor(){super(...arguments),b(this,"_sheet",null)}get sheet(){if(!this._sheet){let e="";for(const t of this.childNodes)t.RRNodeType===Xe.Text&&(e+=t.textContent);this._sheet=Pi.parse(e)}return this._sheet}}class yr extends R{constructor(e){super(e),b(this,"width",""),b(this,"height",""),b(this,"src",""),b(this,"contentDocument",new q),b(this,"contentWindow",new cr);const t=this.contentDocument.createElement("HTML");this.contentDocument.appendChild(t),t.appendChild(this.contentDocument.createElement("HEAD")),t.appendChild(this.contentDocument.createElement("BODY"))}}class wr extends nr{constructor(){super(...arguments),b(this,"nodeName","#text")}}class br extends or{constructor(){super(...arguments),b(this,"nodeName","#comment")}}class xr extends lr{constructor(){super(...arguments),b(this,"nodeName","#cdata-section")}}function _i(){if(typeof window!="undefined"||"performance"in global)return;const i=require("perf_hooks").performance;global.performance=i}function Mi(){if(typeof window!="undefined"||"requestAnimationFrame"in global)return;const i=60,e=1e3/i;let t=null,r=0,s=Object.create(null);function n(){const o=s;s=Object.create(null),t=null,Object.keys(o).forEach(function(h){const u=o[h];u&&u(Date.now())})}function l(o){const h=++r;return s[h]=o,t===null&&(t=setTimeout(n,e)),h}function a(o){delete s[o],Object.keys(s).length===0&&t!==null&&(clearTimeout(t),t=null)}global.requestAnimationFrame=l,global.cancelAnimationFrame=a}function Ii(){typeof Event=="undefined"&&(global.Event=function(){})}function Li(){typeof Node=="undefined"&&(global.Node=A)}function Bi(){if(typeof document!="undefined")return;const i=new q;(()=>{var e,t;i.appendChild(i.createElement("html")),(e=i.documentElement)==null||e.appendChild(i.createElement("head")),(t=i.documentElement)==null||t.appendChild(i.createElement("body"))})(),global.document=i}_i();Mi();Ii();Li();Bi();exports.RRCDATASection=xr;exports.RRCanvasElement=dr;exports.RRComment=br;exports.RRDocument=q;exports.RRDocumentType=fr;exports.RRElement=R;exports.RRIFrameElement=yr;exports.RRImageElement=pr;exports.RRMediaElement=mr;exports.RRStyleElement=gr;exports.RRText=wr;exports.RRWindow=cr;
|
|
31
31
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
32
32
|
var __cp = (to, from, except, desc) => {
|
|
33
33
|
if ((from && typeof from === "object") || typeof from === "function") {
|