capybara-simulated 0.0.7 → 0.1.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +303 -158
  3. data/lib/capybara/simulated/asset_cache.rb +232 -0
  4. data/lib/capybara/simulated/browser.rb +3409 -845
  5. data/lib/capybara/simulated/driver.rb +341 -134
  6. data/lib/capybara/simulated/errors.rb +9 -5
  7. data/lib/capybara/simulated/js/bridge.bundle.js +19738 -0
  8. data/lib/capybara/simulated/js/snapshot_stubs.js +110 -0
  9. data/lib/capybara/simulated/node.rb +151 -163
  10. data/lib/capybara/simulated/quickjs_runtime.rb +424 -0
  11. data/lib/capybara/simulated/runtime_shared.rb +183 -0
  12. data/lib/capybara/simulated/script_cache.rb +168 -0
  13. data/lib/capybara/simulated/sourcemap.rb +119 -0
  14. data/lib/capybara/simulated/stack_resolver.rb +97 -0
  15. data/lib/capybara/simulated/trace.rb +111 -0
  16. data/lib/capybara/simulated/v8_runtime.rb +987 -0
  17. data/lib/capybara/simulated/version.rb +3 -1
  18. data/lib/capybara/simulated/webauthn_state.rb +367 -0
  19. data/lib/capybara/simulated/whitespace_normalizer.rb +45 -0
  20. data/lib/capybara/simulated/worker_runtime.rb +30 -0
  21. data/lib/capybara/simulated.rb +31 -4
  22. data/lib/capybara-simulated.rb +2 -0
  23. data/vendor/js/vendor.bundle.js +13 -0
  24. metadata +24 -32
  25. data/vendor/esbuild-wasm/LICENSE.md +0 -21
  26. data/vendor/esbuild-wasm/bin/esbuild +0 -91
  27. data/vendor/esbuild-wasm/esbuild.wasm +0 -0
  28. data/vendor/esbuild-wasm/lib/main.js +0 -2337
  29. data/vendor/esbuild-wasm/wasm_exec.js +0 -575
  30. data/vendor/esbuild-wasm/wasm_exec_node.js +0 -40
  31. data/vendor/js/bundle-modules.mjs +0 -168
  32. data/vendor/js/csim.bundle.js +0 -91560
  33. data/vendor/js/entry.mjs +0 -23
  34. data/vendor/js/prelude.js +0 -190
  35. data/vendor/js/runtime.js +0 -2208
@@ -0,0 +1,13 @@
1
+ var __csimVendor=(()=>{var th=Object.create;var me=Object.defineProperty;var eh=Object.getOwnPropertyDescriptor;var rh=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,ih=Object.prototype.hasOwnProperty;var i=(t,e)=>me(t,"name",{value:e,configurable:!0});var dt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},y=(t,e)=>{for(var r in e)me(t,r,{get:e[r],enumerable:!0})},na=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of rh(e))!ih.call(t,s)&&s!==r&&me(t,s,{get:()=>e[s],enumerable:!(n=eh(e,s))||n.enumerable});return t};var ia=(t,e,r)=>(r=t!=null?th(nh(t)):{},na(e||!t||!t.__esModule?me(r,"default",{value:t,enumerable:!0}):r,t)),sh=t=>na(me({},"__esModule",{value:!0}),t);var Gl=dt(Ro=>{var Wl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ro.encode=function(t){if(0<=t&&t<Wl.length)return Wl[t];throw new TypeError("Must be between 0 and 63: "+t)};Ro.decode=function(t){var e=65,r=90,n=97,s=122,o=48,a=57,l=43,c=47,u=26,h=52;return e<=t&&t<=r?t-e:n<=t&&t<=s?t-n+u:o<=t&&t<=a?t-o+h:t==l?62:t==c?63:-1}});var Xl=dt(Mo=>{var Yl=Gl(),Fo=5,jl=1<<Fo,zl=jl-1,Ql=jl;function Mg(t){return t<0?(-t<<1)+1:(t<<1)+0}i(Mg,"toVLQSigned");function _g(t){var e=(t&1)===1,r=t>>1;return e?-r:r}i(_g,"fromVLQSigned");Mo.encode=i(function(e){var r="",n,s=Mg(e);do n=s&zl,s>>>=Fo,s>0&&(n|=Ql),r+=Yl.encode(n);while(s>0);return r},"base64VLQ_encode");Mo.decode=i(function(e,r,n){var s=e.length,o=0,a=0,l,c;do{if(r>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Yl.decode(e.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));l=!!(c&Ql),c&=zl,o=o+(c<<a),a+=Fo}while(l);n.value=_g(o),n.rest=r},"base64VLQ_decode")});var Or=dt(J=>{function Ug(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}i(Ug,"getArg");J.getArg=Ug;var Kl=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Bg=/^data:.+\,.+$/;function Oe(t){var e=t.match(Kl);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}i(Oe,"urlParse");J.urlParse=Oe;function de(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}i(de,"urlGenerate");J.urlGenerate=de;var Vg=32;function $g(t){var e=[];return function(r){for(var n=0;n<e.length;n++)if(e[n].input===r){var s=e[0];return e[0]=e[n],e[n]=s,e[0].result}var o=t(r);return e.unshift({input:r,result:o}),e.length>Vg&&e.pop(),o}}i($g,"lruMemoize");var _o=$g(i(function(e){var r=e,n=Oe(e);if(n){if(!n.path)return e;r=n.path}for(var s=J.isAbsolute(r),o=[],a=0,l=0;;)if(a=l,l=r.indexOf("/",a),l===-1){o.push(r.slice(a));break}else for(o.push(r.slice(a,l));l<r.length&&r[l]==="/";)l++;for(var c,u=0,l=o.length-1;l>=0;l--)c=o[l],c==="."?o.splice(l,1):c===".."?u++:u>0&&(c===""?(o.splice(l+1,u),u=0):(o.splice(l,2),u--));return r=o.join("/"),r===""&&(r=s?"/":"."),n?(n.path=r,de(n)):r},"normalize"));J.normalize=_o;function Jl(t,e){t===""&&(t="."),e===""&&(e=".");var r=Oe(e),n=Oe(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),de(r);if(r||e.match(Bg))return e;if(n&&!n.host&&!n.path)return n.host=e,de(n);var s=e.charAt(0)==="/"?e:_o(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=s,de(n)):s}i(Jl,"join");J.join=Jl;J.isAbsolute=function(t){return t.charAt(0)==="/"||Kl.test(t)};function qg(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}i(qg,"relative");J.relative=qg;var Zl=(function(){var t=Object.create(null);return!("__proto__"in t)})();function tc(t){return t}i(tc,"identity");function Hg(t){return ec(t)?"$"+t:t}i(Hg,"toSetString");J.toSetString=Zl?tc:Hg;function Wg(t){return ec(t)?t.slice(1):t}i(Wg,"fromSetString");J.fromSetString=Zl?tc:Wg;function ec(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}i(ec,"isProtoString");function Gg(t,e,r){var n=Ot(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Ot(t.name,e.name)}i(Gg,"compareByOriginalPositions");J.compareByOriginalPositions=Gg;function Yg(t,e,r){var n;return n=t.originalLine-e.originalLine,n!==0||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:Ot(t.name,e.name)}i(Yg,"compareByOriginalPositionsNoSource");J.compareByOriginalPositionsNoSource=Yg;function jg(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=Ot(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ot(t.name,e.name)}i(jg,"compareByGeneratedPositionsDeflated");J.compareByGeneratedPositionsDeflated=jg;function zg(t,e,r){var n=t.generatedColumn-e.generatedColumn;return n!==0||r||(n=Ot(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:Ot(t.name,e.name)}i(zg,"compareByGeneratedPositionsDeflatedNoLine");J.compareByGeneratedPositionsDeflatedNoLine=zg;function Ot(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}i(Ot,"strcmp");function Qg(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Ot(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Ot(t.name,e.name)}i(Qg,"compareByGeneratedPositionsInflated");J.compareByGeneratedPositionsInflated=Qg;function Xg(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}i(Xg,"parseSourceMapInput");J.parseSourceMapInput=Xg;function Kg(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Oe(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var s=n.path.lastIndexOf("/");s>=0&&(n.path=n.path.substring(0,s+1))}e=Jl(de(n),e)}return _o(e)}i(Kg,"computeSourceURL");J.computeSourceURL=Kg});var nc=dt(rc=>{var Uo=Or(),Bo=Object.prototype.hasOwnProperty,Xt=typeof Map<"u";function Rt(){this._array=[],this._set=Xt?new Map:Object.create(null)}i(Rt,"ArraySet");Rt.fromArray=i(function(e,r){for(var n=new Rt,s=0,o=e.length;s<o;s++)n.add(e[s],r);return n},"ArraySet_fromArray");Rt.prototype.size=i(function(){return Xt?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");Rt.prototype.add=i(function(e,r){var n=Xt?e:Uo.toSetString(e),s=Xt?this.has(e):Bo.call(this._set,n),o=this._array.length;(!s||r)&&this._array.push(e),s||(Xt?this._set.set(e,o):this._set[n]=o)},"ArraySet_add");Rt.prototype.has=i(function(e){if(Xt)return this._set.has(e);var r=Uo.toSetString(e);return Bo.call(this._set,r)},"ArraySet_has");Rt.prototype.indexOf=i(function(e){if(Xt){var r=this._set.get(e);if(r>=0)return r}else{var n=Uo.toSetString(e);if(Bo.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},"ArraySet_indexOf");Rt.prototype.at=i(function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},"ArraySet_at");Rt.prototype.toArray=i(function(){return this._array.slice()},"ArraySet_toArray");rc.ArraySet=Rt});var oc=dt(sc=>{var ic=Or();function Jg(t,e){var r=t.generatedLine,n=e.generatedLine,s=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=s||ic.compareByGeneratedPositionsInflated(t,e)<=0}i(Jg,"generatedPositionAfter");function Rr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i(Rr,"MappingList");Rr.prototype.unsortedForEach=i(function(e,r){this._array.forEach(e,r)},"MappingList_forEach");Rr.prototype.add=i(function(e){Jg(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},"MappingList_add");Rr.prototype.toArray=i(function(){return this._sorted||(this._array.sort(ic.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");sc.MappingList=Rr});var uc=dt(ac=>{var Re=Xl(),H=Or(),Fr=nc().ArraySet,Zg=oc().MappingList;function St(t){t||(t={}),this._file=H.getArg(t,"file",null),this._sourceRoot=H.getArg(t,"sourceRoot",null),this._skipValidation=H.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=H.getArg(t,"ignoreInvalidMapping",!1),this._sources=new Fr,this._names=new Fr,this._mappings=new Zg,this._sourcesContents=null}i(St,"SourceMapGenerator");St.prototype._version=3;St.fromSourceMap=i(function(e,r){var n=e.sourceRoot,s=new St(Object.assign(r||{},{file:e.file,sourceRoot:n}));return e.eachMapping(function(o){var a={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(a.source=o.source,n!=null&&(a.source=H.relative(n,a.source)),a.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(a.name=o.name)),s.addMapping(a)}),e.sources.forEach(function(o){var a=o;n!==null&&(a=H.relative(n,o)),s._sources.has(a)||s._sources.add(a);var l=e.sourceContentFor(o);l!=null&&s.setSourceContent(o,l)}),s},"SourceMapGenerator_fromSourceMap");St.prototype.addMapping=i(function(e){var r=H.getArg(e,"generated"),n=H.getArg(e,"original",null),s=H.getArg(e,"source",null),o=H.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,n,s,o)===!1||(s!=null&&(s=String(s),this._sources.has(s)||this._sources.add(s)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:s,name:o}))},"SourceMapGenerator_addMapping");St.prototype.setSourceContent=i(function(e,r){var n=e;this._sourceRoot!=null&&(n=H.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[H.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[H.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");St.prototype.applySourceMap=i(function(e,r,n){var s=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);s=e.file}var o=this._sourceRoot;o!=null&&(s=H.relative(o,s));var a=new Fr,l=new Fr;this._mappings.unsortedForEach(function(c){if(c.source===s&&c.originalLine!=null){var u=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=H.join(n,c.source)),o!=null&&(c.source=H.relative(o,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var h=c.source;h!=null&&!a.has(h)&&a.add(h);var f=c.name;f!=null&&!l.has(f)&&l.add(f)},this),this._sources=a,this._names=l,e.sources.forEach(function(c){var u=e.sourceContentFor(c);u!=null&&(n!=null&&(c=H.join(n,c)),o!=null&&(c=H.relative(o,c)),this.setSourceContent(c,u))},this)},"SourceMapGenerator_applySourceMap");St.prototype._validateMapping=i(function(e,r,n,s){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var o="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!s)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;var o="Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:s});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(o),!1;throw new Error(o)}},"SourceMapGenerator_validateMapping");St.prototype._serializeMappings=i(function(){for(var e=0,r=1,n=0,s=0,o=0,a=0,l="",c,u,h,f,p=this._mappings.toArray(),m=0,x=p.length;m<x;m++){if(u=p[m],c="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)c+=";",r++;else if(m>0){if(!H.compareByGeneratedPositionsInflated(u,p[m-1]))continue;c+=","}c+=Re.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),c+=Re.encode(f-a),a=f,c+=Re.encode(u.originalLine-1-s),s=u.originalLine-1,c+=Re.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(h=this._names.indexOf(u.name),c+=Re.encode(h-o),o=h)),l+=c}return l},"SourceMapGenerator_serializeMappings");St.prototype._generateSourcesContent=i(function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=H.relative(r,n));var s=H.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,s)?this._sourcesContents[s]:null},this)},"SourceMapGenerator_generateSourcesContent");St.prototype.toJSON=i(function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},"SourceMapGenerator_toJSON");St.prototype.toString=i(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");ac.SourceMapGenerator=St});var Go=dt(Ac=>{"use strict";var Tc="0123456789ABCDEF";Ac.percentEncodeAfterEncoding=i(function(e,r,n,s){let o=new TextEncoder().encode(String(r)),a="";for(let l=0;l<o.length;l++){let c=o[l];if(s&&c===32){a+="+";continue}c<32||c>126||n.indexOf(String.fromCharCode(c))!==-1?a+="%"+Tc[c>>4]+Tc[c&15]:a+=String.fromCharCode(c)}return a},"percentEncodeAfterEncoding")});var wc=dt(Yo=>{"use strict";Yo.toASCII=i(function(e){return String(e).toLowerCase()},"toASCII");Yo.toUnicode=i(function(e){return{domain:String(e),error:!1}},"toUnicode")});var zo=dt((UA,Nc)=>{"use strict";function jo(t){return t>=48&&t<=57}i(jo,"isASCIIDigit");function Lc(t){return t>=65&&t<=90||t>=97&&t<=122}i(Lc,"isASCIIAlpha");function ux(t){return Lc(t)||jo(t)}i(ux,"isASCIIAlphanumeric");function lx(t){return jo(t)||t>=65&&t<=70||t>=97&&t<=102}i(lx,"isASCIIHex");Nc.exports={isASCIIDigit:jo,isASCIIAlpha:Lc,isASCIIAlphanumeric:ux,isASCIIHex:lx}});var Qo=dt((VA,vc)=>{"use strict";var cx=new TextEncoder,hx=new TextDecoder("utf-8",{ignoreBOM:!0});function fx(t){return cx.encode(t)}i(fx,"utf8Encode");function px(t){return hx.decode(t)}i(px,"utf8DecodeWithoutBOM");vc.exports={utf8Encode:fx,utf8DecodeWithoutBOM:px}});var Bc=dt((qA,Uc)=>{"use strict";var{isASCIIHex:Pc}=zo(),{utf8Encode:Ic}=Qo();function L(t){return t.codePointAt(0)}i(L,"p");function dx(t){let e=t.toString(16).toUpperCase();return e.length===1&&(e=`0${e}`),`%${e}`}i(dx,"percentEncode");function Dc(t){let e=new Uint8Array(t.byteLength),r=0;for(let n=0;n<t.byteLength;++n){let s=t[n];if(s!==37)e[r++]=s;else if(s===37&&(!Pc(t[n+1])||!Pc(t[n+2])))e[r++]=s;else{let o=parseInt(String.fromCodePoint(t[n+1],t[n+2]),16);e[r++]=o,n+=2}}return e.slice(0,r)}i(Dc,"percentDecodeBytes");function mx(t){let e=Ic(t);return Dc(e)}i(mx,"percentDecodeString");function _r(t){return t<=31||t>126}i(_r,"isC0ControlPercentEncode");var gx=new Set([L(" "),L('"'),L("<"),L(">"),L("`")]);function xx(t){return _r(t)||gx.has(t)}i(xx,"isFragmentPercentEncode");var Xo=new Set([L(" "),L('"'),L("#"),L("<"),L(">")]),Sx=String.fromCodePoint(...[...Xo].sort());function Oc(t){return _r(t)||Xo.has(t)}i(Oc,"isQueryPercentEncode");var Rc=new Set([...Xo,L("'")]),kx=String.fromCodePoint(...[...Rc].sort());function yx(t){return _r(t)||Rc.has(t)}i(yx,"isSpecialQueryPercentEncode");var bx=new Set([L("?"),L("`"),L("{"),L("}"),L("^")]);function Fc(t){return Oc(t)||bx.has(t)}i(Fc,"isPathPercentEncode");var Ex=new Set([L("/"),L(":"),L(";"),L("="),L("@"),L("["),L("\\"),L("]"),L("|")]);function Mc(t){return Fc(t)||Ex.has(t)}i(Mc,"isUserinfoPercentEncode");var Cx=new Set([L("$"),L("%"),L("&"),L("+"),L(",")]);function Tx(t){return Mc(t)||Cx.has(t)}i(Tx,"isComponentPercentEncode");var Ax=new Set([L("!"),L("'"),L("("),L(")"),L("~")]);function wx(t){return Tx(t)||Ax.has(t)}i(wx,"isURLEncodedPercentEncode");function _c(t,e){let r=Ic(t),n="";for(let s of r)e(s)?n+=dx(s):n+=String.fromCharCode(s);return n}i(_c,"utf8PercentEncodeCodePointInternal");function Lx(t,e){return _c(String.fromCodePoint(t),e)}i(Lx,"utf8PercentEncodeCodePoint");function Nx(t,e,r=!1){let n="";for(let s of t)r&&s===" "?n+="+":n+=_c(s,e);return n}i(Nx,"utf8PercentEncodeString");Uc.exports={isC0ControlPercentEncode:_r,isFragmentPercentEncode:xx,isQueryPercentEncode:Oc,isSpecialQueryPercentEncode:yx,isPathPercentEncode:Fc,isUserinfoPercentEncode:Mc,isURLEncodedPercentEncode:wx,extraQueryPercentEncodeChars:Sx,extraSpecialQueryPercentEncodeChars:kx,percentDecodeString:mx,percentDecodeBytes:Dc,utf8PercentEncodeString:Nx,utf8PercentEncodeCodePoint:Lx}});var Jc=dt((WA,st)=>{"use strict";Go();var{percentEncodeAfterEncoding:vx}=Go(),Px=wc(),et=zo(),{utf8DecodeWithoutBOM:Ix}=Qo(),{percentDecodeString:Dx,utf8PercentEncodeCodePoint:Br,utf8PercentEncodeString:Zo,isC0ControlPercentEncode:Hc,isFragmentPercentEncode:Ox,extraQueryPercentEncodeChars:Rx,extraSpecialQueryPercentEncodeChars:Fx,isPathPercentEncode:Mx,isUserinfoPercentEncode:ta}=Bc();function g(t){return t.codePointAt(0)}i(g,"p");var Wc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},E=Symbol("failure");function Vc(t){return[...t].length}i(Vc,"countSymbols");function $c(t,e){let r=t[e];return isNaN(r)?void 0:String.fromCodePoint(r)}i($c,"at");function qc(t){return t==="."||t.toLowerCase()==="%2e"}i(qc,"isSingleDot");function _x(t){return t=t.toLowerCase(),t===".."||t==="%2e."||t===".%2e"||t==="%2e%2e"}i(_x,"isDoubleDot");function Ux(t,e){return et.isASCIIAlpha(t)&&(e===g(":")||e===g("|"))}i(Ux,"isWindowsDriveLetterCodePoints");function Gc(t){return t.length===2&&et.isASCIIAlpha(t.codePointAt(0))&&(t[1]===":"||t[1]==="|")}i(Gc,"isWindowsDriveLetterString");function Bx(t){return t.length===2&&et.isASCIIAlpha(t.codePointAt(0))&&t[1]===":"}i(Bx,"isNormalizedWindowsDriveLetterString");function Yc(t){return t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}i(Yc,"containsForbiddenHostCodePoint");function Vx(t){return Yc(t)||t.search(/[\u0000-\u001F]|%|\u007F/u)!==-1}i(Vx,"containsForbiddenDomainCodePoint");function Ur(t){return Wc[t]!==void 0}i(Ur,"isSpecialScheme");function tt(t){return Ur(t.scheme)}i(tt,"isSpecial");function Ko(t){return!Ur(t.scheme)}i(Ko,"isNotSpecial");function jc(t){return Wc[t]}i(jc,"defaultPort");function zc(t){if(t==="")return E;let e=10;if(t.length>=2&&t.charAt(0)==="0"&&t.charAt(1).toLowerCase()==="x"?(t=t.substring(2),e=16):t.length>=2&&t.charAt(0)==="0"&&(t=t.substring(1),e=8),t==="")return 0;let r=/[^0-7]/u;return e===10&&(r=/[^0-9]/u),e===16&&(r=/[^0-9A-Fa-f]/u),r.test(t)?E:parseInt(t,e)}i(zc,"parseIPv4Number");function $x(t){let e=t.split(".");if(e[e.length-1]===""&&e.length>1&&e.pop(),e.length>4)return E;let r=[];for(let o of e){let a=zc(o);if(a===E)return E;r.push(a)}for(let o=0;o<r.length-1;++o)if(r[o]>255)return E;if(r[r.length-1]>=256**(5-r.length))return E;let n=r.pop(),s=0;for(let o of r)n+=o*256**(3-s),++s;return n}i($x,"parseIPv4");function qx(t){let e="",r=t;for(let n=1;n<=4;++n)e=String(r%256)+e,n!==4&&(e=`.${e}`),r=Math.floor(r/256);return e}i(qx,"serializeIPv4");function Hx(t){let e=[0,0,0,0,0,0,0,0],r=0,n=null,s=0;if(t=Array.from(t,o=>o.codePointAt(0)),t[s]===g(":")){if(t[s+1]!==g(":"))return E;s+=2,++r,n=r}for(;s<t.length;){if(r===8)return E;if(t[s]===g(":")){if(n!==null)return E;++s,++r,n=r;continue}let o=0,a=0;for(;a<4&&et.isASCIIHex(t[s]);)o=o*16+parseInt($c(t,s),16),++s,++a;if(t[s]===g(".")){if(a===0||(s-=a,r>6))return E;let l=0;for(;t[s]!==void 0;){let c=null;if(l>0)if(t[s]===g(".")&&l<4)++s;else return E;if(!et.isASCIIDigit(t[s]))return E;for(;et.isASCIIDigit(t[s]);){let u=parseInt($c(t,s));if(c===null)c=u;else{if(c===0)return E;c=c*10+u}if(c>255)return E;++s}e[r]=e[r]*256+c,++l,(l===2||l===4)&&++r}if(l!==4)return E;break}else if(t[s]===g(":")){if(++s,t[s]===void 0)return E}else if(t[s]!==void 0)return E;e[r]=o,++r}if(n!==null){let o=r-n;for(r=7;r!==0&&o>0;){let a=e[n+o-1];e[n+o-1]=e[r],e[r]=a,--r,--o}}else if(n===null&&r!==8)return E;return e}i(Hx,"parseIPv6");function Wx(t){let e="",r=jx(t),n=!1;for(let s=0;s<=7;++s)if(!(n&&t[s]===0)){if(n&&(n=!1),r===s){e+=s===0?"::":":",n=!0;continue}e+=t[s].toString(16),s!==7&&(e+=":")}return e}i(Wx,"serializeIPv6");function Jo(t,e=!1){if(t[0]==="[")return t[t.length-1]!=="]"?E:Hx(t.substring(1,t.length-1));if(e)return Yx(t);let r=Ix(Dx(t)),n=zx(r);return n===E?E:Gx(n)?$x(n):n}i(Jo,"parseHost");function Gx(t){let e=t.split(".");if(e[e.length-1]===""){if(e.length===1)return!1;e.pop()}let r=e[e.length-1];return!!(zc(r)!==E||/^[0-9]+$/u.test(r))}i(Gx,"endsInANumber");function Yx(t){return Yc(t)?E:Zo(t,Hc)}i(Yx,"parseOpaqueHost");function jx(t){let e=null,r=1,n=null,s=0;for(let o=0;o<t.length;++o)t[o]!==0?(s>r&&(e=n,r=s),n=null,s=0):(n===null&&(n=o),++s);return s>r?n:e}i(jx,"findTheIPv6AddressCompressedPieceIndex");function ea(t){return typeof t=="number"?qx(t):t instanceof Array?`[${Wx(t)}]`:t}i(ea,"serializeHost");function zx(t,e=!1){let r=Px.toASCII(t,{checkHyphens:e,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:e,transitionalProcessing:!1,verifyDNSLength:e,ignoreInvalidPunycode:!1});return r===null||!e&&(r===""||Vx(r))?E:r}i(zx,"domainToASCII");function Qx(t){let e=0,r=t.length;for(;e<r&&!(t.charCodeAt(e)>32);++e);for(;r>e&&!(t.charCodeAt(r-1)>32);--r);return t.substring(e,r)}i(Qx,"trimControlChars");function Xx(t){return t.replace(/\u0009|\u000A|\u000D/ug,"")}i(Xx,"trimTabAndNewline");function Qc(t){let{path:e}=t;e.length!==0&&(t.scheme==="file"&&e.length===1&&Jx(e[0])||e.pop())}i(Qc,"shortenPath");function Xc(t){return t.username!==""||t.password!==""}i(Xc,"includesCredentials");function Kx(t){return t.host===null||t.host===""||t.scheme==="file"}i(Kx,"cannotHaveAUsernamePasswordPort");function Me(t){return typeof t.path=="string"}i(Me,"hasAnOpaquePath");function Jx(t){return/^[A-Za-z]:$/u.test(t)}i(Jx,"isNormalizedWindowsDriveLetter");function $(t,e,r,n,s){if(this.pointer=0,this.input=t,this.base=e||null,this.encoding=r||"utf-8",this.stateOverride=s,this.url=n,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};let a=Qx(this.input);a!==this.input&&(this.parseError=!0),this.input=a}let o=Xx(this.input);for(o!==this.input&&(this.parseError=!0),this.input=o,this.state=s||"scheme start",this.buffer="",this.atSignSeen=!1,this.insideBrackets=!1,this.passwordTokenSeen=!1,this.input=Array.from(this.input,a=>a.codePointAt(0));this.pointer<=this.input.length;++this.pointer){let a=this.input[this.pointer],l=isNaN(a)?void 0:String.fromCodePoint(a),c=this[`parse ${this.state}`](a,l);if(c){if(c===E){this.failure=!0;break}}else break}}i($,"URLStateMachine");$.prototype["parse scheme start"]=i(function(e,r){if(et.isASCIIAlpha(e))this.buffer+=r.toLowerCase(),this.state="scheme";else if(!this.stateOverride)this.state="no scheme",--this.pointer;else return this.parseError=!0,E;return!0},"parseSchemeStart");$.prototype["parse scheme"]=i(function(e,r){if(et.isASCIIAlphanumeric(e)||e===g("+")||e===g("-")||e===g("."))this.buffer+=r.toLowerCase();else if(e===g(":")){if(this.stateOverride&&(tt(this.url)&&!Ur(this.buffer)||!tt(this.url)&&Ur(this.buffer)||(Xc(this.url)||this.url.port!==null)&&this.buffer==="file"||this.url.scheme==="file"&&this.url.host===""))return!1;if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===jc(this.url.scheme)&&(this.url.port=null),!1;this.buffer="",this.url.scheme==="file"?((this.input[this.pointer+1]!==g("/")||this.input[this.pointer+2]!==g("/"))&&(this.parseError=!0),this.state="file"):tt(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme?this.state="special relative or authority":tt(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===g("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else if(!this.stateOverride)this.buffer="",this.state="no scheme",this.pointer=-1;else return this.parseError=!0,E;return!0},"parseScheme");$.prototype["parse no scheme"]=i(function(e){return this.base===null||Me(this.base)&&e!==g("#")?E:(Me(this.base)&&e===g("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):this.base.scheme==="file"?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},"parseNoScheme");$.prototype["parse special relative or authority"]=i(function(e){return e===g("/")&&this.input[this.pointer+1]===g("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},"parseSpecialRelativeOrAuthority");$.prototype["parse path or authority"]=i(function(e){return e===g("/")?this.state="authority":(this.state="path",--this.pointer),!0},"parsePathOrAuthority");$.prototype["parse relative"]=i(function(e){return this.url.scheme=this.base.scheme,e===g("/")?this.state="relative slash":tt(this.url)&&e===g("\\")?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===g("?")?(this.url.query="",this.state="query"):e===g("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},"parseRelative");$.prototype["parse relative slash"]=i(function(e){return tt(this.url)&&(e===g("/")||e===g("\\"))?(e===g("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"):e===g("/")?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer),!0},"parseRelativeSlash");$.prototype["parse special authority slashes"]=i(function(e){return e===g("/")&&this.input[this.pointer+1]===g("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},"parseSpecialAuthoritySlashes");$.prototype["parse special authority ignore slashes"]=i(function(e){return e!==g("/")&&e!==g("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},"parseSpecialAuthorityIgnoreSlashes");$.prototype["parse authority"]=i(function(e,r){if(e===g("@")){this.parseError=!0,this.atSignSeen&&(this.buffer=`%40${this.buffer}`),this.atSignSeen=!0;let n=Vc(this.buffer);for(let s=0;s<n;++s){let o=this.buffer.codePointAt(s);if(o===g(":")&&!this.passwordTokenSeen){this.passwordTokenSeen=!0;continue}let a=Br(o,ta);this.passwordTokenSeen?this.url.password+=a:this.url.username+=a}this.buffer=""}else if(isNaN(e)||e===g("/")||e===g("?")||e===g("#")||tt(this.url)&&e===g("\\")){if(this.atSignSeen&&this.buffer==="")return this.parseError=!0,E;this.pointer-=Vc(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=r;return!0},"parseAuthority");$.prototype["parse hostname"]=$.prototype["parse host"]=i(function(e,r){if(this.stateOverride&&this.url.scheme==="file")--this.pointer,this.state="file host";else if(e===g(":")&&!this.insideBrackets){if(this.buffer==="")return this.parseError=!0,E;if(this.stateOverride==="hostname")return E;let n=Jo(this.buffer,Ko(this.url));if(n===E)return E;this.url.host=n,this.buffer="",this.state="port"}else if(isNaN(e)||e===g("/")||e===g("?")||e===g("#")||tt(this.url)&&e===g("\\")){if(--this.pointer,tt(this.url)&&this.buffer==="")return this.parseError=!0,E;if(this.stateOverride&&this.buffer===""&&(Xc(this.url)||this.url.port!==null))return this.parseError=!0,E;let n=Jo(this.buffer,Ko(this.url));if(n===E)return E;if(this.url.host=n,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===g("[")?this.insideBrackets=!0:e===g("]")&&(this.insideBrackets=!1),this.buffer+=r;return!0},"parseHostName");$.prototype["parse port"]=i(function(e,r){if(et.isASCIIDigit(e))this.buffer+=r;else if(isNaN(e)||e===g("/")||e===g("?")||e===g("#")||tt(this.url)&&e===g("\\")||this.stateOverride){if(this.buffer!==""){let n=parseInt(this.buffer);if(n>2**16-1)return this.parseError=!0,E;if(this.url.port=n===jc(this.url.scheme)?null:n,this.buffer="",this.stateOverride)return!1}if(this.stateOverride)return E;this.state="path start",--this.pointer}else return this.parseError=!0,E;return!0},"parsePort");var Zx=new Set([g("/"),g("\\"),g("?"),g("#")]);function Kc(t,e){let r=t.length-e;return r>=2&&Ux(t[e],t[e+1])&&(r===2||Zx.has(t[e+2]))}i(Kc,"startsWithWindowsDriveLetter");$.prototype["parse file"]=i(function(e){return this.url.scheme="file",this.url.host="",e===g("/")||e===g("\\")?(e===g("\\")&&(this.parseError=!0),this.state="file slash"):this.base!==null&&this.base.scheme==="file"?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===g("?")?(this.url.query="",this.state="query"):e===g("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,Kc(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):Qc(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},"parseFile");$.prototype["parse file slash"]=i(function(e){return e===g("/")||e===g("\\")?(e===g("\\")&&(this.parseError=!0),this.state="file host"):(this.base!==null&&this.base.scheme==="file"&&(!Kc(this.input,this.pointer)&&Bx(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0},"parseFileSlash");$.prototype["parse file host"]=i(function(e,r){if(isNaN(e)||e===g("/")||e===g("\\")||e===g("?")||e===g("#"))if(--this.pointer,!this.stateOverride&&Gc(this.buffer))this.parseError=!0,this.state="path";else if(this.buffer===""){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let n=Jo(this.buffer,Ko(this.url));if(n===E)return E;if(n==="localhost"&&(n=""),this.url.host=n,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=r;return!0},"parseFileHost");$.prototype["parse path start"]=i(function(e){return tt(this.url)?(e===g("\\")&&(this.parseError=!0),this.state="path",e!==g("/")&&e!==g("\\")&&--this.pointer):!this.stateOverride&&e===g("?")?(this.url.query="",this.state="query"):!this.stateOverride&&e===g("#")?(this.url.fragment="",this.state="fragment"):e!==void 0?(this.state="path",e!==g("/")&&--this.pointer):this.stateOverride&&this.url.host===null&&this.url.path.push(""),!0},"parsePathStart");$.prototype["parse path"]=i(function(e){return isNaN(e)||e===g("/")||tt(this.url)&&e===g("\\")||!this.stateOverride&&(e===g("?")||e===g("#"))?(tt(this.url)&&e===g("\\")&&(this.parseError=!0),_x(this.buffer)?(Qc(this.url),e!==g("/")&&!(tt(this.url)&&e===g("\\"))&&this.url.path.push("")):qc(this.buffer)&&e!==g("/")&&!(tt(this.url)&&e===g("\\"))?this.url.path.push(""):qc(this.buffer)||(this.url.scheme==="file"&&this.url.path.length===0&&Gc(this.buffer)&&(this.buffer=`${this.buffer[0]}:`),this.url.path.push(this.buffer)),this.buffer="",e===g("?")&&(this.url.query="",this.state="query"),e===g("#")&&(this.url.fragment="",this.state="fragment")):(e===g("%")&&(!et.isASCIIHex(this.input[this.pointer+1])||!et.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=Br(e,Mx)),!0},"parsePath");$.prototype["parse opaque path"]=i(function(e){if(e===g("?"))this.url.query="",this.state="query";else if(e===g("#"))this.url.fragment="",this.state="fragment";else if(e===g(" ")){let r=this.input[this.pointer+1];r===g("?")||r===g("#")?this.url.path+="%20":this.url.path+=" "}else!isNaN(e)&&e!==g("%")&&(this.parseError=!0),e===g("%")&&(!et.isASCIIHex(this.input[this.pointer+1])||!et.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),isNaN(e)||(this.url.path+=Br(e,Hc));return!0},"parseOpaquePath");$.prototype["parse query"]=i(function(e,r){if((!tt(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss")&&(this.encoding="utf-8"),!this.stateOverride&&e===g("#")||isNaN(e)){let n=tt(this.url)?Fx:Rx;this.url.query+=vx(this.encoding,this.buffer,n),this.buffer="",e===g("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e===g("%")&&(!et.isASCIIHex(this.input[this.pointer+1])||!et.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=r);return!0},"parseQuery");$.prototype["parse fragment"]=i(function(e){return isNaN(e)||(e===g("%")&&(!et.isASCIIHex(this.input[this.pointer+1])||!et.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.url.fragment+=Br(e,Ox)),!0},"parseFragment");function t0(t,e){let r=`${t.scheme}:`;return t.host!==null&&(r+="//",(t.username!==""||t.password!=="")&&(r+=t.username,t.password!==""&&(r+=`:${t.password}`),r+="@"),r+=ea(t.host),t.port!==null&&(r+=`:${t.port}`)),t.host===null&&!Me(t)&&t.path.length>1&&t.path[0]===""&&(r+="/."),r+=ra(t),t.query!==null&&(r+=`?${t.query}`),!e&&t.fragment!==null&&(r+=`#${t.fragment}`),r}i(t0,"serializeURL");function e0(t){let e=`${t.scheme}://`;return e+=ea(t.host),t.port!==null&&(e+=`:${t.port}`),e}i(e0,"serializeOrigin");function ra(t){if(Me(t))return t.path;let e="";for(let r of t.path)e+=`/${r}`;return e}i(ra,"serializePath");st.exports.serializeURL=t0;st.exports.serializePath=ra;st.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":{let e=st.exports.parseURL(ra(t));return e===null||e.scheme!=="http"&&e.scheme!=="https"?"null":st.exports.serializeURLOrigin(e)}case"ftp":case"http":case"https":case"ws":case"wss":return e0({scheme:t.scheme,host:t.host,port:t.port});case"file":return"null";default:return"null"}};st.exports.basicURLParse=function(t,e){e===void 0&&(e={});let r=new $(t,e.baseURL,e.encoding,e.url,e.stateOverride);return r.failure?null:r.url};st.exports.setTheUsername=function(t,e){t.username=Zo(e,ta)};st.exports.setThePassword=function(t,e){t.password=Zo(e,ta)};st.exports.serializeHost=ea;st.exports.cannotHaveAUsernamePasswordPort=Kx;st.exports.hasAnOpaquePath=Me;st.exports.serializeInteger=function(t){return String(t)};st.exports.parseURL=function(t,e){return e===void 0&&(e={}),st.exports.basicURLParse(t,{baseURL:e.baseURL,encoding:e.encoding})}});var i0={};y(i0,{cssSelect:()=>sn,cssTree:()=>r0,cssWhat:()=>qr,urlEngine:()=>n0,xpathway:()=>Cn});var sn={};y(sn,{_compileUnsafe:()=>nn,compile:()=>Ja,default:()=>kf,is:()=>Sf,prepareContext:()=>tu,selectAll:()=>eu,selectOne:()=>xf});function kt(){return!0}i(kt,"trueFunc");function D(){return!1}i(D,"falseFunc");var qr={};y(qr,{AttributeAction:()=>N,IgnoreCaseMode:()=>oh,SelectorType:()=>k,isTraversal:()=>xe,parse:()=>Mt,stringify:()=>$r});var k;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(k||(k={}));var oh={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1},N;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(N||(N={}));var sa=/^[^#\\]?(?:\\(?:[\da-f]{1,6}(?:\r\n|\s)?|.|$)|[\w\u00B0-\uFFFF-])+/i,ah=/\\([\da-f]{1,6}(?:\r\n|\s)?|(\s)|.|$)/gi,b;(function(t){t[t.LeftParenthesis=40]="LeftParenthesis",t[t.RightParenthesis=41]="RightParenthesis",t[t.LeftSquareBracket=91]="LeftSquareBracket",t[t.RightSquareBracket=93]="RightSquareBracket",t[t.Comma=44]="Comma",t[t.Period=46]="Period",t[t.Colon=58]="Colon",t[t.SingleQuote=39]="SingleQuote",t[t.DoubleQuote=34]="DoubleQuote",t[t.Plus=43]="Plus",t[t.Tilde=126]="Tilde",t[t.QuestionMark=63]="QuestionMark",t[t.ExclamationMark=33]="ExclamationMark",t[t.Slash=47]="Slash",t[t.Equal=61]="Equal",t[t.Dollar=36]="Dollar",t[t.Pipe=124]="Pipe",t[t.Circumflex=94]="Circumflex",t[t.Asterisk=42]="Asterisk",t[t.GreaterThan=62]="GreaterThan",t[t.LessThan=60]="LessThan",t[t.Hash=35]="Hash",t[t.LowerI=105]="LowerI",t[t.LowerS=115]="LowerS",t[t.BackSlash=92]="BackSlash",t[t.Space=32]="Space",t[t.Tab=9]="Tab",t[t.NewLine=10]="NewLine",t[t.FormFeed=12]="FormFeed",t[t.CarriageReturn=13]="CarriageReturn"})(b||(b={}));var uh=new Map([[b.Tilde,N.Element],[b.Circumflex,N.Start],[b.Dollar,N.End],[b.Asterisk,N.Any],[b.ExclamationMark,N.Not],[b.Pipe,N.Hyphen]]),lh=new Set(["has","not","matches","is","where","host","host-context"]),ch=new Set(["before","after","first-line","first-letter"]);function xe(t){switch(t.type){case k.Adjacent:case k.Child:case k.Descendant:case k.Parent:case k.Sibling:case k.ColumnCombinator:return!0;case k.Attribute:case k.Pseudo:case k.PseudoElement:case k.Tag:case k.Universal:return!1}}i(xe,"isTraversal");var hh=new Set(["contains","icontains"]);function fh(t,e,r){if(e==="")return"\uFFFD";let n=Number.parseInt(e,16);return Number.isNaN(n)||r?e:n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":String.fromCodePoint(n)}i(fh,"funescape");function ge(t){return t.replace(ah,fh)}i(ge,"unescapeCSS");function Vr(t){return t===b.SingleQuote||t===b.DoubleQuote}i(Vr,"isQuote");function oa(t){return t===b.Space||t===b.Tab||t===b.NewLine||t===b.FormFeed||t===b.CarriageReturn}i(oa,"isWhitespace");function Mt(t){let e=[],r=aa(e,`${t}`,0);if(r<t.length)throw new Error(`Unmatched selector: ${t.slice(r)}`);return e}i(Mt,"parse");function aa(t,e,r){let n=[];function s(f){let p=e.slice(r+f).match(sa);if(!p)throw new Error(`Expected name, found ${e.slice(r)}`);let[m]=p;return r+=f+m.length,ge(m)}i(s,"getName");function o(f){for(r+=f;r<e.length&&oa(e.charCodeAt(r));)r++}i(o,"stripWhitespace");function a(){r+=1;let f=r;for(let p=1;r<e.length;r++)switch(e.charCodeAt(r)){case b.BackSlash:{r+=1;break}case b.LeftParenthesis:{p+=1;break}case b.RightParenthesis:{if(p-=1,p===0)return ge(e.slice(f,r++));break}}throw new Error("Parenthesis not matched")}i(a,"readValueWithParenthesis");function l(){if(n.length>0&&xe(n[n.length-1]))throw new Error("Did not expect successive traversals.")}i(l,"ensureNotTraversal");function c(f){if(n.length>0&&n[n.length-1].type===k.Descendant){n[n.length-1].type=f;return}l(),n.push({type:f})}i(c,"addTraversal");function u(f,p){n.push({type:k.Attribute,name:f,action:p,value:s(1),namespace:null,ignoreCase:"quirks"})}i(u,"addSpecialAttribute");function h(){if(n.length>0&&n[n.length-1].type===k.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");t.push(n)}if(i(h,"finalizeSubselector"),o(0),e.length===r)return r;t:for(;r<e.length;){let f=e.charCodeAt(r);switch(f){case b.Space:case b.Tab:case b.NewLine:case b.FormFeed:case b.CarriageReturn:{(n.length===0||n[0].type!==k.Descendant)&&(l(),n.push({type:k.Descendant})),o(1);break}case b.GreaterThan:{c(k.Child),o(1);break}case b.LessThan:{c(k.Parent),o(1);break}case b.Tilde:{c(k.Sibling),o(1);break}case b.Plus:{c(k.Adjacent),o(1);break}case b.Period:{u("class",N.Element);break}case b.Hash:{u("id",N.Equals);break}case b.LeftSquareBracket:{o(1);let p,m=null;e.charCodeAt(r)===b.Pipe?p=s(1):e.startsWith("*|",r)?(m="*",p=s(2)):(p=s(0),e.charCodeAt(r)===b.Pipe&&e.charCodeAt(r+1)!==b.Equal&&(m=p,p=s(1))),o(0);let x=N.Exists,C=uh.get(e.charCodeAt(r));if(C){if(x=C,e.charCodeAt(r+1)!==b.Equal)throw new Error("Expected `=`");o(2)}else e.charCodeAt(r)===b.Equal&&(x=N.Equals,o(1));let I="",P=null;if(x!=="exists"){if(Vr(e.charCodeAt(r))){let G=e.charCodeAt(r);r+=1;let Ft=r;for(;r<e.length&&e.charCodeAt(r)!==G;)r+=e.charCodeAt(r)===b.BackSlash?2:1;I=ge(e.slice(Ft,r)),r<e.length&&(r+=1)}else{let G=r;for(;r<e.length&&!oa(e.charCodeAt(r))&&e.charCodeAt(r)!==b.RightSquareBracket;)r+=e.charCodeAt(r)===b.BackSlash?2:1;I=ge(e.slice(G,r))}switch(o(0),e.charCodeAt(r)|32){case b.LowerI:{P=!0,o(1);break}case b.LowerS:{P=!1,o(1);break}}}if(r<e.length){if(e.charCodeAt(r)!==b.RightSquareBracket)throw new Error("Attribute selector didn't terminate");r+=1}let W={type:k.Attribute,name:p,action:x,value:I,namespace:m,ignoreCase:P};n.push(W);break}case b.Colon:{if(e.charCodeAt(r+1)===b.Colon){n.push({type:k.PseudoElement,name:s(2).toLowerCase(),data:e.charCodeAt(r)===b.LeftParenthesis?a():null});break}let p=s(1).toLowerCase();if(ch.has(p)){n.push({type:k.PseudoElement,name:p,data:null});break}let m=null;if(e.charCodeAt(r)===b.LeftParenthesis)if(lh.has(p)){if(Vr(e.charCodeAt(r+1)))throw new Error(`Pseudo-selector ${p} cannot be quoted`);if(m=[],r=aa(m,e,r+1),e.charCodeAt(r)!==b.RightParenthesis)throw new Error(`Missing closing parenthesis in :${p} (${e})`);r+=1}else{if(m=a(),hh.has(p)){let x=m.charCodeAt(0);x===m.charCodeAt(m.length-1)&&Vr(x)&&(m=m.slice(1,-1))}m=ge(m)}n.push({type:k.Pseudo,name:p,data:m});break}case b.Comma:{h(),n=[],o(1);break}default:{if(e.startsWith("/*",r)){let x=e.indexOf("*/",r+2);if(x===-1)throw new Error("Comment was not terminated");r=x+2,n.length===0&&o(0);break}let p=null,m;if(f===b.Asterisk)r+=1,m="*";else if(f===b.Pipe){if(m="",e.charCodeAt(r+1)===b.Pipe){c(k.ColumnCombinator),o(2);break}}else if(sa.test(e.slice(r)))m=s(0);else break t;e.charCodeAt(r)===b.Pipe&&e.charCodeAt(r+1)!==b.Pipe&&(p=m,e.charCodeAt(r+1)===b.Asterisk?(m="*",r+=2):m=s(1)),n.push(m==="*"?{type:k.Universal,namespace:p}:{type:k.Tag,name:m,namespace:p})}}}return h(),r}i(aa,"parseSelector");var ca=["\\",'"'],ha=[...ca,"(",")"],ph=new Set(ca.map(t=>t.charCodeAt(0))),ua=new Set(ha.map(t=>t.charCodeAt(0))),Jt=new Set([...ha,"~","^","$","*","+","!","|",":","[","]"," ",".","%"].map(t=>t.charCodeAt(0)));function $r(t){return t.map(e=>e.map((r,n,s)=>dh(r,n,s)).join("")).join(", ")}i($r,"stringify");function dh(t,e,r){switch(t.type){case k.Child:return e===0?"> ":" > ";case k.Parent:return e===0?"< ":" < ";case k.Sibling:return e===0?"~ ":" ~ ";case k.Adjacent:return e===0?"+ ":" + ";case k.Descendant:return" ";case k.ColumnCombinator:return e===0?"|| ":" || ";case k.Universal:return t.namespace==="*"&&e+1<r.length&&"name"in r[e+1]?"":`${fa(t.namespace)}*`;case k.Tag:return la(t);case k.PseudoElement:return`::${Pt(t.name,Jt)}${t.data===null?"":`(${Pt(t.data,ua)})`}`;case k.Pseudo:return`:${Pt(t.name,Jt)}${t.data===null?"":`(${typeof t.data=="string"?Pt(t.data,ua):$r(t.data)})`}`;case k.Attribute:{if(t.name==="id"&&t.action===N.Equals&&t.ignoreCase==="quirks"&&!t.namespace)return`#${Pt(t.value,Jt)}`;if(t.name==="class"&&t.action===N.Element&&t.ignoreCase==="quirks"&&!t.namespace)return`.${Pt(t.value,Jt)}`;let n=la(t);return t.action===N.Exists?`[${n}]`:`[${n}${mh(t.action)}="${Pt(t.value,ph)}"${t.ignoreCase===null?"":t.ignoreCase?" i":" s"}]`}}}i(dh,"stringifyToken");function mh(t){switch(t){case N.Equals:return"";case N.Element:return"~";case N.Start:return"^";case N.End:return"$";case N.Any:return"*";case N.Not:return"!";case N.Hyphen:return"|";default:throw new Error("Shouldn't be here")}}i(mh,"getActionValue");function la(t){return`${fa(t.namespace)}${Pt(t.name,Jt)}`}i(la,"getNamespacedName");function fa(t){return t===null?"":`${t==="*"?"*":Pt(t,Jt)}|`}i(fa,"getNamespace");function Pt(t,e){let r=0,n="";for(let s=0;s<t.length;s++)e.has(t.charCodeAt(s))&&(n+=`${t.slice(r,s)}\\${t.charAt(s)}`,r=s+1);return n.length>0?n+t.slice(r):t}i(Pt,"escapeName");var Y;(function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"})(Y||(Y={}));function pa(t){return t.type===Y.Tag||t.type===Y.Script||t.type===Y.Style}i(pa,"isTag");var da=Y.Root,ma=Y.Text,ga=Y.Directive,xa=Y.Comment,Sa=Y.Script,ka=Y.Style,ya=Y.Tag,ba=Y.CDATA,x0=Y.Doctype;function Z(t){return pa(t)}i(Z,"isTag");function Hr(t){return t.type===Y.CDATA}i(Hr,"isCDATA");function $t(t){return t.type===Y.Text}i($t,"isText");function Ea(t){return t.type===Y.Comment}i(Ea,"isComment");function ot(t){return Object.hasOwn(t,"children")}i(ot,"hasChildren");var zr={};y(zr,{DocumentPosition:()=>mt,append:()=>Yh,appendChild:()=>Gh,compareDocumentPosition:()=>Ma,existsOne:()=>Ta,filter:()=>Zt,find:()=>Ca,findAll:()=>xh,findOne:()=>_e,getAttributeValue:()=>Xh,getChildren:()=>_a,getElementById:()=>bh,getElements:()=>yh,getElementsByClassName:()=>Eh,getElementsByTagName:()=>qt,getElementsByTagType:()=>Ch,getFeed:()=>Mh,getInnerHTML:()=>Fh,getName:()=>Jh,getOuterHTML:()=>Ra,getParent:()=>Ua,getSiblings:()=>Qh,getText:()=>Ve,hasAttrib:()=>Kh,innerText:()=>jr,nextElementSibling:()=>Zh,prepend:()=>zh,prependChild:()=>jh,prevElementSibling:()=>tf,removeElement:()=>ke,removeSubsets:()=>qh,replaceElement:()=>Wh,testElement:()=>kh,textContent:()=>Se,uniqueSort:()=>Hh});function Zt(t,e,r=!0,n=Number.POSITIVE_INFINITY){return Ca(t,Array.isArray(e)?e:[e],r,n)}i(Zt,"filter");function Ca(t,e,r,n){let s=[],o=[Array.isArray(e)?e:[e]],a=[0];for(;;){if(a[0]>=o[0].length){if(a.length===1)return s;o.shift(),a.shift();continue}let l=o[0][a[0]++];if(t(l)&&(s.push(l),--n<=0))return s;r&&ot(l)&&l.children.length>0&&(a.unshift(0),o.unshift(l.children))}}i(Ca,"find");function _e(t,e,r=!0){let n=Array.isArray(e)?e:[e];for(let s of n){if(Z(s)&&t(s))return s;if(r&&ot(s)&&s.children.length>0){let o=_e(t,s.children,!0);if(o)return o}}return null}i(_e,"findOne");function Ta(t,e){return(Array.isArray(e)?e:[e]).some(r=>Z(r)&&t(r)||ot(r)&&Ta(t,r.children))}i(Ta,"existsOne");function xh(t,e){let r=[],n=[Array.isArray(e)?e:[e]],s=[0];for(;;){if(s[0]>=n[0].length){if(n.length===1)return r;n.shift(),s.shift();continue}let o=n[0][s[0]++];Z(o)&&t(o)&&r.push(o),ot(o)&&o.children.length>0&&(s.unshift(0),n.unshift(o.children))}}i(xh,"findAll");var Ue={tag_name(t){return typeof t=="function"?e=>Z(e)&&t(e.name):t==="*"?Z:e=>Z(e)&&e.name===t},tag_type(t){return typeof t=="function"?e=>t(e.type):e=>e.type===t},tag_contains(t){return typeof t=="function"?e=>$t(e)&&t(e.data):e=>$t(e)&&e.data===t}};function Wr(t,e){return typeof e=="function"?r=>Z(r)&&e(r.attribs[t]):r=>Z(r)&&r.attribs[t]===e}i(Wr,"getAttribCheck");function Sh(t,e){return r=>t(r)||e(r)}i(Sh,"combineFuncs");function Aa(t){let e=Object.keys(t).map(r=>{let n=t[r];return Object.hasOwn(Ue,r)?Ue[r](n):Wr(r,n)});return e.length===0?null:e.reduce(Sh)}i(Aa,"compileTest");function kh(t,e){let r=Aa(t);return r?r(e):!0}i(kh,"testElement");function yh(t,e,r,n=Number.POSITIVE_INFINITY){let s=Aa(t);return s?Zt(s,e,r,n):[]}i(yh,"getElements");function bh(t,e,r=!0){return Array.isArray(e)||(e=[e]),_e(Wr("id",t),e,r)}i(bh,"getElementById");function qt(t,e,r=!0,n=Number.POSITIVE_INFINITY){return Zt(Ue.tag_name(t),e,r,n)}i(qt,"getElementsByTagName");function Eh(t,e,r=!0,n=Number.POSITIVE_INFINITY){return Zt(Wr("class",t),e,r,n)}i(Eh,"getElementsByClassName");function Ch(t,e,r=!0,n=Number.POSITIVE_INFINITY){return Zt(Ue.tag_type(t),e,r,n)}i(Ch,"getElementsByTagType");var Th=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),Ah=typeof String.prototype.codePointAt=="function"?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e),wh=1342177476;function Be(t){let e,r=0,{length:n}=t;for(let s=0;s<n;s++){let o=t.charCodeAt(s);if(o<128&&((wh>>>o&1)===0||o>=64||o<32))continue;if(e===void 0?e=t.substring(0,s):r!==s&&(e+=t.substring(r,s)),o<64){e+=Th.get(o),r=s+1;continue}let a=Ah(t,s);e+=`&#x${a.toString(16)};`,a!==o&&s++,r=s+1}return e===void 0?t:(r<n&&(e+=t.substr(r)),e)}i(Be,"encodeXML");function wa(t,e){return i(function(n){let s,o=0,a="";for(;s=t.exec(n);)o!==s.index&&(a+=n.substring(o,s.index)),a+=e.get(s[0].charCodeAt(0)),o=s.index+1;return a+n.substring(o)},"escape")}i(wa,"getEscaper");var Gr=wa(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Yr=wa(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var La;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(La||(La={}));var Na;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(Na||(Na={}));var va=new Map("altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath".split(" ").map(t=>[t.toLowerCase(),t])),Pa=new Map("definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan".split(" ").map(t=>[t.toLowerCase(),t]));var Lh=new Set("style script xmp iframe noembed noframes plaintext noscript".split(" ")),Nh=new Set("area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(" ")),vh=new Set(["svg","math"]),Ph=new Set("mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "));function Ih(t,e={}){let r="length"in t?t:[t],n=e.xmlMode??!1,s="";for(let o=0;o<r.length;o++)s+=Oa(r[o],e,n);return s}i(Ih,"render");var Ia=Ih;function Da(t,e,r){let n="";for(let s=0;s<t.length;s++)n+=Oa(t[s],e,r);return n}i(Da,"renderChildren");function Oa(t,e,r){switch(t.type){case da:return Da(t.children,e,r);case ga:return`<${t.data}>`;case xa:return`<!--${t.data}-->`;case ba:return`<![CDATA[${t.children[0].data}]]>`;case Sa:case ka:case ya:return Dh(t,e,r);case ma:{let n=t,s=n.data||"";return(e.encodeEntities??e.decodeEntities)!==!1&&!(!r&&n.parent&&Lh.has(n.parent.name))?r||e.encodeEntities!=="utf8"?Be(s):Yr(s):s}}}i(Oa,"renderNode");function Dh(t,e,r){r==="foreign"&&(t.name=va.get(t.name)??t.name,t.parent&&Ph.has(t.parent.name)&&(r=!1)),!r&&vh.has(t.name)&&(r="foreign");let{name:n,children:s}=t,o=!r&&Nh.has(n),a=`<${n}${Rh(t.attribs,e,r)}`;return s.length===0&&(r?e.selfClosingTags!==!1:e.selfClosingTags&&o)?a+=r?"/>":" />":(a+=">",s.length>0&&(a+=Da(s,e,r)),o||(a+=`</${n}>`)),a}i(Dh,"renderTag");function Oh(t){return t.replaceAll('"',"&quot;")}i(Oh,"replaceQuotes");function Rh(t,e,r){if(!t)return"";let n=(e.encodeEntities??e.decodeEntities)===!1?Oh:r||e.encodeEntities!=="utf8"?Be:Gr,s=r==="foreign",o=!!(e.emptyAttrs??r),a="";for(let l in t){if(!Object.hasOwn(t,l))continue;let c=t[l],u=s?Pa.get(l)??l:l;a+=!o&&(c==null||c==="")?` ${u}`:` ${u}="${n(c==null?"":String(c))}"`}return a}i(Rh,"formatAttributes");function Ra(t,e){return Ia(t,e)}i(Ra,"getOuterHTML");function Fh(t,e){return ot(t)?t.children.map(r=>Ra(r,e)).join(""):""}i(Fh,"getInnerHTML");function Ve(t){return Array.isArray(t)?t.map(Ve).join(""):Z(t)?t.name==="br"?`
2
+ `:Ve(t.children):Hr(t)?Ve(t.children):$t(t)?t.data:""}i(Ve,"getText");function Se(t){return Array.isArray(t)?t.map(Se).join(""):ot(t)&&!Ea(t)?Se(t.children):$t(t)?t.data:""}i(Se,"textContent");function jr(t){return Array.isArray(t)?t.map(jr).join(""):ot(t)&&(t.type===Y.Tag||Hr(t))?jr(t.children):$t(t)?t.data:""}i(jr,"innerText");function Mh(t){let e=$e($h,t);return e?e.name==="feed"?_h(e):Uh(e):null}i(Mh,"getFeed");function _h(t){let e=t.children,r={type:"atom",items:qt("entry",e).map(o=>{let{children:a}=o,l={media:Fa(a)};at(l,"id","id",a),at(l,"title","title",a);let c=$e("link",a)?.attribs.href;c&&(l.link=c);let u=_t("summary",a)||_t("content",a);u&&(l.description=u);let h=_t("updated",a);return h&&(l.pubDate=new Date(h)),l})};at(r,"id","id",e),at(r,"title","title",e);let n=$e("link",e)?.attribs.href;n&&(r.link=n),at(r,"description","subtitle",e);let s=_t("updated",e);return s&&(r.updated=new Date(s)),at(r,"author","email",e,!0),r}i(_h,"getAtomFeed");function Uh(t){let e=$e("channel",t.children)?.children??[],r={type:t.name.substr(0,3),id:"",items:qt("item",t.children).map(s=>{let{children:o}=s,a={media:Fa(o)};at(a,"id","guid",o),at(a,"title","title",o),at(a,"link","link",o),at(a,"description","description",o);let l=_t("pubDate",o)||_t("dc:date",o);return l&&(a.pubDate=new Date(l)),a})};at(r,"title","title",e),at(r,"link","link",e),at(r,"description","description",e);let n=_t("lastBuildDate",e);return n&&(r.updated=new Date(n)),at(r,"author","managingEditor",e,!0),r}i(Uh,"getRssFeed");var Bh=["url","type","lang"],Vh=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Fa(t){return qt("media:content",t).map(e=>{let{attribs:r}=e,n={medium:r.medium,isDefault:!!r.isDefault};for(let s of Bh)r[s]&&(n[s]=r[s]);for(let s of Vh)r[s]&&(n[s]=Number.parseInt(r[s],10));return r.expression&&(n.expression=r.expression),n})}i(Fa,"getMediaElements");function $e(t,e){return qt(t,e,!0,1)[0]}i($e,"getOneElement");function _t(t,e,r=!1){return Se(qt(t,e,r,1)).trim()}i(_t,"fetch");function at(t,e,r,n,s=!1){let o=_t(r,n,s);o&&(t[e]=o)}i(at,"addConditionally");function $h(t){return t==="rss"||t==="feed"||t==="rdf:RDF"}i($h,"isValidFeed");function qh(t){let e=t.length;for(;--e>=0;){let r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0){t.splice(e,1);continue}for(let n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t}i(qh,"removeSubsets");var mt;(function(t){t[t.DISCONNECTED=1]="DISCONNECTED",t[t.PRECEDING=2]="PRECEDING",t[t.FOLLOWING=4]="FOLLOWING",t[t.CONTAINS=8]="CONTAINS",t[t.CONTAINED_BY=16]="CONTAINED_BY"})(mt||(mt={}));function Ma(t,e){let r=[],n=[];if(t===e)return 0;let s=ot(t)?t:t.parent;for(;s;)r.unshift(s),s=s.parent;for(s=ot(e)?e:e.parent;s;)n.unshift(s),s=s.parent;let o=Math.min(r.length,n.length),a=0;for(;a<o&&r[a]===n[a];)a++;if(a===0)return mt.DISCONNECTED;let l=r[a-1],c=l.children,u=r[a],h=n[a];return c.indexOf(u)>c.indexOf(h)?l===e?mt.FOLLOWING|mt.CONTAINED_BY:mt.FOLLOWING:l===t?mt.PRECEDING|mt.CONTAINS:mt.PRECEDING}i(Ma,"compareDocumentPosition");function Hh(t){return t=t.filter((e,r,n)=>!n.includes(e,r+1)),t.sort((e,r)=>{let n=Ma(e,r);return n&mt.PRECEDING?-1:n&mt.FOLLOWING?1:0}),t}i(Hh,"uniqueSort");function ke(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){let e=t.parent.children,r=e.lastIndexOf(t);r!==-1&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}i(ke,"removeElement");function Wh(t,e){if(e.prev=t.prev,e.prev&&(e.prev.next=e),e.next=t.next,e.next&&(e.next.prev=e),e.parent=t.parent,e.parent){let{children:r}=e.parent,n=r.lastIndexOf(t);if(n===-1)return;r[n]=e,t.parent=null}}i(Wh,"replaceElement");function Gh(t,e){if(ke(e),e.next=null,e.parent=t,t.children.push(e)>1){let r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}i(Gh,"appendChild");function Yh(t,e){ke(e);let{parent:r}=t,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){let s=r.children;s.splice(s.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}i(Yh,"append");function jh(t,e){if(ke(e),e.parent=t,e.prev=null,t.children.unshift(e)===1)e.next=null;else{let r=t.children[1];r.prev=e,e.next=r}}i(jh,"prependChild");function zh(t,e){ke(e);let{parent:r}=t;if(r){let n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}i(zh,"prepend");function _a(t){return ot(t)?t.children:[]}i(_a,"getChildren");function Ua(t){return t.parent||null}i(Ua,"getParent");function Qh(t){let e=Ua(t);if(e!=null)return _a(e);let r=[t],{prev:n,next:s}=t;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;s!=null;)r.push(s),{next:s}=s;return r}i(Qh,"getSiblings");function Xh(t,e){let{attribs:r}=t;return r?.[e]}i(Xh,"getAttributeValue");function Kh(t,e){let{attribs:r}=t;return r!=null&&Object.hasOwn(r,e)&&r[e]!=null}i(Kh,"hasAttrib");function Jh(t){return t.name}i(Jh,"getName");function Zh(t){let{next:e}=t;for(;e!==null&&!Z(e);)({next:e}=e);return e}i(Zh,"nextElementSibling");function tf(t){let{prev:e}=t;for(;e!==null&&!Z(e);)({prev:e}=e);return e}i(tf,"prevElementSibling");var ef=/[-[\]{}()*+?.,\\^$|#\s]/g,rf=/\s/;function Ba(t){return t.replace(ef,"\\$&")}i(Ba,"escapeRegex");var nf=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Ht(t,e){return typeof t.ignoreCase=="boolean"?t.ignoreCase:t.ignoreCase==="quirks"?!!e.quirksMode:!e.xmlMode&&nf.has(t.name.toLowerCase())}i(Ht,"shouldIgnoreCase");var Va={equals(t,e,r){let{adapter:n}=r,{name:s}=e,{value:o}=e;return Ht(e,r)?(o=o.toLowerCase(),a=>{let l=n.getAttributeValue(a,s);return l!=null&&l.length===o.length&&l.toLowerCase()===o&&t(a)}):a=>n.getAttributeValue(a,s)===o&&t(a)},hyphen(t,e,r){let{adapter:n}=r,{name:s}=e,{value:o}=e,{length:a}=o;return Ht(e,r)?(o=o.toLowerCase(),i(function(c){let u=n.getAttributeValue(c,s);return u!=null&&(u.length===a||u.charAt(a)==="-")&&u.substr(0,a).toLowerCase()===o&&t(c)},"hyphenIC")):i(function(c){let u=n.getAttributeValue(c,s);return u!=null&&(u.length===a||u.charAt(a)==="-")&&u.substr(0,a)===o&&t(c)},"hyphen")},element(t,e,r){let{adapter:n}=r,{name:s,value:o}=e;if(o===""||rf.test(o))return D;let a=new RegExp(`(?:^|\\s)${Ba(o)}(?:$|\\s)`,Ht(e,r)?"i":"");return i(function(c){let u=n.getAttributeValue(c,s);return u!=null&&u.length>=o.length&&a.test(u)&&t(c)},"element")},exists(t,{name:e},{adapter:r}){return n=>r.hasAttrib(n,e)&&t(n)},start(t,e,r){let{adapter:n}=r,{name:s}=e,{value:o}=e,{length:a}=o;return a===0?D:Ht(e,r)?(o=o.toLowerCase(),l=>{let c=n.getAttributeValue(l,s);return c!=null&&c.length>=a&&c.substr(0,a).toLowerCase()===o&&t(l)}):l=>!!n.getAttributeValue(l,s)?.startsWith(o)&&t(l)},end(t,e,r){let{adapter:n}=r,{name:s}=e,{value:o}=e,a=-o.length;return a===0?D:Ht(e,r)?(o=o.toLowerCase(),l=>n.getAttributeValue(l,s)?.substr(a).toLowerCase()===o&&t(l)):l=>!!n.getAttributeValue(l,s)?.endsWith(o)&&t(l)},any(t,e,r){let{adapter:n}=r,{name:s,value:o}=e;if(o==="")return D;if(Ht(e,r)){let a=new RegExp(Ba(o),"i");return i(function(c){let u=n.getAttributeValue(c,s);return u!=null&&u.length>=o.length&&a.test(u)&&t(c)},"anyIC")}return a=>!!n.getAttributeValue(a,s)?.includes(o)&&t(a)},not(t,e,r){let{adapter:n}=r,{name:s}=e,{value:o}=e;return o===""?a=>!!n.getAttributeValue(a,s)&&t(a):Ht(e,r)?(o=o.toLowerCase(),a=>{let l=n.getAttributeValue(a,s);return(l==null||l.length!==o.length||l.toLowerCase()!==o)&&t(a)}):a=>n.getAttributeValue(a,s)!==o&&t(a)}};function $a(t,e,r){let{adapter:n,xmlMode:s=!1}=r,o=[],a=[e],l=[0];for(;;){if(l[0]>=a[0].length){if(a.length===1)return o;a.shift(),l.shift();continue}let c=a[0][l[0]++];if(n.isTag(c)&&(t(c)&&o.push(c),s||n.getName(c)!=="template")){let u=n.getChildren(c);u.length>0&&(a.unshift(u),l.unshift(0))}}}i($a,"findAll");function te(t,e,r){let{adapter:n,xmlMode:s=!1}=r,o=[e],a=[0];for(;;){if(a[0]>=o[0].length){if(o.length===1)return null;o.shift(),a.shift();continue}let l=o[0][a[0]++];if(n.isTag(l)){if(t(l))return l;if(s||n.getName(l)!=="template"){let c=n.getChildren(l);c.length>0&&(o.unshift(c),a.unshift(0))}}}}i(te,"findOne");function qe(t,e){let r=e.getSiblings(t);if(r.length<=1)return[];let n=r.indexOf(t);return n===-1||n===r.length-1?[]:r.slice(n+1).filter(e.isTag)}i(qe,"getNextSiblings");function gt(t,e){let r=e.getParent(t);return r!=null&&e.isTag(r)?r:null}i(gt,"getElementParent");var qa="input:is([type=text i],[type=search i],[type=url i],[type=tel i],[type=email i],[type=password i],[type=date i],[type=month i],[type=week i],[type=time i],[type=datetime-local i],[type=number i])",Ha={"any-link":":is(a, area)[href]",link:":any-link:not(:visited)",disabled:`:is(
3
+ :is(button, input, select, textarea, optgroup, option)[disabled],
4
+ optgroup[disabled] > option,
5
+ fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
6
+ )`,enabled:":is(button, input, select, textarea, optgroup, option, fieldset):not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], :selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])","read-only":`[readonly]:is(textarea, ${qa})`,"read-write":`:not([readonly]):is(textarea, ${qa})`,selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};function Wa(t){let e=t[0],r=t[1]-1;if(r<0&&e<=0)return D;if(e===-1)return o=>o<=r;if(e===0)return o=>o===r;if(e===1)return r<0?kt:o=>o>=r;let n=Math.abs(e),s=(r%n+n)%n;return e>1?o=>o>=r&&o%n===s:o=>o<=r&&o%n===s}i(Wa,"compile");var sf=new Set([9,10,12,13,32]),Ga=48,of=57;function Ya(t){switch(t=t.trim().toLowerCase(),t){case"even":return[2,0];case"odd":return[2,1]}let e=0,r=0,n=o(),s=a();if(e<t.length&&t.charAt(e)==="n"&&(e++,r=n*(s??1),l(),e<t.length?(n=o(),l(),s=a()):n=s=0),s===null||e<t.length)throw new Error(`n-th rule couldn't be parsed ('${t}')`);return[r,n*s];function o(){switch(t.charAt(e)){case"-":return e++,-1;case"+":{e++;break}}return 1}function a(){let c=e,u=0;for(;e<t.length&&t.charCodeAt(e)>=Ga&&t.charCodeAt(e)<=of;)u=u*10+(t.charCodeAt(e)-Ga),e++;return e===c?null:u}function l(){for(;e<t.length&&sf.has(t.charCodeAt(e));)e++}}i(Ya,"parse");function Qr(t){return Wa(Ya(t))}i(Qr,"nthCheck");function ee(t,{adapter:e,cacheResults:r},n){if(r===!1||typeof WeakMap>"u")return a=>t(a)&&n(a);let s=new WeakMap;function o(a){let l=n(a);return s.set(a,l),l}return i(o,"addResultToCache"),i(function(l){if(!t(l))return!1;if(s.has(l))return s.get(l)??!1;let c=l;do{let u=gt(c,e);if(u===null)return o(l);c=u}while(!s.has(c));return s.get(c)?o(l):!1},"cachedMatcher")}i(ee,"cacheParentResults");function re(t){let{context:e,rootFunc:r,...n}=t;return n}i(re,"copyOptions");function af(t,e){if(e[0]!=="*"&&e[0]!==t[0])return!1;let r=1;for(let n=1;n<e.length;n++)if(e[n]!=="*"){for(;r<t.length&&t[r]!==e[n];)if(t[r++].length<=1)return!1;if(r>=t.length)return!1;r++}return!0}i(af,"extendedFilter");var uf=/^(.+?)\s+of\s+(.+)$/is;function He(t,e){return i(function(n,s,o,a,l){let{adapter:c,equals:u}=o,h=e?null:s.match(uf),f=Qr(h?h[1].trim():s);if(f===D)return D;let p=h&&l?l(Mt(h[2].trim()),re(o),a):void 0;if(p===D)return D;if(f===kt&&!p)return x=>gt(x,c)!==null&&n(x);let m=p?(x,C)=>p(C):e?(x,C)=>c.getName(C)===c.getName(x):kt;return t?i(function(C){if(p&&!p(C))return!1;let I=c.getSiblings(C),P=0;for(let W=I.length-1;W>=0;W--){let G=I[W];if(u(C,G))break;c.isTag(G)&&m(C,G)&&P++}return f(P)&&n(C)},"nthLast"):i(function(C){if(p&&!p(C))return!1;let I=c.getSiblings(C),P=0;for(let W of I){if(u(C,W))break;c.isTag(W)&&m(C,W)&&P++}return f(P)&&n(C)},"nth")},"nth")}i(He,"compileNth");var We={contains(t,e,r){let{getText:n}=r.adapter;return ee(t,r,s=>n(s).includes(e))},icontains(t,e,r){let n=e.toLowerCase(),{getText:s}=r.adapter;return ee(t,r,o=>s(o).toLowerCase().includes(n))},"nth-child":He(!1,!1),"nth-last-child":He(!0,!1),"nth-of-type":He(!1,!0),"nth-last-of-type":He(!0,!0),root(t,e,{adapter:r}){return n=>(typeof r.isDocumentRoot=="function"?r.isDocumentRoot(n):gt(n,r)===null)&&t(n)},scope(t,e,r,n){let{equals:s}=r;return!n||n.length===0?We.root(t,e,r):n.length===1?o=>s(n[0],o)&&t(o):o=>n.includes(o)&&t(o)},lang(t,e,{adapter:r}){let n=e.split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>s.replace(/^['"]|['"]$/g,"").toLowerCase().split("-"));return i(function(o){let a=o;for(;a!=null;){let l=r.getAttributeValue(a,"xml:lang")??r.getAttributeValue(a,"lang");if(l!=null){if(!l)return n.some(h=>h[0]==="")&&t(o);let u=l.toLowerCase().split("-");return n.some(h=>af(u,h))&&t(o)}let c=r.getParent(a);a=c!=null&&r.isTag(c)?c:null}return n.some(l=>l[0]==="")&&t(o)},"lang")},hover:Xr("isHovered"),visited:Xr("isVisited"),active:Xr("isActive")};function Xr(t){return i(function(r,n,{adapter:s}){let o=s[t];return typeof o!="function"?D:i(function(l){return o(l)&&r(l)},"active")},"dynamicPseudo")}i(Xr,"dynamicStatePseudo");var Kr={empty(t,{adapter:e}){return e.getChildren(t).every(n=>!e.isTag(n)&&e.getText(n)==="")},"first-child"(t,{adapter:e,equals:r}){if(e.prevElementSibling)return e.prevElementSibling(t)==null;let n=e.getSiblings(t).find(s=>e.isTag(s));return n!=null&&r(t,n)},"last-child"(t,{adapter:e,equals:r}){let n=e.getSiblings(t);for(let s=n.length-1;s>=0;s--){if(r(t,n[s]))return!0;if(e.isTag(n[s]))break}return!1},"first-of-type"(t,{adapter:e,equals:r}){let n=e.getSiblings(t),s=e.getName(t);for(let o of n){if(r(t,o))return!0;if(e.isTag(o)&&e.getName(o)===s)break}return!1},"last-of-type"(t,{adapter:e,equals:r}){let n=e.getSiblings(t),s=e.getName(t);for(let o=n.length-1;o>=0;o--){let a=n[o];if(r(t,a))return!0;if(e.isTag(a)&&e.getName(a)===s)break}return!1},"only-of-type"(t,{adapter:e,equals:r}){let n=e.getName(t);return e.getSiblings(t).every(s=>r(t,s)||!e.isTag(s)||e.getName(s)!==n)},"only-child"(t,{adapter:e,equals:r}){return e.getSiblings(t).every(n=>r(t,n)||!e.isTag(n))}};function Jr(t,e,r,n){if(r===null){if(t.length>n)throw new Error(`Pseudo-class :${e} requires an argument`)}else if(t.length===n)throw new Error(`Pseudo-class :${e} doesn't have any arguments`)}i(Jr,"verifyPseudoArguments");function ne(t){return t.type==="_flexibleDescendant"||xe(t)}i(ne,"isTraversal");function ja(t){let e=t.map(Ge);for(let r=1;r<t.length;r++){let n=e[r];if(!(n<0))for(let s=r;s>0&&n<e[s-1];s--){let o=t[s];t[s]=t[s-1],t[s-1]=o,e[s]=e[s-1],e[s-1]=n}}}i(ja,"sortRules");function lf(t){switch(t.action){case N.Exists:return 10;case N.Equals:return t.name==="id"?9:8;case N.Not:return 7;case N.Start:return 6;case N.End:return 6;case N.Any:return 5;case N.Hyphen:return 4;case N.Element:return 3}}i(lf,"getAttributeQuality");function Ge(t){switch(t.type){case k.Universal:return 50;case k.Tag:return 30;case k.Attribute:return Math.floor(lf(t)/(t.ignoreCase?2:1));case k.Pseudo:return t.data?t.name==="has"||t.name==="contains"||t.name==="icontains"?0:Array.isArray(t.data)?Math.max(0,Math.min(...t.data.map(e=>Math.min(...e.map(Ge))))):2:3;default:return-1}}i(Ge,"getQuality");function ye(t){return t.type===k.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(ye)))}i(ye,"includesScopePseudo");var tn={};function cf(t){return t.some(e=>e.length>0&&(ne(e[0])||e.some(ye)))}i(cf,"hasDependsOnCurrentElement");var Zr=i((t,e,r,n,s)=>{let o=s(e,re(r),n);return o===kt?t:o===D?D:a=>o(a)&&t(a)},"is"),Ye={is:Zr,matches:Zr,where:Zr,not(t,e,r,n,s){let o=s(e,re(r),n);return o===D?t:o===kt?D:a=>!o(a)&&t(a)},has(t,e,r,n,s){let{adapter:o}=r,a=re(r);a.relativeSelector=!0;let l=e.some(f=>f.some(ne))?[tn]:void 0,c=cf(e),u=s(e,a,l);if(u===D)return D;if(l&&u!==kt)return c?f=>{if(!t(f))return!1;l[0]=f;let p=o.getChildren(f);return te(u,u.shouldTestNextSiblings?[...p,...qe(f,o)]:p,r)!==null}:ee(t,r,f=>(l[0]=f,te(u,o.getChildren(f),r)!==null));let h=i(f=>te(u,o.getChildren(f),r)!==null,"hasOne");return c?f=>t(f)&&h(f):ee(t,r,h)}};function za(t,e,r,n,s){let{name:o,data:a}=e;if(Array.isArray(a)){if(!(o in Ye))throw new Error(`Unknown pseudo-class :${o}(${a})`);return Ye[o](t,a,r,n,s)}let l=r.pseudos?.[o],c=typeof l=="string"?l:Ha[o];if(typeof c=="string"){if(a!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let u=Mt(c);return Ye.is(t,u,r,n,s)}if(typeof l=="function")return Jr(l,o,a,1),u=>l(u,a)&&t(u);if(o in We)return We[o](t,a,r,n,s);if(o in Kr){let u=Kr[o];return Jr(u,o,a,2),h=>u(h,r,a)&&t(h)}throw new Error(`Unknown pseudo-class :${o}`)}i(za,"compilePseudoSelector");function Qa(t,e,r,n,s,o){let{adapter:a,equals:l,cacheResults:c}=r;switch(e.type){case k.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case k.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case k.Attribute:{if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return r.lowerCaseAttributeNames!==!1&&(!r.xmlMode||r.lowerCaseAttributeNames)&&(e.name=e.name.toLowerCase()),Va[e.action](t,e,r)}case k.Pseudo:return za(t,e,r,n,s);case k.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:u}=e;return(!r.xmlMode||r.lowerCaseTags)&&(u=u.toLowerCase()),i(function(f){return a.getName(f)===u&&t(f)},"tag")}case k.Descendant:{if(!o||c===!1||typeof WeakMap>"u")return i(function(f){let p=f;for(;p=gt(p,a);)if(t(p))return!0;return!1},"descendant");let u=new WeakMap;return i(function(f){let p=f,m;for(;p=gt(p,a);){let x=u.get(p);if(x===void 0){if(m??={matches:!1},m.matches=t(p),u.set(p,m),m.matches)return!0}else return m&&(m.matches=x.matches),x.matches}return!1},"cachedDescendant")}case"_flexibleDescendant":return i(function(h){let f=h;do{if(t(f))return!0;f=gt(f,a)}while(f);return!1},"flexibleDescendant");case k.Parent:return i(function(h){return a.getChildren(h).some(f=>a.isTag(f)&&t(f))},"parent");case k.Child:return i(function(h){let f=gt(h,a);return f!==null&&t(f)},"child");case k.Sibling:return i(function(h){let f=a.getSiblings(h);for(let p of f){if(l(h,p))break;if(a.isTag(p)&&t(p))return!0}return!1},"sibling");case k.Adjacent:return a.prevElementSibling?i(function(h){let f=a.prevElementSibling(h);return f!=null&&t(f)},"adjacent"):i(function(h){let f=a.getSiblings(h),p;for(let m of f){if(l(h,m))break;a.isTag(m)&&(p=m)}return!!p&&t(p)},"adjacent");case k.Universal:{if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}}i(Qa,"compileGeneralSelector");var hf={type:k.Descendant},ff={type:"_flexibleDescendant"},pf={type:k.Pseudo,name:"scope",data:null};function df(t,{adapter:e},r){let n=!!r?.every(s=>s===tn||e.isTag(s)&&gt(s,e)!==null);for(let s of t){if(!(s.length>0&&ne(s[0])&&s[0].type!==k.Descendant))if(n&&!s.some(ye))s.unshift(hf);else continue;s.unshift(pf)}}i(df,"absolutize");function en(t,e,r){for(let u of t)ja(u);let{context:n=r,rootFunc:s=kt}=e,o=Array.isArray(n),a=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)df(t,e,a);else if(t.some(u=>u.length>0&&ne(u[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let l=!1,c=D;t:for(let u of t){if(u.length>=2){let[p,m]=u;p.type!==k.Pseudo||p.name!=="scope"||(o&&m.type===k.Descendant?u[1]=ff:(m.type===k.Adjacent||m.type===k.Sibling)&&(l=!0))}let h=s,f=!1;for(let p of u)if(h=Qa(h,p,e,a,en,f),Ge(p)===0&&(f=!0),h===D)continue t;if(h===s)return s;c=c===D?h:mf(c,h)}return c.shouldTestNextSiblings=l,c}i(en,"compileToken");function mf(t,e){return r=>t(r)||e(r)}i(mf,"or");var Ka=i((t,e)=>t===e,"defaultEquals"),Xa={adapter:{...zr,isTag:Z},equals:Ka};function rn(t){let e=t??Xa;return e.adapter??=Xa.adapter,e.equals??=e.adapter?.equals??Ka,e}i(rn,"convertOptionFormats");function Ja(t,e,r){let n=rn(e),s=nn(t,n,r);return s===D?D:o=>n.adapter.isTag(o)&&s(o)}i(Ja,"compile");function nn(t,e,r){return en(typeof t=="string"?Mt(t):t,rn(e),r)}i(nn,"_compileUnsafe");function Za(t){return i(function(r,n,s){let o=rn(s);typeof r!="function"&&(r=nn(r,o,n));let a=tu(n,o.adapter,r.shouldTestNextSiblings);return t(r,a,o)},"select")}i(Za,"getSelectorFunction");function tu(t,e,r=!1){return r&&(t=gf(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}i(tu,"prepareContext");function gf(t,e){let r=Array.isArray(t)?[...t]:[t],n=r.length;for(let s=0;s<n;s++){let o=qe(r[s],e);r.push(...o)}return r}i(gf,"appendNextSiblings");var eu=Za((t,e,r)=>t===D||!e||e.length===0?[]:$a(t,e,r)),xf=Za((t,e,r)=>t===D||!e||e.length===0?null:te(t,e,r));function Sf(t,e,r){return(typeof e=="function"?e:Ja(e,r))(t)}i(Sf,"is");var kf=eu;var Cn={};y(Cn,{AXES:()=>cn,NodeSet:()=>ct,T:()=>d,XPathResult:()=>Gt,XPathSyntaxError:()=>j,XPathTypeError:()=>_,coreFunctions:()=>rr,createEvaluator:()=>Fu,evaluate:()=>z,isNodeSet:()=>F,makeRootContext:()=>nr,numberToString:()=>fn,parse:()=>Qe,stringToNumber:()=>ht,toBoolean:()=>X,toNumber:()=>Q,toStr:()=>M,tokenize:()=>ze});var j=class extends Error{static{i(this,"XPathSyntaxError")}constructor(e,r){super(r==null?e:`${e} (at position ${r})`),this.name="XPathSyntaxError",this.pos=r??null}},_=class extends Error{static{i(this,"XPathTypeError")}constructor(e){super(e),this.name="XPathTypeError"}};var d={LPAREN:"LPAREN",RPAREN:"RPAREN",LBRACKET:"LBRACKET",RBRACKET:"RBRACKET",AT:"AT",COMMA:"COMMA",DOUBLECOLON:"DOUBLECOLON",SLASH:"SLASH",DOUBLESLASH:"DOUBLESLASH",DOT:"DOT",DOTDOT:"DOTDOT",PIPE:"PIPE",PLUS:"PLUS",MINUS:"MINUS",EQ:"EQ",NE:"NE",LT:"LT",LE:"LE",GT:"GT",GE:"GE",MULTIPLY:"MULTIPLY",AND:"AND",OR:"OR",MOD:"MOD",DIV:"DIV",AXISNAME:"AXISNAME",NODETYPE:"NODETYPE",FUNCNAME:"FUNCNAME",NAMETEST:"NAMETEST",NUMBER:"NUMBER",LITERAL:"LITERAL",VARREF:"VARREF",EOF:"EOF"},yf=new Set([d.AT,d.DOUBLECOLON,d.LPAREN,d.LBRACKET,d.COMMA,d.SLASH,d.DOUBLESLASH,d.PIPE,d.PLUS,d.MINUS,d.EQ,d.NE,d.LT,d.LE,d.GT,d.GE,d.MULTIPLY,d.AND,d.OR,d.MOD,d.DIV]),ru=new Map([["and",d.AND],["or",d.OR],["mod",d.MOD],["div",d.DIV]]),bf=new Set(["node","text","comment","processing-instruction"]);function be(t){return t>="0"&&t<="9"}i(be,"isDigit");function Ee(t){return t>="A"&&t<="Z"||t>="a"&&t<="z"||t==="_"||t.charCodeAt(0)>=128}i(Ee,"isNameStart");function Ef(t){return Ee(t)||be(t)||t==="-"||t==="."}i(Ef,"isNameChar");function nu(t){return t===" "||t===" "||t==="\r"||t===`
7
+ `}i(nu,"isWhitespace");function ze(t){if(typeof t!="string")throw new j("expression must be a string");let e=[],r=0,n=t.length,s=i(()=>e.length?e[e.length-1].type:null,"prevType"),o=i(()=>e.length>0&&!yf.has(s()),"inOperatorPosition"),a=i((c,u,h)=>e.push({type:c,value:u,pos:h}),"push"),l=i(c=>{let u=c;for(;u<n&&nu(t[u]);)u++;return u},"skipWs");for(;r<n;){let c=t[r];if(nu(c)){r++;continue}let u=r;if(c==="/"){t[r+1]==="/"?(a(d.DOUBLESLASH,"//",u),r+=2):(a(d.SLASH,"/",u),r+=1);continue}if(c==="!"){if(t[r+1]==="="){a(d.NE,"!=",u),r+=2;continue}throw new j("unexpected '!'",u)}if(c==="<"){t[r+1]==="="?(a(d.LE,"<=",u),r+=2):(a(d.LT,"<",u),r+=1);continue}if(c===">"){t[r+1]==="="?(a(d.GE,">=",u),r+=2):(a(d.GT,">",u),r+=1);continue}if(c==="="){a(d.EQ,"=",u),r+=1;continue}if(c==="|"){a(d.PIPE,"|",u),r+=1;continue}if(c==="+"){a(d.PLUS,"+",u),r+=1;continue}if(c==="-"){a(d.MINUS,"-",u),r+=1;continue}if(c==="("){a(d.LPAREN,"(",u),r+=1;continue}if(c===")"){a(d.RPAREN,")",u),r+=1;continue}if(c==="["){a(d.LBRACKET,"[",u),r+=1;continue}if(c==="]"){a(d.RBRACKET,"]",u),r+=1;continue}if(c===","){a(d.COMMA,",",u),r+=1;continue}if(c==="@"){a(d.AT,"@",u),r+=1;continue}if(c===":"&&t[r+1]===":"){a(d.DOUBLECOLON,"::",u),r+=2;continue}if(c==='"'||c==="'"){r+=1;let h="";for(;r<n&&t[r]!==c;)h+=t[r],r+=1;if(r>=n)throw new j("unterminated string literal",u);r+=1,a(d.LITERAL,h,u);continue}if(be(c)||c==="."&&be(t[r+1])){let h="";for(;r<n&&be(t[r]);)h+=t[r],r+=1;if(t[r]==="."&&t[r+1]!==".")for(h+=".",r+=1;r<n&&be(t[r]);)h+=t[r],r+=1;a(d.NUMBER,Number(h),u);continue}if(c==="."){t[r+1]==="."?(a(d.DOTDOT,"..",u),r+=2):(a(d.DOT,".",u),r+=1);continue}if(c==="$"){r+=1;let h=Cf(t,r);if(h==null)throw new j("expected name after '$'",u);r=h.end,a(d.VARREF,h.value,u);continue}if(c==="*"){o()?a(d.MULTIPLY,"*",u):a(d.NAMETEST,{prefix:null,local:"*"},u),r+=1;continue}if(Ee(c)){let h=Tf(t,r);r=h.end;let{prefix:f,local:p}=h,m=l(r),x=t[m]==="(",C=t[m]===":"&&t[m+1]===":";if(f==null&&p!=="*"&&o()&&ru.has(p)){a(ru.get(p),p,u);continue}if(C&&f==null&&p!=="*"){a(d.AXISNAME,p,u);continue}if(x&&f==null&&p!=="*"){bf.has(p)?a(d.NODETYPE,p,u):a(d.FUNCNAME,{prefix:null,local:p},u);continue}if(x&&f!=null){a(d.FUNCNAME,{prefix:f,local:p},u);continue}a(d.NAMETEST,{prefix:f,local:p},u);continue}throw new j(`unexpected character '${c}'`,u)}return a(d.EOF,null,n),e}i(ze,"tokenize");function je(t,e){let r=t.length,n=e+1;for(;n<r&&Ef(t[n]);)n++;return n}i(je,"ncNameEnd");function Cf(t,e){if(e>=t.length||!Ee(t[e]))return null;let r=je(t,e);return t[r]===":"&&t[r+1]!==":"&&Ee(t[r+1]??"")&&(r=je(t,r+1)),{value:t.slice(e,r),end:r}}i(Cf,"readQNameString");function Tf(t,e){let r=je(t,e),n=t.slice(e,r);if(t[r]===":"&&t[r+1]!==":"){if(t[r+1]==="*")return{prefix:n,local:"*",end:r+2};if(Ee(t[r+1]??"")){let s=je(t,r+1);return{prefix:n,local:t.slice(r+1,s),end:s}}throw new j(`expected name after ':' in '${n}:'`,r)}return{prefix:null,local:n,end:r}}i(Tf,"readName");var Af=new Set(["last","position","count","sum","floor","ceiling","round","number","string-length"]);function wf(t){switch(t.type){case"Number":case"Unary":return!0;case"Binary":return t.op==="+"||t.op==="-"||t.op==="*"||t.op==="div"||t.op==="mod";case"Function":return t.prefix==null&&Af.has(t.name);default:return!1}}i(wf,"mayYieldNumber");function on(t){if(t.type==="Function"&&t.prefix==null&&(t.name==="position"||t.name==="last"))return!0;for(let e in t){let r=t[e];if(!(!r||typeof r!="object")){if(Array.isArray(r)){for(let n of r)if(n&&typeof n.type=="string"&&on(n))return!0}else if(typeof r.type=="string"&&on(r))return!0}}return!1}i(on,"referencesPositionOrLast");function Lf(t){for(let e of t)if(wf(e)||on(e))return!1;return!0}i(Lf,"predicatesArePositionStable");function Nf(t){return t.axis==="descendant-or-self"&&t.nodeTest.kind==="type"&&t.nodeTest.name==="node"&&t.predicates.length===0}i(Nf,"isDescendantOrSelfNodeStep");function vf(t){for(let e=0;e<t.length-1;e++){let r=t[e],n=t[e+1];Nf(r)&&n.axis==="child"&&Lf(n.predicates)&&t.splice(e,2,{type:"Step",axis:"descendant",nodeTest:n.nodeTest,predicates:n.predicates})}return t}i(vf,"fuseDescendantSteps");function Tt(t){if(t==null||typeof t!="object")return t;switch(t.type){case"Path":Tt(t.root);for(let e of t.steps)for(let r of e.predicates)Tt(r);vf(t.steps);break;case"Filter":Tt(t.primary);for(let e of t.predicates)Tt(e);break;case"Binary":Tt(t.left),Tt(t.right);break;case"Unary":Tt(t.operand);break;case"Function":for(let e of t.args)Tt(e);break;default:break}return t}i(Tt,"optimize");var cn=new Set(["ancestor","ancestor-or-self","attribute","child","descendant","descendant-or-self","following","following-sibling","namespace","parent","preceding","preceding-sibling","self"]),Pf=new Set([d.AT,d.AXISNAME,d.NAMETEST,d.NODETYPE,d.DOT,d.DOTDOT]),If=new Set([d.LPAREN,d.LITERAL,d.NUMBER,d.FUNCNAME,d.VARREF]),Df={[d.OR]:"or"},Of={[d.AND]:"and"},Rf={[d.EQ]:"=",[d.NE]:"!="},Ff={[d.LT]:"<",[d.LE]:"<=",[d.GT]:">",[d.GE]:">="},Mf={[d.PLUS]:"+",[d.MINUS]:"-"},_f={[d.MULTIPLY]:"*",[d.DIV]:"div",[d.MOD]:"mod"};function un(t,e){return{type:"Step",axis:t,nodeTest:{kind:"type",name:e,literal:null},predicates:[]}}i(un,"nodeTypeStep");function an(){return un("descendant-or-self","node")}i(an,"descendantOrSelfStep");var ln=class{static{i(this,"Parser")}constructor(e){this.tokens=e,this.pos=0}peek(){return this.tokens[this.pos]}next(){return this.tokens[this.pos++]}is(e){return this.tokens[this.pos].type===e}expect(e){let r=this.tokens[this.pos];if(r.type!==e)throw new j(`expected ${e} but found ${r.type}`,r.pos);return this.next()}parse(){let e=this.parseExpr();if(!this.is(d.EOF)){let r=this.peek();throw new j(`unexpected trailing token ${r.type}`,r.pos)}return e}parseExpr(){return this.parseOr()}parseBinaryLeft(e,r){let n=e.call(this);for(;;){let s=r[this.peek().type];if(!s)return n;this.next();let o=e.call(this);n={type:"Binary",op:s,left:n,right:o}}}parseOr(){return this.parseBinaryLeft(this.parseAnd,Df)}parseAnd(){return this.parseBinaryLeft(this.parseEquality,Of)}parseEquality(){return this.parseBinaryLeft(this.parseRelational,Rf)}parseRelational(){return this.parseBinaryLeft(this.parseAdditive,Ff)}parseAdditive(){return this.parseBinaryLeft(this.parseMultiplicative,Mf)}parseMultiplicative(){return this.parseBinaryLeft(this.parseUnary,_f)}parseUnary(){return this.is(d.MINUS)?(this.next(),{type:"Unary",operand:this.parseUnary()}):this.parseUnion()}parseUnion(){let e=this.parsePathExpr();for(;this.is(d.PIPE);){this.next();let r=this.parsePathExpr();e={type:"Binary",op:"union",left:e,right:r}}return e}parsePathExpr(){if(If.has(this.peek().type)){let e=this.parseFilterExpr();if(this.is(d.SLASH)||this.is(d.DOUBLESLASH)){let r=[];return this.is(d.DOUBLESLASH)&&r.push(an()),this.next(),this.parseRelativeSteps(r),{type:"Path",root:e,steps:r}}return e}return this.parseLocationPath()}parseLocationPath(){if(this.is(d.SLASH)){this.next();let r=[];return Pf.has(this.peek().type)&&this.parseRelativeSteps(r),{type:"Path",root:{type:"Root"},steps:r}}if(this.is(d.DOUBLESLASH)){this.next();let r=[an()];return this.parseRelativeSteps(r),{type:"Path",root:{type:"Root"},steps:r}}let e=[];return this.parseRelativeSteps(e),{type:"Path",root:null,steps:e}}parseRelativeSteps(e){for(e.push(this.parseStep());;)if(this.is(d.SLASH))this.next(),e.push(this.parseStep());else if(this.is(d.DOUBLESLASH))this.next(),e.push(an()),e.push(this.parseStep());else return e}parseStep(){if(this.is(d.DOT))return this.next(),un("self","node");if(this.is(d.DOTDOT))return this.next(),un("parent","node");let e="child";if(this.is(d.AT))this.next(),e="attribute";else if(this.is(d.AXISNAME)){let s=this.next().value;if(!cn.has(s))throw new j(`unknown axis '${s}'`,this.tokens[this.pos-1].pos);this.expect(d.DOUBLECOLON),e=s}let r=this.parseNodeTest(),n=this.parsePredicates();return{type:"Step",axis:e,nodeTest:r,predicates:n}}parseNodeTest(){if(this.is(d.NODETYPE)){let r=this.next().value;this.expect(d.LPAREN);let n=null;return r==="processing-instruction"&&this.is(d.LITERAL)&&(n=this.next().value),this.expect(d.RPAREN),{kind:"type",name:r,literal:n}}if(this.is(d.NAMETEST)){let{prefix:r,local:n}=this.next().value;return{kind:"name",prefix:r,local:n}}let e=this.peek();throw new j(`expected a node test but found ${e.type}`,e.pos)}parsePredicates(){let e=[];for(;this.is(d.LBRACKET);)this.next(),e.push(this.parseExpr()),this.expect(d.RBRACKET);return e}parseFilterExpr(){let e=this.parsePrimary(),r=this.parsePredicates();return r.length===0?e:{type:"Filter",primary:e,predicates:r}}parsePrimary(){let e=this.peek();switch(e.type){case d.VARREF:throw new j(`variable references are not supported ($${e.value})`,e.pos);case d.LPAREN:{this.next();let r=this.parseExpr();return this.expect(d.RPAREN),r}case d.LITERAL:return this.next(),{type:"Literal",value:e.value};case d.NUMBER:return this.next(),{type:"Number",value:e.value};case d.FUNCNAME:return this.parseFunctionCall();default:throw new j(`unexpected token ${e.type}`,e.pos)}}parseFunctionCall(){let{prefix:e,local:r}=this.next().value;this.expect(d.LPAREN);let n=[];if(!this.is(d.RPAREN))for(n.push(this.parseExpr());this.is(d.COMMA);)this.next(),n.push(this.parseExpr());return this.expect(d.RPAREN),{type:"Function",prefix:e??null,name:r,args:n}}};function Qe(t){return Tt(new ln(ze(t)).parse())}i(Qe,"parse");var ct=class{static{i(this,"NodeSet")}constructor(e=[],r=!1){this.nodes=e,this.sorted=r}get size(){return this.nodes.length}ordered(e){return this.sorted||(this.nodes.sort((r,n)=>e.compareDocumentPosition(r,n)),this.sorted=!0),this.nodes}first(e){let r=this.nodes;if(r.length===0)return null;if(r.length===1||this.sorted)return r[0];let n=r[0];for(let s=1;s<r.length;s++)e.compareDocumentPosition(r[s],n)<0&&(n=r[s]);return n}};function F(t){return t instanceof ct}i(F,"isNodeSet");function X(t){if(typeof t=="boolean")return t;if(typeof t=="number")return t!==0&&!Number.isNaN(t);if(typeof t=="string")return t.length>0;if(F(t))return t.size>0;throw new _(`cannot convert ${hn(t)} to boolean`)}i(X,"toBoolean");function Q(t,e){if(typeof t=="number")return t;if(typeof t=="boolean")return t?1:0;if(typeof t=="string")return ht(t);if(F(t))return ht(iu(t,e));throw new _(`cannot convert ${hn(t)} to number`)}i(Q,"toNumber");function M(t,e){if(typeof t=="string")return t;if(typeof t=="number")return fn(t);if(typeof t=="boolean")return t?"true":"false";if(F(t))return iu(t,e);throw new _(`cannot convert ${hn(t)} to string`)}i(M,"toStr");function iu(t,e){let r=t.first(e);return r==null?"":e.stringValue(r)}i(iu,"nodeSetString");function hn(t){return t===null?"null":typeof t}i(hn,"describe");var Uf=/^[ \t\r\n]+|[ \t\r\n]+$/g,Bf=/^-?(\d+(\.\d*)?|\.\d+)$/;function ht(t){let e=t.replace(Uf,"");return Bf.test(e)?Number(e):NaN}i(ht,"stringToNumber");function fn(t){if(Number.isNaN(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(t===0)return"0";let e=String(t);return e.indexOf("e")===-1&&e.indexOf("E")===-1?e:Vf(e)}i(fn,"numberToString");function Vf(t){let e=t,r=e[0]==="-";r&&(e=e.slice(1));let[n,s]=e.split(/[eE]/),o=Number(s),[a,l=""]=n.split("."),c=a+l,u=a.length+o,h;return u<=0?h=`0.${"0".repeat(-u)}${c}`:u>=c.length?h=c+"0".repeat(u-c.length):h=`${c.slice(0,u)}.${c.slice(u)}`,r?`-${h}`:h}i(Vf,"expandExponential");var $f={"=":i((t,e)=>t===e,"="),"!=":i((t,e)=>t!==e,"!=")},ou={"<":i((t,e)=>t<e,"<"),"<=":i((t,e)=>t<=e,"<="),">":i((t,e)=>t>e,">"),">=":i((t,e)=>t>=e,">=")};function au(t,e,r,n){let s=$f[t];if(F(e)&&F(r)){let o=r.nodes.map(a=>n.stringValue(a));for(let a of e.nodes){let l=n.stringValue(a);for(let c of o)if(s(l,c))return!0}return!1}if(F(e)||F(r)){let o=F(e)?e:r,a=F(e)?r:e;if(typeof a=="boolean")return s(X(o),a);if(typeof a=="number"){for(let c of o.nodes)if(s(ht(n.stringValue(c)),a))return!0;return!1}let l=String(a);for(let c of o.nodes)if(s(n.stringValue(c),l))return!0;return!1}return typeof e=="boolean"||typeof r=="boolean"?s(X(e),X(r)):typeof e=="number"||typeof r=="number"?s(Q(e,n),Q(r,n)):s(M(e,n),M(r,n))}i(au,"compareEquality");function uu(t,e,r,n){let s=ou[t],o=su(e,n),a=su(r,n);for(let l of o)for(let c of a)if(s(l,c))return!0;return!1}i(uu,"compareRelational");function su(t,e){return F(t)?t.nodes.map(r=>ht(e.stringValue(r))):[Q(t,e)]}i(su,"numericValues");function lu(t,e,r){if(t==="="||t==="!="){let o=typeof r=="number"?ht(e)===r:e===r;return t==="="?o:!o}let n=ht(e),s=typeof r=="number"?r:ht(r);return ou[t](n,s)}i(lu,"compareValueLiteral");var ie="http://www.w3.org/XML/1998/namespace",cu="http://www.w3.org/1999/xhtml";function Xe(t,e){if(e.previousSibling)return e.previousSibling(t);let r=e.parent(t);if(!r)return null;let n=e.childNodes(r),s=n.indexOf(t);return s>0?n[s-1]:null}i(Xe,"previousSibling");function Ke(t,e){if(e.nextSibling)return e.nextSibling(t);let r=e.parent(t);if(!r)return null;let n=e.childNodes(r),s=n.indexOf(t);return s>=0&&s+1<n.length?n[s+1]:null}i(Ke,"nextSibling");function Je(t,e,r){let n=[];for(Ze(t,e,n);n.length;){let s=n.pop();r.push(s),Ze(s,e,n)}return r}i(Je,"collectDescendants");function fu(t,e,r,n){let s=[];n&&r(t)&&s.push(t);let o=[];for(Ze(t,e,o);o.length;){let a=o.pop();r(a)&&s.push(a),Ze(a,e,o)}return s}i(fu,"descendantsMatching");function Ze(t,e,r){let n=e.childNodes(t);for(let s=n.length-1;s>=0;s--)r.push(n[s])}i(Ze,"pushChildrenReversed");function hu(t,e){let r=[],n=e.parent(t);for(;n;)r.push(n),n=e.parent(n);return r}i(hu,"ancestors");var qf={self:i(t=>[t],"self"),child:i((t,e)=>e.childNodes(t),"child"),parent:i((t,e)=>{let r=e.parent(t);return r?[r]:[]},"parent"),descendant:i((t,e)=>Je(t,e,[]),"descendant"),"descendant-or-self":i((t,e)=>Je(t,e,[t]),"descendant-or-self"),ancestor:i((t,e)=>hu(t,e),"ancestor"),"ancestor-or-self":i((t,e)=>[t,...hu(t,e)],"ancestor-or-self"),"following-sibling":i((t,e)=>{let r=[];for(let n=Ke(t,e);n;n=Ke(n,e))r.push(n);return r},"following-sibling"),"preceding-sibling":i((t,e)=>{let r=[];for(let n=Xe(t,e);n;n=Xe(n,e))r.push(n);return r},"preceding-sibling"),following:i((t,e)=>{let r=[],n=t;for(;n&&e.nodeType(n)!==9;){for(let s=Ke(n,e);s;s=Ke(s,e))r.push(s),Je(s,e,r);n=e.parent(n)}return r.sort((s,o)=>e.compareDocumentPosition(s,o)),r},"following"),preceding:i((t,e)=>{let r=[],n=t;for(;n&&e.nodeType(n)!==9;){for(let s=Xe(n,e);s;s=Xe(s,e))r.push(s),Je(s,e,r);n=e.parent(n)}return r.sort((s,o)=>e.compareDocumentPosition(s,o)),r.reverse(),r},"preceding"),attribute:i((t,e)=>e.attributes(t),"attribute"),namespace:i(()=>[],"namespace")};function pu(t){let e=qf[t];if(!e)throw new Error(`unsupported axis: ${t}`);return e}i(pu,"resolveAxis");function Gf(t){return t==="attribute"?2:1}i(Gf,"principalType");function du(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){let n=t.charCodeAt(r),s=e.charCodeAt(r);if(n>=65&&n<=90&&(n+=32),s>=65&&s<=90&&(s+=32),n!==s)return!1}return!0}i(du,"asciiEqualsIgnoreCase");function Yf(t){let e=0;for(;e<t.length;){let n=t.charCodeAt(e);if(n>=65&&n<=90)break;e+=1}if(e===t.length)return t;let r=t.slice(0,e);for(;e<t.length;e++){let n=t.charCodeAt(e);r+=n>=65&&n<=90?String.fromCharCode(n+32):t[e]}return r}i(Yf,"asciiLower");function gu(t,e){return e==="xml"?ie:t?typeof t=="function"?t(e)??null:typeof t.lookupNamespaceURI=="function"?t.lookupNamespaceURI(e)??null:null:null}i(gu,"resolvePrefix");function er(t,e,r,n,s,o){let a=n.nodeType(t);if(e.kind==="type")switch(e.name){case"node":return!0;case"text":return a===3;case"comment":return a===8;case"processing-instruction":return a!==7?!1:e.literal==null||n.nodeName(t)===e.literal;default:return!1}if(r==="namespace")return!1;let l=Gf(r);if(a!==l)return!1;if(e.prefix==null){if(e.local==="*")return!0;let h=n.namespaceURI(t)??null,f=n.localName(t);return o?l===2?h==null&&du(f,e.local):h===cu?du(f,e.local):h==null&&f===e.local:h==null&&f===e.local}let c=gu(s,e.prefix);if(c==null)throw new _(`unresolved namespace prefix '${e.prefix}'`);let u=n.namespaceURI(t)??null;return e.local==="*"?u===c:u===c&&n.localName(t)===e.local}i(er,"matchesNodeTest");function dn(t,e,r,n,s){if(r.nodeType(t)!==1)return;let o=null;if(e.prefix!=null&&(o=gu(n,e.prefix),o==null))throw new _(`unresolved namespace prefix '${e.prefix}'`);let a;s&&e.prefix==null?(a=mu.get(e),a===void 0&&(a=Yf(e.local),mu.set(e,a))):a=e.local;let l=r.getAttribute(t,o,a);return l??void 0}i(dn,"attributeValue");var mu=new WeakMap;function Ce(t,e){return e.nodeType(t)===9?t:e.ownerDocument(t)}i(Ce,"documentNodeOf");function xu(t,e){let r=Ce(t,e);return r?!!e.isHtmlDocument(r):!1}i(xu,"isHtmlDocument");function U(t,e,r,n=r){if(e.length<r||e.length>n){let s=r===n?`${r}`:`${r}-${n}`;throw new _(`${t}() expects ${s} argument(s), got ${e.length}`)}}i(U,"arity");function Sn(t,e){if(!F(e))throw new _(`${t}() requires a node-set argument`);return e}i(Sn,"requireNodeSet");function mn(t,e,r){return U(t,r,0,1),r.length===0?e.node:Sn(t,r[0]).first(e.adapter)}i(mn,"targetNode");function gn(t,e,r){return U(t,r,0,1),r.length===0?e.adapter.stringValue(e.node):M(r[0],e.adapter)}i(gn,"targetString");function xn(t){return Number.isNaN(t)||t===1/0||t===-1/0?t:Math.floor(t+.5)}i(xn,"xpathRound");function Wt(t){return t===32||t===9||t===13||t===10}i(Wt,"isXmlWhitespace");function Su(t){let e=[],r=t.length,n=0;for(;n<r;){for(;n<r&&Wt(t.charCodeAt(n));)n+=1;let s=n;for(;n<r&&!Wt(t.charCodeAt(n));)n+=1;n>s&&e.push(t.slice(s,n))}return e}i(Su,"splitWhitespace");function jf(t){let e=t.length,r=0;for(;r<e&&Wt(t.charCodeAt(r));)r+=1;let n=e;for(;n>r&&Wt(t.charCodeAt(n-1));)n-=1;let s=!1;for(let l=r;l<n;l+=1){let c=t.charCodeAt(l);if(Wt(c)&&(c!==32||l+1<n&&Wt(t.charCodeAt(l+1)))){s=!0;break}}if(!s)return t.slice(r,n);let o="",a=!1;for(let l=r;l<n;l+=1){let c=t.charCodeAt(l);if(Wt(c)){a=!0;continue}a&&(o+=" ",a=!1),o+=t[l]}return o}i(jf,"normalizeSpace");var rr={last:i((t,e)=>(U("last",e,0),t.size),"last"),position:i((t,e)=>(U("position",e,0),t.position),"position"),count:i((t,e)=>(U("count",e,1),Sn("count",e[0]).size),"count"),id:i((t,e)=>{U("id",e,1);let{adapter:r}=t,n=Ce(t.node,r),s;F(e[0])?s=e[0].nodes.flatMap(l=>Su(r.stringValue(l))):s=Su(M(e[0],r));let o=new Set,a=[];for(let l of s){let c=n?r.getElementById(n,l):null;c&&!o.has(c)&&(o.add(c),a.push(c))}return new ct(a,!1)},"id"),"local-name":i((t,e)=>{let r=mn("local-name",t,e);if(r==null)return"";let n=t.adapter.nodeType(r);return n===1||n===2?t.adapter.localName(r)??"":n===7?t.adapter.nodeName(r)??"":""},"local-name"),"namespace-uri":i((t,e)=>{let r=mn("namespace-uri",t,e);if(r==null)return"";let n=t.adapter.nodeType(r);return n===1||n===2?t.adapter.namespaceURI(r)??"":""},"namespace-uri"),name:i((t,e)=>{let r=mn("name",t,e);if(r==null)return"";let n=t.adapter.nodeType(r);return n===1||n===2||n===7?t.adapter.nodeName(r)??"":""},"name"),string:i((t,e)=>gn("string",t,e),"string"),concat:i((t,e)=>(U("concat",e,2,1/0),e.map(r=>M(r,t.adapter)).join("")),"concat"),"starts-with":i((t,e)=>(U("starts-with",e,2),M(e[0],t.adapter).startsWith(M(e[1],t.adapter))),"starts-with"),contains:i((t,e)=>(U("contains",e,2),M(e[0],t.adapter).includes(M(e[1],t.adapter))),"contains"),"substring-before":i((t,e)=>{U("substring-before",e,2);let r=M(e[0],t.adapter),n=M(e[1],t.adapter),s=r.indexOf(n);return s===-1?"":r.slice(0,s)},"substring-before"),"substring-after":i((t,e)=>{U("substring-after",e,2);let r=M(e[0],t.adapter),n=M(e[1],t.adapter),s=r.indexOf(n);return s===-1?"":r.slice(s+n.length)},"substring-after"),substring:i((t,e)=>{U("substring",e,2,3);let r=M(e[0],t.adapter),n=xn(Q(e[1],t.adapter)),s=e.length===3?n+xn(Q(e[2],t.adapter)):1/0,o="";for(let a=0;a<r.length;a++){let l=a+1;l>=n&&l<s&&(o+=r[a])}return o},"substring"),"string-length":i((t,e)=>gn("string-length",t,e).length,"string-length"),"normalize-space":i((t,e)=>jf(gn("normalize-space",t,e)),"normalize-space"),translate:i((t,e)=>{U("translate",e,3);let r=M(e[0],t.adapter),n=M(e[1],t.adapter),s=M(e[2],t.adapter),o="";for(let a=0;a<r.length;a++){let l=n.indexOf(r[a]);l===-1?o+=r[a]:l<s.length&&(o+=s[l])}return o},"translate"),boolean:i((t,e)=>(U("boolean",e,1),X(e[0])),"boolean"),not:i((t,e)=>(U("not",e,1),!X(e[0])),"not"),true:i((t,e)=>(U("true",e,0),!0),"true"),false:i((t,e)=>(U("false",e,0),!1),"false"),lang:i((t,e)=>{U("lang",e,1);let{adapter:r}=t,n=M(e[0],r).toLowerCase(),s=null;for(let o=t.node;o;o=r.parent(o))if(r.nodeType(o)===1){let a=r.getAttribute(o,ie,"lang");if(a!=null){s=a.toLowerCase();break}}return s==null?!1:s===n||s.startsWith(`${n}-`)},"lang"),number:i((t,e)=>(U("number",e,0,1),e.length===0?ht(t.adapter.stringValue(t.node)):Q(e[0],t.adapter)),"number"),sum:i((t,e)=>{U("sum",e,1);let r=Sn("sum",e[0]),n=0;for(let s of r.nodes)n+=ht(t.adapter.stringValue(s));return n},"sum"),floor:i((t,e)=>(U("floor",e,1),Math.floor(Q(e[0],t.adapter))),"floor"),ceiling:i((t,e)=>(U("ceiling",e,1),Math.ceil(Q(e[0],t.adapter))),"ceiling"),round:i((t,e)=>(U("round",e,1),xn(Q(e[0],t.adapter))),"round")};function nr(t,e,{resolver:r=null,functions:n=rr}={}){return{node:t,position:1,size:1,adapter:e,resolver:r,functions:n,cache:new Map,html:xu(t,e)}}i(nr,"makeRootContext");function ku(t,e,r,n){return{node:e,position:r,size:n,adapter:t.adapter,resolver:t.resolver,functions:t.functions,cache:t.cache,html:t.html}}i(ku,"withNode");function z(t,e){switch(t.type){case"Literal":return t.value;case"Number":return t.value;case"Unary":return-Q(z(t.operand,e),e.adapter);case"Binary":return Qf(t,e);case"Path":return wu(t,e);case"Filter":return np(t,e);case"Function":return ip(t,e);default:throw new _(`unknown AST node type '${t.type}'`)}}i(z,"evaluate");var zf={"+":i((t,e)=>t+e,"+"),"-":i((t,e)=>t-e,"-"),"*":i((t,e)=>t*e,"*"),div:i((t,e)=>t/e,"div"),mod:i((t,e)=>t%e,"mod")};function Qf(t,e){let{op:r}=t;if(r==="or")return X(z(t.left,e))||X(z(t.right,e));if(r==="and")return X(z(t.left,e))&&X(z(t.right,e));if(r==="union"){let s=z(t.left,e),o=z(t.right,e);if(!F(s)||!F(o))throw new _("union operand is not a node-set");return Zf(s,o)}if(r==="="||r==="!="||r==="<"||r==="<="||r===">"||r===">="){let s=Jf(t,e);if(s!==null)return s;let o=z(t.left,e),a=z(t.right,e);return r==="="||r==="!="?au(r,o,a,e.adapter):uu(r,o,a,e.adapter)}let n=zf[r];return n(Q(z(t.left,e),e.adapter),Q(z(t.right,e),e.adapter))}i(Qf,"evaluateBinary");var yu={"<":">",">":"<","<=":">=",">=":"<="};function Xf(t){return t.axis==="self"&&t.nodeTest.kind==="type"&&t.nodeTest.name==="node"&&t.predicates.length===0}i(Xf,"isSelfNodeStep");var bu=new WeakMap,Eu=new WeakMap;function Au(t){if(t.type!=="Path"||t.root!=null)return null;let e=bu.get(t);if(e!==void 0)return e;let{steps:r}=t,n=null;return r.length===1?n=r[0]:r.length===2&&Xf(r[0])&&(n=r[1]),bu.set(t,n),n}i(Au,"singleRelativeStep");function Cu(t){let e=Au(t);if(e===null||e.axis!=="attribute"||e.predicates.length!==0)return null;let r=e.nodeTest;return r.kind==="name"&&r.local!=="*"?r:null}i(Cu,"simpleAttributeNameTest");function Tu(t){if(t.type==="Literal"||t.type==="Number")return t.value}i(Tu,"constantOperand");function Kf(t){let e=Eu.get(t);if(e!==void 0)return e;let r=Cu(t.left),n=r===null?void 0:Tu(t.right),s=!0;(r===null||n===void 0)&&(r=Cu(t.right),n=r===null?void 0:Tu(t.left),s=!1);let o=null;if(r!==null&&n!==void 0){let a=!s&&yu[t.op]?yu[t.op]:t.op;o={nameTest:r,op:a,literal:n}}return Eu.set(t,o),o}i(Kf,"attributeComparisonShape");function Jf(t,e){let r=Kf(t);if(r===null)return null;let n=dn(e.node,r.nameTest,e.adapter,e.resolver,e.html);return n===void 0?!1:lu(r.op,n,r.literal)}i(Jf,"tryAttributeComparison");function Zf(t,e){if(e.nodes.length===0)return new ct(t.nodes.slice(),!1);if(t.nodes.length===0)return new ct(e.nodes.slice(),!1);let r=new Set(t.nodes),n=t.nodes.slice();for(let s of e.nodes)r.has(s)||(r.add(s),n.push(s));return new ct(n,!1)}i(Zf,"unionNodeSets");function wu(t,e){let{adapter:r}=e,n=t.root!=null&&t.root.type==="Root",s=n?Ce(e.node,r):null;if(n){let c=e.cache.get(t);if(c&&c.doc===s)return c.value}let{html:o}=e,a;if(t.root==null)a=[e.node];else if(n)a=s?[s]:[];else{let c=z(t.root,e);if(!F(c))throw new _("the left-hand side of a path step is not a node-set");a=c.nodes.slice()}for(let c of t.steps)a=ep(c,a,e,o);let l=new ct(a,!1);return n&&e.cache.set(t,{doc:s,value:l}),l}i(wu,"evaluatePath");var tp=new Set(["self","child","attribute","namespace"]);function ep(t,e,r,n){let s=[];if(e.length===0)return s;let{adapter:o}=r,a=e.length>1&&!tp.has(t.axis)?new Set:null,l=t.nodeTest,c=l.kind==="type"&&l.name==="node",u=!c&&(t.axis==="descendant"||t.axis==="descendant-or-self"),h=t.axis==="descendant-or-self",f=u?C=>er(C,l,t.axis,o,r.resolver,n):null,p=u?null:pu(t.axis),m=t.predicates,x=m.length?m.map(ir):null;for(let C of e){let I;if(u?I=fu(C,o,f,h):(I=p(C,o),c||(I=I.filter(P=>er(P,l,t.axis,o,r.resolver,n)))),x&&(I=Lu(I,m,x,r,n)),a)for(let P of I)a.has(P)||(a.add(P),s.push(P));else for(let P of I)s.push(P)}return s}i(ep,"evaluateStep");function ir(t){return t.type==="Path"||t.type==="Filter"?!0:t.type==="Binary"&&t.op==="union"?ir(t.left)&&ir(t.right):!1}i(ir,"isPureNodeSet");function Lu(t,e,r,n,s){let o=t,a=ku(n,n.node,1,1);for(let l=0;l<e.length;l++){let c=e[l],u=r[l],h=o.length;a.size=h;let f=null;for(let p=0;p<h;p++){let m=o[p],x=p+1;a.node=m,a.position=x;let C;if(u)C=kn(c,a,s);else{let I=z(c,a);C=typeof I=="number"?I===x:X(I)}C?f!==null&&f.push(m):f===null&&(f=o.slice(0,p))}f!==null&&(o=f)}return o}i(Lu,"applyPredicates");function kn(t,e,r){return t.type==="Binary"&&t.op==="union"?kn(t.left,e,r)||kn(t.right,e,r):t.type==="Path"?rp(t,e,r):X(z(t,e))}i(kn,"existsBoolean");function rp(t,e,r){let n=Au(t);if(n!==null&&n.predicates.length===0){if(n.axis==="self")return er(e.node,n.nodeTest,"self",e.adapter,e.resolver,r);if(n.axis==="attribute"&&n.nodeTest.kind==="name"&&n.nodeTest.local!=="*")return dn(e.node,n.nodeTest,e.adapter,e.resolver,r)!==void 0}return wu(t,e).size>0}i(rp,"pathExists");function np(t,e){let r=z(t.primary,e);if(!F(r))throw new _("predicate applied to a non-node-set value");let n=r.ordered(e.adapter).slice(),s=t.predicates.map(ir);return new ct(Lu(n,t.predicates,s,e,e.html),!0)}i(np,"evaluateFilter");function ip(t,e){if(t.prefix)throw new _(`unknown function: ${t.prefix}:${t.name}()`);let r=e.functions&&e.functions[t.name];if(!r)throw new _(`unknown function: ${t.name}()`);let n=t.args.map(s=>z(s,e));return r(e,n)}i(ip,"evaluateFunction");var cr=0,ar=1,ur=2,lr=3,En=4,Nu=5,vu=6,Pu=7,Iu=8,Du=9,sr=new Set([En,Nu]),or=new Set([vu,Pu]),Ou=new Set([Iu,Du]),sp=new Set([...sr,...or,...Ou]);function op(t){return F(t)?En:typeof t=="boolean"?lr:typeof t=="number"?ar:ur}i(op,"naturalType");var Gt=class{static{i(this,"XPathResult")}constructor(e,r,n,s){this._exceptions=s;let o=r===cr?op(e):r;if(this._type=o,sp.has(o)){if(!F(e))throw s.typeError("result cannot be converted to the requested node-set type");let a=e.ordered(n);sr.has(o)?(this._nodes=a.slice(),this._index=0):or.has(o)?this._snapshot=a.slice():this._single=a.length>0?a[0]:null}else if(o===ar)this._number=Q(e,n);else if(o===ur)this._string=M(e,n);else if(o===lr)this._boolean=X(e);else throw s.typeError(`unknown XPathResult type: ${o}`)}_wrongType(e){return this._exceptions.typeError(`${e} is not available for result type ${this._type}`)}get resultType(){return this._type}get numberValue(){if(this._type!==ar)throw this._wrongType("numberValue");return this._number}get stringValue(){if(this._type!==ur)throw this._wrongType("stringValue");return this._string}get booleanValue(){if(this._type!==lr)throw this._wrongType("booleanValue");return this._boolean}get singleNodeValue(){if(!Ou.has(this._type))throw this._wrongType("singleNodeValue");return this._single}get snapshotLength(){if(!or.has(this._type))throw this._wrongType("snapshotLength");return this._snapshot.length}get invalidIteratorState(){if(!sr.has(this._type))throw this._wrongType("invalidIteratorState");return!1}iterateNext(){if(!sr.has(this._type))throw this._wrongType("iterateNext()");return this._index>=this._nodes.length?null:this._nodes[this._index++]}snapshotItem(e){if(!or.has(this._type))throw this._wrongType("snapshotItem()");return e>=0&&e<this._snapshot.length?this._snapshot[e]:null}},ap={ANY_TYPE:cr,NUMBER_TYPE:ar,STRING_TYPE:ur,BOOLEAN_TYPE:lr,UNORDERED_NODE_ITERATOR_TYPE:En,ORDERED_NODE_ITERATOR_TYPE:Nu,UNORDERED_NODE_SNAPSHOT_TYPE:vu,ORDERED_NODE_SNAPSHOT_TYPE:Pu,ANY_UNORDERED_NODE_TYPE:Iu,FIRST_ORDERED_NODE_TYPE:Du};for(let[t,e]of Object.entries(ap))Gt[t]=e,Gt.prototype[t]=e;var yn=class{static{i(this,"ParseCache")}constructor(e){this.limit=e,this.map=new Map}get(e){if(this.map.has(e)){let n=this.map.get(e);return this.map.delete(e),this.map.set(e,n),n}let r=Qe(e);return this.map.set(e,r),this.map.size>this.limit&&this.map.delete(this.map.keys().next().value),r}};function up(t){let e=new Map,r=Object.create(t);return r.stringValue=n=>{let s=e.get(n);return s===void 0&&(s=t.stringValue(n),e.set(n,s)),s},r}i(up,"memoizingAdapter");function lp(){return{syntaxError:i(t=>new SyntaxError(t),"syntaxError"),typeError:i(t=>new TypeError(t),"typeError")}}i(lp,"defaultExceptions");function cp(t){let e=lp();return t?{syntaxError:t.syntaxError??e.syntaxError,typeError:t.typeError??e.typeError}:e}i(cp,"normalizeExceptions");function Ru(t,e){return t instanceof j?e.syntaxError(t.message):t instanceof _?e.typeError(t.message):t}i(Ru,"mapError");var bn=class{static{i(this,"XPathExpression")}constructor(e,r,n,s){this._ast=e,this._resolver=r??null,this._adapter=n,this._exceptions=s}evaluate(e,r=cr,n=null){let s=up(this._adapter),o=nr(e,s,{resolver:this._resolver}),a;try{a=z(this._ast,o)}catch(l){throw Ru(l,this._exceptions)}return new Gt(a,r,s,this._exceptions)}};function hp(t,e){return{lookupNamespaceURI(r){if(r==="xml")return ie;let n=r?`xmlns:${r}`:"xmlns";for(let s=t;s;s=e.parent(s))if(e.nodeType(s)===1){for(let o of e.attributes(s))if(e.nodeName(o)===n)return e.stringValue(o)}return null}}}i(hp,"makeNSResolver");function Fu(t,e={}){let r=cp(e.exceptions),n=new yn(e.cacheSize??1e3);function s(o,a){let l;try{l=n.get(o)}catch(c){throw Ru(c,r)}return new bn(l,a??null,t,r)}return i(s,"compile"),{evaluate(o,a,l,c=cr,u=null){return s(o,l).evaluate(a,c,u)},createExpression(o,a){return s(o,a)},createNSResolver(o){return hp(o,t)}}}i(Fu,"createEvaluator");var oe=null,Te=class t{static{i(this,"List")}static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return t.createItem(e)}allocateCursor(e,r){let n;return oe!==null?(n=oe,oe=oe.cursor,n.prev=e,n.next=r,n.cursor=this.cursor):n={prev:e,next:r,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=oe,oe=e}updateCursors(e,r,n,s){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=r),o.next===n&&(o.next=s),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let r=this.head;r!==null;r=r.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let r=null;this.head=null;for(let n of e){let s=t.createItem(n);r!==null?r.next=s:this.head=s,s.prev=r,r=s}return this.tail=r,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,r=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let s=n.next;n.next=s.next,e.call(r,s.data,s,this)}this.releaseCursor()}forEachRight(e,r=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let s=n.prev;n.prev=s.prev,e.call(r,s.data,s,this)}this.releaseCursor()}reduce(e,r,n=this){let s=this.allocateCursor(null,this.head),o=r,a;for(;s.next!==null;)a=s.next,s.next=a.next,o=e.call(n,o,a.data,a,this);return this.releaseCursor(),o}reduceRight(e,r,n=this){let s=this.allocateCursor(this.tail,null),o=r,a;for(;s.prev!==null;)a=s.prev,s.prev=a.prev,o=e.call(n,o,a.data,a,this);return this.releaseCursor(),o}some(e,r=this){for(let n=this.head;n!==null;n=n.next)if(e.call(r,n.data,n,this))return!0;return!1}map(e,r=this){let n=new t;for(let s=this.head;s!==null;s=s.next)n.appendData(e.call(r,s.data,s,this));return n}filter(e,r=this){let n=new t;for(let s=this.head;s!==null;s=s.next)e.call(r,s.data,s,this)&&n.appendData(s.data);return n}nextUntil(e,r,n=this){if(e===null)return;let s=this.allocateCursor(null,e);for(;s.next!==null;){let o=s.next;if(s.next=o.next,r.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,r,n=this){if(e===null)return;let s=this.allocateCursor(e,null);for(;s.prev!==null;){let o=s.prev;if(s.prev=o.prev,r.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new t;for(let r of this)e.appendData(r);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(t.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(t.createItem(e))}insert(e,r=null){if(r!==null)if(this.updateCursors(r.prev,e,r,e),r.prev===null){if(this.head!==r)throw new Error("before doesn't belong to list");this.head=e,r.prev=e,e.next=r,this.updateCursors(null,e)}else r.prev.next=e,e.prev=r.prev,r.prev=e,e.next=r;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,r){return this.insert(t.createItem(e),r)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(t.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(t.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,r){return e.head===null?this:(r!=null?(this.updateCursors(r.prev,e.tail,r,e.head),r.prev!==null?(r.prev.next=e.head,e.head.prev=r.prev):this.head=e.head,r.prev=e.tail,e.tail.next=r):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,r){"head"in r?this.insertList(r,e):this.insert(r,e),this.remove(e)}};function Mu(t,e){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:t,message:e,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e}
8
+ `)}})}i(Mu,"createCustomError");var Tn=100,_u=60,Uu=" ";function Bu({source:t,line:e,column:r,baseLine:n,baseColumn:s},o){function a(x,C){return u.slice(x,C).map((I,P)=>String(x+P+1).padStart(p)+" |"+I).join(`
9
+ `)}i(a,"processLines");let l=`
10
+ `.repeat(Math.max(n-1,0)),c=" ".repeat(Math.max(s-1,0)),u=(l+c+t).split(/\r\n?|\n|\f/),h=Math.max(1,e-o)-1,f=Math.min(e+o,u.length+1),p=Math.max(4,String(f).length)+1,m=0;r+=(Uu.length-1)*(u[e-1].substr(0,r-1).match(/\t/g)||[]).length,r>Tn&&(m=r-_u+3,r=_u-2);for(let x=h;x<=f;x++)x>=0&&x<u.length&&(u[x]=u[x].replace(/\t/g,Uu),u[x]=(m>0&&u[x].length>m?"\u2026":"")+u[x].substr(m,Tn-2)+(u[x].length>m+Tn-1?"\u2026":""));return[a(h,e),new Array(r+p+2).join("-")+"^",a(e,f)].filter(Boolean).join(`
11
+ `).replace(/^(\s+\d+\s+\|\n)+/,"").replace(/\n(\s+\d+\s+\|)+$/,"")}i(Bu,"sourceFragment");function An(t,e,r,n,s,o=1,a=1){return Object.assign(Mu("SyntaxError",t),{source:e,offset:r,line:n,column:s,sourceFragment(c){return Bu({source:e,line:n,column:s,baseLine:o,baseColumn:a},isNaN(c)?0:c)},get formattedMessage(){return`Parse error: ${t}
12
+ `+Bu({source:e,line:n,column:s,baseLine:o,baseColumn:a},2)}})}i(An,"SyntaxError");function nt(t){return t>=48&&t<=57}i(nt,"isDigit");function At(t){return nt(t)||t>=65&&t<=70||t>=97&&t<=102}i(At,"isHexDigit");function fr(t){return t>=65&&t<=90}i(fr,"isUppercaseLetter");function fp(t){return t>=97&&t<=122}i(fp,"isLowercaseLetter");function pp(t){return fr(t)||fp(t)}i(pp,"isLetter");function dp(t){return t>=128}i(dp,"isNonAscii");function hr(t){return pp(t)||dp(t)||t===95}i(hr,"isNameStart");function pr(t){return hr(t)||nt(t)||t===45}i(pr,"isName");function mp(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}i(mp,"isNonPrintable");function Ae(t){return t===10||t===13||t===12}i(Ae,"isNewline");function wt(t){return Ae(t)||t===32||t===9}i(wt,"isWhiteSpace");function ut(t,e){return!(t!==92||Ae(e)||e===0)}i(ut,"isValidEscape");function dr(t,e,r){return t===45?hr(e)||e===45||ut(e,r):hr(t)?!0:t===92?ut(t,e):!1}i(dr,"isIdentifierStart");function mr(t,e,r){return t===43||t===45?nt(e)?2:e===46&&nt(r)?3:0:t===46?nt(e)?2:0:nt(t)?1:0}i(mr,"isNumberStart");function gr(t){return t===65279||t===65534?1:0}i(gr,"isBOM");var wn=new Array(128),gp=128,we=130,Ln=131,xr=132,Nn=133;for(let t=0;t<wn.length;t++)wn[t]=wt(t)&&we||nt(t)&&Ln||hr(t)&&xr||mp(t)&&Nn||t||gp;function Sr(t){return t<128?wn[t]:xr}i(Sr,"charCodeCategory");function ae(t,e){return e<t.length?t.charCodeAt(e):0}i(ae,"getCharCode");function kr(t,e,r){return r===13&&ae(t,e+1)===10?2:1}i(kr,"getNewlineLength");function Pn(t,e,r){let n=t.charCodeAt(e);return fr(n)&&(n=n|32),n===r}i(Pn,"cmpChar");function Yt(t,e,r,n){if(r-e!==n.length||e<0||r>t.length)return!1;for(let s=e;s<r;s++){let o=n.charCodeAt(s-e),a=t.charCodeAt(s);if(fr(a)&&(a=a|32),a!==o)return!1}return!0}i(Yt,"cmpStr");function Vu(t,e){for(;e>=0&&wt(t.charCodeAt(e));e--);return e+1}i(Vu,"findWhiteSpaceStart");function Le(t,e){for(;e<t.length&&wt(t.charCodeAt(e));e++);return e}i(Le,"findWhiteSpaceEnd");function vn(t,e){for(;e<t.length&&nt(t.charCodeAt(e));e++);return e}i(vn,"findDecimalNumberEnd");function Dt(t,e){if(e+=2,At(ae(t,e-1))){for(let n=Math.min(t.length,e+5);e<n&&At(ae(t,e));e++);let r=ae(t,e);wt(r)&&(e+=kr(t,e,r))}return e}i(Dt,"consumeEscaped");function Ne(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(!pr(r)){if(ut(r,ae(t,e+1))){e=Dt(t,e)-1;continue}break}}return e}i(Ne,"consumeName");function yr(t,e){let r=t.charCodeAt(e);if((r===43||r===45)&&(r=t.charCodeAt(e+=1)),nt(r)&&(e=vn(t,e+1),r=t.charCodeAt(e)),r===46&&nt(t.charCodeAt(e+1))&&(e+=2,e=vn(t,e)),Pn(t,e,101)){let n=0;r=t.charCodeAt(e+1),(r===45||r===43)&&(n=1,r=t.charCodeAt(e+2)),nt(r)&&(e=vn(t,e+1+n+1))}return e}i(yr,"consumeNumber");function br(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r===41){e++;break}ut(r,ae(t,e+1))&&(e=Dt(t,e))}return e}i(br,"consumeBadUrlRemnants");function Er(t){if(t.length===1&&!At(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}i(Er,"decodeEscaped");var ue=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"];function le(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,16384)):t}i(le,"adoptBuffer");var $u=10,xp=12,qu=13;function Hu(t){let e=t.source,r=e.length,n=e.length>0?gr(e.charCodeAt(0)):0,s=le(t.lines,r),o=le(t.columns,r),a=t.startLine,l=t.startColumn;for(let c=n;c<r;c++){let u=e.charCodeAt(c);s[c]=a,o[c]=l++,(u===$u||u===qu||u===xp)&&(u===qu&&c+1<r&&e.charCodeAt(c+1)===$u&&(c++,s[c]=a,o[c]=l),a++,l=1)}s[r]=a,o[r]=l,t.lines=s,t.columns=o,t.computed=!0}i(Hu,"computeLinesAndColumns");var Cr=class{static{i(this,"OffsetToLocation")}constructor(e,r,n,s){this.setSource(e,r,n,s),this.lines=null,this.columns=null}setSource(e="",r=0,n=1,s=1){this.source=e,this.startOffset=r,this.startLine=n,this.startColumn=s,this.computed=!1}getLocation(e,r){return this.computed||Hu(this),{source:r,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,r,n){return this.computed||Hu(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+r,line:this.lines[r],column:this.columns[r]}}}};var yt=16777215,bt=24,Pe=1,Ar=2,Ut=new Uint8Array(32);Ut[2]=22;Ut[21]=22;Ut[19]=20;Ut[23]=24;var Et=new Uint8Array(32);Et[2]=Pe;Et[21]=Pe;Et[19]=Pe;Et[23]=Pe;Et[22]=Ar;Et[20]=Ar;Et[24]=Ar;function Wu(t,e,r){return t<e?e:t>r?r:t}i(Wu,"boundIndex");var Tr=class{static{i(this,"TokenStream")}constructor(e,r){this.setSource(e,r)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",r=()=>{}){e=String(e||"");let n=e.length,s=le(this.offsetAndType,e.length+1),o=le(this.balance,e.length+1),a=0,l=-1,c=0,u=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),r(e,(h,f,p)=>{let m=a++;if(s[m]=h<<bt|p,l===-1&&(l=f),o[m]=u,h===c){let x=o[u];o[u]=m,u=x,c=Ut[s[x]>>bt]}else this.isBlockOpenerTokenType(h)&&(u=m,c=Ut[h])}),s[a]=0<<bt|n,o[a]=a;for(let h=0;h<a;h++){let f=o[h];if(f<=h){let p=o[f];p!==h&&(o[h]=p)}else f>a&&(o[h]=a)}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=a,this.offsetAndType=s,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>bt:0}lookupTypeNonSC(e){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>bt;if(n!==13&&n!==25&&e--===0)return n}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&yt:this.source.length}lookupOffsetNonSC(e){for(let r=this.tokenIndex;r<this.tokenCount;r++){let n=this.offsetAndType[r]>>bt;if(n!==13&&n!==25&&e--===0)return r-this.tokenIndex}return 0}lookupValue(e,r){return e+=this.tokenIndex,e<this.tokenCount?Yt(this.source,this.offsetAndType[e-1]&yt,this.offsetAndType[e]&yt,r):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&yt:this.offsetAndType[this.tokenCount]&yt:this.firstCharOffset}getTokenEnd(e){return e===this.tokenIndex?this.tokenEnd:this.offsetAndType[Wu(e,0,this.tokenCount)]&yt}getTokenType(e){return e===this.tokenIndex?this.tokenType:this.offsetAndType[Wu(e,0,this.tokenCount)]>>bt}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBlockOpenerTokenType(e){return Et[e]===Pe}isBlockCloserTokenType(e){return Et[e]===Ar}getBlockTokenPairIndex(e){let r=this.getTokenType(e);if(Et[r]===1){let n=this.balance[e],s=this.getTokenType(n);return Ut[r]===s?n:-1}else if(Et[r]===2){let n=this.balance[e],s=this.getTokenType(n);return Ut[s]===r?n:-1}return-1}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,r){return r?this.lookupType(r)===9&&this.source.charCodeAt(this.lookupOffset(r))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let r=this.tokenIndex+e;r<this.tokenCount?(this.tokenIndex=r,this.tokenStart=this.offsetAndType[r-1]&yt,r=this.offsetAndType[r],this.tokenType=r>>bt,this.tokenEnd=r&yt):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>bt,this.tokenEnd=e&yt):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,r){let n=e,s=0,o=0;t:for(;n<this.tokenCount;n++){if(s=this.balance[n],s<e)break t;switch(o=n>0?this.offsetAndType[n-1]&yt:this.firstCharOffset,r(this.source.charCodeAt(o))){case 1:break t;case 2:n++;break t;default:this.isBlockOpenerTokenType(this.offsetAndType[n]>>bt)&&(n=s)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let r=0,n=this.firstCharOffset;r<this.tokenCount;r++){let s=n,o=this.offsetAndType[r],a=o&yt,l=o>>bt;n=a,e(l,s,a,r)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((r,n,s,o)=>{e[o]={idx:o,type:ue[r],chunk:this.source.substring(n,s),balance:this.balance[o]}}),e}};function wr(t,e){function r(f){return f<l?t.charCodeAt(f):0}i(r,"getCharCode");function n(){if(u=yr(t,u),dr(r(u),r(u+1),r(u+2))){h=12,u=Ne(t,u);return}if(r(u)===37){h=11,u++;return}h=10}i(n,"consumeNumericToken");function s(){let f=u;if(u=Ne(t,u),Yt(t,f,u,"url")&&r(u)===40){if(u=Le(t,u+1),r(u)===34||r(u)===39){h=2,u=f+4;return}a();return}if(r(u)===40){h=2,u++;return}h=1}i(s,"consumeIdentLikeToken");function o(f){for(f||(f=r(u++)),h=5;u<t.length;u++){let p=t.charCodeAt(u);switch(Sr(p)){case f:u++;return;case we:if(Ae(p)){u+=kr(t,u,p),h=6;return}break;case 92:if(u===t.length-1)break;let m=r(u+1);Ae(m)?u+=kr(t,u+1,m):ut(p,m)&&(u=Dt(t,u)-1);break}}}i(o,"consumeStringToken");function a(){for(h=7,u=Le(t,u);u<t.length;u++){let f=t.charCodeAt(u);switch(Sr(f)){case 41:u++;return;case we:if(u=Le(t,u),r(u)===41||u>=t.length){u<t.length&&u++;return}u=br(t,u),h=8;return;case 34:case 39:case 40:case Nn:u=br(t,u),h=8;return;case 92:if(ut(f,r(u+1))){u=Dt(t,u)-1;break}u=br(t,u),h=8;return}}}i(a,"consumeUrlToken"),t=String(t||"");let l=t.length,c=gr(r(0)),u=c,h;for(;u<l;){let f=t.charCodeAt(u);switch(Sr(f)){case we:h=13,u=Le(t,u+1);break;case 34:o();break;case 35:pr(r(u+1))||ut(r(u+1),r(u+2))?(h=4,u=Ne(t,u+1)):(h=9,u++);break;case 39:o();break;case 40:h=21,u++;break;case 41:h=22,u++;break;case 43:mr(f,r(u+1),r(u+2))?n():(h=9,u++);break;case 44:h=18,u++;break;case 45:mr(f,r(u+1),r(u+2))?n():r(u+1)===45&&r(u+2)===62?(h=15,u=u+3):dr(f,r(u+1),r(u+2))?s():(h=9,u++);break;case 46:mr(f,r(u+1),r(u+2))?n():(h=9,u++);break;case 47:r(u+1)===42?(h=25,u=t.indexOf("*/",u+2),u=u===-1?t.length:u+2):(h=9,u++);break;case 58:h=16,u++;break;case 59:h=17,u++;break;case 60:r(u+1)===33&&r(u+2)===45&&r(u+3)===45?(h=14,u=u+4):(h=9,u++);break;case 64:dr(r(u+1),r(u+2),r(u+3))?(h=3,u=Ne(t,u+1)):(h=9,u++);break;case 91:h=19,u++;break;case 92:ut(f,r(u+1))?s():(h=9,u++);break;case 93:h=20,u++;break;case 123:h=23,u++;break;case 125:h=24,u++;break;case Ln:n();break;case xr:s();break;default:h=9,u++}e(h,c,c=u)}}i(wr,"tokenize");function Gu(t){let e=this.createList(),r=!1,n={recognizer:t};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let s=t.getNode.call(this,n);if(s===void 0)break;r&&(t.onWhiteSpace&&t.onWhiteSpace.call(this,s,e,n),r=!1),e.push(s)}return r&&t.onWhiteSpace&&t.onWhiteSpace.call(this,null,e,n),e}i(Gu,"readSequence");var fe=i(()=>{},"NOOP"),Sp=33,kp=35,Dn=59,Yu=123,ju=0,yp={createList(){return[]},createSingleNodeList(t){return[t]},getFirstListNode(t){return t&&t[0]||null},getLastListNode(t){return t&&t.length>0?t[t.length-1]:null}},bp={createList(){return new Te},createSingleNodeList(t){return new Te().appendData(t)},getFirstListNode(t){return t&&t.first},getLastListNode(t){return t&&t.last}};function Ep(t){return function(){return this[t]()}}i(Ep,"createParseContext");function On(t){let e=Object.create(null);for(let r of Object.keys(t)){let n=t[r],s=n.parse||n;s&&(e[r]=s)}return e}i(On,"fetchParseValues");function Cp(t){let e={context:Object.create(null),features:Object.assign(Object.create(null),t.features),scope:Object.assign(Object.create(null),t.scope),atrule:On(t.atrule),pseudo:On(t.pseudo),node:On(t.node)};for(let[r,n]of Object.entries(t.parseContext))switch(typeof n){case"function":e.context[r]=n;break;case"string":e.context[r]=Ep(n);break}return{config:e,...e,...e.node}}i(Cp,"processConfig");function zu(t){let e="",r="<unknown>",n=!1,s=fe,o=!1,a=new Cr,l=Object.assign(new Tr,Cp(t||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Gu,consumeUntilBalanceEnd:i(()=>0,"consumeUntilBalanceEnd"),consumeUntilLeftCurlyBracket(h){return h===Yu?1:0},consumeUntilLeftCurlyBracketOrSemicolon(h){return h===Yu||h===Dn?1:0},consumeUntilExclamationMarkOrSemicolon(h){return h===Sp||h===Dn?1:0},consumeUntilSemicolonIncluded(h){return h===Dn?2:0},createList:fe,createSingleNodeList:fe,getFirstListNode:fe,getLastListNode:fe,parseWithFallback(h,f){let p=this.tokenIndex;try{return h.call(this)}catch(m){if(o)throw m;this.skip(p-this.tokenIndex);let x=f.call(this);return o=!0,s(m,x),o=!1,x}},lookupNonWSType(h){let f;do if(f=this.lookupType(h++),f!==13&&f!==25)return f;while(f!==ju);return ju},charCodeAt(h){return h>=0&&h<e.length?e.charCodeAt(h):0},substring(h,f){return e.substring(h,f)},substrToCursor(h){return this.source.substring(h,this.tokenStart)},cmpChar(h,f){return Pn(e,h,f)},cmpStr(h,f,p){return Yt(e,h,f,p)},consume(h){let f=this.tokenStart;return this.eat(h),this.substrToCursor(f)},consumeFunctionName(){let h=e.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),h},consumeNumber(h){let f=e.substring(this.tokenStart,yr(e,this.tokenStart));return this.eat(h),f},eat(h){if(this.tokenType!==h){let f=ue[h].slice(0,-6).replace(/-/g," ").replace(/^./,x=>x.toUpperCase()),p=`${/[[\](){}]/.test(f)?`"${f}"`:f} is expected`,m=this.tokenStart;switch(h){case 1:this.tokenType===2||this.tokenType===7?(m=this.tokenEnd-1,p="Identifier is expected but function found"):p="Identifier is expected";break;case 4:this.isDelim(kp)&&(this.next(),m++,p="Name is expected");break;case 11:this.tokenType===10&&(m=this.tokenEnd,p="Percent sign is expected");break}this.error(p,m)}this.next()},eatIdent(h){(this.tokenType!==1||this.lookupValue(0,h)===!1)&&this.error(`Identifier "${h}" is expected`),this.next()},eatDelim(h){this.isDelim(h)||this.error(`Delim "${String.fromCharCode(h)}" is expected`),this.next()},getLocation(h,f){return n?a.getLocationRange(h,f,r):null},getLocationFromList(h){if(n){let f=this.getFirstListNode(h),p=this.getLastListNode(h);return a.getLocationRange(f!==null?f.loc.start.offset-a.startOffset:this.tokenStart,p!==null?p.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(h,f){let p=typeof f<"u"&&f<e.length?a.getLocation(f):this.eof?a.getLocation(Vu(e,e.length-1)):a.getLocation(this.tokenStart);throw new An(h||"Unexpected input",e,p.offset,p.line,p.column,a.startLine,a.startColumn)}}),c=i(()=>({filename:r,source:e,tokenCount:l.tokenCount,getTokenType:i(h=>l.getTokenType(h),"getTokenType"),getTokenTypeName:i(h=>ue[l.getTokenType(h)],"getTokenTypeName"),getTokenStart:i(h=>l.getTokenStart(h),"getTokenStart"),getTokenEnd:i(h=>l.getTokenEnd(h),"getTokenEnd"),getTokenValue:i(h=>l.source.substring(l.getTokenStart(h),l.getTokenEnd(h)),"getTokenValue"),substring:i((h,f)=>l.source.substring(h,f),"substring"),balance:l.balance.subarray(0,l.tokenCount+1),isBlockOpenerTokenType:l.isBlockOpenerTokenType,isBlockCloserTokenType:l.isBlockCloserTokenType,getBlockTokenPairIndex:i(h=>l.getBlockTokenPairIndex(h),"getBlockTokenPairIndex"),getLocation:i(h=>a.getLocation(h,r),"getLocation"),getRangeLocation:i((h,f)=>a.getLocationRange(h,f,r),"getRangeLocation")}),"createTokenIterateAPI");return Object.assign(i(function(h,f){e=h,f=f||{},l.setSource(e,wr),a.setSource(e,f.offset,f.line,f.column),r=f.filename||"<unknown>",n=!!f.positions,s=typeof f.onParseError=="function"?f.onParseError:fe,o=!1,l.parseAtrulePrelude="parseAtrulePrelude"in f?!!f.parseAtrulePrelude:!0,l.parseRulePrelude="parseRulePrelude"in f?!!f.parseRulePrelude:!0,l.parseValue="parseValue"in f?!!f.parseValue:!0,l.parseCustomProperty="parseCustomProperty"in f?!!f.parseCustomProperty:!1;let{context:p="default",list:m=!0,onComment:x,onToken:C}=f;if(!(p in l.context))throw new Error("Unknown context `"+p+"`");Object.assign(l,m?bp:yp),Array.isArray(C)?l.forEachToken((P,W,G)=>{C.push({type:P,start:W,end:G})}):typeof C=="function"&&l.forEachToken(C.bind(c())),typeof x=="function"&&l.forEachToken((P,W,G)=>{if(P===25){let Ft=l.getLocation(W,G),Zc=Yt(e,G-2,G,"*/")?e.slice(W+2,G-2):e.slice(W+2,G);x(Zc,Ft)}});let I=l.context[p].call(l,f);return l.eof||l.error(),I},"parse"),{SyntaxError:An,config:l.config})}i(zu,"createParser");var Mn={};y(Mn,{AtrulePrelude:()=>Xu,Selector:()=>Ju,Value:()=>tl});var Tp=35,Ap=42,Qu=43,wp=45,Lp=47,Np=117;function Ie(t){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,t.recognizer);case 19:return this.Brackets(this.readSequence,t.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,t.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,Np)&&this.cmpChar(this.tokenStart+1,Qu)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===Lp||e===Ap||e===Qu||e===wp)return this.Operator();e===Tp&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}i(Ie,"defaultRecognizer");var Xu={getNode:Ie};var vp=35,Pp=38,Ip=42,Dp=43,Op=47,Ku=46,Rp=62,Fp=124,Mp=126;function _p(t,e){e.last!==null&&e.last.type!=="Combinator"&&t!==null&&t.type!=="Combinator"&&e.push({type:"Combinator",loc:null,name:" "})}i(_p,"onWhiteSpace");function Up(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Ku&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case Dp:case Rp:case Mp:case Op:return this.Combinator();case Ku:return this.ClassSelector();case Ip:case Fp:return this.TypeSelector();case vp:return this.IdSelector();case Pp:return this.NestingSelector()}break}}}i(Up,"getNode");var Ju={onWhiteSpace:_p,getNode:Up};function Rn(){return this.createSingleNodeList(this.Raw(null,!1))}i(Rn,"default");function Fn(){let t=this.createList();if(this.skipSC(),t.push(this.Identifier()),this.skipSC(),this.tokenType===18){t.push(this.Operator());let e=this.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(r.type==="Value"&&r.children.isEmpty){for(let n=e-this.tokenIndex;n<=0;n++)if(this.lookupType(n)===13){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}t.push(r)}return t}i(Fn,"default");function Zu(t){return t!==null&&t.type==="Operator"&&(t.value[t.value.length-1]==="-"||t.value[t.value.length-1]==="+")}i(Zu,"isPlusMinusOperator");var tl={getNode:Ie,onWhiteSpace(t,e){Zu(t)&&(t.value=" "+t.value),Zu(e.last)&&(e.last.value+=" ")},expression:Rn,var:Fn};var Bp=new Set(["none","and","not","or"]),el={parse:{prelude(){let t=this.createList();if(this.tokenType===1){let e=this.substring(this.tokenStart,this.tokenEnd);Bp.has(e.toLowerCase())||t.push(this.Identifier())}return t.push(this.Condition("container")),t},block(t=!1){return this.Block(t)}}};var rl={parse:{prelude:null,block(){return this.Block(!0)}}};function _n(t,e){return this.parseWithFallback(()=>{try{return t.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},e||(()=>this.Raw(null,!0)))}i(_n,"parseWithFallback");var nl={layer(){this.skipSC();let t=this.createList(),e=_n.call(this,this.Layer);return(e.type!=="Raw"||e.value!=="")&&t.push(e),t},supports(){this.skipSC();let t=this.createList(),e=_n.call(this,this.Declaration,()=>_n.call(this,()=>this.Condition("supports")));return(e.type!=="Raw"||e.value!=="")&&t.push(e),t}},il={parse:{prelude(){let t=this.createList();switch(this.tokenType){case 5:t.push(this.String());break;case 7:case 2:t.push(this.Url());break;default:this.error("String or url() is expected")}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer")?t.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"layer(")&&t.push(this.Function(null,nl)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,"supports(")&&t.push(this.Function(null,nl)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&t.push(this.MediaQueryList()),t},block:null}};var sl={parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}};var ol={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(t=!1){return this.Block(t)}}};var al={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var ul={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};var ll={parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(t=!1){return this.Block(t)}}};var cl={parse:{prelude:null,block(t=!1){return this.Block(t)}}};var hl={parse:{prelude(){return this.createSingleNodeList(this.Condition("supports"))},block(t=!1){return this.Block(t)}}};var fl={container:el,"font-face":rl,import:il,layer:sl,media:ol,nest:al,page:ul,scope:ll,"starting-style":cl,supports:hl};function pl(){let t=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:t.push(this.Identifier());break;case 5:t.push(this.String());break;case 18:t.push(this.Operator());break;case 22:break t;default:this.error("Identifier, string or comma is expected")}this.skipSC()}return t}i(pl,"parseLanguageRangeList");var zt={parse(){return this.createSingleNodeList(this.SelectorList())}},Un={parse(){return this.createSingleNodeList(this.Selector())}},Vp={parse(){return this.createSingleNodeList(this.Identifier())}},$p={parse:pl},Lr={parse(){return this.createSingleNodeList(this.Nth())}},dl={dir:Vp,has:zt,lang:$p,matches:zt,is:zt,"-moz-any":zt,"-webkit-any":zt,where:zt,not:zt,"nth-child":Lr,"nth-last-child":Lr,"nth-last-of-type":Lr,"nth-of-type":Lr,slotted:Un,host:Un,"host-context":Un};var Oo={};y(Oo,{AnPlusB:()=>Vn,Atrule:()=>Hn,AtrulePrelude:()=>Yn,AttributeSelector:()=>Xn,Block:()=>Zn,Brackets:()=>ri,CDC:()=>si,CDO:()=>ui,ClassSelector:()=>hi,Combinator:()=>di,Comment:()=>xi,Condition:()=>yi,Declaration:()=>Ci,DeclarationList:()=>Li,Dimension:()=>Pi,Feature:()=>Oi,FeatureFunction:()=>Mi,FeatureRange:()=>Vi,Function:()=>Hi,GeneralEnclosed:()=>Yi,Hash:()=>Qi,IdSelector:()=>es,Identifier:()=>Ji,Layer:()=>is,LayerList:()=>as,MediaQuery:()=>cs,MediaQueryList:()=>ps,NestingSelector:()=>gs,Nth:()=>ks,Number:()=>Es,Operator:()=>As,Parentheses:()=>Ns,Percentage:()=>Is,PseudoClassSelector:()=>Rs,PseudoElementSelector:()=>_s,Ratio:()=>Vs,Raw:()=>Hs,Rule:()=>Ys,Scope:()=>Qs,Selector:()=>Js,SelectorList:()=>eo,String:()=>so,StyleSheet:()=>uo,SupportsDeclaration:()=>ho,TypeSelector:()=>go,UnicodeRange:()=>yo,Url:()=>To,Value:()=>Lo,WhiteSpace:()=>Po});var qn={};y(qn,{generate:()=>$n,name:()=>Hp,parse:()=>Vn,structure:()=>Wp});var vt=43,pt=45,Nr=110,Qt=!0,qp=!1;function vr(t,e){let r=this.tokenStart+t,n=this.charCodeAt(r);for((n===vt||n===pt)&&(e&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)nt(this.charCodeAt(r))||this.error("Integer is expected",r)}i(vr,"checkInteger");function pe(t){return vr.call(this,0,t)}i(pe,"checkTokenIsInteger");function Vt(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let r="";switch(e){case Nr:r="N is expected";break;case pt:r="HyphenMinus is expected";break}this.error(r,this.tokenStart+t)}}i(Vt,"expectCharCode");function Bn(){let t=0,e=0,r=this.tokenType;for(;r===13||r===25;)r=this.lookupType(++t);if(r!==10)if(this.isDelim(vt,t)||this.isDelim(pt,t)){e=this.isDelim(vt,t)?vt:pt;do r=this.lookupType(++t);while(r===13||r===25);r!==10&&(this.skip(t),pe.call(this,Qt))}else return null;return t>0&&this.skip(t),e===0&&(r=this.charCodeAt(this.tokenStart),r!==vt&&r!==pt&&this.error("Number sign is expected")),pe.call(this,e!==0),e===pt?"-"+this.consume(10):this.consume(10)}i(Bn,"consumeB");var Hp="AnPlusB",Wp={a:[String,null],b:[String,null]};function Vn(){let t=this.tokenStart,e=null,r=null;if(this.tokenType===10)pe.call(this,qp),r=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,pt))switch(e="-1",Vt.call(this,1,Nr),this.tokenEnd-this.tokenStart){case 2:this.next(),r=Bn.call(this);break;case 3:Vt.call(this,2,pt),this.next(),this.skipSC(),pe.call(this,Qt),r="-"+this.consume(10);break;default:Vt.call(this,2,pt),vr.call(this,3,Qt),this.next(),r=this.substrToCursor(t+2)}else if(this.tokenType===1||this.isDelim(vt)&&this.lookupType(1)===1){let n=0;switch(e="1",this.isDelim(vt)&&(n=1,this.next()),Vt.call(this,0,Nr),this.tokenEnd-this.tokenStart){case 1:this.next(),r=Bn.call(this);break;case 2:Vt.call(this,1,pt),this.next(),this.skipSC(),pe.call(this,Qt),r="-"+this.consume(10);break;default:Vt.call(this,1,pt),vr.call(this,2,Qt),this.next(),r=this.substrToCursor(t+n+1)}}else if(this.tokenType===12){let n=this.charCodeAt(this.tokenStart),s=n===vt||n===pt,o=this.tokenStart+s;for(;o<this.tokenEnd&&nt(this.charCodeAt(o));o++);o===this.tokenStart+s&&this.error("Integer is expected",this.tokenStart+s),Vt.call(this,o-this.tokenStart,Nr),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),r=Bn.call(this)):(Vt.call(this,o-this.tokenStart+1,pt),o+2===this.tokenEnd?(this.next(),this.skipSC(),pe.call(this,Qt),r="-"+this.consume(10)):(vr.call(this,o-this.tokenStart+2,Qt),this.next(),r=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===vt&&(e=e.substr(1)),r!==null&&r.charCodeAt(0)===vt&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:r}}i(Vn,"parse");function $n(t){if(t.a){let e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){let r=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+r)}else this.tokenize(e)}else this.tokenize(t.b)}i($n,"generate");var Gn={};y(Gn,{generate:()=>Wn,name:()=>Yp,parse:()=>Hn,structure:()=>zp,walkContext:()=>jp});function ml(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}i(ml,"consumeRaw");function Gp(){for(let t=1,e;e=this.lookupType(t);t++){if(e===24)return!0;if(e===23||e===3)return!1}return!1}i(Gp,"isDeclarationBlockAtrule");var Yp="Atrule",jp="atrule",zp={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Hn(t=!1){let e=this.tokenStart,r,n,s=null,o=null;switch(this.eat(3),r=this.substrToCursor(e+1),n=r.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?s=this.parseWithFallback(this.AtrulePrelude.bind(this,r,t),ml):s=ml.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,n)&&typeof this.atrule[n].block=="function"?o=this.atrule[n].block.call(this,t):o=this.Block(Gp.call(this));break}return{type:"Atrule",loc:this.getLocation(e,this.tokenStart),name:r,prelude:s,block:o}}i(Hn,"parse");function Wn(t){this.token(3,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(17,";")}i(Wn,"generate");var zn={};y(zn,{generate:()=>jn,name:()=>Qp,parse:()=>Yn,structure:()=>Kp,walkContext:()=>Xp});var Qp="AtrulePrelude",Xp="atrulePrelude",Kp={children:[[]]};function Yn(t){let e=null;return t!==null&&(t=t.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,t)&&typeof this.atrule[t].prelude=="function"?e=this.atrule[t].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}}i(Yn,"parse");function jn(t){this.children(t)}i(jn,"generate");var Jn={};y(Jn,{generate:()=>Kn,name:()=>nd,parse:()=>Xn,structure:()=>id});var Jp=36,gl=42,Pr=61,Zp=94,Qn=124,td=126;function ed(){this.eof&&this.error("Unexpected end of input");let t=this.tokenStart,e=!1;return this.isDelim(gl)?(e=!0,this.next()):this.isDelim(Qn)||this.eat(1),this.isDelim(Qn)?this.charCodeAt(this.tokenStart+1)!==Pr?(this.next(),this.eat(1)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}i(ed,"getAttributeName");function rd(){let t=this.tokenStart,e=this.charCodeAt(t);return e!==Pr&&e!==td&&e!==Zp&&e!==Jp&&e!==gl&&e!==Qn&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==Pr&&(this.isDelim(Pr)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}i(rd,"getOperator");var nd="AttributeSelector",id={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Xn(){let t=this.tokenStart,e,r=null,n=null,s=null;return this.eat(19),this.skipSC(),e=ed.call(this),this.skipSC(),!this.eof&&this.tokenType!==20&&(this.tokenType!==1&&(r=rd.call(this),this.skipSC(),n=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(s=this.consume(1),this.skipSC())),this.eof||this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:r,value:n,flags:s}}i(Xn,"parse");function Kn(t){this.token(9,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(1,t.flags),this.token(9,"]")}i(Kn,"generate");var ei={};y(ei,{generate:()=>ti,name:()=>ad,parse:()=>Zn,structure:()=>ld,walkContext:()=>ud});var sd=38;function kl(){return this.Raw(null,!0)}i(kl,"consumeRaw");function xl(){return this.parseWithFallback(this.Rule,kl)}i(xl,"consumeRule");function Sl(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}i(Sl,"consumeRawDeclaration");function od(){if(this.tokenType===17)return Sl.call(this,this.tokenIndex);let t=this.parseWithFallback(this.Declaration,Sl);return this.tokenType===17&&this.next(),t}i(od,"consumeDeclaration");var ad="Block",ud="block",ld={children:[["Atrule","Rule","Declaration"]]};function Zn(t){let e=t?od:xl,r=this.tokenStart,n=this.createList();this.eat(23);t:for(;!this.eof;)switch(this.tokenType){case 24:break t;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule.bind(this,t),kl));break;default:t&&this.isDelim(sd)?n.push(xl.call(this)):n.push(e.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}i(Zn,"parse");function ti(t){this.token(23,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}i(ti,"generate");var ii={};y(ii,{generate:()=>ni,name:()=>cd,parse:()=>ri,structure:()=>hd});var cd="Brackets",hd={children:[[]]};function ri(t,e){let r=this.tokenStart,n=null;return this.eat(19),n=t.call(this,e),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}i(ri,"parse");function ni(t){this.token(9,"["),this.children(t),this.token(9,"]")}i(ni,"generate");var ai={};y(ai,{generate:()=>oi,name:()=>fd,parse:()=>si,structure:()=>pd});var fd="CDC",pd=[];function si(){let t=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(t,this.tokenStart)}}i(si,"parse");function oi(){this.token(15,"-->")}i(oi,"generate");var ci={};y(ci,{generate:()=>li,name:()=>dd,parse:()=>ui,structure:()=>md});var dd="CDO",md=[];function ui(){let t=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}i(ui,"parse");function li(){this.token(14,"<!--")}i(li,"generate");var pi={};y(pi,{generate:()=>fi,name:()=>xd,parse:()=>hi,structure:()=>Sd});var gd=46,xd="ClassSelector",Sd={name:String};function hi(){return this.eatDelim(gd),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}i(hi,"parse");function fi(t){this.token(9,"."),this.token(1,t.name)}i(fi,"generate");var gi={};y(gi,{generate:()=>mi,name:()=>Ed,parse:()=>di,structure:()=>Cd});var kd=43,yl=47,yd=62,bd=126,Ed="Combinator",Cd={name:String};function di(){let t=this.tokenStart,e;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case yd:case kd:case bd:this.next();break;case yl:this.next(),this.eatIdent("deep"),this.eatDelim(yl);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}i(di,"parse");function mi(t){this.tokenize(t.name)}i(mi,"generate");var ki={};y(ki,{generate:()=>Si,name:()=>wd,parse:()=>xi,structure:()=>Ld});var Td=42,Ad=47,wd="Comment",Ld={value:String};function xi(){let t=this.tokenStart,e=this.tokenEnd;return this.eat(25),e-t+2>=2&&this.charCodeAt(e-2)===Td&&this.charCodeAt(e-1)===Ad&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.tokenStart),value:this.substring(t+2,e)}}i(xi,"parse");function Si(t){this.token(25,"/*"+t.value+"*/")}i(Si,"generate");var Ei={};y(Ei,{generate:()=>bi,name:()=>vd,parse:()=>yi,structure:()=>Pd});var Nd=new Set([16,22,0]),vd="Condition",Pd={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function bl(t){return this.lookupTypeNonSC(1)===1&&Nd.has(this.lookupTypeNonSC(2))?this.Feature(t):this.FeatureRange(t)}i(bl,"featureOrRange");var Id={media:bl,container:bl,supports(){return this.SupportsDeclaration()}};function yi(t="media"){let e=this.createList();t:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:e.push(this.Identifier());break;case 21:{let r=this.parseWithFallback(()=>Id[t].call(this,t),()=>null);r||(r=this.parseWithFallback(()=>{this.eat(21);let n=this.Condition(t);return this.eat(22),n},()=>this.GeneralEnclosed(t))),e.push(r);break}case 2:{let r=this.parseWithFallback(()=>this.FeatureFunction(t),()=>null);r||(r=this.GeneralEnclosed(t)),e.push(r);break}default:break t}return e.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(e),kind:t,children:e}}i(yi,"parse");function bi(t){t.children.forEach(e=>{e.type==="Condition"?(this.token(21,"("),this.node(e),this.token(22,")")):this.node(e)})}i(bi,"generate");var Ai={};y(Ai,{generate:()=>Ti,name:()=>Vd,parse:()=>Ci,structure:()=>qd,walkContext:()=>$d});var El=45;function Cl(t,e){return e=e||0,t.length-e>=2&&t.charCodeAt(e)===El&&t.charCodeAt(e+1)===El}i(Cl,"isCustomProperty");var Al=33,Dd=35,Od=36,Rd=38,Fd=42,Md=43,Tl=47;function _d(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}i(_d,"consumeValueRaw");function Ud(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}i(Ud,"consumeCustomPropertyRaw");function Bd(){let t=this.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Al)===!1&&this.isBalanceEdge(t)===!1&&this.error(),e}i(Bd,"consumeValue");var Vd="Declaration",$d="declaration",qd={important:[Boolean,String],property:String,value:["Value","Raw"]};function Ci(){let t=this.tokenStart,e=this.tokenIndex,r=Hd.call(this),n=Cl(r),s=n?this.parseCustomProperty:this.parseValue,o=n?Ud:_d,a=!1,l;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(n||this.skipSC(),s?l=this.parseWithFallback(Bd,o):l=o.call(this,this.tokenIndex),n&&l.type==="Value"&&l.children.isEmpty){for(let u=c-this.tokenIndex;u<=0;u++)if(this.lookupType(u)===13){l.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(Al)&&(a=Wd.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:a,property:r,value:l}}i(Ci,"parse");function Ti(t){this.token(1,t.property),this.token(16,":"),this.node(t.value),t.important&&(this.token(9,"!"),this.token(1,t.important===!0?"important":t.important))}i(Ti,"generate");function Hd(){let t=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Fd:case Od:case Md:case Dd:case Rd:this.next();break;case Tl:this.next(),this.isDelim(Tl)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(t)}i(Hd,"readProperty");function Wd(){this.eat(9),this.skipSC();let t=this.consume(1);return t==="important"?!0:t}i(Wd,"getImportant");var vi={};y(vi,{generate:()=>Ni,name:()=>Yd,parse:()=>Li,structure:()=>jd});var Gd=38;function wi(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}i(wi,"consumeRaw");var Yd="DeclarationList",jd={children:[["Declaration","Atrule","Rule"]]};function Li(){let t=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:t.push(this.parseWithFallback(this.Atrule.bind(this,!0),wi));break;default:this.isDelim(Gd)?t.push(this.parseWithFallback(this.Rule,wi)):t.push(this.parseWithFallback(this.Declaration,wi))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}}i(Li,"parse");function Ni(t){this.children(t,e=>{e.type==="Declaration"&&this.token(17,";")})}i(Ni,"generate");var Di={};y(Di,{generate:()=>Ii,name:()=>zd,parse:()=>Pi,structure:()=>Qd});var zd="Dimension",Qd={value:String,unit:String};function Pi(){let t=this.tokenStart,e=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(t,this.tokenStart),value:e,unit:this.substring(t+e.length,this.tokenStart)}}i(Pi,"parse");function Ii(t){this.token(12,t.value+t.unit)}i(Ii,"generate");var Fi={};y(Fi,{generate:()=>Ri,name:()=>Kd,parse:()=>Oi,structure:()=>Jd});var Xd=47,Kd="Feature",Jd={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function Oi(t){let e=this.tokenStart,r,n=null;if(this.eat(21),this.skipSC(),r=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;case 2:n=this.parseWithFallback(()=>{let s=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(Xd)&&this.error(),s},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(22),{type:"Feature",loc:this.getLocation(e,this.tokenStart),kind:t,name:r,value:n}}i(Oi,"parse");function Ri(t){this.token(21,"("),this.token(1,t.name),t.value!==null&&(this.token(16,":"),this.node(t.value)),this.token(22,")")}i(Ri,"generate");var Ui={};y(Ui,{generate:()=>_i,name:()=>Zd,parse:()=>Mi,structure:()=>tm});var Zd="FeatureFunction",tm={kind:String,feature:String,value:["Declaration","Selector"]};function em(t,e){let n=(this.features[t]||{})[e];return typeof n!="function"&&this.error(`Unknown feature ${e}()`),n}i(em,"getFeatureParser");function Mi(t="unknown"){let e=this.tokenStart,r=this.consumeFunctionName(),n=em.call(this,t,r.toLowerCase());this.skipSC();let s=this.parseWithFallback(()=>{let o=this.tokenIndex,a=n.call(this);return this.eof===!1&&this.isBalanceEdge(o)===!1&&this.error(),a},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:"FeatureFunction",loc:this.getLocation(e,this.tokenStart),kind:t,feature:r,value:s}}i(Mi,"parse");function _i(t){this.token(2,t.feature+"("),this.node(t.value),this.token(22,")")}i(_i,"generate");var qi={};y(qi,{generate:()=>$i,name:()=>im,parse:()=>Vi,structure:()=>sm});var wl=47,rm=60,Ll=61,nm=62,im="FeatureRange",sm={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function Bi(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(wl,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let t=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(wl)&&this.error(),t},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}i(Bi,"readTerm");function Nl(t){if(this.skipSC(),this.isDelim(rm)||this.isDelim(nm)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(Ll)?(this.next(),e+"="):e}if(this.isDelim(Ll))return"=";this.error(`Expected ${t?'":", ':""}"<", ">", "=" or ")"`)}i(Nl,"readComparison");function Vi(t="unknown"){let e=this.tokenStart;this.skipSC(),this.eat(21);let r=Bi.call(this),n=Nl.call(this,r.type==="Identifier"),s=Bi.call(this),o=null,a=null;return this.lookupNonWSType(0)!==22&&(o=Nl.call(this),a=Bi.call(this)),this.skipSC(),this.eat(22),{type:"FeatureRange",loc:this.getLocation(e,this.tokenStart),kind:t,left:r,leftComparison:n,middle:s,rightComparison:o,right:a}}i(Vi,"parse");function $i(t){this.token(21,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(22,")")}i($i,"generate");var Gi={};y(Gi,{generate:()=>Wi,name:()=>om,parse:()=>Hi,structure:()=>um,walkContext:()=>am});var om="Function",am="function",um={name:String,children:[[]]};function Hi(t,e){let r=this.tokenStart,n=this.consumeFunctionName(),s=n.toLowerCase(),o;return o=e.hasOwnProperty(s)?e[s].call(this,e):t.call(this,e),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:n,children:o}}i(Hi,"parse");function Wi(t){this.token(2,t.name+"("),this.children(t),this.token(22,")")}i(Wi,"generate");var zi={};y(zi,{generate:()=>ji,name:()=>lm,parse:()=>Yi,structure:()=>cm});var lm="GeneralEnclosed",cm={kind:String,function:[String,null],children:[[]]};function Yi(t){let e=this.tokenStart,r=null;this.tokenType===2?r=this.consumeFunctionName():this.eat(21);let n=this.parseWithFallback(()=>{let s=this.tokenIndex,o=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(s)===!1&&this.error(),o},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:"GeneralEnclosed",loc:this.getLocation(e,this.tokenStart),kind:t,function:r,children:n}}i(Yi,"parse");function ji(t){t.function?this.token(2,t.function+"("):this.token(21,"("),this.children(t),this.token(22,")")}i(ji,"generate");var Ki={};y(Ki,{generate:()=>Xi,name:()=>fm,parse:()=>Qi,structure:()=>pm,xxx:()=>hm});var hm="XXX",fm="Hash",pm={value:String};function Qi(){let t=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t+1)}}i(Qi,"parse");function Xi(t){this.token(4,"#"+t.value)}i(Xi,"generate");var ts={};y(ts,{generate:()=>Zi,name:()=>dm,parse:()=>Ji,structure:()=>mm});var dm="Identifier",mm={name:String};function Ji(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}i(Ji,"parse");function Zi(t){this.token(1,t.name)}i(Zi,"generate");var ns={};y(ns,{generate:()=>rs,name:()=>gm,parse:()=>es,structure:()=>xm});var gm="IdSelector",xm={name:String};function es(){let t=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}i(es,"parse");function rs(t){this.token(9,"#"+t.name)}i(rs,"generate");var os={};y(os,{generate:()=>ss,name:()=>km,parse:()=>is,structure:()=>ym});var Sm=46,km="Layer",ym={name:String};function is(){let t=this.tokenStart,e=this.consume(1);for(;this.isDelim(Sm);)this.eat(9),e+="."+this.consume(1);return{type:"Layer",loc:this.getLocation(t,this.tokenStart),name:e}}i(is,"parse");function ss(t){this.tokenize(t.name)}i(ss,"generate");var ls={};y(ls,{generate:()=>us,name:()=>bm,parse:()=>as,structure:()=>Em});var bm="LayerList",Em={children:[["Layer"]]};function as(){let t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(t),children:t}}i(as,"parse");function us(t){this.children(t,()=>this.token(18,","))}i(us,"generate");var fs={};y(fs,{generate:()=>hs,name:()=>Cm,parse:()=>cs,structure:()=>Tm});var Cm="MediaQuery",Tm={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function cs(){let t=this.tokenStart,e=null,r=null,n=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let s=this.consume(1),o=s.toLowerCase();switch(o==="not"||o==="only"?(this.skipSC(),e=o,r=this.consume(1)):r=s,this.lookupTypeNonSC(0)){case 1:{this.skipSC(),this.eatIdent("and"),n=this.Condition("media");break}case 23:case 17:case 18:case 0:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case 1:case 21:case 2:{n=this.Condition("media");break}case 23:case 17:case 0:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(t,this.tokenStart),modifier:e,mediaType:r,condition:n}}i(cs,"parse");function hs(t){t.mediaType?(t.modifier&&this.token(1,t.modifier),this.token(1,t.mediaType),t.condition&&(this.token(1,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}i(hs,"generate");var ms={};y(ms,{generate:()=>ds,name:()=>Am,parse:()=>ps,structure:()=>wm});var Am="MediaQueryList",wm={children:[["MediaQuery"]]};function ps(){let t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}}i(ps,"parse");function ds(t){this.children(t,()=>this.token(18,","))}i(ds,"generate");var Ss={};y(Ss,{generate:()=>xs,name:()=>Nm,parse:()=>gs,structure:()=>vm});var Lm=38,Nm="NestingSelector",vm={};function gs(){let t=this.tokenStart;return this.eatDelim(Lm),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}i(gs,"parse");function xs(){this.token(9,"&")}i(xs,"generate");var bs={};y(bs,{generate:()=>ys,name:()=>Pm,parse:()=>ks,structure:()=>Im});var Pm="Nth",Im={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function ks(){this.skipSC();let t=this.tokenStart,e=t,r=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:n,selector:r}}i(ks,"parse");function ys(t){this.node(t.nth),t.selector!==null&&(this.token(1,"of"),this.node(t.selector))}i(ys,"generate");var Ts={};y(Ts,{generate:()=>Cs,name:()=>Dm,parse:()=>Es,structure:()=>Om});var Dm="Number",Om={value:String};function Es(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}i(Es,"parse");function Cs(t){this.token(10,t.value)}i(Cs,"generate");var Ls={};y(Ls,{generate:()=>ws,name:()=>Rm,parse:()=>As,structure:()=>Fm});var Rm="Operator",Fm={value:String};function As(){let t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}i(As,"parse");function ws(t){this.tokenize(t.value)}i(ws,"generate");var Ps={};y(Ps,{generate:()=>vs,name:()=>Mm,parse:()=>Ns,structure:()=>_m});var Mm="Parentheses",_m={children:[[]]};function Ns(t,e){let r=this.tokenStart,n=null;return this.eat(21),n=t.call(this,e),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}i(Ns,"parse");function vs(t){this.token(21,"("),this.children(t),this.token(22,")")}i(vs,"generate");var Os={};y(Os,{generate:()=>Ds,name:()=>Um,parse:()=>Is,structure:()=>Bm});var Um="Percentage",Bm={value:String};function Is(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}i(Is,"parse");function Ds(t){this.token(11,t.value+"%")}i(Ds,"generate");var Ms={};y(Ms,{generate:()=>Fs,name:()=>Vm,parse:()=>Rs,structure:()=>qm,walkContext:()=>$m});var Vm="PseudoClassSelector",$m="function",qm={name:String,children:[["Raw"],null]};function Rs(){let t=this.tokenStart,e=null,r,n;return this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:r,children:e}}i(Rs,"parse");function Fs(t){this.token(16,":"),t.children===null?this.token(1,t.name):(this.token(2,t.name+"("),this.children(t),this.token(22,")"))}i(Fs,"generate");var Bs={};y(Bs,{generate:()=>Us,name:()=>Hm,parse:()=>_s,structure:()=>Gm,walkContext:()=>Wm});var Hm="PseudoElementSelector",Wm="function",Gm={name:String,children:[["Raw"],null]};function _s(){let t=this.tokenStart,e=null,r,n;return this.eat(16),this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),this.lookupNonWSType(0)==22?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:r,children:e}}i(_s,"parse");function Us(t){this.token(16,":"),this.token(16,":"),t.children===null?this.token(1,t.name):(this.token(2,t.name+"("),this.children(t),this.token(22,")"))}i(Us,"generate");var qs={};y(qs,{generate:()=>$s,name:()=>Ym,parse:()=>Vs,structure:()=>jm});var vl=47;function Pl(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}i(Pl,"consumeTerm");var Ym="Ratio",jm={left:["Number","Function"],right:["Number","Function",null]};function Vs(){let t=this.tokenStart,e=Pl.call(this),r=null;return this.skipSC(),this.isDelim(vl)&&(this.eatDelim(vl),r=Pl.call(this)),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:e,right:r}}i(Vs,"parse");function $s(t){this.node(t.left),this.token(9,"/"),t.right?this.node(t.right):this.node(10,1)}i($s,"generate");var Gs={};y(Gs,{generate:()=>Ws,name:()=>Qm,parse:()=>Hs,structure:()=>Xm});function zm(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}i(zm,"getOffsetExcludeWS");var Qm="Raw",Xm={value:String};function Hs(t,e){let r=this.getTokenStart(this.tokenIndex),n;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>r?n=zm.call(this):n=this.tokenStart,{type:"Raw",loc:this.getLocation(r,n),value:this.substring(r,n)}}i(Hs,"parse");function Ws(t){this.tokenize(t.value)}i(Ws,"generate");var zs={};y(zs,{generate:()=>js,name:()=>Jm,parse:()=>Ys,structure:()=>tg,walkContext:()=>Zm});function Il(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}i(Il,"consumeRaw");function Km(){let t=this.SelectorList();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),t}i(Km,"consumePrelude");var Jm="Rule",Zm="rule",tg={prelude:["SelectorList","Raw"],block:["Block"]};function Ys(){let t=this.tokenIndex,e=this.tokenStart,r,n;return this.parseRulePrelude?r=this.parseWithFallback(Km,Il):r=Il.call(this,t),n=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.tokenStart),prelude:r,block:n}}i(Ys,"parse");function js(t){this.node(t.prelude),this.node(t.block)}i(js,"generate");var Ks={};y(Ks,{generate:()=>Xs,name:()=>eg,parse:()=>Qs,structure:()=>rg});var eg="Scope",rg={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function Qs(){let t=null,e=null;this.skipSC();let r=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat(21),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:"Scope",loc:this.getLocation(r,this.tokenStart),root:t,limit:e}}i(Qs,"parse");function Xs(t){t.root&&(this.token(21,"("),this.node(t.root),this.token(22,")")),t.limit&&(this.token(1,"to"),this.token(21,"("),this.node(t.limit),this.token(22,")"))}i(Xs,"generate");var to={};y(to,{generate:()=>Zs,name:()=>ng,parse:()=>Js,structure:()=>ig});var ng="Selector",ig={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function Js(){let t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}i(Js,"parse");function Zs(t){this.children(t)}i(Zs,"generate");var no={};y(no,{generate:()=>ro,name:()=>sg,parse:()=>eo,structure:()=>ag,walkContext:()=>og});var sg="SelectorList",og="selector",ag={children:[["Selector","Raw"]]};function eo(){let t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}i(eo,"parse");function ro(t){this.children(t,()=>this.token(18,","))}i(ro,"generate");var ao={};y(ao,{generate:()=>oo,name:()=>lg,parse:()=>so,structure:()=>cg});var io=92,Dl=34,Ol=39;function Ir(t){let e=t.length,r=t.charCodeAt(0),n=r===Dl||r===Ol?1:0,s=n===1&&e>1&&t.charCodeAt(e-1)===r?e-2:e-1,o="";for(let a=n;a<=s;a++){let l=t.charCodeAt(a);if(l===io){if(a===s){a!==e-1&&(o=t.substr(a+1));break}if(l=t.charCodeAt(++a),ut(io,l)){let c=a-1,u=Dt(t,c);a=u-1,o+=Er(t.substring(c+1,u))}else l===13&&t.charCodeAt(a+1)===10&&a++}else o+=t[a]}return o}i(Ir,"decode");function Rl(t,e){let r=e?"'":'"',n=e?Ol:Dl,s="",o=!1;for(let a=0;a<t.length;a++){let l=t.charCodeAt(a);if(l===0){s+="\uFFFD";continue}if(l<=31||l===127){s+="\\"+l.toString(16),o=!0;continue}l===n||l===io?(s+="\\"+t.charAt(a),o=!1):(o&&(At(l)||wt(l))&&(s+=" "),s+=t.charAt(a),o=!1)}return r+s+r}i(Rl,"encode");var lg="String",cg={value:String};function so(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Ir(this.consume(5))}}i(so,"parse");function oo(t){this.token(5,Rl(t.value))}i(oo,"generate");var co={};y(co,{generate:()=>lo,name:()=>fg,parse:()=>uo,structure:()=>dg,walkContext:()=>pg});var hg=33;function Fl(){return this.Raw(null,!1)}i(Fl,"consumeRaw");var fg="StyleSheet",pg="stylesheet",dg={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function uo(){let t=this.tokenStart,e=this.createList(),r;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==hg){this.next();continue}r=this.Comment();break;case 14:r=this.CDO();break;case 15:r=this.CDC();break;case 3:r=this.parseWithFallback(this.Atrule,Fl);break;default:r=this.parseWithFallback(this.Rule,Fl)}e.push(r)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:e}}i(uo,"parse");function lo(t){this.children(t)}i(lo,"generate");var po={};y(po,{generate:()=>fo,name:()=>mg,parse:()=>ho,structure:()=>gg});var mg="SupportsDeclaration",gg={declaration:"Declaration"};function ho(){let t=this.tokenStart;this.eat(21),this.skipSC();let e=this.Declaration();return this.eof||this.eat(22),{type:"SupportsDeclaration",loc:this.getLocation(t,this.tokenStart),declaration:e}}i(ho,"parse");function fo(t){this.token(21,"("),this.node(t.declaration),this.token(22,")")}i(fo,"generate");var So={};y(So,{generate:()=>xo,name:()=>Sg,parse:()=>go,structure:()=>kg});var xg=42,Ml=124;function mo(){this.tokenType!==1&&this.isDelim(xg)===!1&&this.error("Identifier or asterisk is expected"),this.next()}i(mo,"eatIdentifierOrAsterisk");var Sg="TypeSelector",kg={name:String};function go(){let t=this.tokenStart;return this.isDelim(Ml)?(this.next(),mo.call(this)):(mo.call(this),this.isDelim(Ml)&&(this.next(),mo.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}i(go,"parse");function xo(t){this.tokenize(t.name)}i(xo,"generate");var Eo={};y(Eo,{generate:()=>bo,name:()=>Eg,parse:()=>yo,structure:()=>Cg});var _l=43,Ul=45,ko=63;function De(t,e){let r=0;for(let n=this.tokenStart+t;n<this.tokenEnd;n++){let s=this.charCodeAt(n);if(s===Ul&&e&&r!==0)return De.call(this,t+r+1,!1),-1;At(s)||this.error(e&&r!==0?"Hyphen minus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n)}return this.next(),r}i(De,"eatHexSequence");function Dr(t){let e=0;for(;this.isDelim(ko);)++e>t&&this.error("Too many question marks"),this.next()}i(Dr,"eatQuestionMarkSequence");function yg(t){this.charCodeAt(this.tokenStart)!==t&&this.error((t===_l?"Plus sign":"Hyphen minus")+" is expected")}i(yg,"startsWith");function bg(){let t=0;switch(this.tokenType){case 10:if(t=De.call(this,1,!0),this.isDelim(ko)){Dr.call(this,6-t);break}if(this.tokenType===12||this.tokenType===10){yg.call(this,Ul),De.call(this,1,!1);break}break;case 12:t=De.call(this,1,!0),t>0&&Dr.call(this,6-t);break;default:if(this.eatDelim(_l),this.tokenType===1){t=De.call(this,0,!0),t>0&&Dr.call(this,6-t);break}if(this.isDelim(ko)){this.next(),Dr.call(this,5);break}this.error("Hex digit or question mark is expected")}}i(bg,"scanUnicodeRange");var Eg="UnicodeRange",Cg={value:String};function yo(){let t=this.tokenStart;return this.eatIdent("u"),bg.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}i(yo,"parse");function bo(t){this.tokenize(t.value)}i(bo,"generate");var wo={};y(wo,{generate:()=>Ao,name:()=>vg,parse:()=>To,structure:()=>Pg});var Tg=32,Co=92,Ag=34,wg=39,Lg=40,Bl=41;function Vl(t){let e=t.length,r=4,n=t.charCodeAt(e-1)===Bl?e-2:e-1,s="";for(;r<n&&wt(t.charCodeAt(r));)r++;for(;r<n&&wt(t.charCodeAt(n));)n--;for(let o=r;o<=n;o++){let a=t.charCodeAt(o);if(a===Co){if(o===n){o!==e-1&&(s=t.substr(o+1));break}if(a=t.charCodeAt(++o),ut(Co,a)){let l=o-1,c=Dt(t,l);o=c-1,s+=Er(t.substring(l+1,c))}else a===13&&t.charCodeAt(o+1)===10&&o++}else s+=t[o]}return s}i(Vl,"decode");function $l(t){let e="",r=!1;for(let n=0;n<t.length;n++){let s=t.charCodeAt(n);if(s===0){e+="\uFFFD";continue}if(s<=31||s===127){e+="\\"+s.toString(16),r=!0;continue}s===Tg||s===Co||s===Ag||s===wg||s===Lg||s===Bl?(e+="\\"+t.charAt(n),r=!1):(r&&At(s)&&(e+=" "),e+=t.charAt(n),r=!1)}return"url("+e+")"}i($l,"encode");var vg="Url",Pg={value:String};function To(){let t=this.tokenStart,e;switch(this.tokenType){case 7:e=Vl(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),e=Ir(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}i(To,"parse");function Ao(t){this.token(7,$l(t.value))}i(Ao,"generate");var vo={};y(vo,{generate:()=>No,name:()=>Ig,parse:()=>Lo,structure:()=>Dg});var Ig="Value",Dg={children:[[]]};function Lo(){let t=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.tokenStart),children:e}}i(Lo,"parse");function No(t){this.children(t)}i(No,"generate");var Do={};y(Do,{generate:()=>Io,name:()=>Rg,parse:()=>Po,structure:()=>Fg});var Og=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Rg="WhiteSpace",Fg={value:String};function Po(){return this.eat(13),Og}i(Po,"parse");function Io(t){this.token(13,t.value)}i(Io,"generate");var ql={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(t){return this.AtrulePrelude(t.atrule?String(t.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",condition(t){return this.Condition(t.kind)},rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:Mn,atrule:fl,pseudo:dl,node:Oo};var Hl=zu(ql);var cc=ia(uc(),1);var lc=new Set(["Atrule","Selector","Declaration"]);function hc(t){let e=new cc.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},s={line:1,column:0},o={generated:s},a=1,l=0,c=!1,u=t.node;t.node=function(p){if(p.loc&&p.loc.start&&lc.has(p.type)){let m=p.loc.start.line,x=p.loc.start.column-1;(n.line!==m||n.column!==x)&&(n.line=m,n.column=x,r.line=a,r.column=l,c&&(c=!1,(r.line!==s.line||r.column!==s.column)&&e.addMapping(o)),c=!0,e.addMapping({source:p.loc.source,original:n,generated:r}))}u.call(this,p),c&&lc.has(p.type)&&(s.line=a,s.column=l)};let h=t.emit;t.emit=function(p,m,x){for(let C=0;C<p.length;C++)p.charCodeAt(C)===10?(a++,l=0):l++;h(p,m,x)};let f=t.result;return t.result=function(){return c&&e.addMapping(o),{css:f(),map:e}},t}i(hc,"generateSourceMap");var Mr={};y(Mr,{safe:()=>$o,spec:()=>nx});var tx=43,ex=45,Vo=i((t,e)=>(t===9&&(t=e),typeof t=="string"&&(t=Math.min(t.charCodeAt(0),128)<<6),t<<1),"code"),fc=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],rx=fc.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function pc(t){let e=new Set(t.map(([r,n])=>Vo(r)<<16|Vo(n)));return function(r,n,s){let o=Vo(n,s),a=s.charCodeAt(0),l=a===ex&&n!==1&&n!==2&&n!==15||a===tx?e.has((r&65534)<<16|a<<7):e.has((r&65534)<<16|o);return o|l}}i(pc,"createMap");var nx=pc(fc),$o=pc(rx);var ix=92;function sx(t,e){if(typeof e=="function"){let r=null;t.children.forEach(n=>{r!==null&&e.call(this,r),this.node(n),r=n});return}t.children.forEach(this.node,this)}i(sx,"processChildren");function dc(t){let e=new Map;for(let[r,n]of Object.entries(t.node))typeof(n.generate||n)=="function"&&e.set(r,n.generate||n);return function(r,n){let s="",o=0,a={node(c){if(e.has(c.type))e.get(c.type).call(l,c);else throw new Error("Unknown node type: "+c.type)},tokenBefore:$o,token(c,u,h){o=this.tokenBefore(o,c,u),!h&&o&1&&this.emit(" ",13,!0),this.emit(u,c,!1),c===9&&u.charCodeAt(0)===ix&&this.emit(`
13
+ `,13,!0)},emit(c){s+=c},result(){return s}};n&&(typeof n.decorator=="function"&&(a=n.decorator(a)),n.sourceMap&&(a=hc(a)),n.mode in Mr&&(a.tokenBefore=Mr[n.mode]));let l={node:i(c=>a.node(c),"node"),children:sx,token:i((c,u)=>a.token(c,u),"token"),tokenize:i(c=>wr(c,(u,h,f)=>{a.token(u,c.slice(h,f),h!==0)}),"tokenize")};return a.node(r),a.result()}}i(dc,"createGenerator");var qo={};y(qo,{AnPlusB:()=>$n,Atrule:()=>Wn,AtrulePrelude:()=>jn,AttributeSelector:()=>Kn,Block:()=>ti,Brackets:()=>ni,CDC:()=>oi,CDO:()=>li,ClassSelector:()=>fi,Combinator:()=>mi,Comment:()=>Si,Condition:()=>bi,Declaration:()=>Ti,DeclarationList:()=>Ni,Dimension:()=>Ii,Feature:()=>Ri,FeatureFunction:()=>_i,FeatureRange:()=>$i,Function:()=>Wi,GeneralEnclosed:()=>ji,Hash:()=>Xi,IdSelector:()=>rs,Identifier:()=>Zi,Layer:()=>ss,LayerList:()=>us,MediaQuery:()=>hs,MediaQueryList:()=>ds,NestingSelector:()=>xs,Nth:()=>ys,Number:()=>Cs,Operator:()=>ws,Parentheses:()=>vs,Percentage:()=>Ds,PseudoClassSelector:()=>Fs,PseudoElementSelector:()=>Us,Ratio:()=>$s,Raw:()=>Ws,Rule:()=>js,Scope:()=>Xs,Selector:()=>Zs,SelectorList:()=>ro,String:()=>oo,StyleSheet:()=>lo,SupportsDeclaration:()=>fo,TypeSelector:()=>xo,UnicodeRange:()=>bo,Url:()=>Ao,Value:()=>No,WhiteSpace:()=>Io});var mc={node:qo};var gc=dc(mc);var{hasOwnProperty:Ho}=Object.prototype,Fe=i(function(){},"noop");function xc(t){return typeof t=="function"?t:Fe}i(xc,"ensureFunction");function Sc(t,e){return function(r,n,s){r.type===e&&t.call(this,r,n,s)}}i(Sc,"invokeForType");function ox(t,e){let r=e.structure,n=[];for(let s in r){if(Ho.call(r,s)===!1)continue;let o=r[s],a={name:s,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(let l of o)l===null?a.nullable=!0:typeof l=="string"?a.type="node":Array.isArray(l)&&(a.type="list");a.type&&n.push(a)}return n.length?{context:e.walkContext,fields:n}:null}i(ox,"getWalkersFromStructure");function ax(t){let e={};for(let r in t.node)if(Ho.call(t.node,r)){let n=t.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");e[r]=ox(r,n)}return e}i(ax,"getTypesFromConfig");function kc(t,e){let r=t.fields.slice(),n=t.context,s=typeof n=="string";return e&&r.reverse(),function(o,a,l,c){let u;s&&(u=a[n],a[n]=o);for(let h of r){let f=o[h.name];if(!h.nullable||f){if(h.type==="list"){if(e?f.reduceRight(c,!1):f.reduce(c,!1))return!0}else if(l(f))return!0}}s&&(a[n]=u)}}i(kc,"createTypeIterator");function yc({StyleSheet:t,Atrule:e,Rule:r,Block:n,DeclarationList:s}){return{Atrule:{StyleSheet:t,Atrule:e,Rule:r,Block:n},Rule:{StyleSheet:t,Atrule:e,Rule:r,Block:n},Declaration:{StyleSheet:t,Atrule:e,Rule:r,Block:n,DeclarationList:s}}}i(yc,"createFastTraveralMap");function bc(t){let e=ax(t),r={},n={},s=Symbol("break-walk"),o=Symbol("skip-node");for(let u in e)Ho.call(e,u)&&e[u]!==null&&(r[u]=kc(e[u],!1),n[u]=kc(e[u],!0));let a=yc(r),l=yc(n),c=i(function(u,h){function f(P,W,G){let Ft=p.call(I,P,W,G);return Ft===s?!0:Ft===o?!1:!!(x.hasOwnProperty(P.type)&&x[P.type](P,I,f,C)||m.call(I,P,W,G)===s)}i(f,"walkNode");let p=Fe,m=Fe,x=r,C=i((P,W,G,Ft)=>P||f(W,G,Ft),"walkReducer"),I={break:s,skip:o,root:u,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof h=="function")p=h;else if(h&&(p=xc(h.enter),m=xc(h.leave),h.reverse&&(x=n),h.visit)){if(a.hasOwnProperty(h.visit))x=h.reverse?l[h.visit]:a[h.visit];else if(!e.hasOwnProperty(h.visit))throw new Error("Bad value `"+h.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");p=Sc(p,h.visit),m=Sc(m,h.visit)}if(p===Fe&&m===Fe)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");f(u)},"walk");return c.break=s,c.skip=o,c.find=function(u,h){let f=null;return c(u,function(p,m,x){if(h.call(this,p,m,x))return f=p,s}),f},c.findLast=function(u,h){let f=null;return c(u,{reverse:!0,enter(p,m,x){if(h.call(this,p,m,x))return f=p,s}}),f},c.findAll=function(u,h){let f=[];return c(u,function(p,m,x){h.call(this,p,m,x)&&f.push(p)}),f},c}i(bc,"createWalker");var Wo={};y(Wo,{AnPlusB:()=>qn,Atrule:()=>Gn,AtrulePrelude:()=>zn,AttributeSelector:()=>Jn,Block:()=>ei,Brackets:()=>ii,CDC:()=>ai,CDO:()=>ci,ClassSelector:()=>pi,Combinator:()=>gi,Comment:()=>ki,Condition:()=>Ei,Declaration:()=>Ai,DeclarationList:()=>vi,Dimension:()=>Di,Feature:()=>Fi,FeatureFunction:()=>Ui,FeatureRange:()=>qi,Function:()=>Gi,GeneralEnclosed:()=>zi,Hash:()=>Ki,IdSelector:()=>ns,Identifier:()=>ts,Layer:()=>os,LayerList:()=>ls,MediaQuery:()=>fs,MediaQueryList:()=>ms,NestingSelector:()=>Ss,Nth:()=>bs,Number:()=>Ts,Operator:()=>Ls,Parentheses:()=>Ps,Percentage:()=>Os,PseudoClassSelector:()=>Ms,PseudoElementSelector:()=>Bs,Ratio:()=>qs,Raw:()=>Gs,Rule:()=>zs,Scope:()=>Ks,Selector:()=>to,SelectorList:()=>no,String:()=>ao,StyleSheet:()=>co,SupportsDeclaration:()=>po,TypeSelector:()=>So,UnicodeRange:()=>Eo,Url:()=>wo,Value:()=>vo,WhiteSpace:()=>Do});var Ec={node:Wo};var Cc=bc(Ec);var n0=ia(Jc()),r0={parse:Hl,generate:gc,walk:Cc};return sh(i0);})();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-simulated
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keita Urashima
@@ -15,28 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '3.40'
18
+ version: '3.37'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '3.40'
26
- - !ruby/object:Gem::Dependency
27
- name: mini_racer
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.18'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0.18'
25
+ version: '3.37'
40
26
  - !ruby/object:Gem::Dependency
41
27
  name: rack
42
28
  requirement: !ruby/object:Gem::Requirement
@@ -51,8 +37,11 @@ dependencies:
51
37
  - - ">="
52
38
  - !ruby/object:Gem::Version
53
39
  version: '2.2'
54
- description: A Capybara driver that runs JavaScript in a long-lived mini_racer V8
55
- context against a happy-dom DOM, sitting between rack-test and full headless browsers.
40
+ description: A Capybara driver that runs JavaScript against an in-process JS-resident
41
+ DOM V8 via rusty_racer or QuickJS via quickjs.rb, whichever is installed. No Chrome,
42
+ no Node toolchain. Forms submit through Rack::MockRequest, inline <script> + event
43
+ handlers run, Hotwire / Stimulus / Turbo work, and Capybara DSL is unchanged. Sits
44
+ between rack-test and full headless browsers.
56
45
  email:
57
46
  - ursm@ursm.jp
58
47
  executables: []
@@ -63,22 +52,25 @@ files:
63
52
  - README.md
64
53
  - lib/capybara-simulated.rb
65
54
  - lib/capybara/simulated.rb
55
+ - lib/capybara/simulated/asset_cache.rb
66
56
  - lib/capybara/simulated/browser.rb
67
57
  - lib/capybara/simulated/driver.rb
68
58
  - lib/capybara/simulated/errors.rb
59
+ - lib/capybara/simulated/js/bridge.bundle.js
60
+ - lib/capybara/simulated/js/snapshot_stubs.js
69
61
  - lib/capybara/simulated/node.rb
62
+ - lib/capybara/simulated/quickjs_runtime.rb
63
+ - lib/capybara/simulated/runtime_shared.rb
64
+ - lib/capybara/simulated/script_cache.rb
65
+ - lib/capybara/simulated/sourcemap.rb
66
+ - lib/capybara/simulated/stack_resolver.rb
67
+ - lib/capybara/simulated/trace.rb
68
+ - lib/capybara/simulated/v8_runtime.rb
70
69
  - lib/capybara/simulated/version.rb
71
- - vendor/esbuild-wasm/LICENSE.md
72
- - vendor/esbuild-wasm/bin/esbuild
73
- - vendor/esbuild-wasm/esbuild.wasm
74
- - vendor/esbuild-wasm/lib/main.js
75
- - vendor/esbuild-wasm/wasm_exec.js
76
- - vendor/esbuild-wasm/wasm_exec_node.js
77
- - vendor/js/bundle-modules.mjs
78
- - vendor/js/csim.bundle.js
79
- - vendor/js/entry.mjs
80
- - vendor/js/prelude.js
81
- - vendor/js/runtime.js
70
+ - lib/capybara/simulated/webauthn_state.rb
71
+ - lib/capybara/simulated/whitespace_normalizer.rb
72
+ - lib/capybara/simulated/worker_runtime.rb
73
+ - vendor/js/vendor.bundle.js
82
74
  homepage: https://github.com/ursm/capybara-simulated
83
75
  licenses:
84
76
  - MIT
@@ -100,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
92
  - !ruby/object:Gem::Version
101
93
  version: '0'
102
94
  requirements: []
103
- rubygems_version: 4.0.6
95
+ rubygems_version: 4.0.10
104
96
  specification_version: 4
105
- summary: Lightweight Capybara driver powered by V8 (mini_racer) + happy-dom
97
+ summary: Lightweight Capybara driver with an in-process JS-resident DOM, Chrome-free
106
98
  test_files: []