@kitschpatrol/tldraw-cli 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -1,23 +1,30 @@
1
1
  #!/usr/bin/env node
2
- var So=Object.create;var vr=Object.defineProperty;var Co=Object.getOwnPropertyDescriptor;var Ao=Object.getOwnPropertyNames;var jo=Object.getPrototypeOf,Po=Object.prototype.hasOwnProperty;var ze=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var Io=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var Fo=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ao(e))!Po.call(i,r)&&r!==t&&vr(i,r,{get:()=>e[r],enumerable:!(n=Co(e,r))||n.enumerable});return i};var Mo=(i,e,t)=>(t=i!=null?So(jo(i)):{},Fo(e||!i||!i.__esModule?vr(t,"default",{value:i,enumerable:!0}):t,i));var Pr=Io((pn,gn)=>{(function(i,e){typeof pn=="object"&&typeof gn<"u"?gn.exports=e():typeof define=="function"&&define.amd?define(e):(i=i||self,i.v=e())})(pn,function(){"use strict";function i(){return i=Object.assign||function(o){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(o[p]=l[p])}return o},i.apply(this,arguments)}function e(o,u){return r(o)||c(o,u)||b()}function t(o){return n(o)||s(o)||d()}function n(o){if(Array.isArray(o)){for(var u=0,l=new Array(o.length);u<o.length;u++)l[u]=o[u];return l}}function r(o){if(Array.isArray(o))return o}function s(o){if(Symbol.iterator in Object(o)||Object.prototype.toString.call(o)==="[object Arguments]")return Array.from(o)}function c(o,u){if(Symbol.iterator in Object(o)||Object.prototype.toString.call(o)==="[object Arguments]"){var l=[],p=!0,v=!1,A=void 0;try{for(var $=o[Symbol.iterator](),te;!(p=(te=$.next()).done)&&(l.push(te.value),!(u&&l.length===u));p=!0);}catch(Z){v=!0,A=Z}finally{try{!p&&$.return!=null&&$.return()}finally{if(v)throw A}}return l}}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function y(o){return o==null}function E(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return y(o)?u:!!o}function w(o){return typeof o=="string"}function f(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return y(o)?u:w(o)?o:String(o)}function _(o,u){var l=f(o),p=E(u);return l===""?"":(p&&(l=l.toLowerCase()),l.substr(0,1).toUpperCase()+l.substr(1))}function F(o){var u=f(o,"");return u.toLowerCase()}var S="\\d",x="\\s\\uFEFF\\xA0",B="\\uD800-\\uDBFF",G="\\uDC00-\\uDFFF",X="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",K="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",k=new RegExp("(["+K+"]|["+B+"]["+G+"]|["+B+"](?!["+G+"])|(?:[^"+B+"]|^)["+G+"])(["+X+"]+)","g"),de=new RegExp("(["+B+"])(["+G+"])","g"),ne=new RegExp("((?:["+K+"]|["+B+"]["+G+"]|["+B+"](?!["+G+"])|(?:[^"+B+"]|^)["+G+"])(?:["+X+"]+))|(["+B+"]["+G+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),We=new RegExp("["+x+"]"),Ue=new RegExp("^["+x+"]+"),q=new RegExp("["+x+"]+$"),R=new RegExp("^"+S+"+$"),P=/[-[\]{}()*+!<=:?./\\^$|#,]/g,N=/[^A-Za-z0-9]/g,H=/[<>&"'`]/g,ee=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,pe=/\.?0+$/g,Q=/<([A-Za-z0-9]+)>/g,ge="\\u2000-\\u206F",Ve="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",ue="\\u2700-\\u27BF",Oe="a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F",_e="\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e",Be=new RegExp("(?:["+_e+"]["+X+"]*)?(?:["+Oe+"]["+X+"]*)+|(?:["+_e+"]["+X+"]*)+(?!["+Oe+"])|["+S+"]+|["+ue+"]|[^"+Ve+ge+x+"]+","g"),W=/[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g,_t=new RegExp("^(?:["+Oe+_e+"]["+X+"]*)+$"),U=new RegExp("^((?:["+Oe+_e+"]["+X+"]*)|["+S+"])+$"),ie=/^[\x01-\xFF]*$/;function re(o,u){return o??u}function Y(o){return y(o)?null:w(o)?o:String(o)}function se(o,u,l){var p=f(o),v;if(y(u))v=ie.test(p)?W:Be;else if(u instanceof RegExp)v=u;else{var A=Y(re(l,""));v=new RegExp(Y(u),A)}return re(p.match(v),[])}function fe(o,u){return u===0?F(o):_(o,!0)}function Ae(o){var u=f(o);return u===""?"":se(u).map(fe).join("")}function je(o){var u=f(o);return u===""?"":u.substr(0,1).toLowerCase()+u.substr(1)}function tt(o){var u=f(o);return u===""?"":se(u).map(F).join("-")}function h(o){var u=f(o);return u===""?"":se(u).map(F).join("_")}function m(o){var u=f(o);return u.toUpperCase()}function C(o){var u=f(o);return u.split("").reduce(O,"")}function O(o,u){var l=u.toLowerCase(),p=u.toUpperCase();return o+(u===l?p:l)}function g(o,u){var l=f(o),p=Array.isArray(u)?u:[],v=ie.test(l)?W:Be;return l.replace(v,function(A,$){var te=$>0&&p.indexOf(l[$-1])>=0;return te?A.toLowerCase():_(A,!0)})}function I(o,u,l){return o<=u?u:o>=l?l:o}var j=9007199254740991;function M(o){return o===1/0?j:o===-1/0?-j:~~o}function me(o,u,l){var p=f(o),v=y(u)?p.length:I(M(u),0,j),A=f(l,"...");return v>=p.length?p:p.substr(0,u-A.length)+A}function ye(o,u){var l=f(o);return l.charAt(u)}var Yn=55296,$i=56319,Vn=56320,Li=57343;function Wi(o){return o>=Yn&&o<=$i}function Ui(o){return o>=Vn&&o<=Li}function Bi(o,u){return(o-Yn)*1024+u-Vn+65536}function qe(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return y(o)?u:typeof o=="number"?o:Number(o)}function qn(o,u){return o!==o?u:o}function Kn(o,u){var l=f(o),p=l.length,v=qe(u);if(v=qn(v,0),!(v<0||v>=p)){var A=l.charCodeAt(v),$;return Wi(A)&&p>v+1&&($=l.charCodeAt(v+1),Ui($))?Bi(A,$):A}}function Gi(o,u){var l=f(o),p=y(u)?1:I(M(u),0,j);return l.length<=p?l:l.substr(0,p)}function zi(o,u){var l=f(o),p=qe(u),v,A=0;for(p=qn(p,0);(v=ne.exec(l))!==null;){if(A===p)return ne.lastIndex=0,v[0];A++}return""}function Hi(o,u){var l=f(o),p=y(u)?1:I(M(u),0,j);return l.length<=p?l:l.substr(l.length-p,p)}function Yi(o,u,l){var p=f(o),v=y(u)?p.length:I(M(u),0,j),A=f(l,"...");if(v>=p.length)return p;var $=ie.test(p)?W:Be,te=0;return p.replace($,function(Z,be){var J=be+Z.length;J<=v-A.length&&(te=J)}),p.substr(0,te)+A}function Vi(o,u,l){return f(o).slice(u,l)}function qi(o,u,l){return f(o).substr(u,l)}function Ki(o,u,l){return f(o).substring(u,l)}function Xi(o){return f(o).length}function ki(o){return f(o).replace(k,"*").replace(de,"*").length}function Zi(o,u){var l=f(o),p=f(u),v=p.length,A=0,$=0;if(l===""||p==="")return A;do $=l.indexOf(p,$),$!==-1&&(A++,$+=v);while($!==-1);return A}var Ji=Array.prototype.reduce;function Qi(o,u,l){var p=f(o);if(p===""||typeof u!="function")return 0;var v=u.bind(l);return Ji.call(p,function(A,$,te){return v($,te,p)?A+1:A},0)}function es(o,u,l){return se(o,u,l).length}function Dt(){this.index=0}Dt.prototype.increment=function(){this.index++},Dt.prototype.incrementOnEmptyPosition=function(o){y(o)&&this.increment()},Dt.prototype.getIndexByPosition=function(o){return y(o)?this.index:o-1};var ts="i",Xn="b",kn="c",ns="d",Zn="o",rs="u",Jn="x",Qn="X",er="e",tr="E",nr="f",rr="g",nn="G",is="s",ss="'",ir="+",os="-",as="%%",us=2,cs=8,sr=16;function or(o,u){for(var l=f(o),p=y(u)?1:I(M(u),0,j),v="";p;)p&1&&(v+=l),p>1&&(l+=l),p>>=1;return v}function Tt(o,u){var l=M(u/o.length),p=u%o.length;return or(o,l+p).substr(0,u)}function ar(o,u,l){var p=f(o),v=y(u)?0:I(M(u),0,j),A=f(l," ");return v<=p.length?p:Tt(A,v-p.length)+p}function ur(o,u,l){var p=f(o),v=y(u)?0:I(M(u),0,j),A=f(l," ");return v<=p.length?p:p+Tt(A,v-p.length)}function ls(o,u){var l=u.width;if(y(l)||o.length>=l)return o;var p=u.alignmentSpecifier===os?ur:ar;return p(o,l,u.getPaddingCharacter())}function cr(o,u,l){return l.signSpecifier===ir&&o>=0&&(u=ir+u),u}function fs(o,u){var l=parseFloat(o),p;isNaN(l)&&(l=0);var v=qe(u.precision,6);switch(u.typeSpecifier){case nr:p=l.toFixed(v);break;case er:p=l.toExponential(v);break;case tr:p=l.toExponential(v).toUpperCase();break;case rr:case nn:p=hs(l,v,u);break}return p=cr(l,p,u),f(p)}function hs(o,u,l){if(o===0)return"0";var p=u===0?1:u,v=o.toPrecision(p).replace(pe,"");return l.typeSpecifier===nn&&(v=v.toUpperCase()),v}function ds(o,u){var l=parseInt(o);switch(isNaN(l)&&(l=0),l=l>>>0,u.typeSpecifier){case kn:l=String.fromCharCode(l);break;case Xn:l=l.toString(us);break;case Zn:l=l.toString(cs);break;case Jn:l=l.toString(sr);break;case Qn:l=l.toString(sr).toUpperCase();break}return f(l)}function ps(o,u){var l=parseInt(o);return isNaN(l)&&(l=0),cr(l,Y(l),u)}function gs(o,u){var l=o,p=u.precision;return!y(p)&&l.length>p&&(l=me(l,p,"")),l}function ms(o,u){var l;switch(u.typeSpecifier){case is:l=gs;break;case ns:case ts:l=ps;break;case kn:case Xn:case Zn:case Jn:case Qn:case rs:l=ds;break;case nr:case er:case tr:case rr:case nn:l=fs;break}var p=l(o,u);return ls(p,u)}function rn(o){this.percent=o.percent,this.signSpecifier=o.signSpecifier,this.paddingSpecifier=o.paddingSpecifier,this.alignmentSpecifier=o.alignmentSpecifier,this.width=o.width,this.precision=o.precision,this.typeSpecifier=o.typeSpecifier}rn.prototype.isPercentLiteral=function(){return as===this.percent},rn.prototype.getPaddingCharacter=function(){var o=re(this.paddingSpecifier," ");return o.length===2&&o[0]===ss&&(o=o[1]),o};function bs(o,u,l){if(y(l.typeSpecifier))throw new Error("sprintf(): Unknown type specifier");if(o>u-1)throw new Error("sprintf(): Too few arguments");if(o<0)throw new Error("sprintf(): Argument number must be greater than zero")}function ws(o,u,l,p,v,A,$,te,Z,be,J){var oe=new rn({percent:p,signSpecifier:A,paddingSpecifier:$,alignmentSpecifier:te,width:qe(Z,null),precision:qe(be,null),typeSpecifier:J});if(oe.isPercentLiteral())return l.slice(1);var ae=o.getIndexByPosition(v);return o.incrementOnEmptyPosition(v),bs(ae,u.length,oe),ms(u[ae],oe)}function lr(o){var u=f(o);if(u==="")return u;for(var l=arguments.length,p=new Array(l>1?l-1:0),v=1;v<l;v++)p[v-1]=arguments[v];var A=ws.bind(void 0,new Dt,p);return u.replace(ee,A)}function xs(o,u){return lr.apply(void 0,[o].concat(t(re(u,[]))))}var ys={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function Es(o){return ys[o]}function vs(o){return f(o).replace(H,Es)}function Os(o){return f(o).replace(P,"\\$&")}var fr={"<":/(&lt;)|(&#x0*3c;)|(&#0*60;)/gi,">":/(&gt;)|(&#x0*3e;)|(&#0*62;)/gi,"&":/(&amp;)|(&#x0*26;)|(&#0*38;)/gi,'"':/(&quot;)|(&#x0*22;)|(&#0*34;)/gi,"'":/(&#x0*27;)|(&#0*39;)/gi,"`":/(&#x0*60;)|(&#0*96;)/gi},_s=Object.keys(fr);function Ss(o,u){return o.replace(fr[u],u)}function Cs(o){var u=f(o);return _s.reduce(Ss,u)}function As(o,u,l){var p=f(o);return p.indexOf(u,l)}function js(o,u,l){var p=f(o);return p.lastIndexOf(u,l)}function Ps(o,u,l){var p=f(o),v=y(l)?0:I(M(l),0,p.length),A=p.substr(v).search(u);return A!==-1&&!isNaN(v)&&(A+=v),A}function Is(o,u,l){var p=f(o),v=f(u),A=qe(l);return A<0||A>p.length||v===""?p:p.slice(0,A)+v+p.slice(A)}var hr={3:"\u039E\u03BE",8:"\u0398\u03B8",A:"A\xC0\xC1\xC2\xC3\xC4\xC5\u0100\u0102\u0104\u01CD\u01DE\u01E0\u01FA\u0200\u0202\u0226\u023A\u0386\u0391\u0410",B:"B\u0181\u0182\u0243\u0392\u0411",C:"C\xC7\u0106\u0108\u010A\u010C\u0187\u023B\u0426",D:"D\u010E\u0110\u0189\u018A\u018B\xD0\u0394\u0414",E:"E\xC8\xC9\xCA\xCB\u0112\u0114\u0116\u0118\u011A\u018E\u0190\u0204\u0206\u0228\u0388\u0395\u0415\u042D",F:"F\u0191\u03A6\u0424",G:"G\u011C\u011E\u0120\u0122\u0193\u01E4\u01E6\u01F4\u0393\u0413\u0490",H:"H\u0124\u0126\u021E\u0389\u0397\u0425",I:"I\xCC\xCD\xCE\xCF\u0128\u012A\u012C\u012E\u0130\u0197\u01CF\u0208\u020A\u038A\u0399\u03AA\u0406\u0418",J:"J\u0134\u0248\u0419",K:"K\u0136\u0198\u01E8\u039A\u041A",L:"L\u0139\u013B\u013D\u013F\u0141\u023D\u039B\u041B",M:"M\u019C\u039C\u041C",N:"N\xD1\u0143\u0145\u0147\u019D\u01F8\u0220\u039D\u041D",O:"O\xD2\xD3\xD4\xD5\xD6\xD8\u014C\u014E\u0150\u0186\u019F\u01A0\u01D1\u01EA\u01EC\u01FE\u020C\u020E\u022A\u022C\u022E\u0230\u038C\u039F\u041E",P:"P\u01A4\u03A0\u041F",Q:"Q\u024A",R:"R\u0154\u0156\u0158\u0210\u0212\u024C\u03A1\u0420",S:"S\u015A\u015C\u015E\u0160\u0218\u03A3\u0421",T:"T\u0162\u0164\u0166\u01AC\u01AE\u021A\u023E\u03A4\u0422",U:"U\xD9\xDA\xDB\xDC\u0168\u016A\u016C\u016E\u0170\u0172\u01AF\u01D3\u01D5\u01D7\u01D9\u01DB\u0214\u0216\u0244\u0423\u042A",V:"V\u01B2\u0245\u0412",W:"W\u0174\u038F\u03A9",X:"X\u03A7",Y:"Y\xDD\u0176\u0178\u01B3\u0232\u024E\u038E\u03A5\u03AB\u042B",Z:"Z\u0179\u017B\u017D\u01B5\u0224\u0396\u0417",a:"a\xE0\xE1\xE2\xE3\xE4\xE5\u0101\u0103\u0105\u01CE\u01DF\u01E1\u01FB\u0201\u0203\u0227\u0250\u03AC\u03B1\u0430",b:"b\u0180\u0183\u0253\u03B2\u0431",c:"c\xE7\u0107\u0109\u010B\u010D\u0188\u023C\u0446",d:"d\u010F\u0111\u018C\u0256\u0257\xF0\u03B4\u0434",e:"e\xE8\xE9\xEA\xEB\u0113\u0115\u0117\u0119\u011B\u01DD\u0205\u0207\u0229\u0247\u025B\u03AD\u03B5\u0435\u044D",f:"f\u0192\u03C6\u0444",g:"g\u011D\u011F\u0121\u0123\u01E5\u01E7\u01F5\u0260\u03B3\u0433\u0491",h:"h\u0125\u0127\u021F\u0265\u03AE\u03B7\u0445",i:"i\xEC\xED\xEE\xEF\u0129\u012B\u012D\u012F\u0131\u01D0\u0209\u020B\u0268\u0390\u03AF\u03B9\u03CA\u0438\u0456",j:"j\u0135\u01F0\u0249\u0439",k:"k\u0137\u0199\u01E9\u03BA\u043A",l:"l\u013A\u013C\u013E\u0140\u0142\u017F\u019A\u026B\u03BB\u043B",m:"m\u026F\u0271\u03BC\u043C",n:"n\xF1\u0144\u0146\u0148\u0149\u019E\u01F9\u0272\u03BD\u043D",o:"o\xF2\xF3\xF4\xF5\xF6\xF8\u014D\u014F\u0151\u01A1\u01D2\u01EB\u01ED\u01FF\u020D\u020F\u022B\u022D\u022F\u0231\u0254\u0275\u03BF\u03CC\u043E",p:"p\u01A5\u03C0\u043F",q:"q\u024B",r:"r\u0155\u0157\u0159\u0211\u0213\u024D\u027D\u03C1\u0440",s:"s\xDF\u015B\u015D\u015F\u0161\u0219\u023F\u03C2\u03C3\u0441",t:"t\u0163\u0165\u0167\u01AD\u021B\u0288\u03C4\u0442",u:"u\xF9\xFA\xFB\xFC\u0169\u016B\u016D\u016F\u0171\u0173\u01B0\u01D4\u01D6\u01D8\u01DA\u01DC\u0215\u0217\u0289\u0443\u044A",v:"v\u028B\u028C\u0432",w:"w\u0175\u03C9\u03CE",x:"x\u03C7",y:"y\xFD\xFF\u0177\u01B4\u0233\u024F\u03B0\u03C5\u03CB\u03CD\u044B",z:"z\u017A\u017C\u017E\u01B6\u0225\u0240\u03B6\u0437",OE:"\x8C\u0152",oe:"\x9C\u0153",AE:"\xC6\u01E2\u01FC",ae:"\xE6\u01E3\u01FD",hv:"\u0195",OI:"\u01A2",oi:"\u01A3",DZ:"\u01C4\u01F1",Dz:"\u01C5\u01F2",dz:"\u01C6\u01F3",LJ:"\u01C7",Lj:"\u01C8",lj:"\u01C9",NJ:"\u01CA",Nj:"\u01CB",nj:"\u01CC",OU:"\u0222",ou:"\u0223",TH:"\xDE",th:"\xFE",PS:"\u03A8",ps:"\u03C8",Yo:"\u0401",Ye:"\u0404",Yi:"\u0407",Zh:"\u0416",Ch:"\u0427",Sh:"\u0428\u0429","":"\u042A\u042C\u044C",Yu:"\u042E",Ya:"\u042F",zh:"\u0436",ch:"\u0447",sh:"\u0448\u0449",yu:"\u044E",ya:"\u044F",yo:"\u0451",ye:"\u0454",yi:"\u0457"},St=null;function Fs(){return St!==null||(St={},Object.keys(hr).forEach(function(o){for(var u=hr[o],l=0;l<u.length;l++){var p=u[l];St[p]=o}})),St}function Ms(o){var u=Fs()[o];return u||o}function Rs(o,u){return u}function dr(o){var u=f(o);return u===""?"":u.replace(N,Ms).replace(k,Rs)}function Ns(o,u,l){var p=f(o),v=y(u)?0:I(M(u),0,j),A=f(l," ");if(v<=p.length)return p;var $=v-p.length,te=M($/2),Z=$%2;return Tt(A,te)+p+Tt(A,te+Z)}function Ds(o,u,l){var p=f(o);return p.replace(u,l)}function pr(o,u,l){var p=f(o);if(u instanceof RegExp){if(u.flags.indexOf("g")===-1)throw new TypeError("search argument is a non-global regular expression");return p.replace(u,l)}var v=f(u),A=typeof l=="function";A||(l=f(l));var $=v.length;if($===0)return pr(o,/(?:)/g,l);for(var te=$>1?$:1,Z=[],be=p.indexOf(v,0);be!==-1;)Z.push(be),be=p.indexOf(v,be+te);for(var J=0,oe="",ae=0;ae<Z.length;ae++){var Ee=Z[ae],Se=l;A&&(Se=f(l.call(void 0,v,Ee,p))),oe+=p.slice(J,Ee)+Se,J=Ee+$}return J<p.length&&(oe+=p.slice(J)),oe}function Ts(o){var u=f(o);return u.split("").reverse().join("")}function gr(o){var u=f(o);u=u.replace(k,function(v,A,$){return gr($)+A}).replace(de,"$2$1");for(var l="",p=u.length;p--;)l+=u.charAt(p);return l}function $s(o){var u=f(o);if(u==="")return"";var l=dr(u).replace(N,"-");return tt(l)}function Ls(o,u,l,p){var v=f(o),A=f(p),$=qe(u);$<0?($=v.length+$,$<0&&($=0)):$>v.length&&($=v.length);var te=qe(l,v.length-$);return te<0&&(te=0),v.slice(0,$)+A+v.slice($+te)}function Ws(o,u,l){var p=f(o),v,A;if(w(u)&&w(l))v=u.split(""),A=l.split("");else{var $=Us(re(u,{})),te=e($,2);v=te[0],A=te[1]}var Z=v.length;if(Z===0)return p;for(var be="",J=A.length,oe=0;oe<p.length;oe++){for(var ae=!1,Ee=void 0,Se=0;Se<Z&&Se<J;Se++){var Ce=v[Se];if(p.substr(oe,Ce.length)===Ce){ae=!0,Ee=A[Se],oe=oe+Ce.length-1;break}}be+=ae?Ee:p[oe]}return be}function Us(o){var u=Object.keys(o),l=u.sort(Bs).map(function(p){return o[p]});return[u,l]}function Bs(o,u){return o.length===u.length?0:o.length<u.length?1:-1}function sn(o,u,l){var p=f(o),v=Y(u);return v===null?!1:v===""?!0:(l=y(l)?0:I(M(l),0,p.length),p.indexOf(v,l)!==-1)}var Gs=Array.prototype.reduce;function mr(o,u){var l=f(o);if(u===""||l==="")return l;var p=Y(u);if(y(p))return l.replace(Ue,"");var v=!0;return Gs.call(l,function(A,$){return v&&sn(p,$)?A:(v=!1,A+$)},"")}var zs=Array.prototype.reduceRight;function br(o,u){var l=f(o);if(u===""||l==="")return l;var p=Y(u);if(y(p))return l.replace(q,"");var v=!0;return zs.call(l,function(A,$){return v&&sn(p,$)?A:(v=!1,$+A)},"")}function Hs(o,u){var l=f(o);if(u===""||l==="")return l;var p=Y(u);return y(p)?l.trim():br(mr(l,p),p)}var Ys="width",Vs="newLine",qs="indent",Ks="cut";function Xs(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=f(o),p=ks(u),v=p.width,A=p.newLine,$=p.indent,te=p.cut;if(l===""||v<=0)return $;for(var Z=l.length,be=l.substring.bind(l),J=0,oe="";Z-J>v;){if(l[J]===" "){J++;continue}var ae=l.lastIndexOf(" ",v+J);ae>=J?(oe+=$+be(J,ae)+A,J=ae+1):te?(oe+=$+be(J,v+J)+A,J+=v):(ae=l.indexOf(" ",v+J),ae>=0?(oe+=$+be(J,ae)+A,J=ae+1):(oe+=$+be(J),J=Z))}return J<Z&&(oe+=$+be(J)),oe}function ks(o){return{width:qe(o[Ys],75),newLine:f(o[Vs],`
3
- `),indent:f(o[qs],""),cut:E(o[Ks],!1)}}function Zs(o,u,l){if(y(u))return!1;var p=f(o),v=f(u);if(v==="")return!0;l=y(l)?p.length:I(M(l),0,p.length),l-=v.length;var A=p.indexOf(v,l);return A!==-1&&A===l}function on(o){var u=f(o);return _t.test(u)}function Js(o){var u=f(o);return U.test(u)}function Qs(o){var u=f(o);return u.trim().length===0}function eo(o){var u=f(o);return R.test(u)}function to(o){var u=f(o);return u.length===0}function no(o){var u=f(o);return on(u)&&u.toLowerCase()===u}function ro(o){var u=typeof o=="object"&&!y(o)?Number(o):o;return(typeof u=="number"||typeof u=="string")&&!isNaN(u-parseFloat(u))}function io(o){var u=f(o);return on(u)&&u.toUpperCase()===u}function so(o,u,l){var p=f(o),v=f(l),A;if(!(u instanceof RegExp)){if(A=Y(u),A===null)return!1;u=new RegExp(A,v)}return u.test(p)}function oo(o,u,l){var p=f(o),v=Y(u);return v===null?!1:v===""?!0:(l=y(l)?0:I(M(l),0,p.length),p.substr(l,v.length)===v)}function ao(o){var u=f(o);return u.split("")}function uo(o){for(var u=f(o),l=u.length,p=[],v=0,A;v<l;)A=Kn(u,v),p.push(A),v+=A>65535?2:1;return p}function co(o){var u=f(o);return re(u.match(ne),[])}function lo(o,u,l){var p=f(o);return p.split(u,l)}var fo="\uFEFF";function ho(o){var u=f(o);return u===""?"":u[0]===fo?u.substring(1):u}function po(o,u,l){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,v=0;p&&(v=-u.length+1);var A=o.substr(l+v,u.length);return A.toLowerCase()===u}function go(o){for(var u=[],l;(l=Q.exec(o))!==null;)u.push(l[1]);return u}var wr=0,xr=1,an=2;function mo(o){for(var u=wr,l="",p=0;u!==an;){var v=o[p++].toLowerCase();switch(v){case"<":break;case">":u=an;break;default:We.test(v)?u===xr&&(u=an):(u===wr&&(u=xr),v!=="/"&&(l+=v));break}}return l}var Ct=0,nt=1,$t=2,yr=3;function bo(o,u,l){if(o=f(o),o==="")return"";if(!Array.isArray(u)){var p=f(u);u=p===""?[]:go(p)}for(var v=f(l),A=o.length,$=u.length>0,te=po.bind(null,o),Z=Ct,be=0,J="",oe="",ae=null,Ee=0;Ee<A;Ee++){var Se=o[Ee],Ce=!1;switch(Se){case"<":if(ae)break;if(te("< ",Ee,!1)){Ce=!0;break}if(Z===Ct){Ce=!0,Z=nt;break}if(Z===nt){be++;break}Ce=!0;break;case"!":if(Z===nt&&te("<!",Ee)){Z=$t;break}Ce=!0;break;case"-":if(Z===$t&&te("!--",Ee)){Z=yr;break}Ce=!0;break;case'"':case"'":Z===nt&&(ae===Se?ae=null:ae||(ae=Se)),Ce=!0;break;case"E":case"e":if(Z===$t&&te("doctype",Ee)){Z=nt;break}Ce=!0;break;case">":if(be>0){be--;break}if(ae)break;if(Z===nt){if(ae=null,Z=Ct,$){oe+=">";var _o=mo(oe);u.indexOf(_o.toLowerCase())!==-1?J+=oe:J+=v,oe=""}else J+=v;break}if(Z===$t||Z===yr&&te("-->",Ee)){ae=null,Z=Ct,oe="";break}Ce=!0;break;default:Ce=!0}if(Ce)switch(Z){case Ct:J+=Se;break;case nt:$&&(oe+=Se);break}}return J}var mt=null;function wo(){return mt!==null||(typeof global=="object"&&global.Object===Object?mt=global:typeof self=="object"&&self.Object===Object?mt=self:mt=new Function("return this")()),mt}var un=wo(),xo=un.v;function yo(){return this===un.v&&(un.v=xo),this}var Eo="1.4.0",cn={camelCase:Ae,capitalize:_,decapitalize:je,kebabCase:tt,lowerCase:F,snakeCase:h,swapCase:C,titleCase:g,upperCase:m,count:Xi,countGraphemes:ki,countSubstrings:Zi,countWhere:Qi,countWords:es,escapeHtml:vs,escapeRegExp:Os,unescapeHtml:Cs,sprintf:lr,vprintf:xs,indexOf:As,lastIndexOf:js,search:Ps,charAt:ye,codePointAt:Kn,first:Gi,graphemeAt:zi,last:Hi,prune:Yi,slice:Vi,substr:qi,substring:Ki,truncate:me,insert:Is,latinise:dr,pad:Ns,padLeft:ar,padRight:ur,repeat:or,replace:Ds,replaceAll:pr,reverse:Ts,reverseGrapheme:gr,slugify:$s,splice:Ls,tr:Ws,trim:Hs,trimLeft:mr,trimRight:br,wordWrap:Xs,endsWith:Zs,includes:sn,isAlpha:on,isAlphaDigit:Js,isBlank:Qs,isDigit:eo,isEmpty:to,isLowerCase:no,isNumeric:ro,isString:w,isUpperCase:io,matches:so,startsWith:oo,chars:ao,codePoints:uo,graphemes:co,split:lo,words:se,stripBom:ho,stripTags:bo,noConflict:yo,version:Eo};function Pe(o,u){this._wrappedValue=o,this._explicitChain=u}Pe.prototype.value=function(){return this._wrappedValue},Pe.prototype.valueOf=function(){return this.value()},Pe.prototype.toJSON=function(){return this.value()},Pe.prototype.toString=function(){return String(this.value())},Pe.prototype.chain=function(){return new Pe(this._wrappedValue,!0)},Pe.prototype.thru=function(o){return typeof o=="function"?new Pe(o(this._wrappedValue),this._explicitChain):this},Pe.prototype._explicitChain=!0;function vo(o){return function(){for(var u=arguments.length,l=new Array(u),p=0;p<u;p++)l[p]=arguments[p];var v=o.apply(void 0,[this._wrappedValue].concat(l));return this._explicitChain||typeof v=="string"?new Pe(v,this._explicitChain):v}}Object.keys(cn).forEach(function(o){Pe.prototype[o]=vo(cn[o])});function Oo(o){return new Pe(o,!0)}function Er(o){return new Pe(o,!1)}return i(Er,cn,{chain:Oo}),Er})});var Or="2.1.0";import Cr from"node:path";import{fileURLToPath as $o}from"node:url";import No,{promises as Do}from"fs";async function ln(i,e,t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);try{return(await Do[i](t))[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function fn(i,e,t){if(typeof t!="string")throw new TypeError(`Expected a string, got ${typeof t}`);try{return No[i](t)[e]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var Ja=ln.bind(null,"stat","isFile"),Qa=ln.bind(null,"stat","isDirectory"),eu=ln.bind(null,"lstat","isSymbolicLink"),_r=fn.bind(null,"statSync","isFile"),tu=fn.bind(null,"statSync","isDirectory"),nu=fn.bind(null,"lstatSync","isSymbolicLink");import To from"node:os";var Sr=To.homedir();function At(i){if(typeof i!="string")throw new TypeError(`Expected a string, got ${typeof i}`);return Sr?i.replace(/^~(?=$|\/|\\)/,Sr):i}function hn(i,e={}){let{requireFileExistence:t,validFileExtensions:n,validHostnames:r}=e;if(URL.canParse(i)){let b=new URL(i);if(b.protocol==="file:")return hn($o(b),e);if(r&&!r.includes(b.hostname))throw new Error(`Bad input URL. Only ${r.join(", ")} URLs are supported.`);return b}let s=At(i),c=Cr.normalize(s);if(t&&!_r(c))throw new Error("Input is not a file.");let d=Cr.extname(c);if(n&&!n.includes(d))throw new Error(`Bad input file name. Only ${n.join(", ")} files are supported.`);return c}import Ir from"express";import Lo from"node:net";import Wo from"node:os";var Lt=class extends Error{constructor(e){super(`${e} is locked`)}},bt={old:new Set,young:new Set},Uo=1e3*15;var jt,Bo=()=>{let i=Wo.networkInterfaces(),e=new Set([void 0,"0.0.0.0"]);for(let t of Object.values(i))for(let n of t)e.add(n.address);return e},Ar=i=>new Promise((e,t)=>{let n=Lo.createServer();n.unref(),n.on("error",t),n.listen(i,()=>{let{port:r}=n.address();n.close(()=>{e(r)})})}),jr=async(i,e)=>{if(i.host||i.port===0)return Ar(i);for(let t of e)try{await Ar({port:i.port,host:t})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return i.port},Go=function*(i){i&&(yield*i),yield 0};async function dn(i){let e,t=new Set;if(i&&(i.port&&(e=typeof i.port=="number"?[i.port]:i.port),i.exclude)){let r=i.exclude;if(typeof r[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let s of r){if(typeof s!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(s))throw new TypeError(`Number ${s} in the exclude option is not a safe integer and can't be used`)}t=new Set(r)}jt===void 0&&(jt=setTimeout(()=>{jt=void 0,bt.old=bt.young,bt.young=new Set},Uo),jt.unref&&jt.unref());let n=Bo();for(let r of Go(e))try{if(t.has(r))continue;let s=await jr({...i,port:r},n);for(;bt.old.has(s)||bt.young.has(s);){if(r!==0)throw new Lt(r);s=await jr({...i,port:r},n)}return bt.young.add(s),s}catch(s){if(!["EADDRINUSE","EACCES"].includes(s.code)&&!(s instanceof Lt))throw s}throw new Error("No available ports found")}import Rr from"node:fs/promises";import Nr from"node:os";import wt from"node:path";import{dirname as zo}from"node:path";import{fileURLToPath as Ho}from"node:url";import Yo from"puppeteer";var mn=Mo(Pr(),1),Vo={darkMode:!1,format:"svg",frames:!1,output:"./",transparent:!1,verbose:!1};async function Dr(i,e){let t={...Vo,...Zo(e??{})},{darkMode:n,format:r,frames:s,output:c,transparent:d,verbose:b}=t;b&&console.time("Export time");let y=hn(i,{requireFileExistence:!0,validFileExtensions:[".tldr"],validHostnames:["www.tldraw.com"]}),E=typeof y=="string";b&&console.log(E?"Local file detected":"tldraw URL detected");let w=E?wt.basename(y,wt.extname(y)):y.pathname.split("/").pop()??y.pathname,f=0,_;if(E){b&&console.log("Starting tldraw server...");let de=zo(Ho(import.meta.url)),ne=wt.join(de,de.endsWith("/src/lib")?"../../dist/tldraw":de.endsWith("/dist/lib")?"../tldraw":"../dist/tldraw");b&&console.log(`tldraw served from "${ne}"`),_=await Ko(ne),f=_.address().port,b&&console.log(`tldraw hosted at "http://localhost:${f}"`)}b&&console.log("Starting Puppeteer...");let F=await Yo.launch({args:E?["--no-sandbox","--disable-web-security"]:[],headless:"new"}),S=await F.newPage();qo(S,b);let x=await S.target().createCDPSession();if(await x.send("Browser.setDownloadBehavior",{behavior:"allowAndName",downloadPath:Nr.tmpdir(),eventsEnabled:!0}),E){await S.setRequestInterception(!0),S.on("request",ne=>{ne.url().endsWith("favicon.ico")?ne.respond({status:200}):ne.continue()}),b&&console.log(`Loading tldr file "${y}"`);let de=await Rr.readFile(y,"utf8");await S.evaluateOnNewDocument(ne=>{localStorage.clear(),localStorage.setItem("tldrData",ne)},de)}let B=E?`http://localhost:${f}`:y.href;b&&console.log(`Navigating to: ${B}`),await S.goto(B,{waitUntil:"networkidle0"});let G=await S.evaluate("editor.getCurrentPageShapes().length");if(b&&console.log(`Shape count: ${G}`),G===0)throw new Error("The sketch is empty");b&&console.log(`Setting background transparency: ${d}`),await ea(S,d),b&&console.log(`Setting dark mode: ${n}`);let X=await Qo(S);await Mr(S,n);let K=[],k=s?await S.evaluate(`editor.getCurrentPageShapes().reduce((accumulator, shape) => {
2
+ var _d=Object.create;var xi=Object.defineProperty;var Cd=Object.getOwnPropertyDescriptor;var Nd=Object.getOwnPropertyNames;var Sd=Object.getPrototypeOf,Id=Object.prototype.hasOwnProperty;var vt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Hr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kt=(e,t)=>{for(var r in t)xi(e,r,{get:t[r],enumerable:!0})},xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nd(t))!Id.call(e,s)&&s!==r&&xi(e,s,{get:()=>t[s],enumerable:!(n=Cd(t,s))||n.enumerable});return e};var lt=(e,t,r)=>(r=e!=null?_d(Sd(e)):{},xd(t||!e||!e.__esModule?xi(r,"default",{value:e,enumerable:!0}):r,e));var Ns=Hr(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.AttributeAction=Bt.IgnoreCaseMode=Bt.SelectorType=void 0;var yh;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(yh=Bt.SelectorType||(Bt.SelectorType={}));Bt.IgnoreCaseMode={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var Dh;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(Dh=Bt.AttributeAction||(Bt.AttributeAction={}))});var Uo=Hr(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.parse=Qr.isTraversal=void 0;var Ee=Ns(),vo=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Ph=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,wh=new Map([[126,Ee.AttributeAction.Element],[94,Ee.AttributeAction.Start],[36,Ee.AttributeAction.End],[42,Ee.AttributeAction.Any],[33,Ee.AttributeAction.Not],[124,Ee.AttributeAction.Hyphen]]),Mh=new Set(["has","not","matches","is","where","host","host-context"]);function Bo(e){switch(e.type){case Ee.SelectorType.Adjacent:case Ee.SelectorType.Child:case Ee.SelectorType.Descendant:case Ee.SelectorType.Parent:case Ee.SelectorType.Sibling:case Ee.SelectorType.ColumnCombinator:return!0;default:return!1}}Qr.isTraversal=Bo;var vh=new Set(["contains","icontains"]);function Fh(e,t,r){var n=parseInt(t,16)-65536;return n!==n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Dn(e){return e.replace(Ph,Fh)}function Vi(e){return e===39||e===34}function Fo(e){return e===32||e===9||e===10||e===12||e===13}function Bh(e){var t=[],r=ko(t,"".concat(e),0);if(r<e.length)throw new Error("Unmatched selector: ".concat(e.slice(r)));return t}Qr.parse=Bh;function ko(e,t,r){var n=[];function s(B){var V=t.slice(r+B).match(vo);if(!V)throw new Error("Expected name, found ".concat(t.slice(r)));var oe=V[0];return r+=B+oe.length,Dn(oe)}function i(B){for(r+=B;r<t.length&&Fo(t.charCodeAt(r));)r++}function u(){r+=1;for(var B=r,V=1;V>0&&r<t.length;r++)t.charCodeAt(r)===40&&!o(r)?V++:t.charCodeAt(r)===41&&!o(r)&&V--;if(V)throw new Error("Parenthesis not matched");return Dn(t.slice(B,r-1))}function o(B){for(var V=0;t.charCodeAt(--B)===92;)V++;return(V&1)===1}function l(){if(n.length>0&&Bo(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function p(B){if(n.length>0&&n[n.length-1].type===Ee.SelectorType.Descendant){n[n.length-1].type=B;return}l(),n.push({type:B})}function E(B,V){n.push({type:Ee.SelectorType.Attribute,name:B,action:V,value:s(1),namespace:null,ignoreCase:"quirks"})}function A(){if(n.length&&n[n.length-1].type===Ee.SelectorType.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(i(0),t.length===r)return r;e:for(;r<t.length;){var g=t.charCodeAt(r);switch(g){case 32:case 9:case 10:case 12:case 13:{(n.length===0||n[0].type!==Ee.SelectorType.Descendant)&&(l(),n.push({type:Ee.SelectorType.Descendant})),i(1);break}case 62:{p(Ee.SelectorType.Child),i(1);break}case 60:{p(Ee.SelectorType.Parent),i(1);break}case 126:{p(Ee.SelectorType.Sibling),i(1);break}case 43:{p(Ee.SelectorType.Adjacent),i(1);break}case 46:{E("class",Ee.AttributeAction.Element);break}case 35:{E("id",Ee.AttributeAction.Equals);break}case 91:{i(1);var y=void 0,w=null;t.charCodeAt(r)===124?y=s(1):t.startsWith("*|",r)?(w="*",y=s(2)):(y=s(0),t.charCodeAt(r)===124&&t.charCodeAt(r+1)!==61&&(w=y,y=s(1))),i(0);var M=Ee.AttributeAction.Exists,x=wh.get(t.charCodeAt(r));if(x){if(M=x,t.charCodeAt(r+1)!==61)throw new Error("Expected `=`");i(2)}else t.charCodeAt(r)===61&&(M=Ee.AttributeAction.Equals,i(1));var q="",Z=null;if(M!=="exists"){if(Vi(t.charCodeAt(r))){for(var ne=t.charCodeAt(r),te=r+1;te<t.length&&(t.charCodeAt(te)!==ne||o(te));)te+=1;if(t.charCodeAt(te)!==ne)throw new Error("Attribute value didn't end");q=Dn(t.slice(r+1,te)),r=te+1}else{for(var ae=r;r<t.length&&(!Fo(t.charCodeAt(r))&&t.charCodeAt(r)!==93||o(r));)r+=1;q=Dn(t.slice(ae,r))}i(0);var Ue=t.charCodeAt(r)|32;Ue===115?(Z=!1,i(1)):Ue===105&&(Z=!0,i(1))}if(t.charCodeAt(r)!==93)throw new Error("Attribute selector didn't terminate");r+=1;var ye={type:Ee.SelectorType.Attribute,name:y,action:M,value:q,namespace:w,ignoreCase:Z};n.push(ye);break}case 58:{if(t.charCodeAt(r+1)===58){n.push({type:Ee.SelectorType.PseudoElement,name:s(2).toLowerCase(),data:t.charCodeAt(r)===40?u():null});continue}var Le=s(1).toLowerCase(),ue=null;if(t.charCodeAt(r)===40)if(Mh.has(Le)){if(Vi(t.charCodeAt(r+1)))throw new Error("Pseudo-selector ".concat(Le," cannot be quoted"));if(ue=[],r=ko(ue,t,r+1),t.charCodeAt(r)!==41)throw new Error("Missing closing parenthesis in :".concat(Le," (").concat(t,")"));r+=1}else{if(ue=u(),vh.has(Le)){var le=ue.charCodeAt(0);le===ue.charCodeAt(ue.length-1)&&Vi(le)&&(ue=ue.slice(1,-1))}ue=Dn(ue)}n.push({type:Ee.SelectorType.Pseudo,name:Le,data:ue});break}case 44:{A(),n=[],i(1);break}default:{if(t.startsWith("/*",r)){var G=t.indexOf("*/",r+2);if(G<0)throw new Error("Comment was not terminated");r=G+2,n.length===0&&i(0);break}var w=null,F=void 0;if(g===42)r+=1,F="*";else if(g===124){if(F="",t.charCodeAt(r+1)===124){p(Ee.SelectorType.ColumnCombinator),i(2);break}}else if(vo.test(t.slice(r)))F=s(0);else break e;t.charCodeAt(r)===124&&t.charCodeAt(r+1)!==124&&(w=F,t.charCodeAt(r+1)===42?(F="*",r+=2):F=s(1)),n.push(F==="*"?{type:Ee.SelectorType.Universal,namespace:w}:{type:Ee.SelectorType.Tag,name:F,namespace:w})}}}return A(),r}});var Wo=Hr(Kr=>{"use strict";var Ss=Kr&&Kr.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,i;n<s;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.stringify=void 0;var Pe=Ns(),qo=["\\",'"'],Yo=Ss(Ss([],qo,!0),["(",")"],!1),kh=new Set(qo.map(function(e){return e.charCodeAt(0)})),Ho=new Set(Yo.map(function(e){return e.charCodeAt(0)})),zr=new Set(Ss(Ss([],Yo,!0),["~","^","$","*","+","!","|",":","[","]"," ","."],!1).map(function(e){return e.charCodeAt(0)}));function Go(e){return e.map(function(t){return t.map(Uh).join("")}).join(", ")}Kr.stringify=Go;function Uh(e,t,r){switch(e.type){case Pe.SelectorType.Child:return t===0?"> ":" > ";case Pe.SelectorType.Parent:return t===0?"< ":" < ";case Pe.SelectorType.Sibling:return t===0?"~ ":" ~ ";case Pe.SelectorType.Adjacent:return t===0?"+ ":" + ";case Pe.SelectorType.Descendant:return" ";case Pe.SelectorType.ColumnCombinator:return t===0?"|| ":" || ";case Pe.SelectorType.Universal:return e.namespace==="*"&&t+1<r.length&&"name"in r[t+1]?"":"".concat(Vo(e.namespace),"*");case Pe.SelectorType.Tag:return jo(e);case Pe.SelectorType.PseudoElement:return"::".concat(Wt(e.name,zr)).concat(e.data===null?"":"(".concat(Wt(e.data,Ho),")"));case Pe.SelectorType.Pseudo:return":".concat(Wt(e.name,zr)).concat(e.data===null?"":"(".concat(typeof e.data=="string"?Wt(e.data,Ho):Go(e.data),")"));case Pe.SelectorType.Attribute:{if(e.name==="id"&&e.action===Pe.AttributeAction.Equals&&e.ignoreCase==="quirks"&&!e.namespace)return"#".concat(Wt(e.value,zr));if(e.name==="class"&&e.action===Pe.AttributeAction.Element&&e.ignoreCase==="quirks"&&!e.namespace)return".".concat(Wt(e.value,zr));var n=jo(e);return e.action===Pe.AttributeAction.Exists?"[".concat(n,"]"):"[".concat(n).concat(Hh(e.action),'="').concat(Wt(e.value,kh),'"').concat(e.ignoreCase===null?"":e.ignoreCase?" i":" s","]")}}}function Hh(e){switch(e){case Pe.AttributeAction.Equals:return"";case Pe.AttributeAction.Element:return"~";case Pe.AttributeAction.Start:return"^";case Pe.AttributeAction.End:return"$";case Pe.AttributeAction.Any:return"*";case Pe.AttributeAction.Not:return"!";case Pe.AttributeAction.Hyphen:return"|";case Pe.AttributeAction.Exists:throw new Error("Shouldn't be here")}}function jo(e){return"".concat(Vo(e.namespace)).concat(Wt(e.name,zr))}function Vo(e){return e!==null?"".concat(e==="*"?"*":Wt(e,zr),"|"):""}function Wt(e,t){for(var r=0,n="",s=0;s<e.length;s++)t.has(e.charCodeAt(s))&&(n+="".concat(e.slice(r,s),"\\").concat(e.charAt(s)),r=s+1);return n.length>0?n+e.slice(r):e}});var Zr=Hr(ht=>{"use strict";var jh=ht&&ht.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),qh=ht&&ht.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&jh(t,e,r)};Object.defineProperty(ht,"__esModule",{value:!0});ht.stringify=ht.parse=ht.isTraversal=void 0;qh(Ns(),ht);var $o=Uo();Object.defineProperty(ht,"isTraversal",{enumerable:!0,get:function(){return $o.isTraversal}});Object.defineProperty(ht,"parse",{enumerable:!0,get:function(){return $o.parse}});var Yh=Wo();Object.defineProperty(ht,"stringify",{enumerable:!0,get:function(){return Yh.stringify}})});var nr=Hr((vT,Xo)=>{Xo.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});var x0=Hr((Da,Pa)=>{(function(e,t){typeof Da=="object"&&typeof Pa<"u"?Pa.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.v=t())})(Da,function(){"use strict";function e(){return e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var T=arguments[m];for(var C in T)Object.prototype.hasOwnProperty.call(T,C)&&(f[C]=T[C])}return f},e.apply(this,arguments)}function t(f,m){return s(f)||u(f,m)||l()}function r(f){return n(f)||i(f)||o()}function n(f){if(Array.isArray(f)){for(var m=0,T=new Array(f.length);m<f.length;m++)T[m]=f[m];return T}}function s(f){if(Array.isArray(f))return f}function i(f){if(Symbol.iterator in Object(f)||Object.prototype.toString.call(f)==="[object Arguments]")return Array.from(f)}function u(f,m){if(Symbol.iterator in Object(f)||Object.prototype.toString.call(f)==="[object Arguments]"){var T=[],C=!0,L=!1,U=void 0;try{for(var Q=f[Symbol.iterator](),me;!(C=(me=Q.next()).done)&&(T.push(me.value),!(m&&T.length===m));C=!0);}catch(fe){L=!0,U=fe}finally{try{!C&&Q.return!=null&&Q.return()}finally{if(L)throw U}}return T}}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function p(f){return f==null}function E(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p(f)?m:!!f}function A(f){return typeof f=="string"}function g(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return p(f)?m:A(f)?f:String(f)}function y(f,m){var T=g(f),C=E(m);return T===""?"":(C&&(T=T.toLowerCase()),T.substr(0,1).toUpperCase()+T.substr(1))}function w(f){var m=g(f,"");return m.toLowerCase()}var M="\\d",x="\\s\\uFEFF\\xA0",q="\\uD800-\\uDBFF",Z="\\uDC00-\\uDFFF",ne="\\u0300-\\u036F\\u1AB0-\\u1AFF\\u1DC0-\\u1DFF\\u20D0-\\u20FF\\uFE20-\\uFE2F",te="\\0-\\u02FF\\u0370-\\u1AAF\\u1B00-\\u1DBF\\u1E00-\\u20CF\\u2100-\\uD7FF\\uE000-\\uFE1F\\uFE30-\\uFFFF",ae=new RegExp("(["+te+"]|["+q+"]["+Z+"]|["+q+"](?!["+Z+"])|(?:[^"+q+"]|^)["+Z+"])(["+ne+"]+)","g"),Ue=new RegExp("(["+q+"])(["+Z+"])","g"),ye=new RegExp("((?:["+te+"]|["+q+"]["+Z+"]|["+q+"](?!["+Z+"])|(?:[^"+q+"]|^)["+Z+"])(?:["+ne+"]+))|(["+q+"]["+Z+"])|([\\n\\r\\u2028\\u2029])|(.)","g"),Le=new RegExp("["+x+"]"),ue=new RegExp("^["+x+"]+"),le=new RegExp("["+x+"]+$"),G=new RegExp("^"+M+"+$"),F=/[-[\]{}()*+!<=:?./\\^$|#,]/g,B=/[^A-Za-z0-9]/g,V=/[<>&"'`]/g,oe=/(%{1,2})(?:(\d+)\$)?(\+)?([ 0]|'.{1})?(-)?(\d+)?(?:\.(\d+))?([bcdiouxXeEfgGs])?/g,Me=/\.?0+$/g,he=/<([A-Za-z0-9]+)>/g,ve="\\u2000-\\u206F",jt="\\x00-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7b-\\xBF\\xD7\\xF7",Ie="\\u2700-\\u27BF",Ze="a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F",Je="\\x41-\\x5a\\xc0-\\xd6\\xd8-\\xde\\u0100\\u0102\\u0104\\u0106\\u0108\\u010a\\u010c\\u010e\\u0110\\u0112\\u0114\\u0116\\u0118\\u011a\\u011c\\u011e\\u0120\\u0122\\u0124\\u0126\\u0128\\u012a\\u012c\\u012e\\u0130\\u0132\\u0134\\u0136\\u0139\\u013b\\u013d\\u013f\\u0141\\u0143\\u0145\\u0147\\u014a\\u014c\\u014e\\u0150\\u0152\\u0154\\u0156\\u0158\\u015a\\u015c\\u015e\\u0160\\u0162\\u0164\\u0166\\u0168\\u016a\\u016c\\u016e\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017b\\u017d\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018b\\u018e-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019c\\u019d\\u019f\\u01a0\\u01a2\\u01a4\\u01a6\\u01a7\\u01a9\\u01ac\\u01ae\\u01af\\u01b1-\\u01b3\\u01b5\\u01b7\\u01b8\\u01bc\\u01c4\\u01c5\\u01c7\\u01c8\\u01ca\\u01cb\\u01cd\\u01cf\\u01d1\\u01d3\\u01d5\\u01d7\\u01d9\\u01db\\u01de\\u01e0\\u01e2\\u01e4\\u01e6\\u01e8\\u01ea\\u01ec\\u01ee\\u01f1\\u01f2\\u01f4\\u01f6-\\u01f8\\u01fa\\u01fc\\u01fe\\u0200\\u0202\\u0204\\u0206\\u0208\\u020a\\u020c\\u020e\\u0210\\u0212\\u0214\\u0216\\u0218\\u021a\\u021c\\u021e\\u0220\\u0222\\u0224\\u0226\\u0228\\u022a\\u022c\\u022e\\u0230\\u0232\\u023a\\u023b\\u023d\\u023e\\u0241\\u0243-\\u0246\\u0248\\u024a\\u024c\\u024e",Rt=new RegExp("(?:["+Je+"]["+ne+"]*)?(?:["+Ze+"]["+ne+"]*)+|(?:["+Je+"]["+ne+"]*)+(?!["+Ze+"])|["+M+"]+|["+Ie+"]|[^"+jt+ve+x+"]+","g"),J=/[A-Z\xC0-\xD6\xD8-\xDE]?[a-z\xDF-\xF6\xF8-\xFF]+|[A-Z\xC0-\xD6\xD8-\xDE]+(?![a-z\xDF-\xF6\xF8-\xFF])|\d+/g,pn=new RegExp("^(?:["+Ze+Je+"]["+ne+"]*)+$"),ee=new RegExp("^((?:["+Ze+Je+"]["+ne+"]*)|["+M+"])+$"),be=/^[\x01-\xFF]*$/;function ge(f,m){return f??m}function se(f){return p(f)?null:A(f)?f:String(f)}function Te(f,m,T){var C=g(f),L;if(p(m))L=be.test(C)?J:Rt;else if(m instanceof RegExp)L=m;else{var U=se(ge(T,""));L=new RegExp(se(m),U)}return ge(C.match(L),[])}function De(f,m){return m===0?w(f):y(f,!0)}function ut(f){var m=g(f);return m===""?"":Te(m).map(De).join("")}function ot(f){var m=g(f);return m===""?"":m.substr(0,1).toLowerCase()+m.substr(1)}function mr(f){var m=g(f);return m===""?"":Te(m).map(w).join("-")}function _(f){var m=g(f);return m===""?"":Te(m).map(w).join("_")}function I(f){var m=g(f);return m.toUpperCase()}function k(f){var m=g(f);return m.split("").reduce(D,"")}function D(f,m){var T=m.toLowerCase(),C=m.toUpperCase();return f+(m===T?C:T)}function S(f,m){var T=g(f),C=Array.isArray(m)?m:[],L=be.test(T)?J:Rt;return T.replace(L,function(U,Q){var me=Q>0&&C.indexOf(T[Q-1])>=0;return me?U.toLowerCase():y(U,!0)})}function j(f,m,T){return f<=m?m:f>=T?T:f}var H=9007199254740991;function Y(f){return f===1/0?H:f===-1/0?-H:~~f}function Fe(f,m,T){var C=g(f),L=p(m)?C.length:j(Y(m),0,H),U=g(T,"...");return L>=C.length?C:C.substr(0,m-U.length)+U}function Ye(f,m){var T=g(f);return T.charAt(m)}var ou=55296,wl=56319,cu=56320,Ml=57343;function vl(f){return f>=ou&&f<=wl}function Fl(f){return f>=cu&&f<=Ml}function Bl(f,m){return(f-ou)*1024+m-cu+65536}function qt(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return p(f)?m:typeof f=="number"?f:Number(f)}function lu(f,m){return f!==f?m:f}function fu(f,m){var T=g(f),C=T.length,L=qt(m);if(L=lu(L,0),!(L<0||L>=C)){var U=T.charCodeAt(L),Q;return vl(U)&&C>L+1&&(Q=T.charCodeAt(L+1),Fl(Q))?Bl(U,Q):U}}function kl(f,m){var T=g(f),C=p(m)?1:j(Y(m),0,H);return T.length<=C?T:T.substr(0,C)}function Ul(f,m){var T=g(f),C=qt(m),L,U=0;for(C=lu(C,0);(L=ye.exec(T))!==null;){if(U===C)return ye.lastIndex=0,L[0];U++}return""}function Hl(f,m){var T=g(f),C=p(m)?1:j(Y(m),0,H);return T.length<=C?T:T.substr(T.length-C,C)}function jl(f,m,T){var C=g(f),L=p(m)?C.length:j(Y(m),0,H),U=g(T,"...");if(L>=C.length)return C;var Q=be.test(C)?J:Rt,me=0;return C.replace(Q,function(fe,Be){var de=Be+fe.length;de<=L-U.length&&(me=de)}),C.substr(0,me)+U}function ql(f,m,T){return g(f).slice(m,T)}function Yl(f,m,T){return g(f).substr(m,T)}function Gl(f,m,T){return g(f).substring(m,T)}function Vl(f){return g(f).length}function Wl(f){return g(f).replace(ae,"*").replace(Ue,"*").length}function $l(f,m){var T=g(f),C=g(m),L=C.length,U=0,Q=0;if(T===""||C==="")return U;do Q=T.indexOf(C,Q),Q!==-1&&(U++,Q+=L);while(Q!==-1);return U}var Xl=Array.prototype.reduce;function Ql(f,m,T){var C=g(f);if(C===""||typeof m!="function")return 0;var L=m.bind(T);return Xl.call(C,function(U,Q,me){return L(Q,me,C)?U+1:U},0)}function zl(f,m,T){return Te(f,m,T).length}function ss(){this.index=0}ss.prototype.increment=function(){this.index++},ss.prototype.incrementOnEmptyPosition=function(f){p(f)&&this.increment()},ss.prototype.getIndexByPosition=function(f){return p(f)?this.index:f-1};var Kl="i",du="b",hu="c",Zl="d",pu="o",Jl="u",mu="x",Eu="X",gu="e",bu="E",Tu="f",Au="g",Ti="G",ef="s",tf="'",_u="+",rf="-",nf="%%",sf=2,af=8,Cu=16;function Nu(f,m){for(var T=g(f),C=p(m)?1:j(Y(m),0,H),L="";C;)C&1&&(L+=T),C>1&&(T+=T),C>>=1;return L}function is(f,m){var T=Y(m/f.length),C=m%f.length;return Nu(f,T+C).substr(0,m)}function Su(f,m,T){var C=g(f),L=p(m)?0:j(Y(m),0,H),U=g(T," ");return L<=C.length?C:is(U,L-C.length)+C}function Iu(f,m,T){var C=g(f),L=p(m)?0:j(Y(m),0,H),U=g(T," ");return L<=C.length?C:C+is(U,L-C.length)}function uf(f,m){var T=m.width;if(p(T)||f.length>=T)return f;var C=m.alignmentSpecifier===rf?Iu:Su;return C(f,T,m.getPaddingCharacter())}function xu(f,m,T){return T.signSpecifier===_u&&f>=0&&(m=_u+m),m}function of(f,m){var T=parseFloat(f),C;isNaN(T)&&(T=0);var L=qt(m.precision,6);switch(m.typeSpecifier){case Tu:C=T.toFixed(L);break;case gu:C=T.toExponential(L);break;case bu:C=T.toExponential(L).toUpperCase();break;case Au:case Ti:C=cf(T,L,m);break}return C=xu(T,C,m),g(C)}function cf(f,m,T){if(f===0)return"0";var C=m===0?1:m,L=f.toPrecision(C).replace(Me,"");return T.typeSpecifier===Ti&&(L=L.toUpperCase()),L}function lf(f,m){var T=parseInt(f);switch(isNaN(T)&&(T=0),T=T>>>0,m.typeSpecifier){case hu:T=String.fromCharCode(T);break;case du:T=T.toString(sf);break;case pu:T=T.toString(af);break;case mu:T=T.toString(Cu);break;case Eu:T=T.toString(Cu).toUpperCase();break}return g(T)}function ff(f,m){var T=parseInt(f);return isNaN(T)&&(T=0),xu(T,se(T),m)}function df(f,m){var T=f,C=m.precision;return!p(C)&&T.length>C&&(T=Fe(T,C,"")),T}function hf(f,m){var T;switch(m.typeSpecifier){case ef:T=df;break;case Zl:case Kl:T=ff;break;case hu:case du:case pu:case mu:case Eu:case Jl:T=lf;break;case Tu:case gu:case bu:case Au:case Ti:T=of;break}var C=T(f,m);return uf(C,m)}function Ai(f){this.percent=f.percent,this.signSpecifier=f.signSpecifier,this.paddingSpecifier=f.paddingSpecifier,this.alignmentSpecifier=f.alignmentSpecifier,this.width=f.width,this.precision=f.precision,this.typeSpecifier=f.typeSpecifier}Ai.prototype.isPercentLiteral=function(){return nf===this.percent},Ai.prototype.getPaddingCharacter=function(){var f=ge(this.paddingSpecifier," ");return f.length===2&&f[0]===tf&&(f=f[1]),f};function pf(f,m,T){if(p(T.typeSpecifier))throw new Error("sprintf(): Unknown type specifier");if(f>m-1)throw new Error("sprintf(): Too few arguments");if(f<0)throw new Error("sprintf(): Argument number must be greater than zero")}function mf(f,m,T,C,L,U,Q,me,fe,Be,de){var Ae=new Ai({percent:C,signSpecifier:U,paddingSpecifier:Q,alignmentSpecifier:me,width:qt(fe,null),precision:qt(Be,null),typeSpecifier:de});if(Ae.isPercentLiteral())return T.slice(1);var Ne=f.getIndexByPosition(L);return f.incrementOnEmptyPosition(L),pf(Ne,m.length,Ae),hf(m[Ne],Ae)}function Ou(f){var m=g(f);if(m==="")return m;for(var T=arguments.length,C=new Array(T>1?T-1:0),L=1;L<T;L++)C[L-1]=arguments[L];var U=mf.bind(void 0,new ss,C);return m.replace(oe,U)}function Ef(f,m){return Ou.apply(void 0,[f].concat(r(ge(m,[]))))}var gf={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function bf(f){return gf[f]}function Tf(f){return g(f).replace(V,bf)}function Af(f){return g(f).replace(F,"\\$&")}var Ru={"<":/(&lt;)|(&#x0*3c;)|(&#0*60;)/gi,">":/(&gt;)|(&#x0*3e;)|(&#0*62;)/gi,"&":/(&amp;)|(&#x0*26;)|(&#0*38;)/gi,'"':/(&quot;)|(&#x0*22;)|(&#0*34;)/gi,"'":/(&#x0*27;)|(&#0*39;)/gi,"`":/(&#x0*60;)|(&#0*96;)/gi},_f=Object.keys(Ru);function Cf(f,m){return f.replace(Ru[m],m)}function Nf(f){var m=g(f);return _f.reduce(Cf,m)}function Sf(f,m,T){var C=g(f);return C.indexOf(m,T)}function If(f,m,T){var C=g(f);return C.lastIndexOf(m,T)}function xf(f,m,T){var C=g(f),L=p(T)?0:j(Y(T),0,C.length),U=C.substr(L).search(m);return U!==-1&&!isNaN(L)&&(U+=L),U}function Of(f,m,T){var C=g(f),L=g(m),U=qt(T);return U<0||U>C.length||L===""?C:C.slice(0,U)+L+C.slice(U)}var Lu={3:"\u039E\u03BE",8:"\u0398\u03B8",A:"A\xC0\xC1\xC2\xC3\xC4\xC5\u0100\u0102\u0104\u01CD\u01DE\u01E0\u01FA\u0200\u0202\u0226\u023A\u0386\u0391\u0410",B:"B\u0181\u0182\u0243\u0392\u0411",C:"C\xC7\u0106\u0108\u010A\u010C\u0187\u023B\u0426",D:"D\u010E\u0110\u0189\u018A\u018B\xD0\u0394\u0414",E:"E\xC8\xC9\xCA\xCB\u0112\u0114\u0116\u0118\u011A\u018E\u0190\u0204\u0206\u0228\u0388\u0395\u0415\u042D",F:"F\u0191\u03A6\u0424",G:"G\u011C\u011E\u0120\u0122\u0193\u01E4\u01E6\u01F4\u0393\u0413\u0490",H:"H\u0124\u0126\u021E\u0389\u0397\u0425",I:"I\xCC\xCD\xCE\xCF\u0128\u012A\u012C\u012E\u0130\u0197\u01CF\u0208\u020A\u038A\u0399\u03AA\u0406\u0418",J:"J\u0134\u0248\u0419",K:"K\u0136\u0198\u01E8\u039A\u041A",L:"L\u0139\u013B\u013D\u013F\u0141\u023D\u039B\u041B",M:"M\u019C\u039C\u041C",N:"N\xD1\u0143\u0145\u0147\u019D\u01F8\u0220\u039D\u041D",O:"O\xD2\xD3\xD4\xD5\xD6\xD8\u014C\u014E\u0150\u0186\u019F\u01A0\u01D1\u01EA\u01EC\u01FE\u020C\u020E\u022A\u022C\u022E\u0230\u038C\u039F\u041E",P:"P\u01A4\u03A0\u041F",Q:"Q\u024A",R:"R\u0154\u0156\u0158\u0210\u0212\u024C\u03A1\u0420",S:"S\u015A\u015C\u015E\u0160\u0218\u03A3\u0421",T:"T\u0162\u0164\u0166\u01AC\u01AE\u021A\u023E\u03A4\u0422",U:"U\xD9\xDA\xDB\xDC\u0168\u016A\u016C\u016E\u0170\u0172\u01AF\u01D3\u01D5\u01D7\u01D9\u01DB\u0214\u0216\u0244\u0423\u042A",V:"V\u01B2\u0245\u0412",W:"W\u0174\u038F\u03A9",X:"X\u03A7",Y:"Y\xDD\u0176\u0178\u01B3\u0232\u024E\u038E\u03A5\u03AB\u042B",Z:"Z\u0179\u017B\u017D\u01B5\u0224\u0396\u0417",a:"a\xE0\xE1\xE2\xE3\xE4\xE5\u0101\u0103\u0105\u01CE\u01DF\u01E1\u01FB\u0201\u0203\u0227\u0250\u03AC\u03B1\u0430",b:"b\u0180\u0183\u0253\u03B2\u0431",c:"c\xE7\u0107\u0109\u010B\u010D\u0188\u023C\u0446",d:"d\u010F\u0111\u018C\u0256\u0257\xF0\u03B4\u0434",e:"e\xE8\xE9\xEA\xEB\u0113\u0115\u0117\u0119\u011B\u01DD\u0205\u0207\u0229\u0247\u025B\u03AD\u03B5\u0435\u044D",f:"f\u0192\u03C6\u0444",g:"g\u011D\u011F\u0121\u0123\u01E5\u01E7\u01F5\u0260\u03B3\u0433\u0491",h:"h\u0125\u0127\u021F\u0265\u03AE\u03B7\u0445",i:"i\xEC\xED\xEE\xEF\u0129\u012B\u012D\u012F\u0131\u01D0\u0209\u020B\u0268\u0390\u03AF\u03B9\u03CA\u0438\u0456",j:"j\u0135\u01F0\u0249\u0439",k:"k\u0137\u0199\u01E9\u03BA\u043A",l:"l\u013A\u013C\u013E\u0140\u0142\u017F\u019A\u026B\u03BB\u043B",m:"m\u026F\u0271\u03BC\u043C",n:"n\xF1\u0144\u0146\u0148\u0149\u019E\u01F9\u0272\u03BD\u043D",o:"o\xF2\xF3\xF4\xF5\xF6\xF8\u014D\u014F\u0151\u01A1\u01D2\u01EB\u01ED\u01FF\u020D\u020F\u022B\u022D\u022F\u0231\u0254\u0275\u03BF\u03CC\u043E",p:"p\u01A5\u03C0\u043F",q:"q\u024B",r:"r\u0155\u0157\u0159\u0211\u0213\u024D\u027D\u03C1\u0440",s:"s\xDF\u015B\u015D\u015F\u0161\u0219\u023F\u03C2\u03C3\u0441",t:"t\u0163\u0165\u0167\u01AD\u021B\u0288\u03C4\u0442",u:"u\xF9\xFA\xFB\xFC\u0169\u016B\u016D\u016F\u0171\u0173\u01B0\u01D4\u01D6\u01D8\u01DA\u01DC\u0215\u0217\u0289\u0443\u044A",v:"v\u028B\u028C\u0432",w:"w\u0175\u03C9\u03CE",x:"x\u03C7",y:"y\xFD\xFF\u0177\u01B4\u0233\u024F\u03B0\u03C5\u03CB\u03CD\u044B",z:"z\u017A\u017C\u017E\u01B6\u0225\u0240\u03B6\u0437",OE:"\x8C\u0152",oe:"\x9C\u0153",AE:"\xC6\u01E2\u01FC",ae:"\xE6\u01E3\u01FD",hv:"\u0195",OI:"\u01A2",oi:"\u01A3",DZ:"\u01C4\u01F1",Dz:"\u01C5\u01F2",dz:"\u01C6\u01F3",LJ:"\u01C7",Lj:"\u01C8",lj:"\u01C9",NJ:"\u01CA",Nj:"\u01CB",nj:"\u01CC",OU:"\u0222",ou:"\u0223",TH:"\xDE",th:"\xFE",PS:"\u03A8",ps:"\u03C8",Yo:"\u0401",Ye:"\u0404",Yi:"\u0407",Zh:"\u0416",Ch:"\u0427",Sh:"\u0428\u0429","":"\u042A\u042C\u044C",Yu:"\u042E",Ya:"\u042F",zh:"\u0436",ch:"\u0447",sh:"\u0448\u0449",yu:"\u044E",ya:"\u044F",yo:"\u0451",ye:"\u0454",yi:"\u0457"},mn=null;function Rf(){return mn!==null||(mn={},Object.keys(Lu).forEach(function(f){for(var m=Lu[f],T=0;T<m.length;T++){var C=m[T];mn[C]=f}})),mn}function Lf(f){var m=Rf()[f];return m||f}function yf(f,m){return m}function yu(f){var m=g(f);return m===""?"":m.replace(B,Lf).replace(ae,yf)}function Df(f,m,T){var C=g(f),L=p(m)?0:j(Y(m),0,H),U=g(T," ");if(L<=C.length)return C;var Q=L-C.length,me=Y(Q/2),fe=Q%2;return is(U,me)+C+is(U,me+fe)}function Pf(f,m,T){var C=g(f);return C.replace(m,T)}function Du(f,m,T){var C=g(f);if(m instanceof RegExp){if(m.flags.indexOf("g")===-1)throw new TypeError("search argument is a non-global regular expression");return C.replace(m,T)}var L=g(m),U=typeof T=="function";U||(T=g(T));var Q=L.length;if(Q===0)return Du(f,/(?:)/g,T);for(var me=Q>1?Q:1,fe=[],Be=C.indexOf(L,0);Be!==-1;)fe.push(Be),Be=C.indexOf(L,Be+me);for(var de=0,Ae="",Ne=0;Ne<fe.length;Ne++){var $e=fe[Ne],et=T;U&&(et=g(T.call(void 0,L,$e,C))),Ae+=C.slice(de,$e)+et,de=$e+Q}return de<C.length&&(Ae+=C.slice(de)),Ae}function wf(f){var m=g(f);return m.split("").reverse().join("")}function Pu(f){var m=g(f);m=m.replace(ae,function(L,U,Q){return Pu(Q)+U}).replace(Ue,"$2$1");for(var T="",C=m.length;C--;)T+=m.charAt(C);return T}function Mf(f){var m=g(f);if(m==="")return"";var T=yu(m).replace(B,"-");return mr(T)}function vf(f,m,T,C){var L=g(f),U=g(C),Q=qt(m);Q<0?(Q=L.length+Q,Q<0&&(Q=0)):Q>L.length&&(Q=L.length);var me=qt(T,L.length-Q);return me<0&&(me=0),L.slice(0,Q)+U+L.slice(Q+me)}function Ff(f,m,T){var C=g(f),L,U;if(A(m)&&A(T))L=m.split(""),U=T.split("");else{var Q=Bf(ge(m,{})),me=t(Q,2);L=me[0],U=me[1]}var fe=L.length;if(fe===0)return C;for(var Be="",de=U.length,Ae=0;Ae<C.length;Ae++){for(var Ne=!1,$e=void 0,et=0;et<fe&&et<de;et++){var tt=L[et];if(C.substr(Ae,tt.length)===tt){Ne=!0,$e=U[et],Ae=Ae+tt.length-1;break}}Be+=Ne?$e:C[Ae]}return Be}function Bf(f){var m=Object.keys(f),T=m.sort(kf).map(function(C){return f[C]});return[m,T]}function kf(f,m){return f.length===m.length?0:f.length<m.length?1:-1}function _i(f,m,T){var C=g(f),L=se(m);return L===null?!1:L===""?!0:(T=p(T)?0:j(Y(T),0,C.length),C.indexOf(L,T)!==-1)}var Uf=Array.prototype.reduce;function wu(f,m){var T=g(f);if(m===""||T==="")return T;var C=se(m);if(p(C))return T.replace(ue,"");var L=!0;return Uf.call(T,function(U,Q){return L&&_i(C,Q)?U:(L=!1,U+Q)},"")}var Hf=Array.prototype.reduceRight;function Mu(f,m){var T=g(f);if(m===""||T==="")return T;var C=se(m);if(p(C))return T.replace(le,"");var L=!0;return Hf.call(T,function(U,Q){return L&&_i(C,Q)?U:(L=!1,Q+U)},"")}function jf(f,m){var T=g(f);if(m===""||T==="")return T;var C=se(m);return p(C)?T.trim():Mu(wu(T,C),C)}var qf="width",Yf="newLine",Gf="indent",Vf="cut";function Wf(f){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T=g(f),C=$f(m),L=C.width,U=C.newLine,Q=C.indent,me=C.cut;if(T===""||L<=0)return Q;for(var fe=T.length,Be=T.substring.bind(T),de=0,Ae="";fe-de>L;){if(T[de]===" "){de++;continue}var Ne=T.lastIndexOf(" ",L+de);Ne>=de?(Ae+=Q+Be(de,Ne)+U,de=Ne+1):me?(Ae+=Q+Be(de,L+de)+U,de+=L):(Ne=T.indexOf(" ",L+de),Ne>=0?(Ae+=Q+Be(de,Ne)+U,de=Ne+1):(Ae+=Q+Be(de),de=fe))}return de<fe&&(Ae+=Q+Be(de)),Ae}function $f(f){return{width:qt(f[qf],75),newLine:g(f[Yf],`
3
+ `),indent:g(f[Gf],""),cut:E(f[Vf],!1)}}function Xf(f,m,T){if(p(m))return!1;var C=g(f),L=g(m);if(L==="")return!0;T=p(T)?C.length:j(Y(T),0,C.length),T-=L.length;var U=C.indexOf(L,T);return U!==-1&&U===T}function Ci(f){var m=g(f);return pn.test(m)}function Qf(f){var m=g(f);return ee.test(m)}function zf(f){var m=g(f);return m.trim().length===0}function Kf(f){var m=g(f);return G.test(m)}function Zf(f){var m=g(f);return m.length===0}function Jf(f){var m=g(f);return Ci(m)&&m.toLowerCase()===m}function ed(f){var m=typeof f=="object"&&!p(f)?Number(f):f;return(typeof m=="number"||typeof m=="string")&&!isNaN(m-parseFloat(m))}function td(f){var m=g(f);return Ci(m)&&m.toUpperCase()===m}function rd(f,m,T){var C=g(f),L=g(T),U;if(!(m instanceof RegExp)){if(U=se(m),U===null)return!1;m=new RegExp(U,L)}return m.test(C)}function nd(f,m,T){var C=g(f),L=se(m);return L===null?!1:L===""?!0:(T=p(T)?0:j(Y(T),0,C.length),C.substr(T,L.length)===L)}function sd(f){var m=g(f);return m.split("")}function id(f){for(var m=g(f),T=m.length,C=[],L=0,U;L<T;)U=fu(m,L),C.push(U),L+=U>65535?2:1;return C}function ad(f){var m=g(f);return ge(m.match(ye),[])}function ud(f,m,T){var C=g(f);return C.split(m,T)}var od="\uFEFF";function cd(f){var m=g(f);return m===""?"":m[0]===od?m.substring(1):m}function ld(f,m,T){var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,L=0;C&&(L=-m.length+1);var U=f.substr(T+L,m.length);return U.toLowerCase()===m}function fd(f){for(var m=[],T;(T=he.exec(f))!==null;)m.push(T[1]);return m}var vu=0,Fu=1,Ni=2;function dd(f){for(var m=vu,T="",C=0;m!==Ni;){var L=f[C++].toLowerCase();switch(L){case"<":break;case">":m=Ni;break;default:Le.test(L)?m===Fu&&(m=Ni):(m===vu&&(m=Fu),L!=="/"&&(T+=L));break}}return T}var En=0,Er=1,as=2,Bu=3;function hd(f,m,T){if(f=g(f),f==="")return"";if(!Array.isArray(m)){var C=g(m);m=C===""?[]:fd(C)}for(var L=g(T),U=f.length,Q=m.length>0,me=ld.bind(null,f),fe=En,Be=0,de="",Ae="",Ne=null,$e=0;$e<U;$e++){var et=f[$e],tt=!1;switch(et){case"<":if(Ne)break;if(me("< ",$e,!1)){tt=!0;break}if(fe===En){tt=!0,fe=Er;break}if(fe===Er){Be++;break}tt=!0;break;case"!":if(fe===Er&&me("<!",$e)){fe=as;break}tt=!0;break;case"-":if(fe===as&&me("!--",$e)){fe=Bu;break}tt=!0;break;case'"':case"'":fe===Er&&(Ne===et?Ne=null:Ne||(Ne=et)),tt=!0;break;case"E":case"e":if(fe===as&&me("doctype",$e)){fe=Er;break}tt=!0;break;case">":if(Be>0){Be--;break}if(Ne)break;if(fe===Er){if(Ne=null,fe=En,Q){Ae+=">";var Ad=dd(Ae);m.indexOf(Ad.toLowerCase())!==-1?de+=Ae:de+=L,Ae=""}else de+=L;break}if(fe===as||fe===Bu&&me("-->",$e)){Ne=null,fe=En,Ae="";break}tt=!0;break;default:tt=!0}if(tt)switch(fe){case En:de+=et;break;case Er:Q&&(Ae+=et);break}}return de}var Ur=null;function pd(){return Ur!==null||(typeof global=="object"&&global.Object===Object?Ur=global:typeof self=="object"&&self.Object===Object?Ur=self:Ur=new Function("return this")()),Ur}var Si=pd(),md=Si.v;function Ed(){return this===Si.v&&(Si.v=md),this}var gd="1.4.0",Ii={camelCase:ut,capitalize:y,decapitalize:ot,kebabCase:mr,lowerCase:w,snakeCase:_,swapCase:k,titleCase:S,upperCase:I,count:Vl,countGraphemes:Wl,countSubstrings:$l,countWhere:Ql,countWords:zl,escapeHtml:Tf,escapeRegExp:Af,unescapeHtml:Nf,sprintf:Ou,vprintf:Ef,indexOf:Sf,lastIndexOf:If,search:xf,charAt:Ye,codePointAt:fu,first:kl,graphemeAt:Ul,last:Hl,prune:jl,slice:ql,substr:Yl,substring:Gl,truncate:Fe,insert:Of,latinise:yu,pad:Df,padLeft:Su,padRight:Iu,repeat:Nu,replace:Pf,replaceAll:Du,reverse:wf,reverseGrapheme:Pu,slugify:Mf,splice:vf,tr:Ff,trim:jf,trimLeft:wu,trimRight:Mu,wordWrap:Wf,endsWith:Xf,includes:_i,isAlpha:Ci,isAlphaDigit:Qf,isBlank:zf,isDigit:Kf,isEmpty:Zf,isLowerCase:Jf,isNumeric:ed,isString:A,isUpperCase:td,matches:rd,startsWith:nd,chars:sd,codePoints:id,graphemes:ad,split:ud,words:Te,stripBom:cd,stripTags:hd,noConflict:Ed,version:gd};function ct(f,m){this._wrappedValue=f,this._explicitChain=m}ct.prototype.value=function(){return this._wrappedValue},ct.prototype.valueOf=function(){return this.value()},ct.prototype.toJSON=function(){return this.value()},ct.prototype.toString=function(){return String(this.value())},ct.prototype.chain=function(){return new ct(this._wrappedValue,!0)},ct.prototype.thru=function(f){return typeof f=="function"?new ct(f(this._wrappedValue),this._explicitChain):this},ct.prototype._explicitChain=!0;function bd(f){return function(){for(var m=arguments.length,T=new Array(m),C=0;C<m;C++)T[C]=arguments[C];var L=f.apply(void 0,[this._wrappedValue].concat(T));return this._explicitChain||typeof L=="string"?new ct(L,this._explicitChain):L}}Object.keys(Ii).forEach(function(f){ct.prototype[f]=bd(Ii[f])});function Td(f){return new ct(f,!0)}function ku(f){return new ct(f,!1)}return e(ku,Ii,{chain:Td}),ku})});var Uu="2.1.1";import qu from"node:path";import{fileURLToPath as Dd}from"node:url";import Rd,{promises as Ld}from"fs";async function Oi(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await Ld[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function Ri(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Rd[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var nb=Oi.bind(null,"stat","isFile"),sb=Oi.bind(null,"stat","isDirectory"),ib=Oi.bind(null,"lstat","isSymbolicLink"),Hu=Ri.bind(null,"statSync","isFile"),ab=Ri.bind(null,"statSync","isDirectory"),ub=Ri.bind(null,"lstatSync","isSymbolicLink");import yd from"node:os";var ju=yd.homedir();function gn(e){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return ju?e.replace(/^~(?=$|\/|\\)/,ju):e}function Li(e,t={}){let{requireFileExistence:r,validFileExtensions:n,validHostnames:s}=t;if(URL.canParse(e)){let l=new URL(e);if(l.protocol==="file:")return Li(Dd(l),t);if(s&&!s.includes(l.hostname))throw new Error(`Bad input URL. Only ${s.join(", ")} URLs are supported.`);return l}let i=gn(e),u=qu.normalize(i);if(r&&!Hu(u))throw new Error("Input is not a file.");let o=qu.extname(u);if(n&&!n.includes(o))throw new Error(`Bad input file name. Only ${n.join(", ")} files are supported.`);return u}var Pd={xml:!1,decodeEntities:!0},bn=Pd,Yu={_useHtmlParser2:!0,xmlMode:!0};function Tn(e){return e?.xml?typeof e.xml=="boolean"?Yu:{...Yu,...e.xml}:e??void 0}var rr={};Kt(rr,{contains:()=>Hi,html:()=>No,merge:()=>Ch,parseHTML:()=>Ah,root:()=>_h,text:()=>tr,xml:()=>So});var er={};Kt(er,{DocumentPosition:()=>Tt,append:()=>nh,appendChild:()=>rh,compareDocumentPosition:()=>To,existsOne:()=>Eo,filter:()=>Rn,find:()=>Es,findAll:()=>uh,findOne:()=>gs,findOneChild:()=>ah,getAttributeValue:()=>Zd,getChildren:()=>Wr,getElementById:()=>fh,getElements:()=>lh,getElementsByTagName:()=>_r,getElementsByTagType:()=>dh,getFeed:()=>Ui,getInnerHTML:()=>Kd,getName:()=>eh,getOuterHTML:()=>po,getParent:()=>mo,getSiblings:()=>ki,getText:()=>hs,hasAttrib:()=>Jd,hasChildren:()=>xe,innerText:()=>On,isCDATA:()=>jr,isComment:()=>Ar,isDocument:()=>Lt,isTag:()=>z,isText:()=>rt,nextElementSibling:()=>ps,prepend:()=>ih,prependChild:()=>sh,prevElementSibling:()=>ms,removeElement:()=>Vt,removeSubsets:()=>hh,replaceElement:()=>th,testElement:()=>ch,textContent:()=>Gt,uniqueSort:()=>Zt});var pe;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(pe||(pe={}));function Gu(e){return e.type===pe.Tag||e.type===pe.Script||e.type===pe.Style}var Vu=pe.Root,Wu=pe.Text,$u=pe.Directive,Xu=pe.Comment,Qu=pe.Script,zu=pe.Style,Ku=pe.Tag,Zu=pe.CDATA,Ju=pe.Doctype;var us=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Nn(this,t)}},An=class extends us{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},Ft=class extends An{constructor(){super(...arguments),this.type=pe.Text}get nodeType(){return 3}},gr=class extends An{constructor(){super(...arguments),this.type=pe.Comment}get nodeType(){return 8}},br=class extends An{constructor(t,r){super(r),this.name=t,this.type=pe.Directive}get nodeType(){return 1}},_n=class extends us{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},Cn=class extends _n{constructor(){super(...arguments),this.type=pe.CDATA}get nodeType(){return 4}},ft=class extends _n{constructor(){super(...arguments),this.type=pe.Root}get nodeType(){return 9}},Tr=class extends _n{constructor(t,r,n=[],s=t==="script"?pe.Script:t==="style"?pe.Style:pe.Tag){super(n),this.name=t,this.attribs=r,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}};function z(e){return Gu(e)}function jr(e){return e.type===pe.CDATA}function rt(e){return e.type===pe.Text}function Ar(e){return e.type===pe.Comment}function os(e){return e.type===pe.Directive}function Lt(e){return e.type===pe.Root}function xe(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Nn(e,t=!1){let r;if(rt(e))r=new Ft(e.data);else if(Ar(e))r=new gr(e.data);else if(z(e)){let n=t?yi(e.children):[],s=new Tr(e.name,{...e.attribs},n);n.forEach(i=>i.parent=s),e.namespace!=null&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=s}else if(jr(e)){let n=t?yi(e.children):[],s=new Cn(n);n.forEach(i=>i.parent=s),r=s}else if(Lt(e)){let n=t?yi(e.children):[],s=new ft(n);n.forEach(i=>i.parent=s),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else if(os(e)){let n=new br(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function yi(e){let t=e.map(r=>Nn(r,!0));for(let r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}var to={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},qr=class{constructor(t,r,n){this.dom=[],this.root=new ft(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=to),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??to,this.elementCB=n??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new ft(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;let t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,r){let n=this.options.xmlMode?pe.Tag:void 0,s=new Tr(t,r,void 0,n);this.addNode(s),this.tagStack.push(s)}ontext(t){let{lastNode:r}=this;if(r&&r.type===pe.Text)r.data+=t,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{let n=new Ft(t);this.addNode(n),this.lastNode=n}}oncomment(t){if(this.lastNode&&this.lastNode.type===pe.Comment){this.lastNode.data+=t;return}let r=new gr(t);this.addNode(r),this.lastNode=r}oncommentend(){this.lastNode=null}oncdatastart(){let t=new Ft(""),r=new Cn([t]);this.addNode(r),t.parent=r,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,r){let n=new br(t,r);this.addNode(n)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){let r=this.tagStack[this.tagStack.length-1],n=r.children[r.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),r.children.push(t),n&&(t.prev=n,n.next=t),t.parent=r,this.lastNode=null}};var bt=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var cs=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Di,wd=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Yr=(Di=String.fromCodePoint)!==null&&Di!==void 0?Di:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Sn(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wd.get(e))!==null&&t!==void 0?t:e}var je;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(je||(je={}));var Md=32,Xe;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Xe||(Xe={}));function Pi(e){return e>=je.ZERO&&e<=je.NINE}function vd(e){return e>=je.UPPER_A&&e<=je.UPPER_F||e>=je.LOWER_A&&e<=je.LOWER_F}function Fd(e){return e>=je.UPPER_A&&e<=je.UPPER_Z||e>=je.LOWER_A&&e<=je.LOWER_Z||Pi(e)}function Bd(e){return e===je.EQUALS||Fd(e)}var He;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(He||(He={}));var Yt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Yt||(Yt={}));var ls=class{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=He.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Yt.Strict}startEntity(t){this.decodeMode=t,this.state=He.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case He.EntityStart:return t.charCodeAt(r)===je.NUM?(this.state=He.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=He.NamedEntity,this.stateNamedEntity(t,r));case He.NumericStart:return this.stateNumericStart(t,r);case He.NumericDecimal:return this.stateNumericDecimal(t,r);case He.NumericHex:return this.stateNumericHex(t,r);case He.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|Md)===je.LOWER_X?(this.state=He.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=He.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,s){if(r!==n){let i=n-r;this.result=this.result*Math.pow(s,i)+parseInt(t.substr(r,i),s),this.consumed+=i}}stateNumericHex(t,r){let n=r;for(;r<t.length;){let s=t.charCodeAt(r);if(Pi(s)||vd(s))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){let n=r;for(;r<t.length;){let s=t.charCodeAt(r);if(Pi(s))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===je.SEMI)this.consumed+=1;else if(this.decodeMode===Yt.Strict)return 0;return this.emitCodePoint(Sn(this.result),this.consumed),this.errors&&(t!==je.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){let{decodeTree:n}=this,s=n[this.treeIndex],i=(s&Xe.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){let u=t.charCodeAt(r);if(this.treeIndex=In(n,s,this.treeIndex+Math.max(1,i),u),this.treeIndex<0)return this.result===0||this.decodeMode===Yt.Attribute&&(i===0||Bd(u))?0:this.emitNotTerminatedNamedEntity();if(s=n[this.treeIndex],i=(s&Xe.VALUE_LENGTH)>>14,i!==0){if(u===je.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Yt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:n}=this,s=(n[r]&Xe.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){let{decodeTree:s}=this;return this.emitCodePoint(r===1?s[t]&~Xe.VALUE_LENGTH:s[t+1],n),r===3&&this.emitCodePoint(s[t+2],n),n}end(){var t;switch(this.state){case He.NamedEntity:return this.result!==0&&(this.decodeMode!==Yt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case He.NumericDecimal:return this.emitNumericEntity(0,2);case He.NumericHex:return this.emitNumericEntity(0,3);case He.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case He.EntityStart:return 0}}};function ro(e){let t="",r=new ls(e,n=>t+=Yr(n));return function(s,i){let u=0,o=0;for(;(o=s.indexOf("&",o))>=0;){t+=s.slice(u,o),r.startEntity(i);let p=r.write(s,o+1);if(p<0){u=o+r.end();break}u=o+p,o=p===0?u+1:u}let l=t+s.slice(u);return t="",l}}function In(e,t,r,n){let s=(t&Xe.BRANCH_LENGTH)>>7,i=t&Xe.JUMP_TABLE;if(s===0)return i!==0&&n===i?r:-1;if(i){let l=n-i;return l<0||l>=s?-1:e[r+l]-1}let u=r,o=u+s-1;for(;u<=o;){let l=u+o>>>1,p=e[l];if(p<n)u=l+1;else if(p>n)o=l-1;else return e[l+s]}return-1}var yb=ro(bt),Db=ro(cs);function fs(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var kd=new Map(fs([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(fs([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(fs([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(fs([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var wi=/["&'<>$\x80-\uFFFF]/g,no=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),so=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function xn(e){let t="",r=0,n;for(;(n=wi.exec(e))!==null;){let s=n.index,i=e.charCodeAt(s),u=no.get(i);u!==void 0?(t+=e.substring(r,s)+u,r=s+1):(t+=`${e.substring(r,s)}&#x${so(e,s).toString(16)};`,r=wi.lastIndex+=+((i&64512)===55296))}return t+e.substr(r)}function Mi(e,t){return function(n){let s,i=0,u="";for(;s=e.exec(n);)i!==s.index&&(u+=n.substring(i,s.index)),u+=t.get(s[0].charCodeAt(0)),i=s.index+1;return u+n.substring(i)}}var io=Mi(/[&<>'"]/g,no),Gr=Mi(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Vr=Mi(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var ao;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(ao||(ao={}));var uo;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(uo||(uo={}));var lo=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"].map(e=>[e.toLowerCase(),e])),fo=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"].map(e=>[e.toLowerCase(),e]));var Hd=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function jd(e){return e.replace(/"/g,"&quot;")}function qd(e,t){var r;if(!e)return;let n=((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)===!1?jd:t.xmlMode||t.encodeEntities!=="utf8"?xn:Gr;return Object.keys(e).map(s=>{var i,u;let o=(i=e[s])!==null&&i!==void 0?i:"";return t.xmlMode==="foreign"&&(s=(u=fo.get(s))!==null&&u!==void 0?u:s),!t.emptyAttrs&&!t.xmlMode&&o===""?s:`${s}="${n(o)}"`}).join(" ")}var ho=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Bi(e,t={}){let r="length"in e?e:[e],n="";for(let s=0;s<r.length;s++)n+=Yd(r[s],t);return n}var ds=Bi;function Yd(e,t){switch(e.type){case Vu:return Bi(e.children,t);case Ju:case $u:return $d(e);case Xu:return zd(e);case Zu:return Qd(e);case Qu:case zu:case Ku:return Wd(e,t);case Wu:return Xd(e,t)}}var Gd=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Vd=new Set(["svg","math"]);function Wd(e,t){var r;t.xmlMode==="foreign"&&(e.name=(r=lo.get(e.name))!==null&&r!==void 0?r:e.name,e.parent&&Gd.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&Vd.has(e.name)&&(t={...t,xmlMode:"foreign"});let n=`<${e.name}`,s=qd(e.attribs,t);return s&&(n+=` ${s}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&ho.has(e.name))?(t.xmlMode||(n+=" "),n+="/>"):(n+=">",e.children.length>0&&(n+=Bi(e.children,t)),(t.xmlMode||!ho.has(e.name))&&(n+=`</${e.name}>`)),n}function $d(e){return`<${e.data}>`}function Xd(e,t){var r;let n=e.data||"";return((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Hd.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!=="utf8"?xn(n):Vr(n)),n}function Qd(e){return`<![CDATA[${e.children[0].data}]]>`}function zd(e){return`<!--${e.data}-->`}function po(e,t){return ds(e,t)}function Kd(e,t){return xe(e)?e.children.map(r=>po(r,t)).join(""):""}function hs(e){return Array.isArray(e)?e.map(hs).join(""):z(e)?e.name==="br"?`
4
+ `:hs(e.children):jr(e)?hs(e.children):rt(e)?e.data:""}function Gt(e){return Array.isArray(e)?e.map(Gt).join(""):xe(e)&&!Ar(e)?Gt(e.children):rt(e)?e.data:""}function On(e){return Array.isArray(e)?e.map(On).join(""):xe(e)&&(e.type===pe.Tag||jr(e))?On(e.children):rt(e)?e.data:""}function Wr(e){return xe(e)?e.children:[]}function mo(e){return e.parent||null}function ki(e){let t=mo(e);if(t!=null)return Wr(t);let r=[e],{prev:n,next:s}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;s!=null;)r.push(s),{next:s}=s;return r}function Zd(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function Jd(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function eh(e){return e.name}function ps(e){let{next:t}=e;for(;t!==null&&!z(t);)({next:t}=t);return t}function ms(e){let{prev:t}=e;for(;t!==null&&!z(t);)({prev:t}=t);return t}function Vt(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function th(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let s=t.parent=e.parent;if(s){let i=s.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function rh(e,t){if(Vt(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function nh(e,t){Vt(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let s=r.children;s.splice(s.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function sh(e,t){if(Vt(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function ih(e,t){Vt(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}function Rn(e,t,r=!0,n=1/0){return Es(e,Array.isArray(t)?t:[t],r,n)}function Es(e,t,r,n){let s=[],i=[t],u=[0];for(;;){if(u[0]>=i[0].length){if(u.length===1)return s;i.shift(),u.shift();continue}let o=i[0][u[0]++];if(e(o)&&(s.push(o),--n<=0))return s;r&&xe(o)&&o.children.length>0&&(u.unshift(0),i.unshift(o.children))}}function ah(e,t){return t.find(e)}function gs(e,t,r=!0){let n=null;for(let s=0;s<t.length&&!n;s++){let i=t[s];if(z(i))e(i)?n=i:r&&i.children.length>0&&(n=gs(e,i.children,!0));else continue}return n}function Eo(e,t){return t.some(r=>z(r)&&(e(r)||Eo(e,r.children)))}function uh(e,t){let r=[],n=[t],s=[0];for(;;){if(s[0]>=n[0].length){if(n.length===1)return r;n.shift(),s.shift();continue}let i=n[0][s[0]++];z(i)&&(e(i)&&r.push(i),i.children.length>0&&(s.unshift(0),n.unshift(i.children)))}}var bs={tag_name(e){return typeof e=="function"?t=>z(t)&&e(t.name):e==="*"?z:t=>z(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>rt(t)&&e(t.data):t=>rt(t)&&t.data===e}};function go(e,t){return typeof t=="function"?r=>z(r)&&t(r.attribs[e]):r=>z(r)&&r.attribs[e]===t}function oh(e,t){return r=>e(r)||t(r)}function bo(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(bs,r)?bs[r](n):go(r,n)});return t.length===0?null:t.reduce(oh)}function ch(e,t){let r=bo(e);return r?r(t):!0}function lh(e,t,r,n=1/0){let s=bo(e);return s?Rn(s,t,r,n):[]}function fh(e,t,r=!0){return Array.isArray(t)||(t=[t]),gs(go("id",e),t,r)}function _r(e,t,r=!0,n=1/0){return Rn(bs.tag_name(e),t,r,n)}function dh(e,t,r=!0,n=1/0){return Rn(bs.tag_type(e),t,r,n)}function hh(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}var Tt;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(Tt||(Tt={}));function To(e,t){let r=[],n=[];if(e===t)return 0;let s=xe(e)?e:e.parent;for(;s;)r.unshift(s),s=s.parent;for(s=xe(t)?t:t.parent;s;)n.unshift(s),s=s.parent;let i=Math.min(r.length,n.length),u=0;for(;u<i&&r[u]===n[u];)u++;if(u===0)return Tt.DISCONNECTED;let o=r[u-1],l=o.children,p=r[u],E=n[u];return l.indexOf(p)>l.indexOf(E)?o===t?Tt.FOLLOWING|Tt.CONTAINED_BY:Tt.FOLLOWING:o===e?Tt.PRECEDING|Tt.CONTAINS:Tt.PRECEDING}function Zt(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=To(t,r);return n&Tt.PRECEDING?-1:n&Tt.FOLLOWING?1:0}),e}function Ui(e){let t=Ts(bh,e);return t?t.name==="feed"?ph(t):mh(t):null}function ph(e){var t;let r=e.children,n={type:"atom",items:_r("entry",r).map(u=>{var o;let{children:l}=u,p={media:Ao(l)};nt(p,"id","id",l),nt(p,"title","title",l);let E=(o=Ts("link",l))===null||o===void 0?void 0:o.attribs.href;E&&(p.link=E);let A=Jt("summary",l)||Jt("content",l);A&&(p.description=A);let g=Jt("updated",l);return g&&(p.pubDate=new Date(g)),p})};nt(n,"id","id",r),nt(n,"title","title",r);let s=(t=Ts("link",r))===null||t===void 0?void 0:t.attribs.href;s&&(n.link=s),nt(n,"description","subtitle",r);let i=Jt("updated",r);return i&&(n.updated=new Date(i)),nt(n,"author","email",r,!0),n}function mh(e){var t,r;let n=(r=(t=Ts("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],s={type:e.name.substr(0,3),id:"",items:_r("item",e.children).map(u=>{let{children:o}=u,l={media:Ao(o)};nt(l,"id","guid",o),nt(l,"title","title",o),nt(l,"link","link",o),nt(l,"description","description",o);let p=Jt("pubDate",o)||Jt("dc:date",o);return p&&(l.pubDate=new Date(p)),l})};nt(s,"title","title",n),nt(s,"link","link",n),nt(s,"description","description",n);let i=Jt("lastBuildDate",n);return i&&(s.updated=new Date(i)),nt(s,"author","managingEditor",n,!0),s}var Eh=["url","type","lang"],gh=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Ao(e){return _r("media:content",e).map(t=>{let{attribs:r}=t,n={medium:r.medium,isDefault:!!r.isDefault};for(let s of Eh)r[s]&&(n[s]=r[s]);for(let s of gh)r[s]&&(n[s]=parseInt(r[s],10));return r.expression&&(n.expression=r.expression),n})}function Ts(e,t){return _r(e,t,!0,1)[0]}function Jt(e,t,r=!1){return Gt(_r(e,t,r,1)).trim()}function nt(e,t,r,n,s=!1){let i=Jt(r,n,s);i&&(e[t]=i)}function bh(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}function Co(e,t,r){return e?e(t??e._root.children,null,void 0,r).toString():""}function Th(e,t){return!t&&typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function No(e,t){let r=Th(e)?(t=e,void 0):e,n={...bn,...this===null||this===void 0?void 0:this._options,...Tn(t??{})};return Co(this,r,n)}function So(e){let t={...this._options,xmlMode:!0};return Co(this,e,t)}function tr(e){let t=e||(this?this.root():[]),r="";for(let n=0;n<t.length;n++)r+=Gt(t[n]);return r}function Ah(e,t,r=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(r=t);let n=this.load(e,bn,!1);return r||n("script").remove(),n.root()[0].children.slice()}function _h(){return this(this._root)}function Hi(e,t){if(t===e)return!1;let r=t;for(;r&&r!==r.parent;)if(r=r.parent,r===e)return!0;return!1}function Ch(e,t){if(!_o(e)||!_o(t))return;let r=e.length,n=+t.length;for(let s=0;s<n;s++)e[r++]=t[s];return e.length=r,e}function _o(e){if(Array.isArray(e))return!0;if(typeof e!="object"||!Object.prototype.hasOwnProperty.call(e,"length")||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}var Gi={};Kt(Gi,{addClass:()=>Po,attr:()=>Sh,data:()=>xh,hasClass:()=>Lh,prop:()=>Ih,removeAttr:()=>Rh,removeClass:()=>wo,toggleClass:()=>Mo,val:()=>Oh});function dt(e){return e.cheerio!=null}function Io(e){return e.replace(/[_.-](\w|$)/g,(t,r)=>r.toUpperCase())}function xo(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Ce(e,t){let r=e.length;for(let n=0;n<r;n++)t(e[n],n);return e}function As(e){let t="length"in e?Array.prototype.map.call(e,n=>Nn(n,!0)):[Nn(e,!0)],r=new ft(t);return t.forEach(n=>{n.parent=r}),t}var Cr;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Cr||(Cr={}));function Ln(e){let t=e.indexOf("<");if(t<0||t>e.length-3)return!1;let r=e.charCodeAt(t+1);return(r>=Cr.LowerA&&r<=Cr.LowerZ||r>=Cr.UpperA&&r<=Cr.UpperZ||r===Cr.Exclamation)&&e.includes(">",t+2)}var $r=Object.prototype.hasOwnProperty,yn=/\s+/,ji="data-",Oo={null:null,true:!0,false:!1},Yi=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Nh=/^{[^]*}$|^\[[^]*]$/;function _s(e,t,r){var n;if(!(!e||!z(e))){if((n=e.attribs)!==null&&n!==void 0||(e.attribs={}),!t)return e.attribs;if($r.call(e.attribs,t))return!r&&Yi.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return tr(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function Xr(e,t,r){r===null?Do(e,t):e.attribs[t]=`${r}`}function Sh(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Ce(this,(r,n)=>{z(r)&&Xr(r,e,t.call(r,n,r.attribs[e]))})}return Ce(this,r=>{z(r)&&(typeof e=="object"?Object.keys(e).forEach(n=>{let s=e[n];Xr(r,n,s)}):Xr(r,e,t))})}return arguments.length>1?this:_s(this[0],e,this.options.xmlMode)}function Ro(e,t,r){return t in e?e[t]:!r&&Yi.test(t)?_s(e,t,!1)!==void 0:_s(e,t,r)}function qi(e,t,r,n){t in e?e[t]=r:Xr(e,t,!n&&Yi.test(t)?r?"":null:`${r}`)}function Ih(e,t){var r;if(typeof e=="string"&&t===void 0){let n=this[0];if(!n||!z(n))return;switch(e){case"style":{let s=this.css(),i=Object.keys(s);return i.forEach((u,o)=>{s[o]=u}),s.length=i.length,s}case"tagName":case"nodeName":return n.name.toUpperCase();case"href":case"src":{let s=(r=n.attribs)===null||r===void 0?void 0:r[e];return typeof URL<"u"&&(e==="href"&&(n.tagName==="a"||n.name==="link")||e==="src"&&(n.tagName==="img"||n.tagName==="iframe"||n.tagName==="audio"||n.tagName==="video"||n.tagName==="source"))&&s!==void 0&&this.options.baseURI?new URL(s,this.options.baseURI).href:s}case"innerText":return On(n);case"textContent":return Gt(n);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return Ro(n,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new Error("Bad combination of arguments.");return Ce(this,(n,s)=>{z(n)&&qi(n,e,t.call(n,s,Ro(n,e,this.options.xmlMode)),this.options.xmlMode)})}return Ce(this,n=>{z(n)&&(typeof e=="object"?Object.keys(e).forEach(s=>{let i=e[s];qi(n,s,i,this.options.xmlMode)}):qi(n,e,t,this.options.xmlMode))})}}function Lo(e,t,r){var n;let s=e;(n=s.data)!==null&&n!==void 0||(s.data={}),typeof t=="object"?Object.assign(s.data,t):typeof t=="string"&&r!==void 0&&(s.data[t]=r)}function yo(e,t){let r,n,s;t==null?(r=Object.keys(e.attribs).filter(i=>i.startsWith(ji)),n=r.map(i=>Io(i.slice(ji.length)))):(r=[ji+xo(t)],n=[t]);for(let i=0;i<r.length;++i){let u=r[i],o=n[i];if($r.call(e.attribs,u)&&!$r.call(e.data,o)){if(s=e.attribs[u],$r.call(Oo,s))s=Oo[s];else if(s===String(Number(s)))s=Number(s);else if(Nh.test(s))try{s=JSON.parse(s)}catch{}e.data[o]=s}}return t==null?e.data:s}function xh(e,t){var r;let n=this[0];if(!n||!z(n))return;let s=n;return(r=s.data)!==null&&r!==void 0||(s.data={}),e?typeof e=="object"||t!==void 0?(Ce(this,i=>{z(i)&&(typeof e=="object"?Lo(i,e):Lo(i,e,t))}),this):$r.call(s.data,e)?s.data[e]:yo(s,e):yo(s)}function Oh(e){let t=arguments.length===0,r=this[0];if(!r||!z(r))return t?void 0:this;switch(r.name){case"textarea":return this.text(e);case"select":{let n=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");let s=typeof e!="object"?[e]:e;for(let i=0;i<s.length;i++)this.find(`option[value="${s[i]}"]`).attr("selected","");return this}return this.attr("multiple")?n.toArray().map(s=>tr(s.children)):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function Do(e,t){!e.attribs||!$r.call(e.attribs,t)||delete e.attribs[t]}function Cs(e){return e?e.trim().split(yn):[]}function Rh(e){let t=Cs(e);for(let r=0;r<t.length;r++)Ce(this,n=>{z(n)&&Do(n,t[r])});return this}function Lh(e){return this.toArray().some(t=>{let r=z(t)&&t.attribs.class,n=-1;if(r&&e.length)for(;(n=r.indexOf(e,n+1))>-1;){let s=n+e.length;if((n===0||yn.test(r[n-1]))&&(s===r.length||yn.test(r[s])))return!0}return!1})}function Po(e){if(typeof e=="function")return Ce(this,(n,s)=>{if(z(n)){let i=n.attribs.class||"";Po.call([n],e.call(n,s,i))}});if(!e||typeof e!="string")return this;let t=e.split(yn),r=this.length;for(let n=0;n<r;n++){let s=this[n];if(!z(s))continue;let i=_s(s,"class",!1);if(!i)Xr(s,"class",t.join(" ").trim());else{let u=` ${i} `;for(let o=0;o<t.length;o++){let l=`${t[o]} `;u.includes(` ${l}`)||(u+=l)}Xr(s,"class",u.trim())}}return this}function wo(e){if(typeof e=="function")return Ce(this,(s,i)=>{z(s)&&wo.call([s],e.call(s,i,s.attribs.class||""))});let t=Cs(e),r=t.length,n=arguments.length===0;return Ce(this,s=>{if(z(s))if(n)s.attribs.class="";else{let i=Cs(s.attribs.class),u=!1;for(let o=0;o<r;o++){let l=i.indexOf(t[o]);l>=0&&(i.splice(l,1),u=!0,o--)}u&&(s.attribs.class=i.join(" "))}})}function Mo(e,t){if(typeof e=="function")return Ce(this,(u,o)=>{z(u)&&Mo.call([u],e.call(u,o,u.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;let r=e.split(yn),n=r.length,s=typeof t=="boolean"?t?1:-1:0,i=this.length;for(let u=0;u<i;u++){let o=this[u];if(!z(o))continue;let l=Cs(o.attribs.class);for(let p=0;p<n;p++){let E=l.indexOf(r[p]);s>=0&&E<0?l.push(r[p]):s<=0&&E>=0&&l.splice(E,1)}o.attribs.class=l.join(" ")}return this}var ha={};Kt(ha,{add:()=>Bp,addBack:()=>kp,children:()=>_p,closest:()=>hp,contents:()=>Cp,each:()=>Np,end:()=>Fp,eq:()=>Dp,filter:()=>Ip,filterArray:()=>da,find:()=>cp,first:()=>Lp,get:()=>Pp,has:()=>Rp,index:()=>Mp,is:()=>xp,last:()=>yp,map:()=>Sp,next:()=>pp,nextAll:()=>mp,nextUntil:()=>Ep,not:()=>Op,parent:()=>lp,parents:()=>fp,parentsUntil:()=>dp,prev:()=>gp,prevAll:()=>bp,prevUntil:()=>Tp,siblings:()=>Ap,slice:()=>vp,toArray:()=>wp});var it=lt(Zr(),1);var ra=lt(nr(),1);var yt=lt(Zr(),1),$t=lt(nr(),1);var Qe=lt(Zr(),1),Qo=new Map([[Qe.SelectorType.Universal,50],[Qe.SelectorType.Tag,30],[Qe.SelectorType.Attribute,1],[Qe.SelectorType.Pseudo,0]]);function Pn(e){return!Qo.has(e.type)}var Gh=new Map([[Qe.AttributeAction.Exists,10],[Qe.AttributeAction.Equals,8],[Qe.AttributeAction.Not,7],[Qe.AttributeAction.Start,6],[Qe.AttributeAction.End,6],[Qe.AttributeAction.Any,5]]);function Wi(e){let t=e.map(zo);for(let r=1;r<e.length;r++){let n=t[r];if(!(n<0))for(let s=r-1;s>=0&&n<t[s];s--){let i=e[s+1];e[s+1]=e[s],e[s]=i,t[s+1]=t[s],t[s]=n}}}function zo(e){var t,r;let n=(t=Qo.get(e.type))!==null&&t!==void 0?t:-1;return e.type===Qe.SelectorType.Attribute?(n=(r=Gh.get(e.action))!==null&&r!==void 0?r:4,e.action===Qe.AttributeAction.Equals&&e.name==="id"&&(n=9),e.ignoreCase&&(n>>=1)):e.type===Qe.SelectorType.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map(s=>Math.min(...s.map(zo)))),n<0&&(n=0)):n=2:n=3),n}var wn=lt(nr(),1),Vh=/[-[\]{}()*+?.,\\^$|#\s]/g;function Ko(e){return e.replace(Vh,"\\$&")}var Wh=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 Nr(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&Wh.has(e.name)}var Zo={equals(e,t,r){let{adapter:n}=r,{name:s}=t,{value:i}=t;return Nr(t,r)?(i=i.toLowerCase(),u=>{let o=n.getAttributeValue(u,s);return o!=null&&o.length===i.length&&o.toLowerCase()===i&&e(u)}):u=>n.getAttributeValue(u,s)===i&&e(u)},hyphen(e,t,r){let{adapter:n}=r,{name:s}=t,{value:i}=t,u=i.length;return Nr(t,r)?(i=i.toLowerCase(),function(l){let p=n.getAttributeValue(l,s);return p!=null&&(p.length===u||p.charAt(u)==="-")&&p.substr(0,u).toLowerCase()===i&&e(l)}):function(l){let p=n.getAttributeValue(l,s);return p!=null&&(p.length===u||p.charAt(u)==="-")&&p.substr(0,u)===i&&e(l)}},element(e,t,r){let{adapter:n}=r,{name:s,value:i}=t;if(/\s/.test(i))return wn.default.falseFunc;let u=new RegExp(`(?:^|\\s)${Ko(i)}(?:$|\\s)`,Nr(t,r)?"i":"");return function(l){let p=n.getAttributeValue(l,s);return p!=null&&p.length>=i.length&&u.test(p)&&e(l)}},exists(e,{name:t},{adapter:r}){return n=>r.hasAttrib(n,t)&&e(n)},start(e,t,r){let{adapter:n}=r,{name:s}=t,{value:i}=t,u=i.length;return u===0?wn.default.falseFunc:Nr(t,r)?(i=i.toLowerCase(),o=>{let l=n.getAttributeValue(o,s);return l!=null&&l.length>=u&&l.substr(0,u).toLowerCase()===i&&e(o)}):o=>{var l;return!!(!((l=n.getAttributeValue(o,s))===null||l===void 0)&&l.startsWith(i))&&e(o)}},end(e,t,r){let{adapter:n}=r,{name:s}=t,{value:i}=t,u=-i.length;return u===0?wn.default.falseFunc:Nr(t,r)?(i=i.toLowerCase(),o=>{var l;return((l=n.getAttributeValue(o,s))===null||l===void 0?void 0:l.substr(u).toLowerCase())===i&&e(o)}):o=>{var l;return!!(!((l=n.getAttributeValue(o,s))===null||l===void 0)&&l.endsWith(i))&&e(o)}},any(e,t,r){let{adapter:n}=r,{name:s,value:i}=t;if(i==="")return wn.default.falseFunc;if(Nr(t,r)){let u=new RegExp(Ko(i),"i");return function(l){let p=n.getAttributeValue(l,s);return p!=null&&p.length>=i.length&&u.test(p)&&e(l)}}return u=>{var o;return!!(!((o=n.getAttributeValue(u,s))===null||o===void 0)&&o.includes(i))&&e(u)}},not(e,t,r){let{adapter:n}=r,{name:s}=t,{value:i}=t;return i===""?u=>!!n.getAttributeValue(u,s)&&e(u):Nr(t,r)?(i=i.toLowerCase(),u=>{let o=n.getAttributeValue(u,s);return(o==null||o.length!==i.length||o.toLowerCase()!==i)&&e(u)}):u=>n.getAttributeValue(u,s)!==i&&e(u)}};var rc=lt(Zr(),1);var $h=new Set([9,10,12,13,32]),Jo=48,Xh=57;function ec(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,r=0,n=i(),s=u();if(t<e.length&&e.charAt(t)==="n"&&(t++,r=n*(s??1),o(),t<e.length?(n=i(),o(),s=u()):n=s=0),s===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[r,n*s];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function u(){let l=t,p=0;for(;t<e.length&&e.charCodeAt(t)>=Jo&&e.charCodeAt(t)<=Xh;)p=p*10+(e.charCodeAt(t)-Jo),t++;return t===l?null:p}function o(){for(;t<e.length&&$h.has(e.charCodeAt(t));)t++}}var $i=lt(nr(),1);function tc(e){let t=e[0],r=e[1]-1;if(r<0&&t<=0)return $i.default.falseFunc;if(t===-1)return i=>i<=r;if(t===0)return i=>i===r;if(t===1)return r<0?$i.default.trueFunc:i=>i>=r;let n=Math.abs(t),s=(r%n+n)%n;return t>1?i=>i>=r&&i%n===s:i=>i<=r&&i%n===s}function Jr(e){return tc(ec(e))}var st=lt(nr(),1);function Is(e,t){return r=>{let n=t.getParent(r);return n!=null&&t.isTag(n)&&e(r)}}var en={contains(e,t,{adapter:r}){return function(s){return e(s)&&r.getText(s).includes(t)}},icontains(e,t,{adapter:r}){let n=t.toLowerCase();return function(i){return e(i)&&r.getText(i).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:r,equals:n}){let s=Jr(t);return s===st.default.falseFunc?st.default.falseFunc:s===st.default.trueFunc?Is(e,r):function(u){let o=r.getSiblings(u),l=0;for(let p=0;p<o.length&&!n(u,o[p]);p++)r.isTag(o[p])&&l++;return s(l)&&e(u)}},"nth-last-child"(e,t,{adapter:r,equals:n}){let s=Jr(t);return s===st.default.falseFunc?st.default.falseFunc:s===st.default.trueFunc?Is(e,r):function(u){let o=r.getSiblings(u),l=0;for(let p=o.length-1;p>=0&&!n(u,o[p]);p--)r.isTag(o[p])&&l++;return s(l)&&e(u)}},"nth-of-type"(e,t,{adapter:r,equals:n}){let s=Jr(t);return s===st.default.falseFunc?st.default.falseFunc:s===st.default.trueFunc?Is(e,r):function(u){let o=r.getSiblings(u),l=0;for(let p=0;p<o.length;p++){let E=o[p];if(n(u,E))break;r.isTag(E)&&r.getName(E)===r.getName(u)&&l++}return s(l)&&e(u)}},"nth-last-of-type"(e,t,{adapter:r,equals:n}){let s=Jr(t);return s===st.default.falseFunc?st.default.falseFunc:s===st.default.trueFunc?Is(e,r):function(u){let o=r.getSiblings(u),l=0;for(let p=o.length-1;p>=0;p--){let E=o[p];if(n(u,E))break;r.isTag(E)&&r.getName(E)===r.getName(u)&&l++}return s(l)&&e(u)}},root(e,t,{adapter:r}){return n=>{let s=r.getParent(n);return(s==null||!r.isTag(s))&&e(n)}},scope(e,t,r,n){let{equals:s}=r;return!n||n.length===0?en.root(e,t,r):n.length===1?i=>s(n[0],i)&&e(i):i=>n.includes(i)&&e(i)},hover:Xi("isHovered"),visited:Xi("isVisited"),active:Xi("isActive")};function Xi(e){return function(r,n,{adapter:s}){let i=s[e];return typeof i!="function"?st.default.falseFunc:function(o){return i(o)&&r(o)}}}var Mn={empty(e,{adapter:t}){return!t.getChildren(e).some(r=>t.isTag(r)||t.getText(r)!=="")},"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let n=t.getSiblings(e).find(s=>t.isTag(s));return n!=null&&r(e,n)},"last-child"(e,{adapter:t,equals:r}){let n=t.getSiblings(e);for(let s=n.length-1;s>=0;s--){if(r(e,n[s]))return!0;if(t.isTag(n[s]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){let n=t.getSiblings(e),s=t.getName(e);for(let i=0;i<n.length;i++){let u=n[i];if(r(e,u))return!0;if(t.isTag(u)&&t.getName(u)===s)break}return!1},"last-of-type"(e,{adapter:t,equals:r}){let n=t.getSiblings(e),s=t.getName(e);for(let i=n.length-1;i>=0;i--){let u=n[i];if(r(e,u))return!0;if(t.isTag(u)&&t.getName(u)===s)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){let n=t.getName(e);return t.getSiblings(e).every(s=>r(e,s)||!t.isTag(s)||t.getName(s)!==n)},"only-child"(e,{adapter:t,equals:r}){return t.getSiblings(e).every(n=>r(e,n)||!t.isTag(n))}};function Qi(e,t,r,n){if(r===null){if(e.length>n)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}var xs={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
5
+ :is(button, input, select, textarea, optgroup, option)[disabled],
6
+ optgroup[disabled] > option,
7
+ fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
8
+ )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",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])"};var At=lt(nr(),1);var Zi={};function Ji(e,t){return e===At.default.falseFunc?At.default.falseFunc:r=>t.isTag(r)&&e(r)}function ea(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function Ki(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var zi=(e,t,r,n,s)=>{let i=s(t,Ki(r),n);return i===At.default.trueFunc?e:i===At.default.falseFunc?At.default.falseFunc:u=>i(u)&&e(u)},Os={is:zi,matches:zi,where:zi,not(e,t,r,n,s){let i=s(t,Ki(r),n);return i===At.default.falseFunc?e:i===At.default.trueFunc?At.default.falseFunc:u=>!i(u)&&e(u)},has(e,t,r,n,s){let{adapter:i}=r,u=Ki(r);u.relativeSelector=!0;let o=t.some(E=>E.some(Pn))?[Zi]:void 0,l=s(t,u,o);if(l===At.default.falseFunc)return At.default.falseFunc;let p=Ji(l,i);if(o&&l!==At.default.trueFunc){let{shouldTestNextSiblings:E=!1}=l;return A=>{if(!e(A))return!1;o[0]=A;let g=i.getChildren(A),y=E?[...g,...ea(A,i)]:g;return i.existsOne(p,y)}}return E=>e(E)&&i.existsOne(p,i.getChildren(E))}};function nc(e,t,r,n,s){var i;let{name:u,data:o}=t;if(Array.isArray(o)){if(!(u in Os))throw new Error(`Unknown pseudo-class :${u}(${o})`);return Os[u](e,o,r,n,s)}let l=(i=r.pseudos)===null||i===void 0?void 0:i[u],p=typeof l=="string"?l:xs[u];if(typeof p=="string"){if(o!=null)throw new Error(`Pseudo ${u} doesn't have any arguments`);let E=(0,rc.parse)(p);return Os.is(e,E,r,n,s)}if(typeof l=="function")return Qi(l,u,o,1),E=>l(E,o)&&e(E);if(u in en)return en[u](e,o,r,n);if(u in Mn){let E=Mn[u];return Qi(E,u,o,2),A=>E(A,r,o)&&e(A)}throw new Error(`Unknown pseudo-class :${u}`)}var _t=lt(Zr(),1);function ta(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function sc(e,t,r,n,s){let{adapter:i,equals:u}=r;switch(t.type){case _t.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case _t.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case _t.SelectorType.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),Zo[t.action](e,t,r)}case _t.SelectorType.Pseudo:return nc(e,t,r,n,s);case _t.SelectorType.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!r.xmlMode||r.lowerCaseTags)&&(o=o.toLowerCase()),function(p){return i.getName(p)===o&&e(p)}}case _t.SelectorType.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let E=p;for(;E=ta(E,i);)if(e(E))return!0;return!1};let o=new WeakSet;return function(p){let E=p;for(;E=ta(E,i);)if(!o.has(E)){if(i.isTag(E)&&e(E))return!0;o.add(E)}return!1}}case"_flexibleDescendant":return function(l){let p=l;do if(e(p))return!0;while(p=ta(p,i));return!1};case _t.SelectorType.Parent:return function(l){return i.getChildren(l).some(p=>i.isTag(p)&&e(p))};case _t.SelectorType.Child:return function(l){let p=i.getParent(l);return p!=null&&i.isTag(p)&&e(p)};case _t.SelectorType.Sibling:return function(l){let p=i.getSiblings(l);for(let E=0;E<p.length;E++){let A=p[E];if(u(l,A))break;if(i.isTag(A)&&e(A))return!0}return!1};case _t.SelectorType.Adjacent:return i.prevElementSibling?function(l){let p=i.prevElementSibling(l);return p!=null&&e(p)}:function(l){let p=i.getSiblings(l),E;for(let A=0;A<p.length;A++){let g=p[A];if(u(l,g))break;i.isTag(g)&&(E=g)}return!!E&&e(E)};case _t.SelectorType.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function ic(e,t,r){let n=Rs(e,t,r);return Ji(n,t.adapter)}function Rs(e,t,r){let n=typeof e=="string"?(0,yt.parse)(e):e;return Ls(n,t,r)}function ac(e){return e.type===yt.SelectorType.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(ac)))}var Qh={type:yt.SelectorType.Descendant},zh={type:"_flexibleDescendant"},Kh={type:yt.SelectorType.Pseudo,name:"scope",data:null};function Zh(e,{adapter:t},r){let n=!!r?.every(s=>{let i=t.isTag(s)&&t.getParent(s);return s===Zi||i&&t.isTag(i)});for(let s of e){if(!(s.length>0&&Pn(s[0])&&s[0].type!==yt.SelectorType.Descendant))if(n&&!s.some(ac))s.unshift(Qh);else continue;s.unshift(Kh)}}function Ls(e,t,r){var n;e.forEach(Wi),r=(n=t.context)!==null&&n!==void 0?n:r;let s=Array.isArray(r),i=r&&(Array.isArray(r)?r:[r]);if(t.relativeSelector!==!1)Zh(e,t,i);else if(e.some(l=>l.length>0&&Pn(l[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let u=!1,o=e.map(l=>{if(l.length>=2){let[p,E]=l;p.type!==yt.SelectorType.Pseudo||p.name!=="scope"||(s&&E.type===yt.SelectorType.Descendant?l[1]=zh:(E.type===yt.SelectorType.Adjacent||E.type===yt.SelectorType.Sibling)&&(u=!0))}return Jh(l,t,i)}).reduce(ep,$t.default.falseFunc);return o.shouldTestNextSiblings=u,o}function Jh(e,t,r){var n;return e.reduce((s,i)=>s===$t.default.falseFunc?$t.default.falseFunc:sc(s,i,t,r,Ls),(n=t.rootFunc)!==null&&n!==void 0?n:$t.default.trueFunc)}function ep(e,t){return t===$t.default.falseFunc||e===$t.default.trueFunc?e:e===$t.default.falseFunc||t===$t.default.trueFunc?t:function(n){return e(n)||t(n)}}var uc=(e,t)=>e===t,tp={adapter:er,equals:uc};function oc(e){var t,r,n,s;let i=e??tp;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=er),(r=i.equals)!==null&&r!==void 0||(i.equals=(s=(n=i.adapter)===null||n===void 0?void 0:n.equals)!==null&&s!==void 0?s:uc),i}function na(e){return function(r,n,s){let i=oc(n);return e(r,i,s)}}var l2=na(ic),f2=na(Rs),ys=na(Ls);function cc(e){return function(r,n,s){let i=oc(s);typeof r!="function"&&(r=Rs(r,i,n));let u=Ds(n,i.adapter,r.shouldTestNextSiblings);return e(r,u,i)}}function Ds(e,t,r=!1){return r&&(e=rp(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function rp(e,t){let r=Array.isArray(e)?e.slice(0):[e],n=r.length;for(let s=0;s<n;s++){let i=ea(r[s],t);r.push(...i)}return r}var d2=cc((e,t,r)=>e===ra.default.falseFunc||!t||t.length===0?[]:r.adapter.findAll(e,t)),h2=cc((e,t,r)=>e===ra.default.falseFunc||!t||t.length===0?null:r.adapter.findOne(e,t));var ws=lt(nr(),1);var np=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function tn(e){return e.type!=="pseudo"?!1:np.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(tn)):!1}function lc(e,t,r){let n=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,r):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}}function fc(e){for(;e.parent;)e=e.parent;return e}function Ps(e){let t=[],r=[];for(let n of e)n.some(tn)?t.push(n):r.push(n);return[r,t]}var sp={type:it.SelectorType.Universal,namespace:null},ip={type:it.SelectorType.Pseudo,name:"scope",data:null};function aa(e,t,r={}){return ua([e],t,r)}function ua(e,t,r={}){if(typeof t=="function")return e.some(t);let[n,s]=Ps((0,it.parse)(t));return n.length>0&&e.some(ys(n,r))||s.some(i=>hc(i,e,r).length>0)}function ap(e,t,r,n){let s=typeof r=="string"?parseInt(r,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(s)&&Math.abs(s)<t.length?[s<0?t[t.length+s]:t[s]]:[];case"gt":return isFinite(s)?t.slice(s+1):[];case"even":return t.filter((i,u)=>u%2===0);case"odd":return t.filter((i,u)=>u%2===1);case"not":{let i=new Set(dc(r,t,n));return t.filter(u=>!i.has(u))}}}function oa(e,t,r={}){return dc((0,it.parse)(e),t,r)}function dc(e,t,r){if(t.length===0)return[];let[n,s]=Ps(e),i;if(n.length){let u=ia(t,n,r);if(s.length===0)return u;u.length&&(i=new Set(u))}for(let u=0;u<s.length&&i?.size!==t.length;u++){let o=s[u];if((i?t.filter(E=>z(E)&&!i.has(E)):t).length===0)break;let p=hc(o,t,r);if(p.length)if(i)p.forEach(E=>i.add(E));else{if(u===s.length-1)return p;i=new Set(p)}}return typeof i<"u"?i.size===t.length?t:t.filter(u=>i.has(u)):[]}function hc(e,t,r){var n;if(e.some(it.isTraversal)){let s=(n=r.root)!==null&&n!==void 0?n:fc(t[0]),i={...r,context:t,relativeSelector:!1};return e.push(ip),Ms(s,e,i,!0,t.length)}return Ms(t,e,r,!1,t.length)}function pc(e,t,r={},n=1/0){if(typeof e=="function")return mc(t,e);let[s,i]=Ps((0,it.parse)(e)),u=i.map(o=>Ms(t,o,r,!0,n));return s.length&&u.push(sa(t,s,r,n)),u.length===0?[]:u.length===1?u[0]:Zt(u.reduce((o,l)=>[...o,...l]))}function Ms(e,t,r,n,s){let i=t.findIndex(tn),u=t.slice(0,i),o=t[i],l=t.length-1===i?s:1/0,p=lc(o.name,o.data,l);if(p===0)return[];let A=(u.length===0&&!Array.isArray(e)?Wr(e).filter(z):u.length===0?(Array.isArray(e)?e:[e]).filter(z):n||u.some(it.isTraversal)?sa(e,[u],r,p):ia(e,[u],r)).slice(0,p),g=ap(o.name,A,o.data,r);if(g.length===0||t.length===i+1)return g;let y=t.slice(i+1),w=y.some(it.isTraversal);if(w){if((0,it.isTraversal)(y[0])){let{type:M}=y[0];(M===it.SelectorType.Sibling||M===it.SelectorType.Adjacent)&&(g=Ds(g,er,!0)),y.unshift(sp)}r={...r,relativeSelector:!1,rootFunc:M=>g.includes(M)}}else r.rootFunc&&r.rootFunc!==ws.trueFunc&&(r={...r,rootFunc:ws.trueFunc});return y.some(tn)?Ms(g,y,r,!1,s):w?sa(g,[y],r,s):ia(g,[y],r)}function sa(e,t,r,n){let s=ys(t,r,e);return mc(e,s,n)}function mc(e,t,r=1/0){let n=Ds(e,er,t.shouldTestNextSiblings);return Es(s=>z(s)&&t(s),n,!0,r)}function ia(e,t,r){let n=(Array.isArray(e)?e:[e]).filter(z);if(n.length===0)return n;let s=ys(t,r);return s===ws.trueFunc?n:n.filter(s)}var op=/^\s*[~+]/;function cp(e){var t;if(!e)return this._make([]);let r=this.toArray();if(typeof e!="string"){let i=dt(e)?e.toArray():[e];return this._make(i.filter(u=>r.some(o=>Hi(o,u))))}let n=op.test(e)?r:this.children().toArray(),s={context:r,root:(t=this._root)===null||t===void 0?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(pc(e,n,s))}function ca(e){return function(t,...r){return function(n){var s;let i=e(t,this);return n&&(i=da(i,n,this.options.xmlMode,(s=this._root)===null||s===void 0?void 0:s[0])),this._make(this.length>1&&i.length>1?r.reduce((u,o)=>o(u),i):i)}}}var vn=ca((e,t)=>{let r=[];for(let n=0;n<t.length;n++){let s=e(t[n]);r.push(s)}return new Array().concat(...r)}),la=ca((e,t)=>{let r=[];for(let n=0;n<t.length;n++){let s=e(t[n]);s!==null&&r.push(s)}return r});function fa(e,...t){let r=null,n=ca((s,i)=>{let u=[];return Ce(i,o=>{for(let l;(l=s(o))&&!r?.(l,u.length);o=l)u.push(l)}),u})(e,...t);return function(s,i){r=typeof s=="string"?o=>aa(o,s,this.options):s?Fn(s):null;let u=n.call(this,i);return r=null,u}}function rn(e){return Array.from(new Set(e))}var lp=la(({parent:e})=>e&&!Lt(e)?e:null,rn),fp=vn(e=>{let t=[];for(;e.parent&&!Lt(e.parent);)t.push(e.parent),e=e.parent;return t},Zt,e=>e.reverse()),dp=fa(({parent:e})=>e&&!Lt(e)?e:null,Zt,e=>e.reverse());function hp(e){var t;let r=[];if(!e)return this._make(r);let n={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},s=typeof e=="string"?i=>aa(i,e,n):Fn(e);return Ce(this,i=>{for(;i&&z(i);){if(s(i,0)){r.includes(i)||r.push(i);break}i=i.parent}}),this._make(r)}var pp=la(e=>ps(e)),mp=vn(e=>{let t=[];for(;e.next;)e=e.next,z(e)&&t.push(e);return t},rn),Ep=fa(e=>ps(e),rn),gp=la(e=>ms(e)),bp=vn(e=>{let t=[];for(;e.prev;)e=e.prev,z(e)&&t.push(e);return t},rn),Tp=fa(e=>ms(e),rn),Ap=vn(e=>ki(e).filter(t=>z(t)&&t!==e),Zt),_p=vn(e=>Wr(e).filter(z),rn);function Cp(){let e=this.toArray().reduce((t,r)=>xe(r)?t.concat(r.children):t,[]);return this._make(e)}function Np(e){let t=0,r=this.length;for(;t<r&&e.call(this[t],t,this[t])!==!1;)++t;return this}function Sp(e){let t=[];for(let r=0;r<this.length;r++){let n=this[r],s=e.call(n,r,n);s!=null&&(t=t.concat(s))}return this._make(t)}function Fn(e){return typeof e=="function"?(t,r)=>e.call(t,r,t):dt(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function Ip(e){var t;return this._make(da(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function da(e,t,r,n){return typeof t=="string"?oa(t,e,{xmlMode:r,root:n}):e.filter(Fn(t))}function xp(e){let t=this.toArray();return typeof e=="string"?ua(t.filter(z),e,this.options):e?t.some(Fn(e)):!1}function Op(e){let t=this.toArray();if(typeof e=="string"){let r=new Set(oa(e,t,this.options));t=t.filter(n=>!r.has(n))}else{let r=Fn(e);t=t.filter((n,s)=>!r(n,s))}return this._make(t)}function Rp(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,r)=>this._make(r).find(e).length>0)}function Lp(){return this.length>1?this._make(this[0]):this}function yp(){return this.length>0?this._make(this[this.length-1]):this}function Dp(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function Pp(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function wp(){return Array.prototype.slice.call(this)}function Mp(e){let t,r;return e==null?(t=this.parent().children(),r=this[0]):typeof e=="string"?(t=this._make(e),r=this[0]):(t=this,r=dt(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function vp(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function Fp(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function Bp(e,t){let r=this._make(e,t),n=Zt([...this.get(),...r.get()]);return this._make(n)}function kp(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}var pa={};Kt(pa,{_makeDomArray:()=>Up,after:()=>Xp,append:()=>qp,appendTo:()=>Hp,before:()=>zp,clone:()=>sm,empty:()=>em,html:()=>tm,insertAfter:()=>Qp,insertBefore:()=>Kp,prepend:()=>Yp,prependTo:()=>jp,remove:()=>Zp,replaceWith:()=>Jp,text:()=>nm,toString:()=>rm,unwrap:()=>Wp,wrap:()=>Gp,wrapAll:()=>$p,wrapInner:()=>Vp});function Ec(e){return function(r,n,s,i){if(typeof Buffer<"u"&&Buffer.isBuffer(r)&&(r=r.toString()),typeof r=="string")return e(r,n,s,i);let u=r;if(!Array.isArray(u)&&Lt(u))return u;let o=new ft([]);return sr(u,o),o}}function sr(e,t){let r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(let n=0;n<r.length;n++){let s=r[n];s.parent&&s.parent.children!==r&&Vt(s),t?(s.prev=r[n-1]||null,s.next=r[n+1]||null):s.prev=s.next=null,s.parent=t}return t}function Up(e,t){return e==null?[]:dt(e)?t?As(e.get()):e.get():Array.isArray(e)?e.reduce((r,n)=>r.concat(this._makeDomArray(n,t)),[]):typeof e=="string"?this._parse(e,this.options,!1,null).children:t?As([e]):[e]}function gc(e){return function(...t){let r=this.length-1;return Ce(this,(n,s)=>{if(!xe(n))return;let i=typeof t[0]=="function"?t[0].call(n,s,this._render(n.children)):t,u=this._makeDomArray(i,s<r);e(u,n.children,n)})}}function ir(e,t,r,n,s){var i,u;let o=[t,r,...n],l=t===0?null:e[t-1],p=t+r>=e.length?null:e[t+r];for(let E=0;E<n.length;++E){let A=n[E],g=A.parent;if(g){let w=g.children.indexOf(A);w>-1&&(g.children.splice(w,1),s===g&&t>w&&o[0]--)}A.parent=s,A.prev&&(A.prev.next=(i=A.next)!==null&&i!==void 0?i:null),A.next&&(A.next.prev=(u=A.prev)!==null&&u!==void 0?u:null),A.prev=E===0?l:n[E-1],A.next=E===n.length-1?p:n[E+1]}return l&&(l.next=n[0]),p&&(p.prev=n[n.length-1]),e.splice(...o)}function Hp(e){return(dt(e)?e:this._make(e)).append(this),this}function jp(e){return(dt(e)?e:this._make(e)).prepend(this),this}var qp=gc((e,t,r)=>{ir(t,t.length,0,e,r)}),Yp=gc((e,t,r)=>{ir(t,0,0,e,r)});function bc(e){return function(t){let r=this.length-1,n=this.parents().last();for(let s=0;s<this.length;s++){let i=this[s],u=typeof t=="function"?t.call(i,s,i):typeof t=="string"&&!Ln(t)?n.find(t).clone():t,[o]=this._makeDomArray(u,s<r);if(!o||!xe(o))continue;let l=o,p=0;for(;p<l.children.length;){let E=l.children[p];z(E)?(l=E,p=0):p++}e(i,l,[o])}return this}}var Gp=bc((e,t,r)=>{let{parent:n}=e;if(!n)return;let s=n.children,i=s.indexOf(e);sr([e],t),ir(s,i,0,r,n)}),Vp=bc((e,t,r)=>{xe(e)&&(sr(e.children,t),sr(r,e))});function Wp(e){return this.parent(e).not("body").each((t,r)=>{this._make(r).replaceWith(r.children)}),this}function $p(e){let t=this[0];if(t){let r=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t),n;for(let i=0;i<r.length;i++)r[i].type==="tag"&&(n=r[i]);let s=0;for(;n&&s<n.children.length;){let i=n.children[s];i.type==="tag"?(n=i,s=0):s++}n&&this._make(n).append(this)}return this}function Xp(...e){let t=this.length-1;return Ce(this,(r,n)=>{let{parent:s}=r;if(!xe(r)||!s)return;let i=s.children,u=i.indexOf(r);if(u<0)return;let o=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,l=this._makeDomArray(o,n<t);ir(i,u+1,0,l,s)})}function Qp(e){typeof e=="string"&&(e=this._make(e)),this.remove();let t=[];return this._makeDomArray(e).forEach(r=>{let n=this.clone().toArray(),{parent:s}=r;if(!s)return;let i=s.children,u=i.indexOf(r);u<0||(ir(i,u+1,0,n,s),t.push(...n))}),this._make(t)}function zp(...e){let t=this.length-1;return Ce(this,(r,n)=>{let{parent:s}=r;if(!xe(r)||!s)return;let i=s.children,u=i.indexOf(r);if(u<0)return;let o=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,l=this._makeDomArray(o,n<t);ir(i,u,0,l,s)})}function Kp(e){let t=this._make(e);this.remove();let r=[];return Ce(t,n=>{let s=this.clone().toArray(),{parent:i}=n;if(!i)return;let u=i.children,o=u.indexOf(n);o<0||(ir(u,o,0,s,i),r.push(...s))}),this._make(r)}function Zp(e){let t=e?this.filter(e):this;return Ce(t,r=>{Vt(r),r.prev=r.next=r.parent=null}),this}function Jp(e){return Ce(this,(t,r)=>{let{parent:n}=t;if(!n)return;let s=n.children,i=typeof e=="function"?e.call(t,r,t):e,u=this._makeDomArray(i);sr(u,null);let o=s.indexOf(t);ir(s,o,1,u,n),u.includes(t)||(t.parent=t.prev=t.next=null)})}function em(){return Ce(this,e=>{xe(e)&&(e.children.forEach(t=>{t.next=t.prev=t.parent=null}),e.children.length=0)})}function tm(e){if(e===void 0){let t=this[0];return!t||!xe(t)?null:this._render(t.children)}return Ce(this,t=>{if(!xe(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=dt(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;sr(r,t)})}function rm(){return this._render(this)}function nm(e){return e===void 0?tr(this):typeof e=="function"?Ce(this,(t,r)=>this._make(t).text(e.call(t,r,tr([t])))):Ce(this,t=>{if(!xe(t))return;t.children.forEach(n=>{n.next=n.prev=n.parent=null});let r=new Ft(`${e}`);sr(r,t)})}function sm(){return this._make(As(this.get()))}var ma={};Kt(ma,{css:()=>im});function im(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Ce(this,(r,n)=>{z(r)&&Tc(r,e,t,n)});if(this.length!==0)return Ac(this[0],e)}function Tc(e,t,r,n){if(typeof t=="string"){let s=Ac(e),i=typeof r=="function"?r.call(e,n,s[t]):r;i===""?delete s[t]:i!=null&&(s[t]=i),e.attribs.style=am(s)}else typeof t=="object"&&Object.keys(t).forEach((s,i)=>{Tc(e,s,t[s],i)})}function Ac(e,t){if(!e||!z(e))return;let r=um(e.attribs.style);if(typeof t=="string")return r[t];if(Array.isArray(t)){let n={};return t.forEach(s=>{r[s]!=null&&(n[s]=r[s])}),n}return r}function am(e){return Object.keys(e).reduce((t,r)=>`${t}${t?" ":""}${r}: ${e[r]};`,"")}function um(e){if(e=(e||"").trim(),!e)return{};let t={},r;for(let n of e.split(";")){let s=n.indexOf(":");if(s<1||s===n.length-1){let i=n.trimEnd();i.length>0&&r!==void 0&&(t[r]+=`;${i}`)}else r=n.slice(0,s).trim(),t[r]=n.slice(s+1).trim()}return t}var Ea={};Kt(Ea,{serialize:()=>cm,serializeArray:()=>lm});var _c="input,select,textarea,keygen",om=/%20/g,Cc=/\r?\n/g;function cm(){return this.serializeArray().map(r=>`${encodeURIComponent(r.name)}=${encodeURIComponent(r.value)}`).join("&").replace(om,"+")}function lm(){return this.map((e,t)=>{let r=this._make(t);return z(t)&&t.name==="form"?r.find(_c).toArray():r.filter(_c).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var r;let n=this._make(t),s=n.attr("name"),i=(r=n.val())!==null&&r!==void 0?r:"";return Array.isArray(i)?i.map(u=>({name:s,value:u.replace(Cc,`\r
9
+ `)})):{name:s,value:i.replace(Cc,`\r
10
+ `)}}).toArray()}var ar=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let s=0;s<t.length;s++)this[s]=t[s];this.length=t.length}}};ar.prototype.cheerio="[cheerio object]";ar.prototype.splice=Array.prototype.splice;ar.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(ar.prototype,Gi,ha,pa,ma,Ea);function Nc(e,t){return function r(n,s,i=!0){if(n==null)throw new Error("cheerio.load() expects a string");let u={...bn,...Tn(s)},o=e(n,u,i,null);class l extends ar{_make(A,g){let y=p(A,g);return y.prevObject=this,y}_parse(A,g,y,w){return e(A,g,y,w)}_render(A){return t(A,this.options)}}function p(E,A,g=o,y){if(E&&dt(E))return E;let w={...u,...Tn(y)},M=typeof g=="string"?[e(g,w,!1,null)]:"length"in g?g:[g],x=dt(M)?M:new l(M,null,w);if(x._root=x,!E)return new l(void 0,x,w);let q=typeof E=="string"&&Ln(E)?e(E,w,!1,null).children:fm(E)?[E]:Array.isArray(E)?E:void 0,Z=new l(q,x,w);if(q)return Z;if(typeof E!="string")throw new Error("Unexpected type of selector");let ne=E,te=A?typeof A=="string"?Ln(A)?new l([e(A,w,!1,null)],x,w):(ne=`${A} ${ne}`,x):dt(A)?A:new l(Array.isArray(A)?A:[A],x,w):x;return te?te.find(ne):Z}return Object.assign(p,rr,{load:r,_root:o,_options:u,fn:l.prototype,prototype:l.prototype}),p}}function fm(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}var dm=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Se="\uFFFD",c;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(c=c||(c={}));var ze={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function vs(e){return e>=55296&&e<=57343}function Sc(e){return e>=56320&&e<=57343}function Ic(e,t){return(e-55296)*1024+9216+t}function Fs(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Bs(e){return e>=64976&&e<=65007||dm.has(e)}var O;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(O=O||(O={}));var pm=65536,ks=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=pm,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t){let{line:r,col:n,offset:s}=this;return{code:t,startLine:r,endLine:r,startCol:n,endCol:n,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let r=this.html.charCodeAt(this.pos+1);if(Sc(r))return this.pos++,this._addGap(),Ic(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,c.EOF;return this._err(O.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){let r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,c.EOF;let n=this.html.charCodeAt(r);return n===c.CARRIAGE_RETURN?c.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,c.EOF;let t=this.html.charCodeAt(this.pos);return t===c.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,c.LINE_FEED):t===c.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,vs(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===c.LINE_FEED||t===c.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Fs(t)?this._err(O.controlCharacterInInputStream):Bs(t)&&this._err(O.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}};var ce;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(ce=ce||(ce={}));function Us(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var Hs={};Kt(Hs,{ATTRS:()=>Dt,DOCUMENT_MODE:()=>Ge,NS:()=>R,SPECIAL_ELEMENTS:()=>ga,TAG_ID:()=>a,TAG_NAMES:()=>N,getTagID:()=>ur,hasUnescapedText:()=>ba,isNumberedHeader:()=>Bn});var R;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(R=R||(R={}));var Dt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Dt=Dt||(Dt={}));var Ge;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ge=Ge||(Ge={}));var N;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(N=N||(N={}));var a;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"})(a=a||(a={}));var Em=new Map([[N.A,a.A],[N.ADDRESS,a.ADDRESS],[N.ANNOTATION_XML,a.ANNOTATION_XML],[N.APPLET,a.APPLET],[N.AREA,a.AREA],[N.ARTICLE,a.ARTICLE],[N.ASIDE,a.ASIDE],[N.B,a.B],[N.BASE,a.BASE],[N.BASEFONT,a.BASEFONT],[N.BGSOUND,a.BGSOUND],[N.BIG,a.BIG],[N.BLOCKQUOTE,a.BLOCKQUOTE],[N.BODY,a.BODY],[N.BR,a.BR],[N.BUTTON,a.BUTTON],[N.CAPTION,a.CAPTION],[N.CENTER,a.CENTER],[N.CODE,a.CODE],[N.COL,a.COL],[N.COLGROUP,a.COLGROUP],[N.DD,a.DD],[N.DESC,a.DESC],[N.DETAILS,a.DETAILS],[N.DIALOG,a.DIALOG],[N.DIR,a.DIR],[N.DIV,a.DIV],[N.DL,a.DL],[N.DT,a.DT],[N.EM,a.EM],[N.EMBED,a.EMBED],[N.FIELDSET,a.FIELDSET],[N.FIGCAPTION,a.FIGCAPTION],[N.FIGURE,a.FIGURE],[N.FONT,a.FONT],[N.FOOTER,a.FOOTER],[N.FOREIGN_OBJECT,a.FOREIGN_OBJECT],[N.FORM,a.FORM],[N.FRAME,a.FRAME],[N.FRAMESET,a.FRAMESET],[N.H1,a.H1],[N.H2,a.H2],[N.H3,a.H3],[N.H4,a.H4],[N.H5,a.H5],[N.H6,a.H6],[N.HEAD,a.HEAD],[N.HEADER,a.HEADER],[N.HGROUP,a.HGROUP],[N.HR,a.HR],[N.HTML,a.HTML],[N.I,a.I],[N.IMG,a.IMG],[N.IMAGE,a.IMAGE],[N.INPUT,a.INPUT],[N.IFRAME,a.IFRAME],[N.KEYGEN,a.KEYGEN],[N.LABEL,a.LABEL],[N.LI,a.LI],[N.LINK,a.LINK],[N.LISTING,a.LISTING],[N.MAIN,a.MAIN],[N.MALIGNMARK,a.MALIGNMARK],[N.MARQUEE,a.MARQUEE],[N.MATH,a.MATH],[N.MENU,a.MENU],[N.META,a.META],[N.MGLYPH,a.MGLYPH],[N.MI,a.MI],[N.MO,a.MO],[N.MN,a.MN],[N.MS,a.MS],[N.MTEXT,a.MTEXT],[N.NAV,a.NAV],[N.NOBR,a.NOBR],[N.NOFRAMES,a.NOFRAMES],[N.NOEMBED,a.NOEMBED],[N.NOSCRIPT,a.NOSCRIPT],[N.OBJECT,a.OBJECT],[N.OL,a.OL],[N.OPTGROUP,a.OPTGROUP],[N.OPTION,a.OPTION],[N.P,a.P],[N.PARAM,a.PARAM],[N.PLAINTEXT,a.PLAINTEXT],[N.PRE,a.PRE],[N.RB,a.RB],[N.RP,a.RP],[N.RT,a.RT],[N.RTC,a.RTC],[N.RUBY,a.RUBY],[N.S,a.S],[N.SCRIPT,a.SCRIPT],[N.SECTION,a.SECTION],[N.SELECT,a.SELECT],[N.SOURCE,a.SOURCE],[N.SMALL,a.SMALL],[N.SPAN,a.SPAN],[N.STRIKE,a.STRIKE],[N.STRONG,a.STRONG],[N.STYLE,a.STYLE],[N.SUB,a.SUB],[N.SUMMARY,a.SUMMARY],[N.SUP,a.SUP],[N.TABLE,a.TABLE],[N.TBODY,a.TBODY],[N.TEMPLATE,a.TEMPLATE],[N.TEXTAREA,a.TEXTAREA],[N.TFOOT,a.TFOOT],[N.TD,a.TD],[N.TH,a.TH],[N.THEAD,a.THEAD],[N.TITLE,a.TITLE],[N.TR,a.TR],[N.TRACK,a.TRACK],[N.TT,a.TT],[N.U,a.U],[N.UL,a.UL],[N.SVG,a.SVG],[N.VAR,a.VAR],[N.WBR,a.WBR],[N.XMP,a.XMP]]);function ur(e){var t;return(t=Em.get(e))!==null&&t!==void 0?t:a.UNKNOWN}var v=a,ga={[R.HTML]:new Set([v.ADDRESS,v.APPLET,v.AREA,v.ARTICLE,v.ASIDE,v.BASE,v.BASEFONT,v.BGSOUND,v.BLOCKQUOTE,v.BODY,v.BR,v.BUTTON,v.CAPTION,v.CENTER,v.COL,v.COLGROUP,v.DD,v.DETAILS,v.DIR,v.DIV,v.DL,v.DT,v.EMBED,v.FIELDSET,v.FIGCAPTION,v.FIGURE,v.FOOTER,v.FORM,v.FRAME,v.FRAMESET,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HEADER,v.HGROUP,v.HR,v.HTML,v.IFRAME,v.IMG,v.INPUT,v.LI,v.LINK,v.LISTING,v.MAIN,v.MARQUEE,v.MENU,v.META,v.NAV,v.NOEMBED,v.NOFRAMES,v.NOSCRIPT,v.OBJECT,v.OL,v.P,v.PARAM,v.PLAINTEXT,v.PRE,v.SCRIPT,v.SECTION,v.SELECT,v.SOURCE,v.STYLE,v.SUMMARY,v.TABLE,v.TBODY,v.TD,v.TEMPLATE,v.TEXTAREA,v.TFOOT,v.TH,v.THEAD,v.TITLE,v.TR,v.TRACK,v.UL,v.WBR,v.XMP]),[R.MATHML]:new Set([v.MI,v.MO,v.MN,v.MS,v.MTEXT,v.ANNOTATION_XML]),[R.SVG]:new Set([v.TITLE,v.FOREIGN_OBJECT,v.DESC]),[R.XLINK]:new Set,[R.XML]:new Set,[R.XMLNS]:new Set};function Bn(e){return e===v.H1||e===v.H2||e===v.H3||e===v.H4||e===v.H5||e===v.H6}var gm=new Set([N.STYLE,N.SCRIPT,N.XMP,N.IFRAME,N.NOEMBED,N.NOFRAMES,N.PLAINTEXT]);function ba(e,t){return gm.has(e)||t&&e===N.NOSCRIPT}var bm=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),h;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(h||(h={}));var Ve={DATA:h.DATA,RCDATA:h.RCDATA,RAWTEXT:h.RAWTEXT,SCRIPT_DATA:h.SCRIPT_DATA,PLAINTEXT:h.PLAINTEXT,CDATA_SECTION:h.CDATA_SECTION};function Un(e){return e>=c.DIGIT_0&&e<=c.DIGIT_9}function kn(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_Z}function Tm(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_Z}function or(e){return Tm(e)||kn(e)}function Ta(e){return or(e)||Un(e)}function Oc(e){return e>=c.LATIN_CAPITAL_A&&e<=c.LATIN_CAPITAL_F}function Rc(e){return e>=c.LATIN_SMALL_A&&e<=c.LATIN_SMALL_F}function Am(e){return Un(e)||Oc(e)||Rc(e)}function js(e){return e+32}function Lc(e){return e===c.SPACE||e===c.LINE_FEED||e===c.TABULATION||e===c.FORM_FEED}function _m(e){return e===c.EQUALS_SIGN||Ta(e)}function xc(e){return Lc(e)||e===c.SOLIDUS||e===c.GREATER_THAN_SIGN}var Hn=class{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=h.DATA,this.returnState=h.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ks(r),this.currentLocation=this.getCurrentLocation(-1)}_err(t){var r,n;(n=(r=this.handler).onParseError)===null||n===void 0||n.call(r,this.preprocessor.getError(t))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(t){this.consumedAfterSnapshot-=t,this.preprocessor.retreat(t)}_reconsumeInState(t,r){this.state=t,this._callState(r)}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:ce.START_TAG,tagName:"",tagID:a.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ce.END_TAG,tagName:"",tagID:a.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ce.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ce.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;let n=this.currentToken;if(Us(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){let s=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(O.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let t=this.currentToken;this.prepareToken(t),t.tagID=ur(t.tagName),t.type===ce.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(O.endTagWithAttributes),t.selfClosing&&this._err(O.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case ce.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ce.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ce.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:ce.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==t)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=r;return}this._createCharacterToken(t,r)}_emitCodePoint(t){let r=Lc(t)?ce.WHITESPACE_CHARACTER:t===c.NULL?ce.NULL_CHARACTER:ce.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ce.CHARACTER,t)}_matchNamedCharacterReference(t){let r=null,n=0,s=!1;for(let i=0,u=bt[0];i>=0&&(i=In(bt,u,i+1,t),!(i<0));t=this._consume()){n+=1,u=bt[i];let o=u&Xe.VALUE_LENGTH;if(o){let l=(o>>14)-1;if(t!==c.SEMICOLON&&this._isCharacterReferenceInAttribute()&&_m(this.preprocessor.peek(1))?(r=[c.AMPERSAND],i+=l):(r=l===0?[bt[i]&~Xe.VALUE_LENGTH]:l===1?[bt[++i]]:[bt[++i],bt[++i]],n=0,s=t!==c.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(n),s&&!this.preprocessor.endOfChunkHit&&this._err(O.missingSemicolonAfterCharacterReference),this._unconsume(1),r}_isCharacterReferenceInAttribute(){return this.returnState===h.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===h.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case h.DATA:{this._stateData(t);break}case h.RCDATA:{this._stateRcdata(t);break}case h.RAWTEXT:{this._stateRawtext(t);break}case h.SCRIPT_DATA:{this._stateScriptData(t);break}case h.PLAINTEXT:{this._statePlaintext(t);break}case h.TAG_OPEN:{this._stateTagOpen(t);break}case h.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case h.TAG_NAME:{this._stateTagName(t);break}case h.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case h.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case h.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case h.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case h.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case h.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case h.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case h.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case h.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case h.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case h.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case h.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case h.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case h.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case h.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case h.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case h.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case h.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case h.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case h.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case h.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case h.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case h.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case h.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case h.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case h.BOGUS_COMMENT:{this._stateBogusComment(t);break}case h.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case h.COMMENT_START:{this._stateCommentStart(t);break}case h.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case h.COMMENT:{this._stateComment(t);break}case h.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case h.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case h.COMMENT_END:{this._stateCommentEnd(t);break}case h.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case h.DOCTYPE:{this._stateDoctype(t);break}case h.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case h.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case h.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case h.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case h.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case h.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case h.CDATA_SECTION:{this._stateCdataSection(t);break}case h.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case h.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case h.CHARACTER_REFERENCE:{this._stateCharacterReference(t);break}case h.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(t);break}case h.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}case h.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(t);break}case h.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(t);break}case h.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(t);break}case h.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(t);break}case h.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case c.LESS_THAN_SIGN:{this.state=h.TAG_OPEN;break}case c.AMPERSAND:{this.returnState=h.DATA,this.state=h.CHARACTER_REFERENCE;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitCodePoint(t);break}case c.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case c.AMPERSAND:{this.returnState=h.RCDATA,this.state=h.CHARACTER_REFERENCE;break}case c.LESS_THAN_SIGN:{this.state=h.RCDATA_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case c.LESS_THAN_SIGN:{this.state=h.RAWTEXT_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(or(t))this._createStartTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case c.EXCLAMATION_MARK:{this.state=h.MARKUP_DECLARATION_OPEN;break}case c.SOLIDUS:{this.state=h.END_TAG_OPEN;break}case c.QUESTION_MARK:{this._err(O.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t);break}case c.EOF:{this._err(O.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=h.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(or(t))this._createEndTagToken(),this.state=h.TAG_NAME,this._stateTagName(t);else switch(t){case c.GREATER_THAN_SIGN:{this._err(O.missingEndTagName),this.state=h.DATA;break}case c.EOF:{this._err(O.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(O.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.BEFORE_ATTRIBUTE_NAME;break}case c.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.tagName+=Se;break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(kn(t)?js(t):t)}}_stateRcdataLessThanSign(t){t===c.SOLIDUS?this.state=h.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){or(t)?(this.state=h.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=h.BEFORE_ATTRIBUTE_NAME,!1;case c.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=h.SELF_CLOSING_START_TAG,!1;case c.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=h.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===c.SOLIDUS?this.state=h.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){or(t)?(this.state=h.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case c.SOLIDUS:{this.state=h.SCRIPT_DATA_END_TAG_OPEN;break}case c.EXCLAMATION_MARK:{this.state=h.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=h.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){or(t)?(this.state=h.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===c.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===c.HYPHEN_MINUS?(this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=h.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case c.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case c.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case c.HYPHEN_MINUS:{this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case c.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===c.SOLIDUS?this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:or(t)?(this._emitChars("<"),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){or(t)?(this.state=h.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ze.SCRIPT,!1)&&xc(this.preprocessor.peek(ze.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<ze.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case c.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case c.NULL:{this._err(O.unexpectedNullCharacter),this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case c.HYPHEN_MINUS:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case c.HYPHEN_MINUS:{this._emitChars("-");break}case c.LESS_THAN_SIGN:{this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case c.GREATER_THAN_SIGN:{this.state=h.SCRIPT_DATA,this._emitChars(">");break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case c.EOF:{this._err(O.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===c.SOLIDUS?(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ze.SCRIPT,!1)&&xc(this.preprocessor.peek(ze.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<ze.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=h.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=h.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.SOLIDUS:case c.GREATER_THAN_SIGN:case c.EOF:{this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case c.EQUALS_SIGN:{this._err(O.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=h.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:case c.SOLIDUS:case c.GREATER_THAN_SIGN:case c.EOF:{this._leaveAttrName(),this.state=h.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case c.EQUALS_SIGN:{this._leaveAttrName(),this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case c.QUOTATION_MARK:case c.APOSTROPHE:case c.LESS_THAN_SIGN:{this._err(O.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.name+=Se;break}default:this.currentAttr.name+=String.fromCodePoint(kn(t)?js(t):t)}}_stateAfterAttributeName(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.SOLIDUS:{this.state=h.SELF_CLOSING_START_TAG;break}case c.EQUALS_SIGN:{this.state=h.BEFORE_ATTRIBUTE_VALUE;break}case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentTagToken();break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=h.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.QUOTATION_MARK:{this.state=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case c.APOSTROPHE:{this.state=h.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case c.GREATER_THAN_SIGN:{this._err(O.missingAttributeValue),this.state=h.DATA,this.emitCurrentTagToken();break}default:this.state=h.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case c.QUOTATION_MARK:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case c.AMPERSAND:{this.returnState=h.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=h.CHARACTER_REFERENCE;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case c.APOSTROPHE:{this.state=h.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case c.AMPERSAND:{this.returnState=h.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=h.CHARACTER_REFERENCE;break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case c.AMPERSAND:{this.returnState=h.ATTRIBUTE_VALUE_UNQUOTED,this.state=h.CHARACTER_REFERENCE;break}case c.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case c.NULL:{this._err(O.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case c.QUOTATION_MARK:case c.APOSTROPHE:case c.LESS_THAN_SIGN:case c.EQUALS_SIGN:case c.GRAVE_ACCENT:{this._err(O.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this._leaveAttrValue(),this.state=h.BEFORE_ATTRIBUTE_NAME;break}case c.SOLIDUS:{this._leaveAttrValue(),this.state=h.SELF_CLOSING_START_TAG;break}case c.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=h.DATA,this.emitCurrentTagToken();break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBetweenAttributes),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case c.GREATER_THAN_SIGN:{let r=this.currentToken;r.selfClosing=!0,this.state=h.DATA,this.emitCurrentTagToken();break}case c.EOF:{this._err(O.eofInTag),this._emitEOFToken();break}default:this._err(O.unexpectedSolidusInTag),this.state=h.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){let r=this.currentToken;switch(t){case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(r);break}case c.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.data+=Se;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ze.DASH_DASH,!0)?(this._createCommentToken(ze.DASH_DASH.length+1),this.state=h.COMMENT_START):this._consumeSequenceIfMatch(ze.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ze.DOCTYPE.length+1),this.state=h.DOCTYPE):this._consumeSequenceIfMatch(ze.CDATA_START,!0)?this.inForeignNode?this.state=h.CDATA_SECTION:(this._err(O.cdataInHtmlContent),this._createCommentToken(ze.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=h.BOGUS_COMMENT):this._ensureHibernation()||(this._err(O.incorrectlyOpenedComment),this._createCommentToken(2),this.state=h.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case c.HYPHEN_MINUS:{this.state=h.COMMENT_START_DASH;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=h.DATA;let r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){let r=this.currentToken;switch(t){case c.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptClosingOfEmptyComment),this.state=h.DATA,this.emitCurrentComment(r);break}case c.EOF:{this._err(O.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateComment(t){let r=this.currentToken;switch(t){case c.HYPHEN_MINUS:{this.state=h.COMMENT_END_DASH;break}case c.LESS_THAN_SIGN:{r.data+="<",this.state=h.COMMENT_LESS_THAN_SIGN;break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.data+=Se;break}case c.EOF:{this._err(O.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){let r=this.currentToken;switch(t){case c.EXCLAMATION_MARK:{r.data+="!",this.state=h.COMMENT_LESS_THAN_SIGN_BANG;break}case c.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=h.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===c.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=h.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===c.HYPHEN_MINUS?this.state=h.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=h.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==c.GREATER_THAN_SIGN&&t!==c.EOF&&this._err(O.nestedComment),this.state=h.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){let r=this.currentToken;switch(t){case c.HYPHEN_MINUS:{this.state=h.COMMENT_END;break}case c.EOF:{this._err(O.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){let r=this.currentToken;switch(t){case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentComment(r);break}case c.EXCLAMATION_MARK:{this.state=h.COMMENT_END_BANG;break}case c.HYPHEN_MINUS:{r.data+="-";break}case c.EOF:{this._err(O.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=h.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){let r=this.currentToken;switch(t){case c.HYPHEN_MINUS:{r.data+="--!",this.state=h.COMMENT_END_DASH;break}case c.GREATER_THAN_SIGN:{this._err(O.incorrectlyClosedComment),this.state=h.DATA,this.emitCurrentComment(r);break}case c.EOF:{this._err(O.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=h.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_NAME;break}case c.GREATER_THAN_SIGN:{this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case c.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingWhitespaceBeforeDoctypeName),this.state=h.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(kn(t))this._createDoctypeToken(String.fromCharCode(js(t))),this.state=h.DOCTYPE_NAME;else switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.NULL:{this._err(O.unexpectedNullCharacter),this._createDoctypeToken(Se),this.state=h.DOCTYPE_NAME;break}case c.GREATER_THAN_SIGN:{this._err(O.missingDoctypeName),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),this._createDoctypeToken(null);let r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=h.DOCTYPE_NAME}}_stateDoctypeName(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.AFTER_DOCTYPE_NAME;break}case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.name+=Se;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(kn(t)?js(t):t)}}_stateAfterDoctypeName(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ze.PUBLIC,!1)?this.state=h.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ze.SYSTEM,!1)?this.state=h.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(O.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case c.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case c.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.QUOTATION_MARK:{r.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{r.publicId="",this.state=h.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case c.GREATER_THAN_SIGN:{this._err(O.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){let r=this.currentToken;switch(t){case c.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.publicId+=Se;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){let r=this.currentToken;switch(t){case c.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.publicId+=Se;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case c.GREATER_THAN_SIGN:{this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.QUOTATION_MARK:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{this._err(O.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.QUOTATION_MARK:{r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:{this.state=h.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case c.QUOTATION_MARK:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{this._err(O.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case c.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.QUOTATION_MARK:{r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case c.APOSTROPHE:{r.systemId="",this.state=h.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case c.GREATER_THAN_SIGN:{this._err(O.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.DATA,this.emitCurrentDoctype(r);break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){let r=this.currentToken;switch(t){case c.QUOTATION_MARK:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.systemId+=Se;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){let r=this.currentToken;switch(t){case c.APOSTROPHE:{this.state=h.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case c.NULL:{this._err(O.unexpectedNullCharacter),r.systemId+=Se;break}case c.GREATER_THAN_SIGN:{this._err(O.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){let r=this.currentToken;switch(t){case c.SPACE:case c.LINE_FEED:case c.TABULATION:case c.FORM_FEED:break;case c.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.EOF:{this._err(O.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(O.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=h.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){let r=this.currentToken;switch(t){case c.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=h.DATA;break}case c.NULL:{this._err(O.unexpectedNullCharacter);break}case c.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}default:}}_stateCdataSection(t){switch(t){case c.RIGHT_SQUARE_BRACKET:{this.state=h.CDATA_SECTION_BRACKET;break}case c.EOF:{this._err(O.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===c.RIGHT_SQUARE_BRACKET?this.state=h.CDATA_SECTION_END:(this._emitChars("]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case c.GREATER_THAN_SIGN:{this.state=h.DATA;break}case c.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=h.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(t){t===c.NUMBER_SIGN?this.state=h.NUMERIC_CHARACTER_REFERENCE:Ta(t)?(this.state=h.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(t)):(this._flushCodePointConsumedAsCharacterReference(c.AMPERSAND),this._reconsumeInState(this.returnState,t))}_stateNamedCharacterReference(t){let r=this._matchNamedCharacterReference(t);if(!this._ensureHibernation())if(r){for(let n=0;n<r.length;n++)this._flushCodePointConsumedAsCharacterReference(r[n]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(c.AMPERSAND),this.state=h.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(t){Ta(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===c.SEMICOLON&&this._err(O.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,t))}_stateNumericCharacterReference(t){this.charRefCode=0,t===c.LATIN_SMALL_X||t===c.LATIN_CAPITAL_X?this.state=h.HEXADEMICAL_CHARACTER_REFERENCE_START:Un(t)?(this.state=h.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(t)):(this._err(O.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(c.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(c.NUMBER_SIGN),this._reconsumeInState(this.returnState,t))}_stateHexademicalCharacterReferenceStart(t){Am(t)?(this.state=h.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(t)):(this._err(O.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(c.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(c.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState)}_stateHexademicalCharacterReference(t){Oc(t)?this.charRefCode=this.charRefCode*16+t-55:Rc(t)?this.charRefCode=this.charRefCode*16+t-87:Un(t)?this.charRefCode=this.charRefCode*16+t-48:t===c.SEMICOLON?this.state=h.NUMERIC_CHARACTER_REFERENCE_END:(this._err(O.missingSemicolonAfterCharacterReference),this.state=h.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(t))}_stateDecimalCharacterReference(t){Un(t)?this.charRefCode=this.charRefCode*10+t-48:t===c.SEMICOLON?this.state=h.NUMERIC_CHARACTER_REFERENCE_END:(this._err(O.missingSemicolonAfterCharacterReference),this.state=h.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(t))}_stateNumericCharacterReferenceEnd(t){if(this.charRefCode===c.NULL)this._err(O.nullCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(O.characterReferenceOutsideUnicodeRange),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(vs(this.charRefCode))this._err(O.surrogateCharacterReference),this.charRefCode=c.REPLACEMENT_CHARACTER;else if(Bs(this.charRefCode))this._err(O.noncharacterCharacterReference);else if(Fs(this.charRefCode)||this.charRefCode===c.CARRIAGE_RETURN){this._err(O.controlCharacterReference);let r=bm.get(this.charRefCode);r!==void 0&&(this.charRefCode=r)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,t)}};var Dc=new Set([a.DD,a.DT,a.LI,a.OPTGROUP,a.OPTION,a.P,a.RB,a.RP,a.RT,a.RTC]),yc=new Set([...Dc,a.CAPTION,a.COLGROUP,a.TBODY,a.TD,a.TFOOT,a.TH,a.THEAD,a.TR]),qs=new Map([[a.APPLET,R.HTML],[a.CAPTION,R.HTML],[a.HTML,R.HTML],[a.MARQUEE,R.HTML],[a.OBJECT,R.HTML],[a.TABLE,R.HTML],[a.TD,R.HTML],[a.TEMPLATE,R.HTML],[a.TH,R.HTML],[a.ANNOTATION_XML,R.MATHML],[a.MI,R.MATHML],[a.MN,R.MATHML],[a.MO,R.MATHML],[a.MS,R.MATHML],[a.MTEXT,R.MATHML],[a.DESC,R.SVG],[a.FOREIGN_OBJECT,R.SVG],[a.TITLE,R.SVG]]),Cm=[a.H1,a.H2,a.H3,a.H4,a.H5,a.H6],Nm=[a.TR,a.TEMPLATE,a.HTML],Sm=[a.TBODY,a.TFOOT,a.THEAD,a.TEMPLATE,a.HTML],Im=[a.TABLE,a.TEMPLATE,a.HTML],xm=[a.TD,a.TH],Ys=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=a.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===a.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===R.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){let n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){let s=this._indexOf(t)+1;this.items.splice(s,0,r),this.tagIDs.splice(s,0,n),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==R.HTML);this.shortenToLength(r<0?0:r)}shortenToLength(t){for(;this.stackTop>=t;){let r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){let r=this._indexOf(t);this.shortenToLength(r<0?0:r)}popUntilPopped(t,r){let n=this._indexOfTagNames(t,r);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(Cm,R.HTML)}popUntilTableCellPopped(){this.popUntilPopped(xm,R.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){let n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Im,R.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Sm,R.HTML)}clearBackToTableRowContext(){this.clearBackTo(Nm,R.HTML)}remove(t){let r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===a.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===a.HTML}hasInScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],s=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&s===R.HTML)return!0;if(qs.get(n)===s)return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t],n=this.treeAdapter.getNamespaceURI(this.items[t]);if(Bn(r)&&n===R.HTML)return!0;if(qs.get(r)===n)return!1}return!0}hasInListItemScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],s=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&s===R.HTML)return!0;if((n===a.UL||n===a.OL)&&s===R.HTML||qs.get(n)===s)return!1}return!0}hasInButtonScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r],s=this.treeAdapter.getNamespaceURI(this.items[r]);if(n===t&&s===R.HTML)return!0;if(n===a.BUTTON&&s===R.HTML||qs.get(n)===s)return!1}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===R.HTML){if(n===t)return!0;if(n===a.TABLE||n===a.TEMPLATE||n===a.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===R.HTML){if(r===a.TBODY||r===a.THEAD||r===a.TFOOT)return!0;if(r===a.TABLE||r===a.HTML)return!1}}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--){let n=this.tagIDs[r];if(this.treeAdapter.getNamespaceURI(this.items[r])===R.HTML){if(n===t)return!0;if(n!==a.OPTION&&n!==a.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Dc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;yc.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&yc.has(this.currentTagId);)this.pop()}};var Ct;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ct=Ct||(Ct={}));var Pc={type:Ct.Marker},Gs=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){let n=[],s=r.length,i=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){let l=this.entries[o];if(l.type===Ct.Marker)break;let{element:p}=l;if(this.treeAdapter.getTagName(p)===i&&this.treeAdapter.getNamespaceURI(p)===u){let E=this.treeAdapter.getAttrList(p);E.length===s&&n.push({idx:o,attrs:E})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<3)return;let r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<3)return;let s=new Map(r.map(u=>[u.name,u.value])),i=0;for(let u=0;u<n.length;u++){let o=n[u];o.attrs.every(l=>s.get(l.name)===l.value)&&(i+=1,i>=3&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Pc)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ct.Element,element:t,token:r})}insertElementAfterBookmark(t,r){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Ct.Element,element:t,token:r})}removeEntry(t){let r=this.entries.indexOf(t);r>=0&&this.entries.splice(r,1)}clearToLastMarker(){let t=this.entries.indexOf(Pc);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){let r=this.entries.find(n=>n.type===Ct.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===Ct.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Ct.Element&&r.element===t)}};function wc(e){return{nodeName:"#text",value:e,parentNode:null}}var kt={createDocument(){return{nodeName:"#document",mode:Ge.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){let s=e.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=t,s.publicId=r,s.systemId=n;else{let i={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};kt.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(kt.isTextNode(r)){r.value+=t;return}}kt.appendChild(e,wc(t))},insertTextBefore(e,t,r){let n=e.childNodes[e.childNodes.indexOf(r)-1];n&&kt.isTextNode(n)?n.value+=t:kt.insertBefore(e,wc(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};var vc="html",Om="about:legacy-compat",Rm="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Fc=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],Lm=[...Fc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],ym=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Bc=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Dm=[...Bc,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Mc(e,t){return t.some(r=>e.startsWith(r))}function kc(e){return e.name===vc&&e.publicId===null&&(e.systemId===null||e.systemId===Om)}function Uc(e){if(e.name!==vc)return Ge.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===Rm)return Ge.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),ym.has(r))return Ge.QUIRKS;let n=t===null?Lm:Fc;if(Mc(r,n))return Ge.QUIRKS;if(n=t===null?Bc:Dm,Mc(r,n))return Ge.LIMITED_QUIRKS}return Ge.NO_QUIRKS}var Hc={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},wm="definitionurl",Mm="definitionURL",vm=new Map(["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"].map(e=>[e.toLowerCase(),e])),Fm=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:R.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:R.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:R.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:R.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:R.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:R.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:R.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:R.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:R.XML}],["xml:space",{prefix:"xml",name:"space",namespace:R.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:R.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:R.XMLNS}]]),Bm=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),km=new Set([a.B,a.BIG,a.BLOCKQUOTE,a.BODY,a.BR,a.CENTER,a.CODE,a.DD,a.DIV,a.DL,a.DT,a.EM,a.EMBED,a.H1,a.H2,a.H3,a.H4,a.H5,a.H6,a.HEAD,a.HR,a.I,a.IMG,a.LI,a.LISTING,a.MENU,a.META,a.NOBR,a.OL,a.P,a.PRE,a.RUBY,a.S,a.SMALL,a.SPAN,a.STRONG,a.STRIKE,a.SUB,a.SUP,a.TABLE,a.TT,a.U,a.UL,a.VAR]);function jc(e){let t=e.tagID;return t===a.FONT&&e.attrs.some(({name:n})=>n===Dt.COLOR||n===Dt.SIZE||n===Dt.FACE)||km.has(t)}function Aa(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===wm){e.attrs[t].name=Mm;break}}function _a(e){for(let t=0;t<e.attrs.length;t++){let r=vm.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function Vs(e){for(let t=0;t<e.attrs.length;t++){let r=Fm.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function qc(e){let t=Bm.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ur(e.tagName))}function Um(e,t){return t===R.MATHML&&(e===a.MI||e===a.MO||e===a.MN||e===a.MS||e===a.MTEXT)}function Hm(e,t,r){if(t===R.MATHML&&e===a.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Dt.ENCODING){let s=r[n].value.toLowerCase();return s===Hc.TEXT_HTML||s===Hc.APPLICATION_XML}}return t===R.SVG&&(e===a.FOREIGN_OBJECT||e===a.DESC||e===a.TITLE)}function Yc(e,t,r,n){return(!n||n===R.HTML)&&Hm(e,t,r)||(!n||n===R.MATHML)&&Um(e,t)}var jm="hidden",qm=8,Ym=3,b;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(b||(b={}));var Gm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Xc=new Set([a.TABLE,a.TBODY,a.TFOOT,a.THEAD,a.TR]),Vc={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:kt,onParseError:null},nn=class{constructor(t,r,n=null,s=null){this.fragmentContext=n,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=b.INITIAL,this.originalInsertionMode=b.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Vc,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new Hn(this.options,this),this.activeFormattingElements=new Gs(this.treeAdapter),this.fragmentContextID=n?ur(this.treeAdapter.getTagName(n)):a.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Ys(this.document,this.treeAdapter,this)}static parse(t,r){let n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){let n={...Vc,...r};t??(t=n.treeAdapter.createElement(N.TEMPLATE,R.HTML,[]));let s=n.treeAdapter.createElement("documentmock",R.HTML,[]),i=new this(n,s,t);return i.fragmentContextID===a.TEMPLATE&&i.tmplInsertionModeStack.unshift(b.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var s;if(!this.onParseError)return;let i=(s=t.location)!==null&&s!==void 0?s:Gm,u={code:r,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(u)}onItemPush(t,r,n){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(n=this.treeAdapter).onItemPop)===null||s===void 0||s.call(n,t,this.openElements.current),r){let i,u;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,u=this.fragmentContextID):{current:i,currentTagId:u}=this.openElements,this._setContextModes(i,u)}}_setContextModes(t,r){let n=t===this.document||this.treeAdapter.getNamespaceURI(t)===R.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,R.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=b.TEXT}switchToPlaintextParsing(){this.insertionMode=b.TEXT,this.originalInsertionMode=b.IN_BODY,this.tokenizer.state=Ve.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===N.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==R.HTML))switch(this.fragmentContextID){case a.TITLE:case a.TEXTAREA:{this.tokenizer.state=Ve.RCDATA;break}case a.STYLE:case a.XMP:case a.IFRAME:case a.NOEMBED:case a.NOFRAMES:case a.NOSCRIPT:{this.tokenizer.state=Ve.RAWTEXT;break}case a.SCRIPT:{this.tokenizer.state=Ve.SCRIPT_DATA;break}case a.PLAINTEXT:{this.tokenizer.state=Ve.PLAINTEXT;break}default:}}_setDocumentType(t){let r=t.name||"",n=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,s),t.location){let u=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){let n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,t)}}_appendElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){let n=this.treeAdapter.createElement(t,R.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){let r=this.treeAdapter.createElement(t.tagName,R.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(N.HTML,R.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,a.HTML)}_appendCommentNode(t,r){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;let s=this.treeAdapter.getChildNodes(r),i=n?s.lastIndexOf(n):s.length,u=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){let{endLine:l,endCol:p,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:l,endCol:p,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){let n=r.location,s=this.treeAdapter.getTagName(t),i=r.type===ce.END_TAG&&s===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===a.SVG&&this.treeAdapter.getTagName(r)===N.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===R.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===a.MGLYPH||t.tagID===a.MALIGNMARK)&&!this._isIntegrationPoint(n,r,R.HTML)}_processToken(t){switch(t.type){case ce.CHARACTER:{this.onCharacter(t);break}case ce.NULL_CHARACTER:{this.onNullCharacter(t);break}case ce.COMMENT:{this.onComment(t);break}case ce.DOCTYPE:{this.onDoctype(t);break}case ce.START_TAG:{this._processStartTag(t);break}case ce.END_TAG:{this.onEndTag(t);break}case ce.EOF:{this.onEof(t);break}case ce.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){let s=this.treeAdapter.getNamespaceURI(r),i=this.treeAdapter.getAttrList(r);return Yc(t,s,i,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let r=this.activeFormattingElements.entries.findIndex(s=>s.type===Ct.Marker||this.openElements.contains(s.element)),n=r<0?t-1:r-1;for(let s=n;s>=0;s--){let i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=b.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(a.P),this.openElements.popUntilTagNamePopped(a.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case a.TR:{this.insertionMode=b.IN_ROW;return}case a.TBODY:case a.THEAD:case a.TFOOT:{this.insertionMode=b.IN_TABLE_BODY;return}case a.CAPTION:{this.insertionMode=b.IN_CAPTION;return}case a.COLGROUP:{this.insertionMode=b.IN_COLUMN_GROUP;return}case a.TABLE:{this.insertionMode=b.IN_TABLE;return}case a.BODY:{this.insertionMode=b.IN_BODY;return}case a.FRAMESET:{this.insertionMode=b.IN_FRAMESET;return}case a.SELECT:{this._resetInsertionModeForSelect(t);return}case a.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case a.HTML:{this.insertionMode=this.headElement?b.AFTER_HEAD:b.BEFORE_HEAD;return}case a.TD:case a.TH:{if(t>0){this.insertionMode=b.IN_CELL;return}break}case a.HEAD:{if(t>0){this.insertionMode=b.IN_HEAD;return}break}}this.insertionMode=b.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){let n=this.openElements.tagIDs[r];if(n===a.TEMPLATE)break;if(n===a.TABLE){this.insertionMode=b.IN_SELECT_IN_TABLE;return}}this.insertionMode=b.IN_SELECT}_isElementCausesFosterParenting(t){return Xc.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case a.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===R.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case a.TABLE:{let n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){let n=this.treeAdapter.getNamespaceURI(t);return ga[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){AE(this,t);return}switch(this.insertionMode){case b.INITIAL:{jn(this,t);break}case b.BEFORE_HTML:{Yn(this,t);break}case b.BEFORE_HEAD:{Gn(this,t);break}case b.IN_HEAD:{Vn(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case b.AFTER_HEAD:{$n(this,t);break}case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:{zc(this,t);break}case b.TEXT:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{Ca(this,t);break}case b.IN_TABLE_TEXT:{r0(this,t);break}case b.IN_COLUMN_GROUP:{$s(this,t);break}case b.AFTER_BODY:{Xs(this,t);break}case b.AFTER_AFTER_BODY:{Ws(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TE(this,t);return}switch(this.insertionMode){case b.INITIAL:{jn(this,t);break}case b.BEFORE_HTML:{Yn(this,t);break}case b.BEFORE_HEAD:{Gn(this,t);break}case b.IN_HEAD:{Vn(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case b.AFTER_HEAD:{$n(this,t);break}case b.TEXT:{this._insertCharacters(t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{Ca(this,t);break}case b.IN_COLUMN_GROUP:{$s(this,t);break}case b.AFTER_BODY:{Xs(this,t);break}case b.AFTER_AFTER_BODY:{Ws(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Na(this,t);return}switch(this.insertionMode){case b.INITIAL:case b.BEFORE_HTML:case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_TEMPLATE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:{Na(this,t);break}case b.IN_TABLE_TEXT:{qn(this,t);break}case b.AFTER_BODY:{Km(this,t);break}case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{Zm(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case b.INITIAL:{Jm(this,t);break}case b.BEFORE_HEAD:case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:{this._err(t,O.misplacedDoctype);break}case b.IN_TABLE_TEXT:{qn(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,O.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?_E(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case b.INITIAL:{jn(this,t);break}case b.BEFORE_HTML:{e1(this,t);break}case b.BEFORE_HEAD:{r1(this,t);break}case b.IN_HEAD:{Pt(this,t);break}case b.IN_HEAD_NO_SCRIPT:{i1(this,t);break}case b.AFTER_HEAD:{u1(this,t);break}case b.IN_BODY:{We(this,t);break}case b.IN_TABLE:{sn(this,t);break}case b.IN_TABLE_TEXT:{qn(this,t);break}case b.IN_CAPTION:{nE(this,t);break}case b.IN_COLUMN_GROUP:{Oa(this,t);break}case b.IN_TABLE_BODY:{Ks(this,t);break}case b.IN_ROW:{Zs(this,t);break}case b.IN_CELL:{aE(this,t);break}case b.IN_SELECT:{i0(this,t);break}case b.IN_SELECT_IN_TABLE:{oE(this,t);break}case b.IN_TEMPLATE:{lE(this,t);break}case b.AFTER_BODY:{dE(this,t);break}case b.IN_FRAMESET:{hE(this,t);break}case b.AFTER_FRAMESET:{mE(this,t);break}case b.AFTER_AFTER_BODY:{gE(this,t);break}case b.AFTER_AFTER_FRAMESET:{bE(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?CE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case b.INITIAL:{jn(this,t);break}case b.BEFORE_HTML:{t1(this,t);break}case b.BEFORE_HEAD:{n1(this,t);break}case b.IN_HEAD:{s1(this,t);break}case b.IN_HEAD_NO_SCRIPT:{a1(this,t);break}case b.AFTER_HEAD:{o1(this,t);break}case b.IN_BODY:{zs(this,t);break}case b.TEXT:{$1(this,t);break}case b.IN_TABLE:{Xn(this,t);break}case b.IN_TABLE_TEXT:{qn(this,t);break}case b.IN_CAPTION:{sE(this,t);break}case b.IN_COLUMN_GROUP:{iE(this,t);break}case b.IN_TABLE_BODY:{Sa(this,t);break}case b.IN_ROW:{s0(this,t);break}case b.IN_CELL:{uE(this,t);break}case b.IN_SELECT:{a0(this,t);break}case b.IN_SELECT_IN_TABLE:{cE(this,t);break}case b.IN_TEMPLATE:{fE(this,t);break}case b.AFTER_BODY:{o0(this,t);break}case b.IN_FRAMESET:{pE(this,t);break}case b.AFTER_FRAMESET:{EE(this,t);break}case b.AFTER_AFTER_BODY:{Ws(this,t);break}default:}}onEof(t){switch(this.insertionMode){case b.INITIAL:{jn(this,t);break}case b.BEFORE_HTML:{Yn(this,t);break}case b.BEFORE_HEAD:{Gn(this,t);break}case b.IN_HEAD:{Vn(this,t);break}case b.IN_HEAD_NO_SCRIPT:{Wn(this,t);break}case b.AFTER_HEAD:{$n(this,t);break}case b.IN_BODY:case b.IN_TABLE:case b.IN_CAPTION:case b.IN_COLUMN_GROUP:case b.IN_TABLE_BODY:case b.IN_ROW:case b.IN_CELL:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:{e0(this,t);break}case b.TEXT:{X1(this,t);break}case b.IN_TABLE_TEXT:{qn(this,t);break}case b.IN_TEMPLATE:{u0(this,t);break}case b.AFTER_BODY:case b.IN_FRAMESET:case b.AFTER_FRAMESET:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{xa(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===c.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case b.IN_HEAD:case b.IN_HEAD_NO_SCRIPT:case b.AFTER_HEAD:case b.TEXT:case b.IN_COLUMN_GROUP:case b.IN_SELECT:case b.IN_SELECT_IN_TABLE:case b.IN_FRAMESET:case b.AFTER_FRAMESET:{this._insertCharacters(t);break}case b.IN_BODY:case b.IN_CAPTION:case b.IN_CELL:case b.IN_TEMPLATE:case b.AFTER_BODY:case b.AFTER_AFTER_BODY:case b.AFTER_AFTER_FRAMESET:{Qc(this,t);break}case b.IN_TABLE:case b.IN_TABLE_BODY:case b.IN_ROW:{Ca(this,t);break}case b.IN_TABLE_TEXT:{t0(this,t);break}default:}}};function Vm(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Jc(e,t),r}function Wm(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){let s=e.openElements.items[n];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[n])&&(r=s)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function $m(e,t,r){let n=t,s=e.openElements.getCommonAncestor(t);for(let i=0,u=s;u!==r;i++,u=s){s=e.openElements.getCommonAncestor(u);let o=e.activeFormattingElements.getElementEntry(u),l=o&&i>=Ym;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(u)):(u=Xm(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(u,n),n=u)}return n}function Xm(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function Qm(e,t,r){let n=e.treeAdapter.getTagName(t),s=ur(n);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(r);else{let i=e.treeAdapter.getNamespaceURI(t);s===a.TEMPLATE&&i===R.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function zm(e,t,r){let n=e.treeAdapter.getNamespaceURI(r.element),{token:s}=r,i=e.treeAdapter.createElement(s.tagName,n,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,i,s.tagID)}function Ia(e,t){for(let r=0;r<qm;r++){let n=Vm(e,t);if(!n)break;let s=Wm(e,n);if(!s)break;e.activeFormattingElements.bookmark=n;let i=$m(e,s,n.element),u=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),u&&Qm(e,u,i),zm(e,s,n)}}function Na(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Km(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Zm(e,t){e._appendCommentNode(t,e.document)}function xa(e,t){if(e.stopped=!0,t.location){let r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(n);if(s&&!s.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let i=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(i);u&&!u.endTag&&e._setEndLocation(i,t)}}}}function Jm(e,t){e._setDocumentType(t);let r=t.forceQuirks?Ge.QUIRKS:Uc(t);kc(t)||e._err(t,O.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=b.BEFORE_HTML}function jn(e,t){e._err(t,O.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ge.QUIRKS),e.insertionMode=b.BEFORE_HTML,e._processToken(t)}function e1(e,t){t.tagID===a.HTML?(e._insertElement(t,R.HTML),e.insertionMode=b.BEFORE_HEAD):Yn(e,t)}function t1(e,t){let r=t.tagID;(r===a.HTML||r===a.HEAD||r===a.BODY||r===a.BR)&&Yn(e,t)}function Yn(e,t){e._insertFakeRootElement(),e.insertionMode=b.BEFORE_HEAD,e._processToken(t)}function r1(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.HEAD:{e._insertElement(t,R.HTML),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD;break}default:Gn(e,t)}}function n1(e,t){let r=t.tagID;r===a.HEAD||r===a.BODY||r===a.HTML||r===a.BR?Gn(e,t):e._err(t,O.endTagWithoutMatchingOpenElement)}function Gn(e,t){e._insertFakeElement(N.HEAD,a.HEAD),e.headElement=e.openElements.current,e.insertionMode=b.IN_HEAD,e._processToken(t)}function Pt(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.BASE:case a.BASEFONT:case a.BGSOUND:case a.LINK:case a.META:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case a.TITLE:{e._switchToTextParsing(t,Ve.RCDATA);break}case a.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ve.RAWTEXT):(e._insertElement(t,R.HTML),e.insertionMode=b.IN_HEAD_NO_SCRIPT);break}case a.NOFRAMES:case a.STYLE:{e._switchToTextParsing(t,Ve.RAWTEXT);break}case a.SCRIPT:{e._switchToTextParsing(t,Ve.SCRIPT_DATA);break}case a.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=b.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(b.IN_TEMPLATE);break}case a.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:Vn(e,t)}}function s1(e,t){switch(t.tagID){case a.HEAD:{e.openElements.pop(),e.insertionMode=b.AFTER_HEAD;break}case a.BODY:case a.BR:case a.HTML:{Vn(e,t);break}case a.TEMPLATE:{Sr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Sr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==a.TEMPLATE&&e._err(t,O.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(a.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,O.endTagWithoutMatchingOpenElement)}function Vn(e,t){e.openElements.pop(),e.insertionMode=b.AFTER_HEAD,e._processToken(t)}function i1(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.BASEFONT:case a.BGSOUND:case a.HEAD:case a.LINK:case a.META:case a.NOFRAMES:case a.STYLE:{Pt(e,t);break}case a.NOSCRIPT:{e._err(t,O.nestedNoscriptInHead);break}default:Wn(e,t)}}function a1(e,t){switch(t.tagID){case a.NOSCRIPT:{e.openElements.pop(),e.insertionMode=b.IN_HEAD;break}case a.BR:{Wn(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function Wn(e,t){let r=t.type===ce.EOF?O.openElementsLeftAfterEof:O.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=b.IN_HEAD,e._processToken(t)}function u1(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.BODY:{e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=b.IN_BODY;break}case a.FRAMESET:{e._insertElement(t,R.HTML),e.insertionMode=b.IN_FRAMESET;break}case a.BASE:case a.BASEFONT:case a.BGSOUND:case a.LINK:case a.META:case a.NOFRAMES:case a.SCRIPT:case a.STYLE:case a.TEMPLATE:case a.TITLE:{e._err(t,O.abandonedHeadElementChild),e.openElements.push(e.headElement,a.HEAD),Pt(e,t),e.openElements.remove(e.headElement);break}case a.HEAD:{e._err(t,O.misplacedStartTagForHeadElement);break}default:$n(e,t)}}function o1(e,t){switch(t.tagID){case a.BODY:case a.HTML:case a.BR:{$n(e,t);break}case a.TEMPLATE:{Sr(e,t);break}default:e._err(t,O.endTagWithoutMatchingOpenElement)}}function $n(e,t){e._insertFakeElement(N.BODY,a.BODY),e.insertionMode=b.IN_BODY,Qs(e,t)}function Qs(e,t){switch(t.type){case ce.CHARACTER:{zc(e,t);break}case ce.WHITESPACE_CHARACTER:{Qc(e,t);break}case ce.COMMENT:{Na(e,t);break}case ce.START_TAG:{We(e,t);break}case ce.END_TAG:{zs(e,t);break}case ce.EOF:{e0(e,t);break}default:}}function Qc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zc(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function c1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function l1(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function f1(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_FRAMESET)}function d1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function h1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),Bn(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,R.HTML)}function p1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function m1(e,t){let r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML),r||(e.formElement=e.openElements.current))}function E1(e,t){e.framesetOk=!1;let r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let s=e.openElements.tagIDs[n];if(r===a.LI&&s===a.LI||(r===a.DD||r===a.DT)&&(s===a.DD||s===a.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==a.ADDRESS&&s!==a.DIV&&s!==a.P&&e._isSpecialElement(e.openElements.items[n],s))break}e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML)}function g1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.tokenizer.state=Ve.PLAINTEXT}function b1(e,t){e.openElements.hasInScope(a.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1}function T1(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(N.A);r&&(Ia(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function A1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _1(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(a.NOBR)&&(Ia(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,R.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function C1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function N1(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ge.QUIRKS&&e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=b.IN_TABLE}function Kc(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Zc(e){let t=Us(e,Dt.TYPE);return t!=null&&t.toLowerCase()===jm}function S1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,R.HTML),Zc(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function I1(e,t){e._appendElement(t,R.HTML),t.ackSelfClosing=!0}function x1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._appendElement(t,R.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function O1(e,t){t.tagName=N.IMG,t.tagID=a.IMG,Kc(e,t)}function R1(e,t){e._insertElement(t,R.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ve.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=b.TEXT}function L1(e,t){e.openElements.hasInButtonScope(a.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ve.RAWTEXT)}function y1(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ve.RAWTEXT)}function Wc(e,t){e._switchToTextParsing(t,Ve.RAWTEXT)}function D1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===b.IN_TABLE||e.insertionMode===b.IN_CAPTION||e.insertionMode===b.IN_TABLE_BODY||e.insertionMode===b.IN_ROW||e.insertionMode===b.IN_CELL?b.IN_SELECT_IN_TABLE:b.IN_SELECT}function P1(e,t){e.openElements.currentTagId===a.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function w1(e,t){e.openElements.hasInScope(a.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,R.HTML)}function M1(e,t){e.openElements.hasInScope(a.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(a.RTC),e._insertElement(t,R.HTML)}function v1(e,t){e._reconstructActiveFormattingElements(),Aa(t),Vs(t),t.selfClosing?e._appendElement(t,R.MATHML):e._insertElement(t,R.MATHML),t.ackSelfClosing=!0}function F1(e,t){e._reconstructActiveFormattingElements(),_a(t),Vs(t),t.selfClosing?e._appendElement(t,R.SVG):e._insertElement(t,R.SVG),t.ackSelfClosing=!0}function $c(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,R.HTML)}function We(e,t){switch(t.tagID){case a.I:case a.S:case a.B:case a.U:case a.EM:case a.TT:case a.BIG:case a.CODE:case a.FONT:case a.SMALL:case a.STRIKE:case a.STRONG:{A1(e,t);break}case a.A:{T1(e,t);break}case a.H1:case a.H2:case a.H3:case a.H4:case a.H5:case a.H6:{h1(e,t);break}case a.P:case a.DL:case a.OL:case a.UL:case a.DIV:case a.DIR:case a.NAV:case a.MAIN:case a.MENU:case a.ASIDE:case a.CENTER:case a.FIGURE:case a.FOOTER:case a.HEADER:case a.HGROUP:case a.DIALOG:case a.DETAILS:case a.ADDRESS:case a.ARTICLE:case a.SECTION:case a.SUMMARY:case a.FIELDSET:case a.BLOCKQUOTE:case a.FIGCAPTION:{d1(e,t);break}case a.LI:case a.DD:case a.DT:{E1(e,t);break}case a.BR:case a.IMG:case a.WBR:case a.AREA:case a.EMBED:case a.KEYGEN:{Kc(e,t);break}case a.HR:{x1(e,t);break}case a.RB:case a.RTC:{w1(e,t);break}case a.RT:case a.RP:{M1(e,t);break}case a.PRE:case a.LISTING:{p1(e,t);break}case a.XMP:{L1(e,t);break}case a.SVG:{F1(e,t);break}case a.HTML:{c1(e,t);break}case a.BASE:case a.LINK:case a.META:case a.STYLE:case a.TITLE:case a.SCRIPT:case a.BGSOUND:case a.BASEFONT:case a.TEMPLATE:{Pt(e,t);break}case a.BODY:{l1(e,t);break}case a.FORM:{m1(e,t);break}case a.NOBR:{_1(e,t);break}case a.MATH:{v1(e,t);break}case a.TABLE:{N1(e,t);break}case a.INPUT:{S1(e,t);break}case a.PARAM:case a.TRACK:case a.SOURCE:{I1(e,t);break}case a.IMAGE:{O1(e,t);break}case a.BUTTON:{b1(e,t);break}case a.APPLET:case a.OBJECT:case a.MARQUEE:{C1(e,t);break}case a.IFRAME:{y1(e,t);break}case a.SELECT:{D1(e,t);break}case a.OPTION:case a.OPTGROUP:{P1(e,t);break}case a.NOEMBED:{Wc(e,t);break}case a.FRAMESET:{f1(e,t);break}case a.TEXTAREA:{R1(e,t);break}case a.NOSCRIPT:{e.options.scriptingEnabled?Wc(e,t):$c(e,t);break}case a.PLAINTEXT:{g1(e,t);break}case a.COL:case a.TH:case a.TD:case a.TR:case a.HEAD:case a.FRAME:case a.TBODY:case a.TFOOT:case a.THEAD:case a.CAPTION:case a.COLGROUP:break;default:$c(e,t)}}function B1(e,t){if(e.openElements.hasInScope(a.BODY)&&(e.insertionMode=b.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function k1(e,t){e.openElements.hasInScope(a.BODY)&&(e.insertionMode=b.AFTER_BODY,o0(e,t))}function U1(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function H1(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(a.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(a.FORM):r&&e.openElements.remove(r))}function j1(e){e.openElements.hasInButtonScope(a.P)||e._insertFakeElement(N.P,a.P),e._closePElement()}function q1(e){e.openElements.hasInListItemScope(a.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(a.LI),e.openElements.popUntilTagNamePopped(a.LI))}function Y1(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function G1(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function V1(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function W1(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(N.BR,a.BR),e.openElements.pop(),e.framesetOk=!1}function Jc(e,t){let r=t.tagName,n=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){let i=e.openElements.items[s],u=e.openElements.tagIDs[s];if(n===u&&(n!==a.UNKNOWN||e.treeAdapter.getTagName(i)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(i,u))break}}function zs(e,t){switch(t.tagID){case a.A:case a.B:case a.I:case a.S:case a.U:case a.EM:case a.TT:case a.BIG:case a.CODE:case a.FONT:case a.NOBR:case a.SMALL:case a.STRIKE:case a.STRONG:{Ia(e,t);break}case a.P:{j1(e);break}case a.DL:case a.UL:case a.OL:case a.DIR:case a.DIV:case a.NAV:case a.PRE:case a.MAIN:case a.MENU:case a.ASIDE:case a.BUTTON:case a.CENTER:case a.FIGURE:case a.FOOTER:case a.HEADER:case a.HGROUP:case a.DIALOG:case a.ADDRESS:case a.ARTICLE:case a.DETAILS:case a.SECTION:case a.SUMMARY:case a.LISTING:case a.FIELDSET:case a.BLOCKQUOTE:case a.FIGCAPTION:{U1(e,t);break}case a.LI:{q1(e);break}case a.DD:case a.DT:{Y1(e,t);break}case a.H1:case a.H2:case a.H3:case a.H4:case a.H5:case a.H6:{G1(e);break}case a.BR:{W1(e);break}case a.BODY:{B1(e,t);break}case a.HTML:{k1(e,t);break}case a.FORM:{H1(e);break}case a.APPLET:case a.OBJECT:case a.MARQUEE:{V1(e,t);break}case a.TEMPLATE:{Sr(e,t);break}default:Jc(e,t)}}function e0(e,t){e.tmplInsertionModeStack.length>0?u0(e,t):xa(e,t)}function $1(e,t){var r;t.tagID===a.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function X1(e,t){e._err(t,O.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ca(e,t){if(Xc.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=b.IN_TABLE_TEXT,t.type){case ce.CHARACTER:{r0(e,t);break}case ce.WHITESPACE_CHARACTER:{t0(e,t);break}}else Qn(e,t)}function Q1(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_CAPTION}function z1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_COLUMN_GROUP}function K1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.COLGROUP,a.COLGROUP),e.insertionMode=b.IN_COLUMN_GROUP,Oa(e,t)}function Z1(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_TABLE_BODY}function J1(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(N.TBODY,a.TBODY),e.insertionMode=b.IN_TABLE_BODY,Ks(e,t)}function eE(e,t){e.openElements.hasInTableScope(a.TABLE)&&(e.openElements.popUntilTagNamePopped(a.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function tE(e,t){Zc(t)?e._appendElement(t,R.HTML):Qn(e,t),t.ackSelfClosing=!0}function rE(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,R.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function sn(e,t){switch(t.tagID){case a.TD:case a.TH:case a.TR:{J1(e,t);break}case a.STYLE:case a.SCRIPT:case a.TEMPLATE:{Pt(e,t);break}case a.COL:{K1(e,t);break}case a.FORM:{rE(e,t);break}case a.TABLE:{eE(e,t);break}case a.TBODY:case a.TFOOT:case a.THEAD:{Z1(e,t);break}case a.INPUT:{tE(e,t);break}case a.CAPTION:{Q1(e,t);break}case a.COLGROUP:{z1(e,t);break}default:Qn(e,t)}}function Xn(e,t){switch(t.tagID){case a.TABLE:{e.openElements.hasInTableScope(a.TABLE)&&(e.openElements.popUntilTagNamePopped(a.TABLE),e._resetInsertionMode());break}case a.TEMPLATE:{Sr(e,t);break}case a.BODY:case a.CAPTION:case a.COL:case a.COLGROUP:case a.HTML:case a.TBODY:case a.TD:case a.TFOOT:case a.TH:case a.THEAD:case a.TR:break;default:Qn(e,t)}}function Qn(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Qs(e,t),e.fosterParentingEnabled=r}function t0(e,t){e.pendingCharacterTokens.push(t)}function r0(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function qn(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Qn(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var n0=new Set([a.CAPTION,a.COL,a.COLGROUP,a.TBODY,a.TD,a.TFOOT,a.TH,a.THEAD,a.TR]);function nE(e,t){let r=t.tagID;n0.has(r)?e.openElements.hasInTableScope(a.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,sn(e,t)):We(e,t)}function sE(e,t){let r=t.tagID;switch(r){case a.CAPTION:case a.TABLE:{e.openElements.hasInTableScope(a.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_TABLE,r===a.TABLE&&Xn(e,t));break}case a.BODY:case a.COL:case a.COLGROUP:case a.HTML:case a.TBODY:case a.TD:case a.TFOOT:case a.TH:case a.THEAD:case a.TR:break;default:zs(e,t)}}function Oa(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.COL:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case a.TEMPLATE:{Pt(e,t);break}default:$s(e,t)}}function iE(e,t){switch(t.tagID){case a.COLGROUP:{e.openElements.currentTagId===a.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE);break}case a.TEMPLATE:{Sr(e,t);break}case a.COL:break;default:$s(e,t)}}function $s(e,t){e.openElements.currentTagId===a.COLGROUP&&(e.openElements.pop(),e.insertionMode=b.IN_TABLE,e._processToken(t))}function Ks(e,t){switch(t.tagID){case a.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_ROW;break}case a.TH:case a.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(N.TR,a.TR),e.insertionMode=b.IN_ROW,Zs(e,t);break}case a.CAPTION:case a.COL:case a.COLGROUP:case a.TBODY:case a.TFOOT:case a.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,sn(e,t));break}default:sn(e,t)}}function Sa(e,t){let r=t.tagID;switch(t.tagID){case a.TBODY:case a.TFOOT:case a.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE);break}case a.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE,Xn(e,t));break}case a.BODY:case a.CAPTION:case a.COL:case a.COLGROUP:case a.HTML:case a.TD:case a.TH:case a.TR:break;default:Xn(e,t)}}function Zs(e,t){switch(t.tagID){case a.TH:case a.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,R.HTML),e.insertionMode=b.IN_CELL,e.activeFormattingElements.insertMarker();break}case a.CAPTION:case a.COL:case a.COLGROUP:case a.TBODY:case a.TFOOT:case a.THEAD:case a.TR:{e.openElements.hasInTableScope(a.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,Ks(e,t));break}default:sn(e,t)}}function s0(e,t){switch(t.tagID){case a.TR:{e.openElements.hasInTableScope(a.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY);break}case a.TABLE:{e.openElements.hasInTableScope(a.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,Sa(e,t));break}case a.TBODY:case a.TFOOT:case a.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(a.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=b.IN_TABLE_BODY,Sa(e,t));break}case a.BODY:case a.CAPTION:case a.COL:case a.COLGROUP:case a.HTML:case a.TD:case a.TH:break;default:Xn(e,t)}}function aE(e,t){let r=t.tagID;n0.has(r)?(e.openElements.hasInTableScope(a.TD)||e.openElements.hasInTableScope(a.TH))&&(e._closeTableCell(),Zs(e,t)):We(e,t)}function uE(e,t){let r=t.tagID;switch(r){case a.TD:case a.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=b.IN_ROW);break}case a.TABLE:case a.TBODY:case a.TFOOT:case a.THEAD:case a.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),s0(e,t));break}case a.BODY:case a.CAPTION:case a.COL:case a.COLGROUP:case a.HTML:break;default:zs(e,t)}}function i0(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.OPTION:{e.openElements.currentTagId===a.OPTION&&e.openElements.pop(),e._insertElement(t,R.HTML);break}case a.OPTGROUP:{e.openElements.currentTagId===a.OPTION&&e.openElements.pop(),e.openElements.currentTagId===a.OPTGROUP&&e.openElements.pop(),e._insertElement(t,R.HTML);break}case a.INPUT:case a.KEYGEN:case a.TEXTAREA:case a.SELECT:{e.openElements.hasInSelectScope(a.SELECT)&&(e.openElements.popUntilTagNamePopped(a.SELECT),e._resetInsertionMode(),t.tagID!==a.SELECT&&e._processStartTag(t));break}case a.SCRIPT:case a.TEMPLATE:{Pt(e,t);break}default:}}function a0(e,t){switch(t.tagID){case a.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===a.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===a.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===a.OPTGROUP&&e.openElements.pop();break}case a.OPTION:{e.openElements.currentTagId===a.OPTION&&e.openElements.pop();break}case a.SELECT:{e.openElements.hasInSelectScope(a.SELECT)&&(e.openElements.popUntilTagNamePopped(a.SELECT),e._resetInsertionMode());break}case a.TEMPLATE:{Sr(e,t);break}default:}}function oE(e,t){let r=t.tagID;r===a.CAPTION||r===a.TABLE||r===a.TBODY||r===a.TFOOT||r===a.THEAD||r===a.TR||r===a.TD||r===a.TH?(e.openElements.popUntilTagNamePopped(a.SELECT),e._resetInsertionMode(),e._processStartTag(t)):i0(e,t)}function cE(e,t){let r=t.tagID;r===a.CAPTION||r===a.TABLE||r===a.TBODY||r===a.TFOOT||r===a.THEAD||r===a.TR||r===a.TD||r===a.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(a.SELECT),e._resetInsertionMode(),e.onEndTag(t)):a0(e,t)}function lE(e,t){switch(t.tagID){case a.BASE:case a.BASEFONT:case a.BGSOUND:case a.LINK:case a.META:case a.NOFRAMES:case a.SCRIPT:case a.STYLE:case a.TEMPLATE:case a.TITLE:{Pt(e,t);break}case a.CAPTION:case a.COLGROUP:case a.TBODY:case a.TFOOT:case a.THEAD:{e.tmplInsertionModeStack[0]=b.IN_TABLE,e.insertionMode=b.IN_TABLE,sn(e,t);break}case a.COL:{e.tmplInsertionModeStack[0]=b.IN_COLUMN_GROUP,e.insertionMode=b.IN_COLUMN_GROUP,Oa(e,t);break}case a.TR:{e.tmplInsertionModeStack[0]=b.IN_TABLE_BODY,e.insertionMode=b.IN_TABLE_BODY,Ks(e,t);break}case a.TD:case a.TH:{e.tmplInsertionModeStack[0]=b.IN_ROW,e.insertionMode=b.IN_ROW,Zs(e,t);break}default:e.tmplInsertionModeStack[0]=b.IN_BODY,e.insertionMode=b.IN_BODY,We(e,t)}}function fE(e,t){t.tagID===a.TEMPLATE&&Sr(e,t)}function u0(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(a.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):xa(e,t)}function dE(e,t){t.tagID===a.HTML?We(e,t):Xs(e,t)}function o0(e,t){var r;if(t.tagID===a.HTML){if(e.fragmentContext||(e.insertionMode=b.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===a.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Xs(e,t)}function Xs(e,t){e.insertionMode=b.IN_BODY,Qs(e,t)}function hE(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.FRAMESET:{e._insertElement(t,R.HTML);break}case a.FRAME:{e._appendElement(t,R.HTML),t.ackSelfClosing=!0;break}case a.NOFRAMES:{Pt(e,t);break}default:}}function pE(e,t){t.tagID===a.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==a.FRAMESET&&(e.insertionMode=b.AFTER_FRAMESET))}function mE(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.NOFRAMES:{Pt(e,t);break}default:}}function EE(e,t){t.tagID===a.HTML&&(e.insertionMode=b.AFTER_AFTER_FRAMESET)}function gE(e,t){t.tagID===a.HTML?We(e,t):Ws(e,t)}function Ws(e,t){e.insertionMode=b.IN_BODY,Qs(e,t)}function bE(e,t){switch(t.tagID){case a.HTML:{We(e,t);break}case a.NOFRAMES:{Pt(e,t);break}default:}}function TE(e,t){t.chars=Se,e._insertCharacters(t)}function AE(e,t){e._insertCharacters(t),e.framesetOk=!1}function c0(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==R.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function _E(e,t){if(jc(t))c0(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===R.MATHML?Aa(t):n===R.SVG&&(qc(t),_a(t)),Vs(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function CE(e,t){if(t.tagID===a.P||t.tagID===a.BR){c0(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===R.HTML){e._endTagOutsideForeignContent(t);break}let s=e.treeAdapter.getTagName(n);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(r);break}}}var NE=new Set([N.AREA,N.BASE,N.BASEFONT,N.BGSOUND,N.BR,N.COL,N.EMBED,N.FRAME,N.HR,N.IMG,N.INPUT,N.KEYGEN,N.LINK,N.META,N.PARAM,N.SOURCE,N.TRACK,N.WBR]);function SE(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===R.HTML&&NE.has(t.treeAdapter.getTagName(e))}var IE={treeAdapter:kt,scriptingEnabled:!0};function Ra(e,t){let r={...IE,...t};return l0(e,r)}function xE(e,t){let r="",n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===N.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===R.HTML?t.treeAdapter.getTemplateContent(e):e,s=t.treeAdapter.getChildNodes(n);if(s)for(let i of s)r+=l0(i,t);return r}function l0(e,t){return t.treeAdapter.isElementNode(e)?OE(e,t):t.treeAdapter.isTextNode(e)?LE(e,t):t.treeAdapter.isCommentNode(e)?yE(e,t):t.treeAdapter.isDocumentTypeNode(e)?DE(e,t):""}function OE(e,t){let r=t.treeAdapter.getTagName(e);return`<${r}${RE(e,t)}>${SE(e,t)?"":`${xE(e,t)}</${r}>`}`}function RE(e,{treeAdapter:t}){let r="";for(let n of t.getAttrList(e)){if(r+=" ",!n.namespace)r+=n.name;else switch(n.namespace){case R.XML:{r+=`xml:${n.name}`;break}case R.XMLNS:{n.name!=="xmlns"&&(r+="xmlns:"),r+=n.name;break}case R.XLINK:{r+=`xlink:${n.name}`;break}default:r+=`${n.prefix}:${n.name}`}r+=`="${Gr(n.value)}"`}return r}function LE(e,t){let{treeAdapter:r}=t,n=r.getTextNodeContent(e),s=r.getParentNode(e),i=s&&r.isElementNode(s)&&r.getTagName(s);return i&&r.getNamespaceURI(s)===R.HTML&&ba(i,t.scriptingEnabled)?n:Vr(n)}function yE(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function DE(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function f0(e,t){return nn.parse(e,t)}function d0(e,t,r){typeof e=="string"&&(r=t,t=e,e=null);let n=nn.getFragmentParser(e,r);return n.tokenizer.write(t,!0),n.getFragment()}function h0(e){return new Ft(e)}function p0(e){let t=e.includes('"')?"'":'"';return t+e+t}function PE(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${p0(t)}`:r&&(n+=" SYSTEM"),r&&(n+=` ${p0(r)}`),n}var Ir={isCommentNode:Ar,isElementNode:z,isTextNode:rt,createDocument(){let e=new ft([]);return e["x-mode"]=Hs.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment(){return new ft([])},createElement(e,t,r){let n=Object.create(null),s=Object.create(null),i=Object.create(null);for(let o=0;o<r.length;o++){let l=r[o].name;n[l]=r[o].value,s[l]=r[o].namespace,i[l]=r[o].prefix}let u=new Tr(e,n,[]);return u.namespace=t,u["x-attribsNamespace"]=s,u["x-attribsPrefix"]=i,u},createCommentNode(e){return new gr(e)},appendChild(e,t){let r=e.children[e.children.length-1];r&&(r.next=t,t.prev=r),e.children.push(t),t.parent=e},insertBefore(e,t,r){let n=e.children.indexOf(r),{prev:s}=r;s&&(s.next=t,t.prev=s),r.prev=t,t.next=r,e.children.splice(n,0,t),t.parent=e},setTemplateContent(e,t){Ir.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,r,n){let s=PE(t,r,n),i=e.children.find(u=>os(u)&&u.name==="!doctype");i?i.data=s??null:(i=new br("!doctype",s),Ir.appendChild(e,i)),i["x-name"]=t??void 0,i["x-publicId"]=r??void 0,i["x-systemId"]=n??void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){let t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){let r=e.children[e.children.length-1];r&&rt(r)?r.data+=t:Ir.appendChild(e,h0(t))},insertTextBefore(e,t,r){let n=e.children[e.children.indexOf(r)-1];n&&rt(n)?n.data+=t:Ir.insertBefore(e,h0(t),r)},adoptAttributes(e,t){for(let r=0;r<t.length;r++){let n=t[r].name;typeof e.attribs[n]>"u"&&(e.attribs[n]=t[r].value,e["x-attribsNamespace"][n]=t[r].namespace,e["x-attribsPrefix"][n]=t[r].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return os(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function m0(e,t,r,n){let s={scriptingEnabled:typeof t.scriptingEnabled=="boolean"?t.scriptingEnabled:!0,treeAdapter:Ir,sourceCodeLocationInfo:t.sourceCodeLocationInfo};return r?f0(e,s):d0(n,e,s)}var wE={treeAdapter:Ir};function E0(e){let t="length"in e?e:[e];for(let n=0;n<t.length;n+=1){let s=t[n];Lt(s)&&Array.prototype.splice.call(t,n,1,...s.children)}let r="";for(let n=0;n<t.length;n+=1){let s=t[n];r+=Ra(s,wE)}return r}var W;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(W||(W={}));var P;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"})(P||(P={}));function Xt(e){return e===W.Space||e===W.NewLine||e===W.Tab||e===W.FormFeed||e===W.CarriageReturn}function Js(e){return e===W.Slash||e===W.Gt||Xt(e)}function g0(e){return e>=W.Zero&&e<=W.Nine}function ME(e){return e>=W.LowerA&&e<=W.LowerZ||e>=W.UpperA&&e<=W.UpperZ}function vE(e){return e>=W.UpperA&&e<=W.UpperF||e>=W.LowerA&&e<=W.LowerF}var wt;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(wt||(wt={}));var at={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},an=class{constructor({xmlMode:t=!1,decodeEntities:r=!0},n){this.cbs=n,this.state=P.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=P.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=t,this.decodeEntities=r,this.entityTrie=t?cs:bt}reset(){this.state=P.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=P.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}getIndex(){return this.index}getSectionStart(){return this.sectionStart}stateText(t){t===W.Lt||!this.decodeEntities&&this.fastForwardTo(W.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=P.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===W.Amp&&(this.state=P.BeforeEntity)}stateSpecialStartSequence(t){let r=this.sequenceIndex===this.currentSequence.length;if(!(r?Js(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=P.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===W.Gt||Xt(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart<r){let n=this.index;this.index=r,this.cbs.ontext(this.sectionStart,r),this.index=n}this.isSpecial=!1,this.sectionStart=r+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===at.TitleEnd?this.decodeEntities&&t===W.Amp&&(this.state=P.BeforeEntity):this.fastForwardTo(W.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===W.Lt)}stateCDATASequence(t){t===at.Cdata[this.sequenceIndex]?++this.sequenceIndex===at.Cdata.length&&(this.state=P.InCommentLike,this.currentSequence=at.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=P.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===at.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=P.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!Js(t):ME(t)}startSpecial(t,r){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=r,this.state=P.SpecialStartSequence}stateBeforeTagName(t){if(t===W.ExclamationMark)this.state=P.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===W.Questionmark)this.state=P.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){let r=t|32;this.sectionStart=this.index,!this.xmlMode&&r===at.TitleEnd[2]?this.startSpecial(at.TitleEnd,3):this.state=!this.xmlMode&&r===at.ScriptEnd[2]?P.BeforeSpecialS:P.InTagName}else t===W.Slash?this.state=P.BeforeClosingTagName:(this.state=P.Text,this.stateText(t))}stateInTagName(t){Js(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=P.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){Xt(t)||(t===W.Gt?this.state=P.Text:(this.state=this.isTagStartChar(t)?P.InClosingTagName:P.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===W.Gt||Xt(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=P.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===W.Gt||this.fastForwardTo(W.Gt))&&(this.state=P.Text,this.baseState=P.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===W.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=P.InSpecialTag,this.sequenceIndex=0):this.state=P.Text,this.baseState=this.state,this.sectionStart=this.index+1):t===W.Slash?this.state=P.InSelfClosingTag:Xt(t)||(this.state=P.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===W.Gt?(this.cbs.onselfclosingtag(this.index),this.state=P.Text,this.baseState=P.Text,this.sectionStart=this.index+1,this.isSpecial=!1):Xt(t)||(this.state=P.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===W.Eq||Js(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=P.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===W.Eq?this.state=P.BeforeAttributeValue:t===W.Slash||t===W.Gt?(this.cbs.onattribend(wt.NoValue,this.index),this.state=P.BeforeAttributeName,this.stateBeforeAttributeName(t)):Xt(t)||(this.cbs.onattribend(wt.NoValue,this.index),this.state=P.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===W.DoubleQuote?(this.state=P.InAttributeValueDq,this.sectionStart=this.index+1):t===W.SingleQuote?(this.state=P.InAttributeValueSq,this.sectionStart=this.index+1):Xt(t)||(this.sectionStart=this.index,this.state=P.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,r){t===r||!this.decodeEntities&&this.fastForwardTo(r)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(r===W.DoubleQuote?wt.Double:wt.Single,this.index),this.state=P.BeforeAttributeName):this.decodeEntities&&t===W.Amp&&(this.baseState=this.state,this.state=P.BeforeEntity)}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,W.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,W.SingleQuote)}stateInAttributeValueNoQuotes(t){Xt(t)||t===W.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(wt.Unquoted,this.index),this.state=P.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===W.Amp&&(this.baseState=this.state,this.state=P.BeforeEntity)}stateBeforeDeclaration(t){t===W.OpeningSquareBracket?(this.state=P.CDATASequence,this.sequenceIndex=0):this.state=t===W.Dash?P.BeforeComment:P.InDeclaration}stateInDeclaration(t){(t===W.Gt||this.fastForwardTo(W.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=P.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===W.Gt||this.fastForwardTo(W.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=P.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===W.Dash?(this.state=P.InCommentLike,this.currentSequence=at.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=P.InDeclaration}stateInSpecialComment(t){(t===W.Gt||this.fastForwardTo(W.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=P.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){let r=t|32;r===at.ScriptEnd[3]?this.startSpecial(at.ScriptEnd,4):r===at.StyleEnd[3]?this.startSpecial(at.StyleEnd,4):(this.state=P.InTagName,this.stateInTagName(t))}stateBeforeEntity(t){this.entityExcess=1,this.entityResult=0,t===W.Number?this.state=P.BeforeNumericEntity:t===W.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=P.InNamedEntity,this.stateInNamedEntity(t))}stateInNamedEntity(t){if(this.entityExcess+=1,this.trieIndex=In(this.entityTrie,this.trieCurrent,this.trieIndex+1,t),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];let r=this.trieCurrent&Xe.VALUE_LENGTH;if(r){let n=(r>>14)-1;if(!this.allowLegacyEntity()&&t!==W.Semi)this.trieIndex+=n;else{let s=this.index-this.entityExcess+1;s>this.sectionStart&&this.emitPartial(this.sectionStart,s),this.entityResult=this.trieIndex,this.trieIndex+=n,this.entityExcess=0,this.sectionStart=this.index+1,n===0&&this.emitNamedEntity()}}}emitNamedEntity(){if(this.state=this.baseState,this.entityResult===0)return;switch((this.entityTrie[this.entityResult]&Xe.VALUE_LENGTH)>>14){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~Xe.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}stateBeforeNumericEntity(t){(t|32)===W.LowerX?(this.entityExcess++,this.state=P.InHexEntity):(this.state=P.InNumericEntity,this.stateInNumericEntity(t))}emitNumericEntity(t){let r=this.index-this.entityExcess-1;r+2+ +(this.state===P.InHexEntity)!==this.index&&(r>this.sectionStart&&this.emitPartial(this.sectionStart,r),this.sectionStart=this.index+Number(t),this.emitCodePoint(Sn(this.entityResult))),this.state=this.baseState}stateInNumericEntity(t){t===W.Semi?this.emitNumericEntity(!0):g0(t)?(this.entityResult=this.entityResult*10+(t-W.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}stateInHexEntity(t){t===W.Semi?this.emitNumericEntity(!0):g0(t)?(this.entityResult=this.entityResult*16+(t-W.Zero),this.entityExcess++):vE(t)?(this.entityResult=this.entityResult*16+((t|32)-W.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)}allowLegacyEntity(){return!this.xmlMode&&(this.baseState===P.Text||this.baseState===P.InSpecialTag)}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===P.Text||this.state===P.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===P.InAttributeValueDq||this.state===P.InAttributeValueSq||this.state===P.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){let t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case P.Text:{this.stateText(t);break}case P.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case P.InSpecialTag:{this.stateInSpecialTag(t);break}case P.CDATASequence:{this.stateCDATASequence(t);break}case P.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case P.InAttributeName:{this.stateInAttributeName(t);break}case P.InCommentLike:{this.stateInCommentLike(t);break}case P.InSpecialComment:{this.stateInSpecialComment(t);break}case P.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case P.InTagName:{this.stateInTagName(t);break}case P.InClosingTagName:{this.stateInClosingTagName(t);break}case P.BeforeTagName:{this.stateBeforeTagName(t);break}case P.AfterAttributeName:{this.stateAfterAttributeName(t);break}case P.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case P.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case P.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case P.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case P.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case P.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case P.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case P.InDeclaration:{this.stateInDeclaration(t);break}case P.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case P.BeforeComment:{this.stateBeforeComment(t);break}case P.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case P.InNamedEntity:{this.stateInNamedEntity(t);break}case P.BeforeEntity:{this.stateBeforeEntity(t);break}case P.InHexEntity:{this.stateInHexEntity(t);break}case P.InNumericEntity:{this.stateInNumericEntity(t);break}default:this.stateBeforeNumericEntity(t)}this.index++}this.cleanup()}finish(){this.state===P.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let t=this.buffer.length+this.offset;this.state===P.InCommentLike?this.currentSequence===at.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===P.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===P.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===P.InTagName||this.state===P.BeforeAttributeName||this.state===P.BeforeAttributeValue||this.state===P.AfterAttributeName||this.state===P.InAttributeName||this.state===P.InAttributeValueSq||this.state===P.InAttributeValueDq||this.state===P.InAttributeValueNq||this.state===P.InClosingTagName||this.cbs.ontext(this.sectionStart,t)}emitPartial(t,r){this.baseState!==P.Text&&this.baseState!==P.InSpecialTag?this.cbs.onattribdata(t,r):this.cbs.ontext(t,r)}emitCodePoint(t){this.baseState!==P.Text&&this.baseState!==P.InSpecialTag?this.cbs.onattribentity(t):this.cbs.ontextentity(t)}};var un=new Set(["input","option","optgroup","select","button","datalist","textarea"]),_e=new Set(["p"]),b0=new Set(["thead","tbody"]),T0=new Set(["dd","dt"]),A0=new Set(["rt","rp"]),FE=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",_e],["h1",_e],["h2",_e],["h3",_e],["h4",_e],["h5",_e],["h6",_e],["select",un],["input",un],["output",un],["button",un],["datalist",un],["textarea",un],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",T0],["dt",T0],["address",_e],["article",_e],["aside",_e],["blockquote",_e],["details",_e],["div",_e],["dl",_e],["fieldset",_e],["figcaption",_e],["figure",_e],["footer",_e],["form",_e],["header",_e],["hr",_e],["main",_e],["nav",_e],["ol",_e],["pre",_e],["section",_e],["table",_e],["ul",_e],["rt",A0],["rp",A0],["tbody",b0],["tfoot",b0]]),BE=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),_0=new Set(["math","svg"]),C0=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),kE=/\s|\//,zn=class{constructor(t,r={}){var n,s,i,u,o;this.options=r,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.lowerCaseTagNames=(n=r.lowerCaseTags)!==null&&n!==void 0?n:!r.xmlMode,this.lowerCaseAttributeNames=(s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode,this.tokenizer=new((i=r.Tokenizer)!==null&&i!==void 0?i:an)(this.options,this),(o=(u=this.cbs).onparserinit)===null||o===void 0||o.call(u,this)}ontext(t,r){var n,s;let i=this.getSlice(t,r);this.endIndex=r-1,(s=(n=this.cbs).ontext)===null||s===void 0||s.call(n,i),this.startIndex=r}ontextentity(t){var r,n;let s=this.tokenizer.getSectionStart();this.endIndex=s-1,(n=(r=this.cbs).ontext)===null||n===void 0||n.call(r,Yr(t)),this.startIndex=s}isVoidElement(t){return!this.options.xmlMode&&BE.has(t)}onopentagname(t,r){this.endIndex=r;let n=this.getSlice(t,r);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(t){var r,n,s,i;this.openTagStart=this.startIndex,this.tagname=t;let u=!this.options.xmlMode&&FE.get(t);if(u)for(;this.stack.length>0&&u.has(this.stack[this.stack.length-1]);){let o=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,o,!0)}this.isVoidElement(t)||(this.stack.push(t),_0.has(t)?this.foreignContext.push(!0):C0.has(t)&&this.foreignContext.push(!1)),(i=(s=this.cbs).onopentagname)===null||i===void 0||i.call(s,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){var n,s,i,u,o,l;this.endIndex=r;let p=this.getSlice(t,r);if(this.lowerCaseTagNames&&(p=p.toLowerCase()),(_0.has(p)||C0.has(p))&&this.foreignContext.pop(),this.isVoidElement(p))!this.options.xmlMode&&p==="br"&&((s=(n=this.cbs).onopentagname)===null||s===void 0||s.call(n,"br"),(u=(i=this.cbs).onopentag)===null||u===void 0||u.call(i,"br",{},!0),(l=(o=this.cbs).onclosetag)===null||l===void 0||l.call(o,"br",!1));else{let E=this.stack.lastIndexOf(p);if(E!==-1)if(this.cbs.onclosetag){let A=this.stack.length-E;for(;A--;)this.cbs.onclosetag(this.stack.pop(),A!==0)}else this.stack.length=E;else!this.options.xmlMode&&p==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var r,n;let s=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===s&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,s,!t),this.stack.pop())}onattribname(t,r){this.startIndex=t;let n=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=Yr(t)}onattribend(t,r){var n,s;this.endIndex=r,(s=(n=this.cbs).onattribute)===null||s===void 0||s.call(n,this.attribname,this.attribvalue,t===wt.Double?'"':t===wt.Single?"'":t===wt.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(kE),n=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let s=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${s}`,`!${n}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let s=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${s}`,`?${n}`)}this.startIndex=r+1}oncomment(t,r,n){var s,i,u,o;this.endIndex=r,(i=(s=this.cbs).oncomment)===null||i===void 0||i.call(s,this.getSlice(t,r-n)),(o=(u=this.cbs).oncommentend)===null||o===void 0||o.call(u),this.startIndex=r+1}oncdata(t,r,n){var s,i,u,o,l,p,E,A,g,y;this.endIndex=r;let w=this.getSlice(t,r-n);this.options.xmlMode||this.options.recognizeCDATA?((i=(s=this.cbs).oncdatastart)===null||i===void 0||i.call(s),(o=(u=this.cbs).ontext)===null||o===void 0||o.call(u,w),(p=(l=this.cbs).oncdataend)===null||p===void 0||p.call(l)):((A=(E=this.cbs).oncomment)===null||A===void 0||A.call(E,`[CDATA[${w}]]`),(y=(g=this.cbs).oncommentend)===null||y===void 0||y.call(g)),this.startIndex=r+1}onend(){var t,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(t=this.cbs).onend)===null||r===void 0||r.call(t)}reset(){var t,r,n,s;(r=(t=this.cbs).onreset)===null||r===void 0||r.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(n=this.cbs).onparserinit)===null||s===void 0||s.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,r){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}};function N0(e,t){let r=new qr(void 0,t);return new zn(r,t).end(e),r.root}var UE=Ec((e,t,r,n)=>t.xmlMode||t._useHtmlParser2?N0(e,t):m0(e,t,r,n)),La=Nc(UE,(e,t)=>t.xmlMode||t._useHtmlParser2?ds(e,t):E0(e)),KA=La([]),{contains:ZA}=rr,{merge:JA}=rr,{parseHTML:e_}=rr,{root:t_}=rr;import O0 from"express";import jE from"node:net";import qE from"node:os";var ei=class extends Error{constructor(t){super(`${t} is locked`)}},on={old:new Set,young:new Set},YE=1e3*15;var Kn,GE=()=>{let e=qE.networkInterfaces(),t=new Set([void 0,"0.0.0.0"]);for(let r of Object.values(e))for(let n of r)t.add(n.address);return t},S0=e=>new Promise((t,r)=>{let n=jE.createServer();n.unref(),n.on("error",r),n.listen(e,()=>{let{port:s}=n.address();n.close(()=>{t(s)})})}),I0=async(e,t)=>{if(e.host||e.port===0)return S0(e);for(let r of t)try{await S0({port:e.port,host:r})}catch(n){if(!["EADDRNOTAVAIL","EINVAL"].includes(n.code))throw n}return e.port},VE=function*(e){e&&(yield*e),yield 0};async function ya(e){let t,r=new Set;if(e&&(e.port&&(t=typeof e.port=="number"?[e.port]:e.port),e.exclude)){let s=e.exclude;if(typeof s[Symbol.iterator]!="function")throw new TypeError("The `exclude` option must be an iterable.");for(let i of s){if(typeof i!="number")throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded.");if(!Number.isSafeInteger(i))throw new TypeError(`Number ${i} in the exclude option is not a safe integer and can't be used`)}r=new Set(s)}Kn===void 0&&(Kn=setTimeout(()=>{Kn=void 0,on.old=on.young,on.young=new Set},YE),Kn.unref&&Kn.unref());let n=GE();for(let s of VE(t))try{if(r.has(s))continue;let i=await I0({...e,port:s},n);for(;on.old.has(i)||on.young.has(i);){if(s!==0)throw new ei(s);i=await I0({...e,port:s},n)}return on.young.add(i),i}catch(i){if(!["EADDRINUSE","EACCES"].includes(i.code)&&!(i instanceof ei))throw i}throw new Error("No available ports found")}import ti from"node:fs/promises";import y0 from"node:os";import Qt from"node:path";import{dirname as WE}from"node:path";import{fileURLToPath as $E}from"node:url";import XE from"puppeteer";var wa=lt(x0(),1),QE={darkMode:!1,format:"svg",frames:!1,name:void 0,output:"./",stripStyle:!1,transparent:!1,verbose:!1};async function D0(e,t){let r={...QE,...eg(t??{})},{darkMode:n,format:s,frames:i,name:u,output:o,stripStyle:l,transparent:p,verbose:E}=r;l&&s==="png"&&console.warn("Warning: --strip-style is only supported for SVG output"),E&&console.time("Export time");let A=Li(e,{requireFileExistence:!0,validFileExtensions:[".tldr"],validHostnames:["www.tldraw.com"]}),g=typeof A=="string";E&&console.log(g?"Local file detected":"tldraw URL detected");let y=u===void 0?g?Qt.basename(A,Qt.extname(A)):A.pathname.split("/").pop()??A.pathname:ig(u,s),w=0,M;if(g){E&&console.log("Starting tldraw server...");let Le=WE($E(import.meta.url)),ue=Qt.join(Le,Le.endsWith("/src/lib")?"../../dist/tldraw":Le.endsWith("/dist/lib")?"../tldraw":"../dist/tldraw");E&&console.log(`tldraw served from "${ue}"`),M=await KE(ue),w=M.address().port,E&&console.log(`tldraw hosted at "http://localhost:${w}"`)}E&&console.log("Starting Puppeteer...");let x=await XE.launch({args:g?["--no-sandbox","--disable-web-security"]:[],headless:"new"}),q=await x.newPage();sg(q,E);let Z=await q.target().createCDPSession();if(await Z.send("Browser.setDownloadBehavior",{behavior:"allowAndName",downloadPath:y0.tmpdir(),eventsEnabled:!0}),g){await q.setRequestInterception(!0),q.on("request",ue=>{ue.url().endsWith("favicon.ico")?ue.respond({status:200}):ue.continue()}),E&&console.log(`Loading tldr file "${A}"`);let Le=await ti.readFile(A,"utf8");await q.evaluateOnNewDocument(ue=>{localStorage.clear(),localStorage.setItem("tldrData",ue)},Le)}let ne=g?`http://localhost:${w}`:A.href;E&&console.log(`Navigating to: ${ne}`),await q.goto(ne,{waitUntil:"networkidle0"});let te=await q.evaluate("editor.getCurrentPageShapes().length");if(E&&console.log(`Shape count: ${te}`),te===0)throw new Error("The sketch is empty");E&&console.log(`Setting background transparency: ${p}`),await ng(q,p),E&&console.log(`Setting dark mode: ${n}`);let ae=await rg(q);await L0(q,n);let Ue=[],ye=i?await q.evaluate(`editor.getCurrentPageShapes().reduce((accumulator, shape) => {
4
11
  if (shape.type === 'frame') {
5
12
  accumulator.push({ id: shape.id, name: shape.props.name })
6
13
  }
7
14
  return accumulator
8
- }, [])`):[];if(s&&k.length===0&&console.warn("No frames found in the sketch, exporting entire page instead."),s&&k.length>0){let de=!1,ne=[];if(typeof s=="boolean")ne=k;else if(Array.isArray(s))for(let q of s){let R=k.find(P=>P.name===q)??k.find(P=>P.id===(q.startsWith("shape:")?q:`shape:${q}`));if(!R)throw new Error(`No frame found matching: "${q}"`);ne.push(R)}if(ne.length===0)throw new Error("No frames found matching the specified frames");let We=ne.map(q=>(0,mn.slugify)(q.name)),Ue=[...new Set(We)];de=We.length!==Ue.length,b&&de&&console.warn("Frame names are not unique, including frame IDs in the output filenames to avoid collisions");for(let q of ne){b&&console.log(`Downloading sketch frame: "${q.name}"`),await S.evaluate("editor.selectNone()"),await S.evaluate(`editor.select('${q.id}')`);let R=(de?`-${q.id.replace("shape:","")}`:"")+`-${(0,mn.slugify)(q.name)}`,P=await Fr(S,x,c,w+R,r);b&&console.log(`Download complete, saved to: "${P}"`),K.push(P)}}else b&&console.log("Downloading sketch"),K=await Fr(S,x,c,w,r),b&&console.log(`Download complete, saved to: "${K}"`);return b&&console.log(`Restoring dark mode: ${X}`),await Mr(S,X),await F.close(),b&&console.log("Stopped Puppeteer"),E&&_&&(_.close(),b&&console.log("Stopped tldraw server")),b&&console.timeEnd("Export time"),K}async function Fr(i,e,t,n,r){let s=Xo(e);await Jo(i),await ko(i,["main.menu","menu-item.edit","menu-item.export-as",`menu-item.export-as-${r}`]);let c=await s;await i.waitForNetworkIdle();let d=wt.join(Nr.tmpdir(),c),b=wt.resolve(At(wt.join(t,`${n}.${r}`)));return await Rr.rename(d,b),b}function qo(i,e){i.on("console",t=>{let n=t.type(),r=t.text();n==="error"?console.error(`[Browser] ${r}`):n==="warning"?console.warn(`[Browser] ${r}`):e&&console.log(`[Browser] ${r}`)})}async function Ko(i){let e=Ir(),t=await dn();return e.use(Ir.static(i)),new Promise((n,r)=>{let s=e.listen(t,()=>{n(s)});s.on("error",c=>{r(c)})})}async function Xo(i){return new Promise((e,t)=>{i.on("Browser.downloadProgress",n=>{n.state==="completed"?e(n.guid):n.state==="canceled"&&t(new Error("Download was canceled"))})})}async function ko(i,e){for(let t of e)await i.waitForSelector(`[data-testid="${t}"]`),await i.click(`[data-testid="${t}"]`)}function Zo(i){return Object.fromEntries(Object.entries(i).filter(([,e])=>e!==void 0))}async function Jo(i){await i.evaluate("app.clearOpenMenus()")}async function Qo(i){return!!await i.evaluate("editor.user.getUserPreferences().isDarkMode")}async function Mr(i,e){await i.evaluate(`editor.user.updateUserPreferences({ isDarkMode: ${e}})`)}async function ea(i,e){await i.evaluate(`editor.updateInstanceState(
9
- { exportBackground: ${!e} },
15
+ }, [])`):[];if(i&&ye.length===0&&console.warn("No frames found in the sketch, exporting entire page instead."),i&&ye.length>0){let Le=!1,ue=[];if(typeof i=="boolean")ue=ye;else if(Array.isArray(i))for(let F of i){let B=ye.find(V=>V.name===F)??ye.find(V=>V.id===(F.startsWith("shape:")?F:`shape:${F}`));if(!B)throw new Error(`No frame found matching: "${F}"`);ue.push(B)}if(ue.length===0)throw new Error("No frames found matching the specified frames");let le=ue.map(F=>(0,wa.slugify)(F.name)),G=[...new Set(le)];Le=le.length!==G.length,E&&Le&&console.warn("Frame names are not unique, including frame IDs in the output filenames to avoid collisions");for(let F of ue){E&&console.log(`Downloading sketch frame: "${F.name}"`),await q.evaluate("editor.selectNone()"),await q.evaluate(`editor.select('${F.id}')`);let B=(Le?`-${F.id.replace("shape:","")}`:"")+`-${(0,wa.slugify)(F.name)}`,V=await R0(q,Z,o,y+B,s,l);E&&console.log(`Download complete, saved to: "${V}"`),Ue.push(V)}}else E&&console.log("Downloading sketch"),Ue=await R0(q,Z,o,y,s,l),E&&console.log(`Download complete, saved to: "${Ue}"`);return E&&console.log(`Restoring dark mode: ${ae}`),await L0(q,ae),await x.close(),E&&console.log("Stopped Puppeteer"),g&&M&&(M.close(),E&&console.log("Stopped tldraw server")),E&&console.timeEnd("Export time"),Ue}async function R0(e,t,r,n,s,i){let u=ZE(t);await tg(e),await JE(e,["main.menu","menu-item.edit","menu-item.export-as",`menu-item.export-as-${s}`]);let o=await u;await e.waitForNetworkIdle();let l=Qt.join(y0.tmpdir(),o),p=Qt.resolve(gn(Qt.join(r,`${n}.${s}`)));if(await ti.rename(l,p),i&&s==="svg"){let E=await ti.readFile(p,"utf8"),A=zE(E);await ti.writeFile(p,A)}return p}function zE(e){let t=La(e,{xmlMode:!0});return t("style").remove(),t.xml()}async function KE(e){let t=O0(),r=await ya();return t.use(O0.static(e)),new Promise((n,s)=>{let i=t.listen(r,()=>{n(i)});i.on("error",u=>{s(u)})})}async function ZE(e){return new Promise((t,r)=>{e.on("Browser.downloadProgress",n=>{n.state==="completed"?t(n.guid):n.state==="canceled"&&r(new Error("Download was canceled"))})})}async function JE(e,t){for(let r of t)await e.waitForSelector(`[data-testid="${r}"]`),await e.click(`[data-testid="${r}"]`)}function eg(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function tg(e){await e.evaluate("app.clearOpenMenus()")}async function rg(e){return!!await e.evaluate("editor.user.getUserPreferences().isDarkMode")}async function L0(e,t){await e.evaluate(`editor.user.updateUserPreferences({ isDarkMode: ${t}})`)}async function ng(e,t){await e.evaluate(`editor.updateInstanceState(
16
+ { exportBackground: ${!t} },
10
17
  { ephemeral: true },
11
- )`)}import{notStrictEqual as Sa,strictEqual as Ca}from"assert";var ta={right:oa,center:aa},na=0,Wt=1,ra=2,Ut=3,bn=class{constructor(e){var t;this.width=e.width,this.wrap=(t=e.wrap)!==null&&t!==void 0?t:!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]=="string")return this.applyLayoutDSL(e[0]);let t=e.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]=="string"&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
12
- `).map(r=>r.split(" ")),n=0;return t.forEach(r=>{r.length>1&&Ie.stringWidth(r[0])>n&&(n=Math.min(Math.floor(this.width*.5),Ie.stringWidth(r[0])))}),t.forEach(r=>{this.div(...r.map((s,c)=>({text:s.trim(),padding:this.measurePadding(s),width:c===0&&r.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=Ie.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(t=>!t.hidden).map(t=>t.text).join(`
13
- `)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let s="";n.forEach((c,d)=>{let{width:b}=e[d],y=this.negatePadding(e[d]),E=c;if(y>Ie.stringWidth(c)&&(E+=" ".repeat(y-Ie.stringWidth(c))),e[d].align&&e[d].align!=="left"&&this.wrap){let f=ta[e[d].align];E=f(E,y),Ie.stringWidth(E)<y&&(E+=" ".repeat((b||0)-Ie.stringWidth(E)-1))}let w=e[d].padding||[0,0,0,0];w[Ut]&&(s+=" ".repeat(w[Ut])),s+=Tr(e[d],E,"| "),s+=E,s+=Tr(e[d],E," |"),w[Wt]&&(s+=" ".repeat(w[Wt])),r===0&&t.length>0&&(s=this.renderInline(s,t[t.length-1]))}),t.push({text:s.replace(/ +$/,""),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,s=t.text,c=Ie.stringWidth(s.trimRight());return t.span?this.wrap?r<c?e:(t.hidden=!0,s.trimRight()+" ".repeat(r-c)+e.trimLeft()):(t.hidden=!0,s+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((s,c)=>{s.width=n[c],this.wrap?r=Ie.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
14
- `):r=s.text.split(`
15
- `),s.border&&(r.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),r.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(r.unshift(...new Array(s.padding[na]||0).fill("")),r.push(...new Array(s.padding[ra]||0).fill(""))),r.forEach((d,b)=>{t[b]||t.push([]);let y=t[b];for(let E=0;E<c;E++)y[E]===void 0&&y.push("");y.push(d)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Ut]||0)+(e.padding[Wt]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(c=>c.width||Ie.stringWidth(c.text));let t=e.length,n=this.width,r=e.map(c=>{if(c.width)return t--,n-=c.width,c.width}),s=t?Math.floor(n/t):0;return r.map((c,d)=>c===void 0?Math.max(s,ia(e[d])):c)}};function Tr(i,e,t){return i.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function ia(i){let e=i.padding||[],t=1+(e[Ut]||0)+(e[Wt]||0);return i.border?t+4:t}function sa(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function oa(i,e){i=i.trim();let t=Ie.stringWidth(i);return t<e?" ".repeat(e-t)+i:i}function aa(i,e){i=i.trim();let t=Ie.stringWidth(i);return t>=e?i:" ".repeat(e-t>>1)+i}var Ie;function $r(i,e){return Ie=e,new bn({width:i?.width||sa(),wrap:i?.wrap})}var Lr=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function wn(i){return i.replace(Lr,"")}function Wr(i,e){let[t,n]=i.match(Lr)||["",""];i=wn(i);let r="";for(let s=0;s<i.length;s++)s!==0&&s%e===0&&(r+=`
16
- `),r+=i.charAt(s);return t&&n&&(r=`${t}${r}${n}`),r}function xn(i){return $r(i,{stringWidth:e=>[...e].length,stripAnsi:wn,wrap:Wr})}import{dirname as Ur,resolve as Br}from"path";import{readdirSync as ua,statSync as ca}from"fs";function Gr(i,e){let t=Br(".",i),n;for(ca(t).isDirectory()||(t=Ur(t));;){if(n=e(t,ua(t)),n)return Br(t,n);if(t=Ur(n=t),n===t)break}}import{inspect as Aa}from"util";import{readFileSync as ja}from"fs";import{fileURLToPath as Pa}from"url";import{format as ha}from"util";import{normalize as da,resolve as pa}from"path";function rt(i){if(i!==i.toLowerCase()&&i!==i.toUpperCase()||(i=i.toLowerCase()),i.indexOf("-")===-1&&i.indexOf("_")===-1)return i;{let t="",n=!1,r=i.match(/^-+/);for(let s=r?r[0].length:0;s<i.length;s++){let c=i.charAt(s);n&&(n=!1,c=c.toUpperCase()),s!==0&&(c==="-"||c==="_")?n=!0:c!=="-"&&c!=="_"&&(t+=c)}return t}}function Bt(i,e){let t=i.toLowerCase();e=e||"-";let n="";for(let r=0;r<i.length;r++){let s=t.charAt(r),c=i.charAt(r);s!==c&&r>0?n+=`${e}${t.charAt(r)}`:n+=c}return n}function Gt(i){return i==null?!1:typeof i=="number"||/^0x[0-9a-f]+$/i.test(i)?!0:/^0[^.]/.test(i)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(i)}function zr(i){if(Array.isArray(i))return i.map(c=>typeof c!="string"?c+"":c);i=i.trim();let e=0,t=null,n=null,r=null,s=[];for(let c=0;c<i.length;c++){if(t=n,n=i.charAt(c),n===" "&&!r){t!==" "&&e++;continue}n===r?r=null:(n==="'"||n==='"')&&!r&&(r=n),s[e]||(s[e]=""),s[e]+=n}return s}var Ne;(function(i){i.BOOLEAN="boolean",i.STRING="string",i.NUMBER="number",i.ARRAY="array"})(Ne||(Ne={}));var Ke,zt=class{constructor(e){Ke=e}parse(e,t){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},t),r=zr(e),s=typeof e=="string",c=la(Object.assign(Object.create(null),n.alias)),d=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),b=Object.assign(Object.create(null),n.default),y=n.configObjects||[],E=n.envPrefix,w=d["populate--"],f=w?"--":"_",_=Object.create(null),F=Object.create(null),S=n.__||Ke.format,x={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},B=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,G=new RegExp("^--"+d["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(h){let m=typeof h=="object"?h.key:h,C=Object.keys(h).map(function(O){return{boolean:"bools",string:"strings",number:"numbers"}[O]}).filter(Boolean).pop();C&&(x[C][m]=!0),x.arrays[m]=!0,x.keys.push(m)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(h){x.bools[h]=!0,x.keys.push(h)}),[].concat(n.string||[]).filter(Boolean).forEach(function(h){x.strings[h]=!0,x.keys.push(h)}),[].concat(n.number||[]).filter(Boolean).forEach(function(h){x.numbers[h]=!0,x.keys.push(h)}),[].concat(n.count||[]).filter(Boolean).forEach(function(h){x.counts[h]=!0,x.keys.push(h)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(h){x.normalize[h]=!0,x.keys.push(h)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([h,m])=>{typeof m=="number"&&(x.nargs[h]=m,x.keys.push(h))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([h,m])=>{typeof m=="function"&&(x.coercions[h]=m,x.keys.push(h))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(h){x.configs[h]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([h,m])=>{(typeof m=="boolean"||typeof m=="function")&&(x.configs[h]=m)})),Be(n.key,c,n.default,x.arrays),Object.keys(b).forEach(function(h){(x.aliases[h]||[]).forEach(function(m){b[m]=b[h]})});let X=null;tt();let K=[],k=Object.assign(Object.create(null),{_:[]}),de={};for(let h=0;h<r.length;h++){let m=r[h],C=m.replace(/^-{3,}/,"---"),O,g,I,j,M,me;if(m!=="--"&&/^-/.test(m)&&re(m))ne(m);else if(C.match(/^---+(=|$)/)){ne(m);continue}else if(m.match(/^--.+=/)||!d["short-option-groups"]&&m.match(/^-.+=/))j=m.match(/^--?([^=]+)=([\s\S]*)$/),j!==null&&Array.isArray(j)&&j.length>=3&&(W(j[1],x.arrays)?h=Ue(h,j[1],r,j[2]):W(j[1],x.nargs)!==!1?h=We(h,j[1],r,j[2]):q(j[1],j[2],!0));else if(m.match(G)&&d["boolean-negation"])j=m.match(G),j!==null&&Array.isArray(j)&&j.length>=2&&(g=j[1],q(g,W(g,x.arrays)?[!1]:!1));else if(m.match(/^--.+/)||!d["short-option-groups"]&&m.match(/^-[^-]+/))j=m.match(/^--?(.+)/),j!==null&&Array.isArray(j)&&j.length>=2&&(g=j[1],W(g,x.arrays)?h=Ue(h,g,r):W(g,x.nargs)!==!1?h=We(h,g,r):(M=r[h+1],M!==void 0&&(!M.match(/^-/)||M.match(B))&&!W(g,x.bools)&&!W(g,x.counts)||/^(true|false)$/.test(M)?(q(g,M),h++):q(g,se(g))));else if(m.match(/^-.\..+=/))j=m.match(/^-([^=]+)=([\s\S]*)$/),j!==null&&Array.isArray(j)&&j.length>=3&&q(j[1],j[2]);else if(m.match(/^-.\..+/)&&!m.match(B))M=r[h+1],j=m.match(/^-(.\..+)/),j!==null&&Array.isArray(j)&&j.length>=2&&(g=j[1],M!==void 0&&!M.match(/^-/)&&!W(g,x.bools)&&!W(g,x.counts)?(q(g,M),h++):q(g,se(g)));else if(m.match(/^-[^-]+/)&&!m.match(B)){I=m.slice(1,-1).split(""),O=!1;for(let ye=0;ye<I.length;ye++){if(M=m.slice(ye+2),I[ye+1]&&I[ye+1]==="="){me=m.slice(ye+3),g=I[ye],W(g,x.arrays)?h=Ue(h,g,r,me):W(g,x.nargs)!==!1?h=We(h,g,r,me):q(g,me),O=!0;break}if(M==="-"){q(I[ye],M);continue}if(/[A-Za-z]/.test(I[ye])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(M)&&W(M,x.bools)===!1){q(I[ye],M),O=!0;break}if(I[ye+1]&&I[ye+1].match(/\W/)){q(I[ye],M),O=!0;break}else q(I[ye],se(I[ye]))}g=m.slice(-1)[0],!O&&g!=="-"&&(W(g,x.arrays)?h=Ue(h,g,r):W(g,x.nargs)!==!1?h=We(h,g,r):(M=r[h+1],M!==void 0&&(!/^(-|--)[^-]/.test(M)||M.match(B))&&!W(g,x.bools)&&!W(g,x.counts)||/^(true|false)$/.test(M)?(q(g,M),h++):q(g,se(g))))}else if(m.match(/^-[0-9]$/)&&m.match(B)&&W(m.slice(1),x.bools))g=m.slice(1),q(g,se(g));else if(m==="--"){K=r.slice(h+1);break}else if(d["halt-at-non-option"]){K=r.slice(h);break}else ne(m)}Q(k,!0),Q(k,!1),H(k),pe(),ue(k,x.aliases,b,!0),ge(k),d["set-placeholder-key"]&&Ve(k),Object.keys(x.counts).forEach(function(h){Oe(k,h.split("."))||q(h,0)}),w&&K.length&&(k[f]=[]),K.forEach(function(h){k[f].push(h)}),d["camel-case-expansion"]&&d["strip-dashed"]&&Object.keys(k).filter(h=>h!=="--"&&h.includes("-")).forEach(h=>{delete k[h]}),d["strip-aliased"]&&[].concat(...Object.keys(c).map(h=>c[h])).forEach(h=>{d["camel-case-expansion"]&&h.includes("-")&&delete k[h.split(".").map(m=>rt(m)).join(".")],delete k[h]});function ne(h){let m=N("_",h);(typeof m=="string"||typeof m=="number")&&k._.push(m)}function We(h,m,C,O){let g,I=W(m,x.nargs);if(I=typeof I!="number"||isNaN(I)?1:I,I===0)return je(O)||(X=Error(S("Argument unexpected for: %s",m))),q(m,se(m)),h;let j=je(O)?0:1;if(d["nargs-eats-options"])C.length-(h+1)+j<I&&(X=Error(S("Not enough arguments following: %s",m))),j=I;else{for(g=h+1;g<C.length&&(!C[g].match(/^-[^0-9]/)||C[g].match(B)||re(C[g]));g++)j++;j<I&&(X=Error(S("Not enough arguments following: %s",m)))}let M=Math.min(j,I);for(!je(O)&&M>0&&(q(m,O),M--),g=h+1;g<M+h+1;g++)q(m,C[g]);return h+M}function Ue(h,m,C,O){let g=[],I=O||C[h+1],j=W(m,x.nargs);if(W(m,x.bools)&&!/^(true|false)$/.test(I))g.push(!0);else if(je(I)||je(O)&&/^-/.test(I)&&!B.test(I)&&!re(I)){if(b[m]!==void 0){let M=b[m];g=Array.isArray(M)?M:[M]}}else{je(O)||g.push(P(m,O,!0));for(let M=h+1;M<C.length&&!(!d["greedy-arrays"]&&g.length>0||j&&typeof j=="number"&&g.length>=j||(I=C[M],/^-/.test(I)&&!B.test(I)&&!re(I)));M++)h=M,g.push(P(m,I,s))}return typeof j=="number"&&(j&&g.length<j||isNaN(j)&&g.length===0)&&(X=Error(S("Not enough arguments following: %s",m))),q(m,g),h}function q(h,m,C=s){if(/-/.test(h)&&d["camel-case-expansion"]){let I=h.split(".").map(function(j){return rt(j)}).join(".");R(h,I)}let O=P(h,m,C),g=h.split(".");_e(k,g,O),x.aliases[h]&&x.aliases[h].forEach(function(I){let j=I.split(".");_e(k,j,O)}),g.length>1&&d["dot-notation"]&&(x.aliases[g[0]]||[]).forEach(function(I){let j=I.split("."),M=[].concat(g);M.shift(),j=j.concat(M),(x.aliases[h]||[]).includes(j.join("."))||_e(k,j,O)}),W(h,x.normalize)&&!W(h,x.arrays)&&[h].concat(x.aliases[h]||[]).forEach(function(j){Object.defineProperty(de,j,{enumerable:!0,get(){return m},set(M){m=typeof M=="string"?Ke.normalize(M):M}})})}function R(h,m){x.aliases[h]&&x.aliases[h].length||(x.aliases[h]=[m],_[m]=!0),x.aliases[m]&&x.aliases[m].length||R(m,h)}function P(h,m,C){C&&(m=fa(m)),(W(h,x.bools)||W(h,x.counts))&&typeof m=="string"&&(m=m==="true");let O=Array.isArray(m)?m.map(function(g){return N(h,g)}):N(h,m);return W(h,x.counts)&&(je(O)||typeof O=="boolean")&&(O=yn()),W(h,x.normalize)&&W(h,x.arrays)&&(Array.isArray(m)?O=m.map(g=>Ke.normalize(g)):O=Ke.normalize(m)),O}function N(h,m){return!d["parse-positional-numbers"]&&h==="_"||!W(h,x.strings)&&!W(h,x.bools)&&!Array.isArray(m)&&(Gt(m)&&d["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${m}`)))||!je(m)&&W(h,x.numbers))&&(m=Number(m)),m}function H(h){let m=Object.create(null);ue(m,x.aliases,b),Object.keys(x.configs).forEach(function(C){let O=h[C]||m[C];if(O)try{let g=null,I=Ke.resolve(Ke.cwd(),O),j=x.configs[C];if(typeof j=="function"){try{g=j(I)}catch(M){g=M}if(g instanceof Error){X=g;return}}else g=Ke.require(I);ee(g)}catch(g){g.name==="PermissionDenied"?X=g:h[C]&&(X=Error(S("Invalid JSON config file: %s",O)))}})}function ee(h,m){Object.keys(h).forEach(function(C){let O=h[C],g=m?m+"."+C:C;typeof O=="object"&&O!==null&&!Array.isArray(O)&&d["dot-notation"]?ee(O,g):(!Oe(k,g.split("."))||W(g,x.arrays)&&d["combine-arrays"])&&q(g,O)})}function pe(){typeof y<"u"&&y.forEach(function(h){ee(h)})}function Q(h,m){if(typeof E>"u")return;let C=typeof E=="string"?E:"",O=Ke.env();Object.keys(O).forEach(function(g){if(C===""||g.lastIndexOf(C,0)===0){let I=g.split("__").map(function(j,M){return M===0&&(j=j.substring(C.length)),rt(j)});(m&&x.configs[I.join(".")]||!m)&&!Oe(h,I)&&q(I.join("."),O[g])}})}function ge(h){let m,C=new Set;Object.keys(h).forEach(function(O){if(!C.has(O)&&(m=W(O,x.coercions),typeof m=="function"))try{let g=N(O,m(h[O]));[].concat(x.aliases[O]||[],O).forEach(I=>{C.add(I),h[I]=g})}catch(g){X=g}})}function Ve(h){return x.keys.forEach(m=>{~m.indexOf(".")||typeof h[m]>"u"&&(h[m]=void 0)}),h}function ue(h,m,C,O=!1){Object.keys(C).forEach(function(g){Oe(h,g.split("."))||(_e(h,g.split("."),C[g]),O&&(F[g]=!0),(m[g]||[]).forEach(function(I){Oe(h,I.split("."))||_e(h,I.split("."),C[g])}))})}function Oe(h,m){let C=h;d["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(g){C=C[g]||{}});let O=m[m.length-1];return typeof C!="object"?!1:O in C}function _e(h,m,C){let O=h;d["dot-notation"]||(m=[m.join(".")]),m.slice(0,-1).forEach(function(me){me=Hr(me),typeof O=="object"&&O[me]===void 0&&(O[me]={}),typeof O[me]!="object"||Array.isArray(O[me])?(Array.isArray(O[me])?O[me].push({}):O[me]=[O[me],{}],O=O[me][O[me].length-1]):O=O[me]});let g=Hr(m[m.length-1]),I=W(m.join("."),x.arrays),j=Array.isArray(C),M=d["duplicate-arguments-array"];!M&&W(g,x.nargs)&&(M=!0,(!je(O[g])&&x.nargs[g]===1||Array.isArray(O[g])&&O[g].length===x.nargs[g])&&(O[g]=void 0)),C===yn()?O[g]=yn(O[g]):Array.isArray(O[g])?M&&I&&j?O[g]=d["flatten-duplicate-arrays"]?O[g].concat(C):(Array.isArray(O[g][0])?O[g]:[O[g]]).concat([C]):!M&&!!I==!!j?O[g]=C:O[g]=O[g].concat([C]):O[g]===void 0&&I?O[g]=j?C:[C]:M&&!(O[g]===void 0||W(g,x.counts)||W(g,x.bools))?O[g]=[O[g],C]:O[g]=C}function Be(...h){h.forEach(function(m){Object.keys(m||{}).forEach(function(C){x.aliases[C]||(x.aliases[C]=[].concat(c[C]||[]),x.aliases[C].concat(C).forEach(function(O){if(/-/.test(O)&&d["camel-case-expansion"]){let g=rt(O);g!==C&&x.aliases[C].indexOf(g)===-1&&(x.aliases[C].push(g),_[g]=!0)}}),x.aliases[C].concat(C).forEach(function(O){if(O.length>1&&/[A-Z]/.test(O)&&d["camel-case-expansion"]){let g=Bt(O,"-");g!==C&&x.aliases[C].indexOf(g)===-1&&(x.aliases[C].push(g),_[g]=!0)}}),x.aliases[C].forEach(function(O){x.aliases[O]=[C].concat(x.aliases[C].filter(function(g){return O!==g}))}))})})}function W(h,m){let C=[].concat(x.aliases[h]||[],h),O=Object.keys(m),g=C.find(I=>O.includes(I));return g?m[g]:!1}function _t(h){let m=Object.keys(x);return[].concat(m.map(O=>x[O])).some(function(O){return Array.isArray(O)?O.includes(h):O[h]})}function U(h,...m){return[].concat(...m).some(function(O){let g=h.match(O);return g&&_t(g[1])})}function ie(h){if(h.match(B)||!h.match(/^-[^-]+/))return!1;let m=!0,C,O=h.slice(1).split("");for(let g=0;g<O.length;g++){if(C=h.slice(g+2),!_t(O[g])){m=!1;break}if(O[g+1]&&O[g+1]==="="||C==="-"||/[A-Za-z]/.test(O[g])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(C)||O[g+1]&&O[g+1].match(/\W/))break}return m}function re(h){return d["unknown-options-as-args"]&&Y(h)}function Y(h){return h=h.replace(/^-{3,}/,"--"),h.match(B)||ie(h)?!1:!U(h,/^-+([^=]+?)=[\s\S]*$/,G,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function se(h){return!W(h,x.bools)&&!W(h,x.counts)&&`${h}`in b?b[h]:fe(Ae(h))}function fe(h){return{[Ne.BOOLEAN]:!0,[Ne.STRING]:"",[Ne.NUMBER]:void 0,[Ne.ARRAY]:[]}[h]}function Ae(h){let m=Ne.BOOLEAN;return W(h,x.strings)?m=Ne.STRING:W(h,x.numbers)?m=Ne.NUMBER:W(h,x.bools)?m=Ne.BOOLEAN:W(h,x.arrays)&&(m=Ne.ARRAY),m}function je(h){return h===void 0}function tt(){Object.keys(x.counts).find(h=>W(h,x.arrays)?(X=Error(S("Invalid configuration: %s, opts.count excludes opts.array.",h)),!0):W(h,x.nargs)?(X=Error(S("Invalid configuration: %s, opts.count excludes opts.narg.",h)),!0):!1)}return{aliases:Object.assign({},x.aliases),argv:Object.assign(de,k),configuration:d,defaulted:Object.assign({},F),error:X,newAliases:Object.assign({},_)}}};function la(i){let e=[],t=Object.create(null),n=!0;for(Object.keys(i).forEach(function(r){e.push([].concat(i[r],r))});n;){n=!1;for(let r=0;r<e.length;r++)for(let s=r+1;s<e.length;s++)if(e[r].filter(function(d){return e[s].indexOf(d)!==-1}).length){e[r]=e[r].concat(e[s]),e.splice(s,1),n=!0;break}}return e.forEach(function(r){r=r.filter(function(c,d,b){return b.indexOf(c)===d});let s=r.pop();s!==void 0&&typeof s=="string"&&(t[s]=r)}),t}function yn(i){return i!==void 0?i+1:1}function Hr(i){return i==="__proto__"?"___proto___":i}function fa(i){return typeof i=="string"&&(i[0]==="'"||i[0]==='"')&&i[i.length-1]===i[0]?i.substring(1,i.length-1):i}import{readFileSync as ga}from"fs";var En,vn,On,Yr=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,Vr=(vn=(En=process==null?void 0:process.versions)===null||En===void 0?void 0:En.node)!==null&&vn!==void 0?vn:(On=process==null?void 0:process.version)===null||On===void 0?void 0:On.slice(1);if(Vr&&Number(Vr.match(/^([^.]+)/)[1])<Yr)throw Error(`yargs parser supports a minimum Node.js version of ${Yr}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var ma=process?process.env:{},qr=new zt({cwd:process.cwd,env:()=>ma,format:ha,normalize:da,resolve:pa,require:i=>{if(typeof ze<"u")return ze(i);if(i.match(/\.json$/))return JSON.parse(ga(i,"utf8"));throw Error("only .json config files are supported in ESM")}}),Pt=function(e,t){return qr.parse(e.slice(),t).argv};Pt.detailed=function(i,e){return qr.parse(i.slice(),e)};Pt.camelCase=rt;Pt.decamelize=Bt;Pt.looksLikeNumber=Gt;var _n=Pt;import{basename as Ia,dirname as Fa,extname as Ma,relative as Ra,resolve as Qr}from"path";function Kr(){return ba()?0:1}function ba(){return wa()&&!process.defaultApp}function wa(){return!!process.versions.electron}function Sn(i){return i.slice(Kr()+1)}function Xr(){return process.argv[Kr()]}var ce=class i extends Error{constructor(e){super(e||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,i)}};import{readFileSync as xa,statSync as ya,writeFile as Ea}from"fs";import{format as va}from"util";import{resolve as Oa}from"path";var kr={fs:{readFileSync:xa,writeFile:Ea},format:va,resolve:Oa,exists:i=>{try{return ya(i).isFile()}catch{return!1}}};var Ge,Cn=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage=="boolean"?e.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...e){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let t=e.shift(),n=function(){};return typeof e[e.length-1]=="function"&&(n=e.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]=t,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ge.format.apply(Ge.format,[this.cache[this.locale][t]||t].concat(e))}__n(){let e=Array.prototype.slice.call(arguments),t=e.shift(),n=e.shift(),r=e.shift(),s=function(){};typeof e[e.length-1]=="function"&&(s=e.pop()),this.cache[this.locale]||this._readLocaleFile();let c=r===1?t:n;this.cache[this.locale][t]&&(c=this.cache[this.locale][t][r===1?"one":"other"]),!this.cache[this.locale][t]&&this.updateFiles?(this.cache[this.locale][t]={one:t,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let d=[c];return~c.indexOf("%d")&&d.push(r),Ge.format.apply(Ge.format,d.concat(e))}setLocale(e){this.locale=e}getLocale(){return this.locale}updateLocale(e){this.cache[this.locale]||this._readLocaleFile();for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.cache[this.locale][t]=e[t])}_taggedLiteral(e,...t){let n="";return e.forEach(function(r,s){let c=t[s+1];n+=r,typeof c<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(t,1)))}_enqueueWrite(e){this.writeQueue.push(e),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let e=this,t=this.writeQueue[0],n=t.directory,r=t.locale,s=t.cb,c=this._resolveLocaleFile(n,r),d=JSON.stringify(this.cache[r],null,2);Ge.fs.writeFile(c,d,"utf-8",function(b){e.writeQueue.shift(),e.writeQueue.length>0&&e._processWriteQueue(),s(b)})}_readLocaleFile(){let e={},t=this._resolveLocaleFile(this.directory,this.locale);try{Ge.fs.readFileSync&&(e=JSON.parse(Ge.fs.readFileSync(t,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+t),n.code==="ENOENT")e={};else throw n}this.cache[this.locale]=e}_resolveLocaleFile(e,t){let n=Ge.resolve(e,"./",t+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~t.lastIndexOf("_")){let r=Ge.resolve(e,"./",t.split("_")[0]+".json");this._fileExistsSync(r)&&(n=r)}return n}_fileExistsSync(e){return Ge.exists(e)}};function Zr(i,e){Ge=e;let t=new Cn(i);return{__:t.__.bind(t),__n:t.__n.bind(t),setLocale:t.setLocale.bind(t),getLocale:t.getLocale.bind(t),updateLocale:t.updateLocale.bind(t),locale:t.locale}}var _a=i=>Zr(i,kr),Jr=_a;var Na="require is not supported by ESM",ei="loading a directory of commands is not supported yet for ESM",It;try{It=Pa(import.meta.url)}catch{It=process.cwd()}var Da=It.substring(0,It.lastIndexOf("node_modules")),An={assert:{notStrictEqual:Sa,strictEqual:Ca},cliui:xn,findUp:Gr,getEnv:i=>process.env[i],inspect:Aa,getCallerFile:()=>{throw new ce(ei)},getProcessArgvBin:Xr,mainFilename:Da||process.cwd(),Parser:_n,path:{basename:Ia,dirname:Fa,extname:Ma,relative:Ra,resolve:Qr},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(i,e)=>process.emitWarning(i,e),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:ja,require:()=>{throw new ce(Na)},requireDirectory:()=>{throw new ce(ei)},stringWidth:i=>[...i].length,y18n:Jr({directory:Qr(It,"../../../locales"),updateFiles:!1})};function ve(i,e,t,n){t.assert.notStrictEqual(i,e,n)}function jn(i,e){e.assert.strictEqual(typeof i,"string")}function xt(i){return Object.keys(i)}function le(i){return!!i&&!!i.then&&typeof i.then=="function"}function Xe(i){let t=i.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,r=t.shift();if(!r)throw new Error(`No command found in: ${i}`);let s={cmd:r.replace(n,""),demanded:[],optional:[]};return t.forEach((c,d)=>{let b=!1;c=c.replace(/\s/g,""),/\.+[\]>]/.test(c)&&d===t.length-1&&(b=!0),/^\[/.test(c)?s.optional.push({cmd:c.replace(n,"").split("|"),variadic:b}):s.demanded.push({cmd:c.replace(n,"").split("|"),variadic:b})}),s}var Ta=["first","second","third","fourth","fifth","sixth"];function D(i,e,t){function n(){return typeof i=="object"?[{demanded:[],optional:[]},i,e]:[Xe(`cmd ${i}`),e,t]}try{let r=0,[s,c,d]=n(),b=[].slice.call(c);for(;b.length&&b[b.length-1]===void 0;)b.pop();let y=d||b.length;if(y<s.demanded.length)throw new ce(`Not enough arguments provided. Expected ${s.demanded.length} but received ${b.length}.`);let E=s.demanded.length+s.optional.length;if(y>E)throw new ce(`Too many arguments provided. Expected max ${E} but received ${y}.`);s.demanded.forEach(w=>{let f=b.shift(),_=ti(f);w.cmd.filter(S=>S===_||S==="*").length===0&&ni(_,w.cmd,r),r+=1}),s.optional.forEach(w=>{if(b.length===0)return;let f=b.shift(),_=ti(f);w.cmd.filter(S=>S===_||S==="*").length===0&&ni(_,w.cmd,r),r+=1})}catch(r){console.warn(r.stack)}}function ti(i){return Array.isArray(i)?"array":i===null?"null":typeof i}function ni(i,e,t){throw new ce(`Invalid ${Ta[t]||"manyith"} argument. Expected ${e.join(" or ")} but received ${i}.`)}var Ht=class{constructor(e){this.globalMiddleware=[],this.frozens=[],this.yargs=e}addMiddleware(e,t,n=!0,r=!1){if(D("<array|function> [boolean] [boolean] [boolean]",[e,t,n],arguments.length),Array.isArray(e)){for(let s=0;s<e.length;s++){if(typeof e[s]!="function")throw Error("middleware must be a function");let c=e[s];c.applyBeforeValidation=t,c.global=n}Array.prototype.push.apply(this.globalMiddleware,e)}else if(typeof e=="function"){let s=e;s.applyBeforeValidation=t,s.global=n,s.mutates=r,this.globalMiddleware.push(e)}return this.yargs}addCoerceMiddleware(e,t){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(r=>{let s=[...n[t]||[],t];return r.option?!s.includes(r.option):!0}),e.option=t,this.addMiddleware(e,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let e=this.frozens.pop();e!==void 0&&(this.globalMiddleware=e)}reset(){this.globalMiddleware=this.globalMiddleware.filter(e=>e.global)}};function ri(i){return i?i.map(e=>(e.applyBeforeValidation=!1,e)):[]}function it(i,e,t,n){return t.reduce((r,s)=>{if(s.applyBeforeValidation!==n)return r;if(s.mutates){if(s.applied)return r;s.applied=!0}if(le(r))return r.then(c=>Promise.all([c,s(c,e)])).then(([c,d])=>Object.assign(c,d));{let c=s(r,e);return le(c)?c.then(d=>Object.assign(r,d)):Object.assign(r,c)}},i)}function st(i,e,t=n=>{throw n}){try{let n=$a(i)?i():i;return le(n)?n.then(r=>e(r)):e(n)}catch(n){return t(n)}}function $a(i){return typeof i=="function"}function Pn(i){if(typeof ze>"u")return null;for(let e=0,t=Object.keys(ze.cache),n;e<t.length;e++)if(n=ze.cache[t[e]],n.exports===i)return n;return null}var yt=/(^\*)|(^\$0)/,In=class{constructor(e,t,n,r){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=r,this.usage=e,this.globalMiddleware=n,this.validation=t}addDirectory(e,t,n,r){r=r||{},typeof r.recurse!="boolean"&&(r.recurse=!1),Array.isArray(r.extensions)||(r.extensions=["js"]);let s=typeof r.visit=="function"?r.visit:c=>c;r.visit=(c,d,b)=>{let y=s(c,d,b);if(y){if(this.requireCache.has(d))return y;this.requireCache.add(d),this.addHandler(y)}return y},this.shim.requireDirectory({require:t,filename:n},e,r)}addHandler(e,t,n,r,s,c){let d=[],b=ri(s);if(r=r||(()=>{}),Array.isArray(e))if(La(e))[e,...d]=e;else for(let y of e)this.addHandler(y);else if(Ua(e)){let y=Array.isArray(e.command)||typeof e.command=="string"?e.command:this.moduleName(e);e.aliases&&(y=[].concat(y).concat(e.aliases)),this.addHandler(y,this.extractDesc(e),e.builder,e.handler,e.middlewares,e.deprecated);return}else if(ii(n)){this.addHandler([e].concat(d),t,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof e=="string"){let y=Xe(e);d=d.map(f=>Xe(f).cmd);let E=!1,w=[y.cmd].concat(d).filter(f=>yt.test(f)?(E=!0,!1):!0);w.length===0&&E&&w.push("$0"),E&&(y.cmd=w[0],d=w.slice(1),e=e.replace(yt,y.cmd)),d.forEach(f=>{this.aliasMap[f]=y.cmd}),t!==!1&&this.usage.command(e,t,E,d,c),this.handlers[y.cmd]={original:e,description:t,handler:r,builder:n||{},middlewares:b,deprecated:c,demanded:y.demanded,optional:y.optional},E&&(this.defaultCommand=this.handlers[y.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(e,t,n,r,s,c){let d=this.handlers[e]||this.handlers[this.aliasMap[e]]||this.defaultCommand,b=t.getInternalMethods().getContext(),y=b.commands.slice(),E=!e;e&&(b.commands.push(e),b.fullCommands.push(d.original));let w=this.applyBuilderUpdateUsageAndParse(E,d,t,n.aliases,y,r,s,c);return le(w)?w.then(f=>this.applyMiddlewareAndGetResult(E,d,f.innerArgv,b,s,f.aliases,t)):this.applyMiddlewareAndGetResult(E,d,w.innerArgv,b,s,w.aliases,t)}applyBuilderUpdateUsageAndParse(e,t,n,r,s,c,d,b){let y=t.builder,E=n;if(Yt(y)){n.getInternalMethods().getUsageInstance().freeze();let w=y(n.getInternalMethods().reset(r),b);if(le(w))return w.then(f=>(E=oi(f)?f:n,this.parseAndUpdateUsage(e,t,E,s,c,d)))}else Wa(y)&&(n.getInternalMethods().getUsageInstance().freeze(),E=n.getInternalMethods().reset(r),Object.keys(t.builder).forEach(w=>{E.option(w,y[w])}));return this.parseAndUpdateUsage(e,t,E,s,c,d)}parseAndUpdateUsage(e,t,n,r,s,c){e&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(r,t),t.description);let d=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,c);return le(d)?d.then(b=>({aliases:n.parsed.aliases,innerArgv:b})):{aliases:n.parsed.aliases,innerArgv:d}}shouldUpdateUsage(e){return!e.getInternalMethods().getUsageInstance().getUsageDisabled()&&e.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(e,t){let n=yt.test(t.original)?t.original.replace(yt,"").trim():t.original,r=e.filter(s=>!yt.test(s));return r.push(n),`$0 ${r.join(" ")}`}handleValidationAndGetResult(e,t,n,r,s,c,d,b){if(!c.getInternalMethods().getHasOutput()){let y=c.getInternalMethods().runValidation(s,b,c.parsed.error,e);n=st(n,E=>(y(E),E))}if(t.handler&&!c.getInternalMethods().getHasOutput()){c.getInternalMethods().setHasOutput();let y=!!c.getOptions().configuration["populate--"];c.getInternalMethods().postProcess(n,y,!1,!1),n=it(n,c,d,!1),n=st(n,E=>{let w=t.handler(E);return le(w)?w.then(()=>E):E}),e||c.getInternalMethods().getUsageInstance().cacheHelpMessage(),le(n)&&!c.getInternalMethods().hasParseCallback()&&n.catch(E=>{try{c.getInternalMethods().getUsageInstance().fail(null,E)}catch{}})}return e||(r.commands.pop(),r.fullCommands.pop()),n}applyMiddlewareAndGetResult(e,t,n,r,s,c,d){let b={};if(s)return n;d.getInternalMethods().getHasOutput()||(b=this.populatePositionals(t,n,r,d));let y=this.globalMiddleware.getMiddleware().slice(0).concat(t.middlewares),E=it(n,d,y,!0);return le(E)?E.then(w=>this.handleValidationAndGetResult(e,t,w,r,c,d,y,b)):this.handleValidationAndGetResult(e,t,E,r,c,d,y,b)}populatePositionals(e,t,n,r){t._=t._.slice(n.commands.length);let s=e.demanded.slice(0),c=e.optional.slice(0),d={};for(this.validation.positionalCount(s.length,t._.length);s.length;){let b=s.shift();this.populatePositional(b,t,d)}for(;c.length;){let b=c.shift();this.populatePositional(b,t,d)}return t._=n.commands.concat(t._.map(b=>""+b)),this.postProcessPositionals(t,d,this.cmdToParseOptions(e.original),r),d}populatePositional(e,t,n){let r=e.cmd[0];e.variadic?n[r]=t._.splice(0).map(String):t._.length&&(n[r]=[String(t._.shift())])}cmdToParseOptions(e){let t={array:[],default:{},alias:{},demand:{}},n=Xe(e);return n.demanded.forEach(r=>{let[s,...c]=r.cmd;r.variadic&&(t.array.push(s),t.default[s]=[]),t.alias[s]=c,t.demand[s]=!0}),n.optional.forEach(r=>{let[s,...c]=r.cmd;r.variadic&&(t.array.push(s),t.default[s]=[]),t.alias[s]=c}),t}postProcessPositionals(e,t,n,r){let s=Object.assign({},r.getOptions());s.default=Object.assign(n.default,s.default);for(let y of Object.keys(n.alias))s.alias[y]=(s.alias[y]||[]).concat(n.alias[y]);s.array=s.array.concat(n.array),s.config={};let c=[];if(Object.keys(t).forEach(y=>{t[y].map(E=>{s.configuration["unknown-options-as-args"]&&(s.key[y]=!0),c.push(`--${y}`),c.push(E)})}),!c.length)return;let d=Object.assign({},s.configuration,{"populate--":!1}),b=this.shim.Parser.detailed(c,Object.assign({},s,{configuration:d}));if(b.error)r.getInternalMethods().getUsageInstance().fail(b.error.message,b.error);else{let y=Object.keys(t);Object.keys(t).forEach(E=>{y.push(...b.aliases[E])}),Object.keys(b.argv).forEach(E=>{y.includes(E)&&(t[E]||(t[E]=b.argv[E]),!this.isInConfigs(r,E)&&!this.isDefaulted(r,E)&&Object.prototype.hasOwnProperty.call(e,E)&&Object.prototype.hasOwnProperty.call(b.argv,E)&&(Array.isArray(e[E])||Array.isArray(b.argv[E]))?e[E]=[].concat(e[E],b.argv[E]):e[E]=b.argv[E])})}}isDefaulted(e,t){let{default:n}=e.getOptions();return Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(t))}isInConfigs(e,t){let{configObjects:n}=e.getOptions();return n.some(r=>Object.prototype.hasOwnProperty.call(r,t))||n.some(r=>Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(t)))}runDefaultBuilderOn(e){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(e)){let n=yt.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");e.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let t=this.defaultCommand.builder;if(Yt(t))return t(e,!0);ii(t)||Object.keys(t).forEach(n=>{e.option(n,t[n])})}moduleName(e){let t=Pn(e);if(!t)throw new Error(`No command name given for module: ${this.shim.inspect(e)}`);return this.commandFromFilename(t.filename)}commandFromFilename(e){return this.shim.path.basename(e,this.shim.path.extname(e))}extractDesc({describe:e,description:t,desc:n}){for(let r of[e,t,n]){if(typeof r=="string"||r===!1)return r;ve(r,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let e=this.frozens.pop();ve(e,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=e}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function si(i,e,t,n){return new In(i,e,t,n)}function ii(i){return typeof i=="object"&&!!i.builder&&typeof i.handler=="function"}function La(i){return i.every(e=>typeof e=="string")}function Yt(i){return typeof i=="function"}function Wa(i){return typeof i=="object"}function Ua(i){return typeof i=="object"&&!Array.isArray(i)}function ke(i={},e=()=>!0){let t={};return xt(i).forEach(n=>{e(n,i[n])&&(t[n]=i[n])}),t}function Ze(i){typeof process>"u"||[process.stdout,process.stderr].forEach(e=>{let t=e;t._handle&&t.isTTY&&typeof t._handle.setBlocking=="function"&&t._handle.setBlocking(i)})}function Ba(i){return typeof i=="boolean"}function ui(i,e){let t=e.y18n.__,n={},r=[];n.failFn=function(P){r.push(P)};let s=null,c=null,d=!0;n.showHelpOnFail=function(P=!0,N){let[H,ee]=typeof P=="string"?[!0,P]:[P,N];return i.getInternalMethods().isGlobalContext()&&(c=ee),s=ee,d=H,n};let b=!1;n.fail=function(P,N){let H=i.getInternalMethods().getLoggerInstance();if(r.length)for(let ee=r.length-1;ee>=0;--ee){let pe=r[ee];if(Ba(pe)){if(N)throw N;if(P)throw Error(P)}else pe(P,N,n)}else{if(i.getExitProcess()&&Ze(!0),!b){b=!0,d&&(i.showHelp("error"),H.error()),(P||N)&&H.error(P||N);let ee=s||c;ee&&((P||N)&&H.error(""),H.error(ee))}if(N=N||new ce(P),i.getExitProcess())return i.exit(1);if(i.getInternalMethods().hasParseCallback())return i.exit(1,N);throw N}};let y=[],E=!1;n.usage=(R,P)=>R===null?(E=!0,y=[],n):(E=!1,y.push([R,P||""]),n),n.getUsage=()=>y,n.getUsageDisabled=()=>E,n.getPositionalGroupName=()=>t("Positionals:");let w=[];n.example=(R,P)=>{w.push([R,P||""])};let f=[];n.command=function(P,N,H,ee,pe=!1){H&&(f=f.map(Q=>(Q[2]=!1,Q))),f.push([P,N||"",H,ee,pe])},n.getCommands=()=>f;let _={};n.describe=function(P,N){Array.isArray(P)?P.forEach(H=>{n.describe(H,N)}):typeof P=="object"?Object.keys(P).forEach(H=>{n.describe(H,P[H])}):_[P]=N},n.getDescriptions=()=>_;let F=[];n.epilog=R=>{F.push(R)};let S=!1,x;n.wrap=R=>{S=!0,x=R},n.getWrap=()=>e.getEnv("YARGS_DISABLE_WRAP")?null:(S||(x=We(),S=!0),x);let B="__yargsString__:";n.deferY18nLookup=R=>B+R,n.help=function(){if(K)return K;X();let P=i.customScriptName?i.$0:e.path.basename(i.$0),N=i.getDemandedOptions(),H=i.getDemandedCommands(),ee=i.getDeprecatedOptions(),pe=i.getGroups(),Q=i.getOptions(),ge=[];ge=ge.concat(Object.keys(_)),ge=ge.concat(Object.keys(N)),ge=ge.concat(Object.keys(H)),ge=ge.concat(Object.keys(Q.default)),ge=ge.filter(de),ge=Object.keys(ge.reduce((U,ie)=>(ie!=="_"&&(U[ie]=!0),U),{}));let Ve=n.getWrap(),ue=e.cliui({width:Ve,wrap:!!Ve});if(!E){if(y.length)y.forEach(U=>{ue.div({text:`${U[0].replace(/\$0/g,P)}`}),U[1]&&ue.div({text:`${U[1]}`,padding:[1,0,0,0]})}),ue.div();else if(f.length){let U=null;H._?U=`${P} <${t("command")}>
17
- `:U=`${P} [${t("command")}]
18
- `,ue.div(`${U}`)}}if(f.length>1||f.length===1&&!f[0][2]){ue.div(t("Commands:"));let U=i.getInternalMethods().getContext(),ie=U.commands.length?`${U.commands.join(" ")} `:"";i.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(f=f.sort((Y,se)=>Y[0].localeCompare(se[0])));let re=P?`${P} `:"";f.forEach(Y=>{let se=`${re}${ie}${Y[0].replace(/^\$0 ?/,"")}`;ue.span({text:se,padding:[0,2,0,2],width:G(f,Ve,`${P}${ie}`)+4},{text:Y[1]});let fe=[];Y[2]&&fe.push(`[${t("default")}]`),Y[3]&&Y[3].length&&fe.push(`[${t("aliases:")} ${Y[3].join(", ")}]`),Y[4]&&(typeof Y[4]=="string"?fe.push(`[${t("deprecated: %s",Y[4])}]`):fe.push(`[${t("deprecated")}]`)),fe.length?ue.div({text:fe.join(" "),padding:[0,0,0,2],align:"right"}):ue.div()}),ue.div()}let Oe=(Object.keys(Q.alias)||[]).concat(Object.keys(i.parsed.newAliases)||[]);ge=ge.filter(U=>!i.parsed.newAliases[U]&&Oe.every(ie=>(Q.alias[ie]||[]).indexOf(U)===-1));let _e=t("Options:");pe[_e]||(pe[_e]=[]),k(ge,Q.alias,pe,_e);let Be=U=>/^--/.test(Vt(U)),W=Object.keys(pe).filter(U=>pe[U].length>0).map(U=>{let ie=pe[U].filter(de).map(re=>{if(Oe.includes(re))return re;for(let Y=0,se;(se=Oe[Y])!==void 0;Y++)if((Q.alias[se]||[]).includes(re))return se;return re});return{groupName:U,normalizedKeys:ie}}).filter(({normalizedKeys:U})=>U.length>0).map(({groupName:U,normalizedKeys:ie})=>{let re=ie.reduce((Y,se)=>(Y[se]=[se].concat(Q.alias[se]||[]).map(fe=>U===n.getPositionalGroupName()?fe:(/^[0-9]$/.test(fe)?Q.boolean.includes(se)?"-":"--":fe.length>1?"--":"-")+fe).sort((fe,Ae)=>Be(fe)===Be(Ae)?0:Be(fe)?1:-1).join(", "),Y),{});return{groupName:U,normalizedKeys:ie,switches:re}});if(W.filter(({groupName:U})=>U!==n.getPositionalGroupName()).some(({normalizedKeys:U,switches:ie})=>!U.every(re=>Be(ie[re])))&&W.filter(({groupName:U})=>U!==n.getPositionalGroupName()).forEach(({normalizedKeys:U,switches:ie})=>{U.forEach(re=>{Be(ie[re])&&(ie[re]=Ga(ie[re],4))})}),W.forEach(({groupName:U,normalizedKeys:ie,switches:re})=>{ue.div(U),ie.forEach(Y=>{let se=re[Y],fe=_[Y]||"",Ae=null;fe.includes(B)&&(fe=t(fe.substring(B.length))),Q.boolean.includes(Y)&&(Ae=`[${t("boolean")}]`),Q.count.includes(Y)&&(Ae=`[${t("count")}]`),Q.string.includes(Y)&&(Ae=`[${t("string")}]`),Q.normalize.includes(Y)&&(Ae=`[${t("string")}]`),Q.array.includes(Y)&&(Ae=`[${t("array")}]`),Q.number.includes(Y)&&(Ae=`[${t("number")}]`);let je=m=>typeof m=="string"?`[${t("deprecated: %s",m)}]`:`[${t("deprecated")}]`,tt=[Y in ee?je(ee[Y]):null,Ae,Y in N?`[${t("required")}]`:null,Q.choices&&Q.choices[Y]?`[${t("choices:")} ${n.stringifiedValues(Q.choices[Y])}]`:null,ne(Q.default[Y],Q.defaultDescription[Y])].filter(Boolean).join(" ");ue.span({text:Vt(se),padding:[0,2,0,2+ai(se)],width:G(re,Ve)+4},fe);let h=i.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;tt&&!h?ue.div({text:tt,padding:[0,0,0,2],align:"right"}):ue.div()}),ue.div()}),w.length&&(ue.div(t("Examples:")),w.forEach(U=>{U[0]=U[0].replace(/\$0/g,P)}),w.forEach(U=>{U[1]===""?ue.div({text:U[0],padding:[0,2,0,2]}):ue.div({text:U[0],padding:[0,2,0,2],width:G(w,Ve)+4},{text:U[1]})}),ue.div()),F.length>0){let U=F.map(ie=>ie.replace(/\$0/g,P)).join(`
19
- `);ue.div(`${U}
20
- `)}return ue.toString().replace(/\s*$/,"")};function G(R,P,N){let H=0;return Array.isArray(R)||(R=Object.values(R).map(ee=>[ee])),R.forEach(ee=>{H=Math.max(e.stringWidth(N?`${N} ${Vt(ee[0])}`:Vt(ee[0]))+ai(ee[0]),H)}),P&&(H=Math.min(H,parseInt((P*.5).toString(),10))),H}function X(){let R=i.getDemandedOptions(),P=i.getOptions();(Object.keys(P.alias)||[]).forEach(N=>{P.alias[N].forEach(H=>{_[H]&&n.describe(N,_[H]),H in R&&i.demandOption(N,R[H]),P.boolean.includes(H)&&i.boolean(N),P.count.includes(H)&&i.count(N),P.string.includes(H)&&i.string(N),P.normalize.includes(H)&&i.normalize(N),P.array.includes(H)&&i.array(N),P.number.includes(H)&&i.number(N)})})}let K;n.cacheHelpMessage=function(){K=this.help()},n.clearCachedHelpMessage=function(){K=void 0},n.hasCachedHelpMessage=function(){return!!K};function k(R,P,N,H){let ee=[],pe=null;return Object.keys(N).forEach(Q=>{ee=ee.concat(N[Q])}),R.forEach(Q=>{pe=[Q].concat(P[Q]),pe.some(ge=>ee.indexOf(ge)!==-1)||N[H].push(Q)}),ee}function de(R){return i.getOptions().hiddenOptions.indexOf(R)<0||i.parsed.argv[i.getOptions().showHiddenOpt]}n.showHelp=R=>{let P=i.getInternalMethods().getLoggerInstance();R||(R="error"),(typeof R=="function"?R:P[R])(n.help())},n.functionDescription=R=>["(",R.name?e.Parser.decamelize(R.name,"-"):t("generated-value"),")"].join(""),n.stringifiedValues=function(P,N){let H="",ee=N||", ",pe=[].concat(P);return!P||!pe.length||pe.forEach(Q=>{H.length&&(H+=ee),H+=JSON.stringify(Q)}),H};function ne(R,P){let N=`[${t("default:")} `;if(R===void 0&&!P)return null;if(P)N+=P;else switch(typeof R){case"string":N+=`"${R}"`;break;case"object":N+=JSON.stringify(R);break;default:N+=R}return`${N}]`}function We(){return e.process.stdColumns?Math.min(80,e.process.stdColumns):80}let Ue=null;n.version=R=>{Ue=R},n.showVersion=R=>{let P=i.getInternalMethods().getLoggerInstance();R||(R="error"),(typeof R=="function"?R:P[R])(Ue)},n.reset=function(P){return s=null,b=!1,y=[],E=!1,F=[],w=[],f=[],_=ke(_,N=>!P[N]),n};let q=[];return n.freeze=function(){q.push({failMessage:s,failureOutput:b,usages:y,usageDisabled:E,epilogs:F,examples:w,commands:f,descriptions:_})},n.unfreeze=function(P=!1){let N=q.pop();N&&(P?(_={...N.descriptions,..._},f=[...N.commands,...f],y=[...N.usages,...y],w=[...N.examples,...w],F=[...N.epilogs,...F]):{failMessage:s,failureOutput:b,usages:y,usageDisabled:E,epilogs:F,examples:w,commands:f,descriptions:_}=N)},n}function Fn(i){return typeof i=="object"}function Ga(i,e){return Fn(i)?{text:i.text,indentation:i.indentation+e}:{text:i,indentation:e}}function ai(i){return Fn(i)?i.indentation:0}function Vt(i){return Fn(i)?i.text:i}var ci=`###-begin-{{app_name}}-completions-###
18
+ )`)}function sg(e,t){e.on("console",r=>{let n=r.type(),s=r.text();n==="error"?console.error(`[Browser] ${s}`):n==="warning"?console.warn(`[Browser] ${s}`):t&&console.log(`[Browser] ${s}`)})}function ig(e,t){let r=Qt.extname(e);return r===`.${t}`?Qt.basename(e,r):Qt.basename(e)}import{notStrictEqual as yg,strictEqual as Dg}from"assert";var ag={right:fg,center:dg},ug=0,ri=1,og=2,ni=3,Ma=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...t){let r=this.div(...t);r.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(`
19
+ `).map(s=>s.split(" ")),n=0;return r.forEach(s=>{s.length>1&&pt.stringWidth(s[0])>n&&(n=Math.min(Math.floor(this.width*.5),pt.stringWidth(s[0])))}),r.forEach(s=>{this.div(...s.map((i,u)=>({text:i.trim(),padding:this.measurePadding(i),width:u===0&&s.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=pt.stripAnsi(t);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t)}),t.filter(r=>!r.hidden).map(r=>r.text).join(`
20
+ `)}rowToString(t,r){return this.rasterize(t).forEach((n,s)=>{let i="";n.forEach((u,o)=>{let{width:l}=t[o],p=this.negatePadding(t[o]),E=u;if(p>pt.stringWidth(u)&&(E+=" ".repeat(p-pt.stringWidth(u))),t[o].align&&t[o].align!=="left"&&this.wrap){let g=ag[t[o].align];E=g(E,p),pt.stringWidth(E)<p&&(E+=" ".repeat((l||0)-pt.stringWidth(E)-1))}let A=t[o].padding||[0,0,0,0];A[ni]&&(i+=" ".repeat(A[ni])),i+=P0(t[o],E,"| "),i+=E,i+=P0(t[o],E," |"),A[ri]&&(i+=" ".repeat(A[ri])),s===0&&r.length>0&&(i=this.renderInline(i,r[r.length-1]))}),r.push({text:i.replace(/ +$/,""),span:t.span})}),r}renderInline(t,r){let n=t.match(/^ */),s=n?n[0].length:0,i=r.text,u=pt.stringWidth(i.trimRight());return r.span?this.wrap?s<u?t:(r.hidden=!0,i.trimRight()+" ".repeat(s-u)+t.trimLeft()):(r.hidden=!0,i+t):t}rasterize(t){let r=[],n=this.columnWidths(t),s;return t.forEach((i,u)=>{i.width=n[u],this.wrap?s=pt.wrap(i.text,this.negatePadding(i),{hard:!0}).split(`
21
+ `):s=i.text.split(`
22
+ `),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[ug]||0).fill("")),s.push(...new Array(i.padding[og]||0).fill(""))),s.forEach((o,l)=>{r[l]||r.push([]);let p=r[l];for(let E=0;E<u;E++)p[E]===void 0&&p.push("");p.push(o)})}),r}negatePadding(t){let r=t.width||0;return t.padding&&(r-=(t.padding[ni]||0)+(t.padding[ri]||0)),t.border&&(r-=4),r}columnWidths(t){if(!this.wrap)return t.map(u=>u.width||pt.stringWidth(u.text));let r=t.length,n=this.width,s=t.map(u=>{if(u.width)return r--,n-=u.width,u.width}),i=r?Math.floor(n/r):0;return s.map((u,o)=>u===void 0?Math.max(i,cg(t[o])):u)}};function P0(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function cg(e){let t=e.padding||[],r=1+(t[ni]||0)+(t[ri]||0);return e.border?r+4:r}function lg(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function fg(e,t){e=e.trim();let r=pt.stringWidth(e);return r<t?" ".repeat(t-r)+e:e}function dg(e,t){e=e.trim();let r=pt.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}var pt;function w0(e,t){return pt=t,new Ma({width:e?.width||lg(),wrap:e?.wrap})}var M0=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function va(e){return e.replace(M0,"")}function v0(e,t){let[r,n]=e.match(M0)||["",""];e=va(e);let s="";for(let i=0;i<e.length;i++)i!==0&&i%t===0&&(s+=`
23
+ `),s+=e.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function Fa(e){return w0(e,{stringWidth:t=>[...t].length,stripAnsi:va,wrap:v0})}import{dirname as F0,resolve as B0}from"path";import{readdirSync as hg,statSync as pg}from"fs";function k0(e,t){let r=B0(".",e),n;for(pg(r).isDirectory()||(r=F0(r));;){if(n=t(r,hg(r)),n)return B0(r,n);if(r=F0(n=r),n===r)break}}import{inspect as Pg}from"util";import{readFileSync as wg}from"fs";import{fileURLToPath as Mg}from"url";import{format as gg}from"util";import{normalize as bg,resolve as Tg}from"path";function xr(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let i=s?s[0].length:0;i<e.length;i++){let u=e.charAt(i);n&&(n=!1,u=u.toUpperCase()),i!==0&&(u==="-"||u==="_")?n=!0:u!=="-"&&u!=="_"&&(r+=u)}return r}}function si(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let s=0;s<e.length;s++){let i=r.charAt(s),u=e.charAt(s);i!==u&&s>0?n+=`${t}${r.charAt(s)}`:n+=u}return n}function ii(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function U0(e){if(Array.isArray(e))return e.map(u=>typeof u!="string"?u+"":u);e=e.trim();let t=0,r=null,n=null,s=null,i=[];for(let u=0;u<e.length;u++){if(r=n,n=e.charAt(u),n===" "&&!s){r!==" "&&t++;continue}n===s?s=null:(n==="'"||n==='"')&&!s&&(s=n),i[t]||(i[t]=""),i[t]+=n}return i}var Nt;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Nt||(Nt={}));var zt,ai=class{constructor(t){zt=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=U0(t),i=typeof t=="string",u=mg(Object.assign(Object.create(null),n.alias)),o=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),l=Object.assign(Object.create(null),n.default),p=n.configObjects||[],E=n.envPrefix,A=o["populate--"],g=A?"--":"_",y=Object.create(null),w=Object.create(null),M=n.__||zt.format,x={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},q=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,Z=new RegExp("^--"+o["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(_){let I=typeof _=="object"?_.key:_,k=Object.keys(_).map(function(D){return{boolean:"bools",string:"strings",number:"numbers"}[D]}).filter(Boolean).pop();k&&(x[k][I]=!0),x.arrays[I]=!0,x.keys.push(I)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(_){x.bools[_]=!0,x.keys.push(_)}),[].concat(n.string||[]).filter(Boolean).forEach(function(_){x.strings[_]=!0,x.keys.push(_)}),[].concat(n.number||[]).filter(Boolean).forEach(function(_){x.numbers[_]=!0,x.keys.push(_)}),[].concat(n.count||[]).filter(Boolean).forEach(function(_){x.counts[_]=!0,x.keys.push(_)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(_){x.normalize[_]=!0,x.keys.push(_)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([_,I])=>{typeof I=="number"&&(x.nargs[_]=I,x.keys.push(_))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([_,I])=>{typeof I=="function"&&(x.coercions[_]=I,x.keys.push(_))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(_){x.configs[_]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([_,I])=>{(typeof I=="boolean"||typeof I=="function")&&(x.configs[_]=I)})),Rt(n.key,u,n.default,x.arrays),Object.keys(l).forEach(function(_){(x.aliases[_]||[]).forEach(function(I){l[I]=l[_]})});let ne=null;mr();let te=[],ae=Object.assign(Object.create(null),{_:[]}),Ue={};for(let _=0;_<s.length;_++){let I=s[_],k=I.replace(/^-{3,}/,"---"),D,S,j,H,Y,Fe;if(I!=="--"&&/^-/.test(I)&&ge(I))ye(I);else if(k.match(/^---+(=|$)/)){ye(I);continue}else if(I.match(/^--.+=/)||!o["short-option-groups"]&&I.match(/^-.+=/))H=I.match(/^--?([^=]+)=([\s\S]*)$/),H!==null&&Array.isArray(H)&&H.length>=3&&(J(H[1],x.arrays)?_=ue(_,H[1],s,H[2]):J(H[1],x.nargs)!==!1?_=Le(_,H[1],s,H[2]):le(H[1],H[2],!0));else if(I.match(Z)&&o["boolean-negation"])H=I.match(Z),H!==null&&Array.isArray(H)&&H.length>=2&&(S=H[1],le(S,J(S,x.arrays)?[!1]:!1));else if(I.match(/^--.+/)||!o["short-option-groups"]&&I.match(/^-[^-]+/))H=I.match(/^--?(.+)/),H!==null&&Array.isArray(H)&&H.length>=2&&(S=H[1],J(S,x.arrays)?_=ue(_,S,s):J(S,x.nargs)!==!1?_=Le(_,S,s):(Y=s[_+1],Y!==void 0&&(!Y.match(/^-/)||Y.match(q))&&!J(S,x.bools)&&!J(S,x.counts)||/^(true|false)$/.test(Y)?(le(S,Y),_++):le(S,Te(S))));else if(I.match(/^-.\..+=/))H=I.match(/^-([^=]+)=([\s\S]*)$/),H!==null&&Array.isArray(H)&&H.length>=3&&le(H[1],H[2]);else if(I.match(/^-.\..+/)&&!I.match(q))Y=s[_+1],H=I.match(/^-(.\..+)/),H!==null&&Array.isArray(H)&&H.length>=2&&(S=H[1],Y!==void 0&&!Y.match(/^-/)&&!J(S,x.bools)&&!J(S,x.counts)?(le(S,Y),_++):le(S,Te(S)));else if(I.match(/^-[^-]+/)&&!I.match(q)){j=I.slice(1,-1).split(""),D=!1;for(let Ye=0;Ye<j.length;Ye++){if(Y=I.slice(Ye+2),j[Ye+1]&&j[Ye+1]==="="){Fe=I.slice(Ye+3),S=j[Ye],J(S,x.arrays)?_=ue(_,S,s,Fe):J(S,x.nargs)!==!1?_=Le(_,S,s,Fe):le(S,Fe),D=!0;break}if(Y==="-"){le(j[Ye],Y);continue}if(/[A-Za-z]/.test(j[Ye])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(Y)&&J(Y,x.bools)===!1){le(j[Ye],Y),D=!0;break}if(j[Ye+1]&&j[Ye+1].match(/\W/)){le(j[Ye],Y),D=!0;break}else le(j[Ye],Te(j[Ye]))}S=I.slice(-1)[0],!D&&S!=="-"&&(J(S,x.arrays)?_=ue(_,S,s):J(S,x.nargs)!==!1?_=Le(_,S,s):(Y=s[_+1],Y!==void 0&&(!/^(-|--)[^-]/.test(Y)||Y.match(q))&&!J(S,x.bools)&&!J(S,x.counts)||/^(true|false)$/.test(Y)?(le(S,Y),_++):le(S,Te(S))))}else if(I.match(/^-[0-9]$/)&&I.match(q)&&J(I.slice(1),x.bools))S=I.slice(1),le(S,Te(S));else if(I==="--"){te=s.slice(_+1);break}else if(o["halt-at-non-option"]){te=s.slice(_);break}else ye(I)}he(ae,!0),he(ae,!1),V(ae),Me(),Ie(ae,x.aliases,l,!0),ve(ae),o["set-placeholder-key"]&&jt(ae),Object.keys(x.counts).forEach(function(_){Ze(ae,_.split("."))||le(_,0)}),A&&te.length&&(ae[g]=[]),te.forEach(function(_){ae[g].push(_)}),o["camel-case-expansion"]&&o["strip-dashed"]&&Object.keys(ae).filter(_=>_!=="--"&&_.includes("-")).forEach(_=>{delete ae[_]}),o["strip-aliased"]&&[].concat(...Object.keys(u).map(_=>u[_])).forEach(_=>{o["camel-case-expansion"]&&_.includes("-")&&delete ae[_.split(".").map(I=>xr(I)).join(".")],delete ae[_]});function ye(_){let I=B("_",_);(typeof I=="string"||typeof I=="number")&&ae._.push(I)}function Le(_,I,k,D){let S,j=J(I,x.nargs);if(j=typeof j!="number"||isNaN(j)?1:j,j===0)return ot(D)||(ne=Error(M("Argument unexpected for: %s",I))),le(I,Te(I)),_;let H=ot(D)?0:1;if(o["nargs-eats-options"])k.length-(_+1)+H<j&&(ne=Error(M("Not enough arguments following: %s",I))),H=j;else{for(S=_+1;S<k.length&&(!k[S].match(/^-[^0-9]/)||k[S].match(q)||ge(k[S]));S++)H++;H<j&&(ne=Error(M("Not enough arguments following: %s",I)))}let Y=Math.min(H,j);for(!ot(D)&&Y>0&&(le(I,D),Y--),S=_+1;S<Y+_+1;S++)le(I,k[S]);return _+Y}function ue(_,I,k,D){let S=[],j=D||k[_+1],H=J(I,x.nargs);if(J(I,x.bools)&&!/^(true|false)$/.test(j))S.push(!0);else if(ot(j)||ot(D)&&/^-/.test(j)&&!q.test(j)&&!ge(j)){if(l[I]!==void 0){let Y=l[I];S=Array.isArray(Y)?Y:[Y]}}else{ot(D)||S.push(F(I,D,!0));for(let Y=_+1;Y<k.length&&!(!o["greedy-arrays"]&&S.length>0||H&&typeof H=="number"&&S.length>=H||(j=k[Y],/^-/.test(j)&&!q.test(j)&&!ge(j)));Y++)_=Y,S.push(F(I,j,i))}return typeof H=="number"&&(H&&S.length<H||isNaN(H)&&S.length===0)&&(ne=Error(M("Not enough arguments following: %s",I))),le(I,S),_}function le(_,I,k=i){if(/-/.test(_)&&o["camel-case-expansion"]){let j=_.split(".").map(function(H){return xr(H)}).join(".");G(_,j)}let D=F(_,I,k),S=_.split(".");Je(ae,S,D),x.aliases[_]&&x.aliases[_].forEach(function(j){let H=j.split(".");Je(ae,H,D)}),S.length>1&&o["dot-notation"]&&(x.aliases[S[0]]||[]).forEach(function(j){let H=j.split("."),Y=[].concat(S);Y.shift(),H=H.concat(Y),(x.aliases[_]||[]).includes(H.join("."))||Je(ae,H,D)}),J(_,x.normalize)&&!J(_,x.arrays)&&[_].concat(x.aliases[_]||[]).forEach(function(H){Object.defineProperty(Ue,H,{enumerable:!0,get(){return I},set(Y){I=typeof Y=="string"?zt.normalize(Y):Y}})})}function G(_,I){x.aliases[_]&&x.aliases[_].length||(x.aliases[_]=[I],y[I]=!0),x.aliases[I]&&x.aliases[I].length||G(I,_)}function F(_,I,k){k&&(I=Eg(I)),(J(_,x.bools)||J(_,x.counts))&&typeof I=="string"&&(I=I==="true");let D=Array.isArray(I)?I.map(function(S){return B(_,S)}):B(_,I);return J(_,x.counts)&&(ot(D)||typeof D=="boolean")&&(D=Ba()),J(_,x.normalize)&&J(_,x.arrays)&&(Array.isArray(I)?D=I.map(S=>zt.normalize(S)):D=zt.normalize(I)),D}function B(_,I){return!o["parse-positional-numbers"]&&_==="_"||!J(_,x.strings)&&!J(_,x.bools)&&!Array.isArray(I)&&(ii(I)&&o["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${I}`)))||!ot(I)&&J(_,x.numbers))&&(I=Number(I)),I}function V(_){let I=Object.create(null);Ie(I,x.aliases,l),Object.keys(x.configs).forEach(function(k){let D=_[k]||I[k];if(D)try{let S=null,j=zt.resolve(zt.cwd(),D),H=x.configs[k];if(typeof H=="function"){try{S=H(j)}catch(Y){S=Y}if(S instanceof Error){ne=S;return}}else S=zt.require(j);oe(S)}catch(S){S.name==="PermissionDenied"?ne=S:_[k]&&(ne=Error(M("Invalid JSON config file: %s",D)))}})}function oe(_,I){Object.keys(_).forEach(function(k){let D=_[k],S=I?I+"."+k:k;typeof D=="object"&&D!==null&&!Array.isArray(D)&&o["dot-notation"]?oe(D,S):(!Ze(ae,S.split("."))||J(S,x.arrays)&&o["combine-arrays"])&&le(S,D)})}function Me(){typeof p<"u"&&p.forEach(function(_){oe(_)})}function he(_,I){if(typeof E>"u")return;let k=typeof E=="string"?E:"",D=zt.env();Object.keys(D).forEach(function(S){if(k===""||S.lastIndexOf(k,0)===0){let j=S.split("__").map(function(H,Y){return Y===0&&(H=H.substring(k.length)),xr(H)});(I&&x.configs[j.join(".")]||!I)&&!Ze(_,j)&&le(j.join("."),D[S])}})}function ve(_){let I,k=new Set;Object.keys(_).forEach(function(D){if(!k.has(D)&&(I=J(D,x.coercions),typeof I=="function"))try{let S=B(D,I(_[D]));[].concat(x.aliases[D]||[],D).forEach(j=>{k.add(j),_[j]=S})}catch(S){ne=S}})}function jt(_){return x.keys.forEach(I=>{~I.indexOf(".")||typeof _[I]>"u"&&(_[I]=void 0)}),_}function Ie(_,I,k,D=!1){Object.keys(k).forEach(function(S){Ze(_,S.split("."))||(Je(_,S.split("."),k[S]),D&&(w[S]=!0),(I[S]||[]).forEach(function(j){Ze(_,j.split("."))||Je(_,j.split("."),k[S])}))})}function Ze(_,I){let k=_;o["dot-notation"]||(I=[I.join(".")]),I.slice(0,-1).forEach(function(S){k=k[S]||{}});let D=I[I.length-1];return typeof k!="object"?!1:D in k}function Je(_,I,k){let D=_;o["dot-notation"]||(I=[I.join(".")]),I.slice(0,-1).forEach(function(Fe){Fe=H0(Fe),typeof D=="object"&&D[Fe]===void 0&&(D[Fe]={}),typeof D[Fe]!="object"||Array.isArray(D[Fe])?(Array.isArray(D[Fe])?D[Fe].push({}):D[Fe]=[D[Fe],{}],D=D[Fe][D[Fe].length-1]):D=D[Fe]});let S=H0(I[I.length-1]),j=J(I.join("."),x.arrays),H=Array.isArray(k),Y=o["duplicate-arguments-array"];!Y&&J(S,x.nargs)&&(Y=!0,(!ot(D[S])&&x.nargs[S]===1||Array.isArray(D[S])&&D[S].length===x.nargs[S])&&(D[S]=void 0)),k===Ba()?D[S]=Ba(D[S]):Array.isArray(D[S])?Y&&j&&H?D[S]=o["flatten-duplicate-arrays"]?D[S].concat(k):(Array.isArray(D[S][0])?D[S]:[D[S]]).concat([k]):!Y&&!!j==!!H?D[S]=k:D[S]=D[S].concat([k]):D[S]===void 0&&j?D[S]=H?k:[k]:Y&&!(D[S]===void 0||J(S,x.counts)||J(S,x.bools))?D[S]=[D[S],k]:D[S]=k}function Rt(..._){_.forEach(function(I){Object.keys(I||{}).forEach(function(k){x.aliases[k]||(x.aliases[k]=[].concat(u[k]||[]),x.aliases[k].concat(k).forEach(function(D){if(/-/.test(D)&&o["camel-case-expansion"]){let S=xr(D);S!==k&&x.aliases[k].indexOf(S)===-1&&(x.aliases[k].push(S),y[S]=!0)}}),x.aliases[k].concat(k).forEach(function(D){if(D.length>1&&/[A-Z]/.test(D)&&o["camel-case-expansion"]){let S=si(D,"-");S!==k&&x.aliases[k].indexOf(S)===-1&&(x.aliases[k].push(S),y[S]=!0)}}),x.aliases[k].forEach(function(D){x.aliases[D]=[k].concat(x.aliases[k].filter(function(S){return D!==S}))}))})})}function J(_,I){let k=[].concat(x.aliases[_]||[],_),D=Object.keys(I),S=k.find(j=>D.includes(j));return S?I[S]:!1}function pn(_){let I=Object.keys(x);return[].concat(I.map(D=>x[D])).some(function(D){return Array.isArray(D)?D.includes(_):D[_]})}function ee(_,...I){return[].concat(...I).some(function(D){let S=_.match(D);return S&&pn(S[1])})}function be(_){if(_.match(q)||!_.match(/^-[^-]+/))return!1;let I=!0,k,D=_.slice(1).split("");for(let S=0;S<D.length;S++){if(k=_.slice(S+2),!pn(D[S])){I=!1;break}if(D[S+1]&&D[S+1]==="="||k==="-"||/[A-Za-z]/.test(D[S])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(k)||D[S+1]&&D[S+1].match(/\W/))break}return I}function ge(_){return o["unknown-options-as-args"]&&se(_)}function se(_){return _=_.replace(/^-{3,}/,"--"),_.match(q)||be(_)?!1:!ee(_,/^-+([^=]+?)=[\s\S]*$/,Z,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function Te(_){return!J(_,x.bools)&&!J(_,x.counts)&&`${_}`in l?l[_]:De(ut(_))}function De(_){return{[Nt.BOOLEAN]:!0,[Nt.STRING]:"",[Nt.NUMBER]:void 0,[Nt.ARRAY]:[]}[_]}function ut(_){let I=Nt.BOOLEAN;return J(_,x.strings)?I=Nt.STRING:J(_,x.numbers)?I=Nt.NUMBER:J(_,x.bools)?I=Nt.BOOLEAN:J(_,x.arrays)&&(I=Nt.ARRAY),I}function ot(_){return _===void 0}function mr(){Object.keys(x.counts).find(_=>J(_,x.arrays)?(ne=Error(M("Invalid configuration: %s, opts.count excludes opts.array.",_)),!0):J(_,x.nargs)?(ne=Error(M("Invalid configuration: %s, opts.count excludes opts.narg.",_)),!0):!1)}return{aliases:Object.assign({},x.aliases),argv:Object.assign(Ue,ae),configuration:o,defaulted:Object.assign({},w),error:ne,newAliases:Object.assign({},y)}}};function mg(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s))});n;){n=!1;for(let s=0;s<t.length;s++)for(let i=s+1;i<t.length;i++)if(t[s].filter(function(o){return t[i].indexOf(o)!==-1}).length){t[s]=t[s].concat(t[i]),t.splice(i,1),n=!0;break}}return t.forEach(function(s){s=s.filter(function(u,o,l){return l.indexOf(u)===o});let i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function Ba(e){return e!==void 0?e+1:1}function H0(e){return e==="__proto__"?"___proto___":e}function Eg(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}import{readFileSync as Ag}from"fs";var ka,Ua,Ha,j0=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,q0=(Ua=(ka=process==null?void 0:process.versions)===null||ka===void 0?void 0:ka.node)!==null&&Ua!==void 0?Ua:(Ha=process==null?void 0:process.version)===null||Ha===void 0?void 0:Ha.slice(1);if(q0&&Number(q0.match(/^([^.]+)/)[1])<j0)throw Error(`yargs parser supports a minimum Node.js version of ${j0}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var _g=process?process.env:{},Y0=new ai({cwd:process.cwd,env:()=>_g,format:gg,normalize:bg,resolve:Tg,require:e=>{if(typeof vt<"u")return vt(e);if(e.match(/\.json$/))return JSON.parse(Ag(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),Zn=function(t,r){return Y0.parse(t.slice(),r).argv};Zn.detailed=function(e,t){return Y0.parse(e.slice(),t)};Zn.camelCase=xr;Zn.decamelize=si;Zn.looksLikeNumber=ii;var ja=Zn;import{basename as vg,dirname as Fg,extname as Bg,relative as kg,resolve as Q0}from"path";function G0(){return Cg()?0:1}function Cg(){return Ng()&&!process.defaultApp}function Ng(){return!!process.versions.electron}function qa(e){return e.slice(G0()+1)}function V0(){return process.argv[G0()]}var Oe=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};import{readFileSync as Sg,statSync as Ig,writeFile as xg}from"fs";import{format as Og}from"util";import{resolve as Rg}from"path";var W0={fs:{readFileSync:Sg,writeFile:xg},format:Og,resolve:Rg,exists:e=>{try{return Ig(e).isFile()}catch{return!1}}};var Mt,Ya=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Mt.format.apply(Mt.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),i=function(){};typeof t[t.length-1]=="function"&&(i=t.pop()),this.cache[this.locale]||this._readLocaleFile();let u=s===1?r:n;this.cache[this.locale][r]&&(u=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let o=[u];return~u.indexOf("%d")&&o.push(s),Mt.format.apply(Mt.format,o.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r])}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,i){let u=r[i+1];n+=s,typeof u<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,i=r.cb,u=this._resolveLocaleFile(n,s),o=JSON.stringify(this.cache[s],null,2);Mt.fs.writeFile(u,o,"utf-8",function(l){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),i(l)})}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{Mt.fs.readFileSync&&(t=JSON.parse(Mt.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t}_resolveLocaleFile(t,r){let n=Mt.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=Mt.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(t){return Mt.exists(t)}};function $0(e,t){Mt=t;let r=new Ya(e);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var Lg=e=>$0(e,W0),X0=Lg;var Ug="require is not supported by ESM",z0="loading a directory of commands is not supported yet for ESM",Jn;try{Jn=Mg(import.meta.url)}catch{Jn=process.cwd()}var Hg=Jn.substring(0,Jn.lastIndexOf("node_modules")),Ga={assert:{notStrictEqual:yg,strictEqual:Dg},cliui:Fa,findUp:k0,getEnv:e=>process.env[e],inspect:Pg,getCallerFile:()=>{throw new Oe(z0)},getProcessArgvBin:V0,mainFilename:Hg||process.cwd(),Parser:ja,path:{basename:vg,dirname:Fg,extname:Bg,relative:kg,resolve:Q0},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:wg,require:()=>{throw new Oe(Ug)},requireDirectory:()=>{throw new Oe(z0)},stringWidth:e=>[...e].length,y18n:X0({directory:Q0(Jn,"../../../locales"),updateFiles:!1})};function Ke(e,t,r,n){r.assert.notStrictEqual(e,t,n)}function Va(e,t){t.assert.strictEqual(typeof e,"string")}function cn(e){return Object.keys(e)}function Re(e){return!!e&&!!e.then&&typeof e.then=="function"}function cr(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let i={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((u,o)=>{let l=!1;u=u.replace(/\s/g,""),/\.+[\]>]/.test(u)&&o===r.length-1&&(l=!0),/^\[/.test(u)?i.optional.push({cmd:u.replace(n,"").split("|"),variadic:l}):i.demanded.push({cmd:u.replace(n,"").split("|"),variadic:l})}),i}var jg=["first","second","third","fourth","fifth","sixth"];function $(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[cr(`cmd ${e}`),t,r]}try{let s=0,[i,u,o]=n(),l=[].slice.call(u);for(;l.length&&l[l.length-1]===void 0;)l.pop();let p=o||l.length;if(p<i.demanded.length)throw new Oe(`Not enough arguments provided. Expected ${i.demanded.length} but received ${l.length}.`);let E=i.demanded.length+i.optional.length;if(p>E)throw new Oe(`Too many arguments provided. Expected max ${E} but received ${p}.`);i.demanded.forEach(A=>{let g=l.shift(),y=K0(g);A.cmd.filter(M=>M===y||M==="*").length===0&&Z0(y,A.cmd,s),s+=1}),i.optional.forEach(A=>{if(l.length===0)return;let g=l.shift(),y=K0(g);A.cmd.filter(M=>M===y||M==="*").length===0&&Z0(y,A.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function K0(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Z0(e,t,r){throw new Oe(`Invalid ${jg[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var ui=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,r,n=!0,s=!1){if($("<array|function> [boolean] [boolean] [boolean]",[t,r,n],arguments.length),Array.isArray(t)){for(let i=0;i<t.length;i++){if(typeof t[i]!="function")throw Error("middleware must be a function");let u=t[i];u.applyBeforeValidation=r,u.global=n}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let i=t;i.applyBeforeValidation=r,i.global=n,i.mutates=s,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(s=>{let i=[...n[r]||[],r];return s.option?!i.includes(s.option):!0}),t.option=r,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function J0(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function Or(e,t,r,n){return r.reduce((s,i)=>{if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Re(s))return s.then(u=>Promise.all([u,i(u,t)])).then(([u,o])=>Object.assign(u,o));{let u=i(s,t);return Re(u)?u.then(o=>Object.assign(s,o)):Object.assign(s,u)}},e)}function Rr(e,t,r=n=>{throw n}){try{let n=qg(e)?e():e;return Re(n)?n.then(s=>t(s)):t(n)}catch(n){return r(n)}}function qg(e){return typeof e=="function"}function Wa(e){if(typeof vt>"u")return null;for(let t=0,r=Object.keys(vt.cache),n;t<r.length;t++)if(n=vt.cache[r[t]],n.exports===e)return n;return null}var ln=/(^\*)|(^\$0)/,$a=class{constructor(t,r,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=t,this.globalMiddleware=n,this.validation=r}addDirectory(t,r,n,s){s=s||{},typeof s.recurse!="boolean"&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);let i=typeof s.visit=="function"?s.visit:u=>u;s.visit=(u,o,l)=>{let p=i(u,o,l);if(p){if(this.requireCache.has(o))return p;this.requireCache.add(o),this.addHandler(p)}return p},this.shim.requireDirectory({require:r,filename:n},t,s)}addHandler(t,r,n,s,i,u){let o=[],l=J0(i);if(s=s||(()=>{}),Array.isArray(t))if(Yg(t))[t,...o]=t;else for(let p of t)this.addHandler(p);else if(Vg(t)){let p=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(p=[].concat(p).concat(t.aliases)),this.addHandler(p,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(el(n)){this.addHandler([t].concat(o),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof t=="string"){let p=cr(t);o=o.map(g=>cr(g).cmd);let E=!1,A=[p.cmd].concat(o).filter(g=>ln.test(g)?(E=!0,!1):!0);A.length===0&&E&&A.push("$0"),E&&(p.cmd=A[0],o=A.slice(1),t=t.replace(ln,p.cmd)),o.forEach(g=>{this.aliasMap[g]=p.cmd}),r!==!1&&this.usage.command(t,r,E,o,u),this.handlers[p.cmd]={original:t,description:r,handler:s,builder:n||{},middlewares:l,deprecated:u,demanded:p.demanded,optional:p.optional},E&&(this.defaultCommand=this.handlers[p.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,r,n,s,i,u){let o=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,l=r.getInternalMethods().getContext(),p=l.commands.slice(),E=!t;t&&(l.commands.push(t),l.fullCommands.push(o.original));let A=this.applyBuilderUpdateUsageAndParse(E,o,r,n.aliases,p,s,i,u);return Re(A)?A.then(g=>this.applyMiddlewareAndGetResult(E,o,g.innerArgv,l,i,g.aliases,r)):this.applyMiddlewareAndGetResult(E,o,A.innerArgv,l,i,A.aliases,r)}applyBuilderUpdateUsageAndParse(t,r,n,s,i,u,o,l){let p=r.builder,E=n;if(oi(p)){n.getInternalMethods().getUsageInstance().freeze();let A=p(n.getInternalMethods().reset(s),l);if(Re(A))return A.then(g=>(E=rl(g)?g:n,this.parseAndUpdateUsage(t,r,E,i,u,o)))}else Gg(p)&&(n.getInternalMethods().getUsageInstance().freeze(),E=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(A=>{E.option(A,p[A])}));return this.parseAndUpdateUsage(t,r,E,i,u,o)}parseAndUpdateUsage(t,r,n,s,i,u){t&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(s,r),r.description);let o=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,u);return Re(o)?o.then(l=>({aliases:n.parsed.aliases,innerArgv:l})):{aliases:n.parsed.aliases,innerArgv:o}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,r){let n=ln.test(r.original)?r.original.replace(ln,"").trim():r.original,s=t.filter(i=>!ln.test(i));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(t,r,n,s,i,u,o,l){if(!u.getInternalMethods().getHasOutput()){let p=u.getInternalMethods().runValidation(i,l,u.parsed.error,t);n=Rr(n,E=>(p(E),E))}if(r.handler&&!u.getInternalMethods().getHasOutput()){u.getInternalMethods().setHasOutput();let p=!!u.getOptions().configuration["populate--"];u.getInternalMethods().postProcess(n,p,!1,!1),n=Or(n,u,o,!1),n=Rr(n,E=>{let A=r.handler(E);return Re(A)?A.then(()=>E):E}),t||u.getInternalMethods().getUsageInstance().cacheHelpMessage(),Re(n)&&!u.getInternalMethods().hasParseCallback()&&n.catch(E=>{try{u.getInternalMethods().getUsageInstance().fail(null,E)}catch{}})}return t||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(t,r,n,s,i,u,o){let l={};if(i)return n;o.getInternalMethods().getHasOutput()||(l=this.populatePositionals(r,n,s,o));let p=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),E=Or(n,o,p,!0);return Re(E)?E.then(A=>this.handleValidationAndGetResult(t,r,A,s,u,o,p,l)):this.handleValidationAndGetResult(t,r,E,s,u,o,p,l)}populatePositionals(t,r,n,s){r._=r._.slice(n.commands.length);let i=t.demanded.slice(0),u=t.optional.slice(0),o={};for(this.validation.positionalCount(i.length,r._.length);i.length;){let l=i.shift();this.populatePositional(l,r,o)}for(;u.length;){let l=u.shift();this.populatePositional(l,r,o)}return r._=n.commands.concat(r._.map(l=>""+l)),this.postProcessPositionals(r,o,this.cmdToParseOptions(t.original),s),o}populatePositional(t,r,n){let s=t.cmd[0];t.variadic?n[s]=r._.splice(0).map(String):r._.length&&(n[s]=[String(r._.shift())])}cmdToParseOptions(t){let r={array:[],default:{},alias:{},demand:{}},n=cr(t);return n.demanded.forEach(s=>{let[i,...u]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=u,r.demand[i]=!0}),n.optional.forEach(s=>{let[i,...u]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=u}),r}postProcessPositionals(t,r,n,s){let i=Object.assign({},s.getOptions());i.default=Object.assign(n.default,i.default);for(let p of Object.keys(n.alias))i.alias[p]=(i.alias[p]||[]).concat(n.alias[p]);i.array=i.array.concat(n.array),i.config={};let u=[];if(Object.keys(r).forEach(p=>{r[p].map(E=>{i.configuration["unknown-options-as-args"]&&(i.key[p]=!0),u.push(`--${p}`),u.push(E)})}),!u.length)return;let o=Object.assign({},i.configuration,{"populate--":!1}),l=this.shim.Parser.detailed(u,Object.assign({},i,{configuration:o}));if(l.error)s.getInternalMethods().getUsageInstance().fail(l.error.message,l.error);else{let p=Object.keys(r);Object.keys(r).forEach(E=>{p.push(...l.aliases[E])}),Object.keys(l.argv).forEach(E=>{p.includes(E)&&(r[E]||(r[E]=l.argv[E]),!this.isInConfigs(s,E)&&!this.isDefaulted(s,E)&&Object.prototype.hasOwnProperty.call(t,E)&&Object.prototype.hasOwnProperty.call(l.argv,E)&&(Array.isArray(t[E])||Array.isArray(l.argv[E]))?t[E]=[].concat(t[E],l.argv[E]):t[E]=l.argv[E])})}}isDefaulted(t,r){let{default:n}=t.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(t,r){let{configObjects:n}=t.getOptions();return n.some(s=>Object.prototype.hasOwnProperty.call(s,r))||n.some(s=>Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let n=ln.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(oi(r))return r(t,!0);el(r)||Object.keys(r).forEach(n=>{t.option(n,r[n])})}moduleName(t){let r=Wa(t);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(r.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:r,desc:n}){for(let s of[t,r,n]){if(typeof s=="string"||s===!1)return s;Ke(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();Ke(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function tl(e,t,r,n){return new $a(e,t,r,n)}function el(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function Yg(e){return e.every(t=>typeof t=="string")}function oi(e){return typeof e=="function"}function Gg(e){return typeof e=="object"}function Vg(e){return typeof e=="object"&&!Array.isArray(e)}function lr(e={},t=()=>!0){let r={};return cn(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n])}),r}function fr(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e)})}function Wg(e){return typeof e=="boolean"}function sl(e,t){let r=t.y18n.__,n={},s=[];n.failFn=function(F){s.push(F)};let i=null,u=null,o=!0;n.showHelpOnFail=function(F=!0,B){let[V,oe]=typeof F=="string"?[!0,F]:[F,B];return e.getInternalMethods().isGlobalContext()&&(u=oe),i=oe,o=V,n};let l=!1;n.fail=function(F,B){let V=e.getInternalMethods().getLoggerInstance();if(s.length)for(let oe=s.length-1;oe>=0;--oe){let Me=s[oe];if(Wg(Me)){if(B)throw B;if(F)throw Error(F)}else Me(F,B,n)}else{if(e.getExitProcess()&&fr(!0),!l){l=!0,o&&(e.showHelp("error"),V.error()),(F||B)&&V.error(F||B);let oe=i||u;oe&&((F||B)&&V.error(""),V.error(oe))}if(B=B||new Oe(F),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,B);throw B}};let p=[],E=!1;n.usage=(G,F)=>G===null?(E=!0,p=[],n):(E=!1,p.push([G,F||""]),n),n.getUsage=()=>p,n.getUsageDisabled=()=>E,n.getPositionalGroupName=()=>r("Positionals:");let A=[];n.example=(G,F)=>{A.push([G,F||""])};let g=[];n.command=function(F,B,V,oe,Me=!1){V&&(g=g.map(he=>(he[2]=!1,he))),g.push([F,B||"",V,oe,Me])},n.getCommands=()=>g;let y={};n.describe=function(F,B){Array.isArray(F)?F.forEach(V=>{n.describe(V,B)}):typeof F=="object"?Object.keys(F).forEach(V=>{n.describe(V,F[V])}):y[F]=B},n.getDescriptions=()=>y;let w=[];n.epilog=G=>{w.push(G)};let M=!1,x;n.wrap=G=>{M=!0,x=G},n.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(M||(x=Le(),M=!0),x);let q="__yargsString__:";n.deferY18nLookup=G=>q+G,n.help=function(){if(te)return te;ne();let F=e.customScriptName?e.$0:t.path.basename(e.$0),B=e.getDemandedOptions(),V=e.getDemandedCommands(),oe=e.getDeprecatedOptions(),Me=e.getGroups(),he=e.getOptions(),ve=[];ve=ve.concat(Object.keys(y)),ve=ve.concat(Object.keys(B)),ve=ve.concat(Object.keys(V)),ve=ve.concat(Object.keys(he.default)),ve=ve.filter(Ue),ve=Object.keys(ve.reduce((ee,be)=>(be!=="_"&&(ee[be]=!0),ee),{}));let jt=n.getWrap(),Ie=t.cliui({width:jt,wrap:!!jt});if(!E){if(p.length)p.forEach(ee=>{Ie.div({text:`${ee[0].replace(/\$0/g,F)}`}),ee[1]&&Ie.div({text:`${ee[1]}`,padding:[1,0,0,0]})}),Ie.div();else if(g.length){let ee=null;V._?ee=`${F} <${r("command")}>
24
+ `:ee=`${F} [${r("command")}]
25
+ `,Ie.div(`${ee}`)}}if(g.length>1||g.length===1&&!g[0][2]){Ie.div(r("Commands:"));let ee=e.getInternalMethods().getContext(),be=ee.commands.length?`${ee.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(g=g.sort((se,Te)=>se[0].localeCompare(Te[0])));let ge=F?`${F} `:"";g.forEach(se=>{let Te=`${ge}${be}${se[0].replace(/^\$0 ?/,"")}`;Ie.span({text:Te,padding:[0,2,0,2],width:Z(g,jt,`${F}${be}`)+4},{text:se[1]});let De=[];se[2]&&De.push(`[${r("default")}]`),se[3]&&se[3].length&&De.push(`[${r("aliases:")} ${se[3].join(", ")}]`),se[4]&&(typeof se[4]=="string"?De.push(`[${r("deprecated: %s",se[4])}]`):De.push(`[${r("deprecated")}]`)),De.length?Ie.div({text:De.join(" "),padding:[0,0,0,2],align:"right"}):Ie.div()}),Ie.div()}let Ze=(Object.keys(he.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);ve=ve.filter(ee=>!e.parsed.newAliases[ee]&&Ze.every(be=>(he.alias[be]||[]).indexOf(ee)===-1));let Je=r("Options:");Me[Je]||(Me[Je]=[]),ae(ve,he.alias,Me,Je);let Rt=ee=>/^--/.test(ci(ee)),J=Object.keys(Me).filter(ee=>Me[ee].length>0).map(ee=>{let be=Me[ee].filter(Ue).map(ge=>{if(Ze.includes(ge))return ge;for(let se=0,Te;(Te=Ze[se])!==void 0;se++)if((he.alias[Te]||[]).includes(ge))return Te;return ge});return{groupName:ee,normalizedKeys:be}}).filter(({normalizedKeys:ee})=>ee.length>0).map(({groupName:ee,normalizedKeys:be})=>{let ge=be.reduce((se,Te)=>(se[Te]=[Te].concat(he.alias[Te]||[]).map(De=>ee===n.getPositionalGroupName()?De:(/^[0-9]$/.test(De)?he.boolean.includes(Te)?"-":"--":De.length>1?"--":"-")+De).sort((De,ut)=>Rt(De)===Rt(ut)?0:Rt(De)?1:-1).join(", "),se),{});return{groupName:ee,normalizedKeys:be,switches:ge}});if(J.filter(({groupName:ee})=>ee!==n.getPositionalGroupName()).some(({normalizedKeys:ee,switches:be})=>!ee.every(ge=>Rt(be[ge])))&&J.filter(({groupName:ee})=>ee!==n.getPositionalGroupName()).forEach(({normalizedKeys:ee,switches:be})=>{ee.forEach(ge=>{Rt(be[ge])&&(be[ge]=$g(be[ge],4))})}),J.forEach(({groupName:ee,normalizedKeys:be,switches:ge})=>{Ie.div(ee),be.forEach(se=>{let Te=ge[se],De=y[se]||"",ut=null;De.includes(q)&&(De=r(De.substring(q.length))),he.boolean.includes(se)&&(ut=`[${r("boolean")}]`),he.count.includes(se)&&(ut=`[${r("count")}]`),he.string.includes(se)&&(ut=`[${r("string")}]`),he.normalize.includes(se)&&(ut=`[${r("string")}]`),he.array.includes(se)&&(ut=`[${r("array")}]`),he.number.includes(se)&&(ut=`[${r("number")}]`);let ot=I=>typeof I=="string"?`[${r("deprecated: %s",I)}]`:`[${r("deprecated")}]`,mr=[se in oe?ot(oe[se]):null,ut,se in B?`[${r("required")}]`:null,he.choices&&he.choices[se]?`[${r("choices:")} ${n.stringifiedValues(he.choices[se])}]`:null,ye(he.default[se],he.defaultDescription[se])].filter(Boolean).join(" ");Ie.span({text:ci(Te),padding:[0,2,0,2+nl(Te)],width:Z(ge,jt)+4},De);let _=e.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;mr&&!_?Ie.div({text:mr,padding:[0,0,0,2],align:"right"}):Ie.div()}),Ie.div()}),A.length&&(Ie.div(r("Examples:")),A.forEach(ee=>{ee[0]=ee[0].replace(/\$0/g,F)}),A.forEach(ee=>{ee[1]===""?Ie.div({text:ee[0],padding:[0,2,0,2]}):Ie.div({text:ee[0],padding:[0,2,0,2],width:Z(A,jt)+4},{text:ee[1]})}),Ie.div()),w.length>0){let ee=w.map(be=>be.replace(/\$0/g,F)).join(`
26
+ `);Ie.div(`${ee}
27
+ `)}return Ie.toString().replace(/\s*$/,"")};function Z(G,F,B){let V=0;return Array.isArray(G)||(G=Object.values(G).map(oe=>[oe])),G.forEach(oe=>{V=Math.max(t.stringWidth(B?`${B} ${ci(oe[0])}`:ci(oe[0]))+nl(oe[0]),V)}),F&&(V=Math.min(V,parseInt((F*.5).toString(),10))),V}function ne(){let G=e.getDemandedOptions(),F=e.getOptions();(Object.keys(F.alias)||[]).forEach(B=>{F.alias[B].forEach(V=>{y[V]&&n.describe(B,y[V]),V in G&&e.demandOption(B,G[V]),F.boolean.includes(V)&&e.boolean(B),F.count.includes(V)&&e.count(B),F.string.includes(V)&&e.string(B),F.normalize.includes(V)&&e.normalize(B),F.array.includes(V)&&e.array(B),F.number.includes(V)&&e.number(B)})})}let te;n.cacheHelpMessage=function(){te=this.help()},n.clearCachedHelpMessage=function(){te=void 0},n.hasCachedHelpMessage=function(){return!!te};function ae(G,F,B,V){let oe=[],Me=null;return Object.keys(B).forEach(he=>{oe=oe.concat(B[he])}),G.forEach(he=>{Me=[he].concat(F[he]),Me.some(ve=>oe.indexOf(ve)!==-1)||B[V].push(he)}),oe}function Ue(G){return e.getOptions().hiddenOptions.indexOf(G)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}n.showHelp=G=>{let F=e.getInternalMethods().getLoggerInstance();G||(G="error"),(typeof G=="function"?G:F[G])(n.help())},n.functionDescription=G=>["(",G.name?t.Parser.decamelize(G.name,"-"):r("generated-value"),")"].join(""),n.stringifiedValues=function(F,B){let V="",oe=B||", ",Me=[].concat(F);return!F||!Me.length||Me.forEach(he=>{V.length&&(V+=oe),V+=JSON.stringify(he)}),V};function ye(G,F){let B=`[${r("default:")} `;if(G===void 0&&!F)return null;if(F)B+=F;else switch(typeof G){case"string":B+=`"${G}"`;break;case"object":B+=JSON.stringify(G);break;default:B+=G}return`${B}]`}function Le(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let ue=null;n.version=G=>{ue=G},n.showVersion=G=>{let F=e.getInternalMethods().getLoggerInstance();G||(G="error"),(typeof G=="function"?G:F[G])(ue)},n.reset=function(F){return i=null,l=!1,p=[],E=!1,w=[],A=[],g=[],y=lr(y,B=>!F[B]),n};let le=[];return n.freeze=function(){le.push({failMessage:i,failureOutput:l,usages:p,usageDisabled:E,epilogs:w,examples:A,commands:g,descriptions:y})},n.unfreeze=function(F=!1){let B=le.pop();B&&(F?(y={...B.descriptions,...y},g=[...B.commands,...g],p=[...B.usages,...p],A=[...B.examples,...A],w=[...B.epilogs,...w]):{failMessage:i,failureOutput:l,usages:p,usageDisabled:E,epilogs:w,examples:A,commands:g,descriptions:y}=B)},n}function Xa(e){return typeof e=="object"}function $g(e,t){return Xa(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function nl(e){return Xa(e)?e.indentation:0}function ci(e){return Xa(e)?e.text:e}var il=`###-begin-{{app_name}}-completions-###
21
28
  #
22
29
  # yargs command completion script
23
30
  #
@@ -45,7 +52,7 @@ _{{app_name}}_yargs_completions()
45
52
  }
46
53
  complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
47
54
  ###-end-{{app_name}}-completions-###
48
- `,li=`#compdef {{app_name}}
55
+ `,al=`#compdef {{app_name}}
49
56
  ###-begin-{{app_name}}-completions-###
50
57
  #
51
58
  # yargs command completion script
@@ -64,14 +71,14 @@ _{{app_name}}_yargs_completions()
64
71
  }
65
72
  compdef _{{app_name}}_yargs_completions {{app_name}}
66
73
  ###-end-{{app_name}}-completions-###
67
- `;var Mn=class{constructor(e,t,n,r){var s,c,d;this.yargs=e,this.usage=t,this.command=n,this.shim=r,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(d=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((c=this.shim.getEnv("ZSH_NAME"))===null||c===void 0?void 0:c.includes("zsh")))!==null&&d!==void 0?d:!1}defaultCompletion(e,t,n,r){let s=this.command.getCommandHandlers();for(let d=0,b=e.length;d<b;++d)if(s[e[d]]&&s[e[d]].builder){let y=s[e[d]].builder;if(Yt(y)){this.indexAfterLastReset=d+1;let E=this.yargs.getInternalMethods().reset();return y(E,!0),E.argv}}let c=[];this.commandCompletions(c,e,n),this.optionCompletions(c,e,t,n),this.choicesFromOptionsCompletions(c,e,t,n),this.choicesFromPositionalsCompletions(c,e,t,n),r(null,c)}commandCompletions(e,t,n){let r=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&r[r.length-1]!==n&&!this.previousArgHasChoices(t)&&this.usage.getCommands().forEach(s=>{let c=Xe(s[0]).cmd;if(t.indexOf(c)===-1)if(!this.zshShell)e.push(c);else{let d=s[1]||"";e.push(c.replace(/:/g,"\\:")+":"+d)}})}optionCompletions(e,t,n,r){if((r.match(/^-/)||r===""&&e.length===0)&&!this.previousArgHasChoices(t)){let s=this.yargs.getOptions(),c=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(d=>{let b=!!s.configuration["boolean-negation"]&&s.boolean.includes(d);!c.includes(d)&&!s.hiddenOptions.includes(d)&&!this.argsContainKey(t,d,b)&&this.completeOptionKey(d,e,r,b&&!!s.default[d])})}}choicesFromOptionsCompletions(e,t,n,r){if(this.previousArgHasChoices(t)){let s=this.getPreviousArgChoices(t);s&&s.length>0&&e.push(...s.map(c=>c.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(e,t,n,r){if(r===""&&e.length>0&&this.previousArgHasChoices(t))return;let s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],c=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),d=s[n._.length-c-1];if(!d)return;let b=this.yargs.getOptions().choices[d]||[];for(let y of b)y.startsWith(r)&&e.push(y.replace(/:/g,"\\:"))}getPreviousArgChoices(e){if(e.length<1)return;let t=e[e.length-1],n="";if(!t.startsWith("-")&&e.length>1&&(n=t,t=e[e.length-2]),!t.startsWith("-"))return;let r=t.replace(/^-+/,""),s=this.yargs.getOptions(),c=[r,...this.yargs.getAliases()[r]||[]],d;for(let b of c)if(Object.prototype.hasOwnProperty.call(s.key,b)&&Array.isArray(s.choices[b])){d=s.choices[b];break}if(d)return d.filter(b=>!n||b.startsWith(n))}previousArgHasChoices(e){let t=this.getPreviousArgChoices(e);return t!==void 0&&t.length>0}argsContainKey(e,t,n){let r=s=>e.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1;if(r(t)||n&&r(`no-${t}`))return!0;if(this.aliases){for(let s of this.aliases[t])if(r(s))return!0}return!1}completeOptionKey(e,t,n,r){var s,c,d,b;let y=e;if(this.zshShell){let _=this.usage.getDescriptions(),F=(c=(s=this===null||this===void 0?void 0:this.aliases)===null||s===void 0?void 0:s[e])===null||c===void 0?void 0:c.find(B=>{let G=_[B];return typeof G=="string"&&G.length>0}),S=F?_[F]:void 0,x=(b=(d=_[e])!==null&&d!==void 0?d:S)!==null&&b!==void 0?b:"";y=`${e.replace(/:/g,"\\:")}:${x.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let E=_=>/^--/.test(_),w=_=>/^[^0-9]$/.test(_),f=!E(n)&&w(e)?"-":"--";t.push(f+y),r&&t.push(f+"no-"+y)}customCompletion(e,t,n,r){if(ve(this.customCompletionFunction,null,this.shim),Ha(this.customCompletionFunction)){let s=this.customCompletionFunction(n,t);return le(s)?s.then(c=>{this.shim.process.nextTick(()=>{r(null,c)})}).catch(c=>{this.shim.process.nextTick(()=>{r(c,void 0)})}):r(null,s)}else return Ya(this.customCompletionFunction)?this.customCompletionFunction(n,t,(s=r)=>this.defaultCompletion(e,t,n,s),s=>{r(null,s)}):this.customCompletionFunction(n,t,s=>{r(null,s)})}getCompletion(e,t){let n=e.length?e[e.length-1]:"",r=this.yargs.parse(e,!0),s=this.customCompletionFunction?c=>this.customCompletion(e,c,n,t):c=>this.defaultCompletion(e,c,n,t);return le(r)?r.then(s):s(r)}generateCompletionScript(e,t){let n=this.zshShell?li:ci,r=this.shim.path.basename(e);return e.match(/\.js$/)&&(e=`./${e}`),n=n.replace(/{{app_name}}/g,r),n=n.replace(/{{completion_command}}/g,t),n.replace(/{{app_path}}/g,e)}registerFunction(e){this.customCompletionFunction=e}setParsed(e){this.aliases=e.aliases}};function fi(i,e,t,n){return new Mn(i,e,t,n)}function Ha(i){return i.length<3}function Ya(i){return i.length>3}function hi(i,e){if(i.length===0)return e.length;if(e.length===0)return i.length;let t=[],n;for(n=0;n<=e.length;n++)t[n]=[n];let r;for(r=0;r<=i.length;r++)t[0][r]=r;for(n=1;n<=e.length;n++)for(r=1;r<=i.length;r++)e.charAt(n-1)===i.charAt(r-1)?t[n][r]=t[n-1][r-1]:n>1&&r>1&&e.charAt(n-2)===i.charAt(r-1)&&e.charAt(n-1)===i.charAt(r-2)?t[n][r]=t[n-2][r-2]+1:t[n][r]=Math.min(t[n-1][r-1]+1,Math.min(t[n][r-1]+1,t[n-1][r]+1));return t[e.length][i.length]}var di=["$0","--","_"];function pi(i,e,t){let n=t.y18n.__,r=t.y18n.__n,s={};s.nonOptionCount=function(w){let f=i.getDemandedCommands(),F=w._.length+(w["--"]?w["--"].length:0)-i.getInternalMethods().getContext().commands.length;f._&&(F<f._.min||F>f._.max)&&(F<f._.min?f._.minMsg!==void 0?e.fail(f._.minMsg?f._.minMsg.replace(/\$0/g,F.toString()).replace(/\$1/,f._.min.toString()):null):e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",F,F.toString(),f._.min.toString())):F>f._.max&&(f._.maxMsg!==void 0?e.fail(f._.maxMsg?f._.maxMsg.replace(/\$0/g,F.toString()).replace(/\$1/,f._.max.toString()):null):e.fail(r("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",F,F.toString(),f._.max.toString()))))},s.positionalCount=function(w,f){f<w&&e.fail(r("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",f,f+"",w+""))},s.requiredArguments=function(w,f){let _=null;for(let F of Object.keys(f))(!Object.prototype.hasOwnProperty.call(w,F)||typeof w[F]>"u")&&(_=_||{},_[F]=f[F]);if(_){let F=[];for(let x of Object.keys(_)){let B=_[x];B&&F.indexOf(B)<0&&F.push(B)}let S=F.length?`
68
- ${F.join(`
69
- `)}`:"";e.fail(r("Missing required argument: %s","Missing required arguments: %s",Object.keys(_).length,Object.keys(_).join(", ")+S))}},s.unknownArguments=function(w,f,_,F,S=!0){var x;let B=i.getInternalMethods().getCommandInstance().getCommands(),G=[],X=i.getInternalMethods().getContext();if(Object.keys(w).forEach(K=>{!di.includes(K)&&!Object.prototype.hasOwnProperty.call(_,K)&&!Object.prototype.hasOwnProperty.call(i.getInternalMethods().getParseContext(),K)&&!s.isValidAndSomeAliasIsNotNew(K,f)&&G.push(K)}),S&&(X.commands.length>0||B.length>0||F)&&w._.slice(X.commands.length).forEach(K=>{B.includes(""+K)||G.push(""+K)}),S){let k=((x=i.getDemandedCommands()._)===null||x===void 0?void 0:x.max)||0,de=X.commands.length+k;de<w._.length&&w._.slice(de).forEach(ne=>{ne=String(ne),!X.commands.includes(ne)&&!G.includes(ne)&&G.push(ne)})}G.length&&e.fail(r("Unknown argument: %s","Unknown arguments: %s",G.length,G.map(K=>K.trim()?K:`"${K}"`).join(", ")))},s.unknownCommands=function(w){let f=i.getInternalMethods().getCommandInstance().getCommands(),_=[],F=i.getInternalMethods().getContext();return(F.commands.length>0||f.length>0)&&w._.slice(F.commands.length).forEach(S=>{f.includes(""+S)||_.push(""+S)}),_.length>0?(e.fail(r("Unknown command: %s","Unknown commands: %s",_.length,_.join(", "))),!0):!1},s.isValidAndSomeAliasIsNotNew=function(w,f){if(!Object.prototype.hasOwnProperty.call(f,w))return!1;let _=i.parsed.newAliases;return[w,...f[w]].some(F=>!Object.prototype.hasOwnProperty.call(_,F)||!_[w])},s.limitedChoices=function(w){let f=i.getOptions(),_={};if(!Object.keys(f.choices).length)return;Object.keys(w).forEach(x=>{di.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(f.choices,x)&&[].concat(w[x]).forEach(B=>{f.choices[x].indexOf(B)===-1&&B!==void 0&&(_[x]=(_[x]||[]).concat(B))})});let F=Object.keys(_);if(!F.length)return;let S=n("Invalid values:");F.forEach(x=>{S+=`
70
- ${n("Argument: %s, Given: %s, Choices: %s",x,e.stringifiedValues(_[x]),e.stringifiedValues(f.choices[x]))}`}),e.fail(S)};let c={};s.implies=function(w,f){D("<string|object> [array|number|string]",[w,f],arguments.length),typeof w=="object"?Object.keys(w).forEach(_=>{s.implies(_,w[_])}):(i.global(w),c[w]||(c[w]=[]),Array.isArray(f)?f.forEach(_=>s.implies(w,_)):(ve(f,void 0,t),c[w].push(f)))},s.getImplied=function(){return c};function d(E,w){let f=Number(w);return w=isNaN(f)?w:f,typeof w=="number"?w=E._.length>=w:w.match(/^--no-.+/)?(w=w.match(/^--no-(.+)/)[1],w=!Object.prototype.hasOwnProperty.call(E,w)):w=Object.prototype.hasOwnProperty.call(E,w),w}s.implications=function(w){let f=[];if(Object.keys(c).forEach(_=>{let F=_;(c[_]||[]).forEach(S=>{let x=F,B=S;x=d(w,x),S=d(w,S),x&&!S&&f.push(` ${F} -> ${B}`)})}),f.length){let _=`${n("Implications failed:")}
71
- `;f.forEach(F=>{_+=F}),e.fail(_)}};let b={};s.conflicts=function(w,f){D("<string|object> [array|string]",[w,f],arguments.length),typeof w=="object"?Object.keys(w).forEach(_=>{s.conflicts(_,w[_])}):(i.global(w),b[w]||(b[w]=[]),Array.isArray(f)?f.forEach(_=>s.conflicts(w,_)):b[w].push(f))},s.getConflicting=()=>b,s.conflicting=function(w){Object.keys(w).forEach(f=>{b[f]&&b[f].forEach(_=>{_&&w[f]!==void 0&&w[_]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",f,_))})}),i.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(b).forEach(f=>{b[f].forEach(_=>{_&&w[t.Parser.camelCase(f)]!==void 0&&w[t.Parser.camelCase(_)]!==void 0&&e.fail(n("Arguments %s and %s are mutually exclusive",f,_))})})},s.recommendCommands=function(w,f){f=f.sort((x,B)=>B.length-x.length);let F=null,S=1/0;for(let x=0,B;(B=f[x])!==void 0;x++){let G=hi(w,B);G<=3&&G<S&&(S=G,F=B)}F&&e.fail(n("Did you mean %s?",F))},s.reset=function(w){return c=ke(c,f=>!w[f]),b=ke(b,f=>!w[f]),s};let y=[];return s.freeze=function(){y.push({implied:c,conflicting:b})},s.unfreeze=function(){let w=y.pop();ve(w,void 0,t),{implied:c,conflicting:b}=w},s}var Rn=[],Ft;function Mt(i,e,t,n){Ft=n;let r={};if(Object.prototype.hasOwnProperty.call(i,"extends")){if(typeof i.extends!="string")return r;let s=/\.json|\..*rc$/.test(i.extends),c=null;if(s)c=qa(e,i.extends);else try{c=ze.resolve(i.extends)}catch{return i}Va(c),Rn.push(c),r=s?JSON.parse(Ft.readFileSync(c,"utf8")):ze(i.extends),delete i.extends,r=Mt(r,Ft.path.dirname(c),t,Ft)}return Rn=[],t?gi(r,i):Object.assign({},r,i)}function Va(i){if(Rn.indexOf(i)>-1)throw new ce(`Circular extended configurations: '${i}'.`)}function qa(i,e){return Ft.path.resolve(i,e)}function gi(i,e){let t={};function n(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,i);for(let r of Object.keys(e))n(e[r])&&n(t[r])?t[r]=gi(i[r],e[r]):t[r]=e[r];return t}var T=function(i,e,t,n,r){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?r.call(i,t):r?r.value=t:e.set(i,t),t},a=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},we,ot,Rt,De,Fe,qt,Je,at,Kt,Te,Xt,$e,He,Me,Le,kt,Et,xe,L,Zt,Jt,Re,ut,vt,ct,Qe,Qt,z,lt,ft,ht,V,en,Ye,he;function Di(i){return(e=[],t=i.process.cwd(),n)=>{let r=new Hn(e,t,n,i);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var mi=Symbol("copyDoubleDash"),bi=Symbol("copyDoubleDash"),Nn=Symbol("deleteFromParserHintObject"),wi=Symbol("emitWarning"),xi=Symbol("freeze"),yi=Symbol("getDollarZero"),dt=Symbol("getParserConfiguration"),Ei=Symbol("getUsageConfiguration"),Dn=Symbol("guessLocale"),vi=Symbol("guessVersion"),Oi=Symbol("parsePositionalNumbers"),Tn=Symbol("pkgUp"),et=Symbol("populateParserHintArray"),Ot=Symbol("populateParserHintSingleValueDictionary"),$n=Symbol("populateParserHintArrayDictionary"),Ln=Symbol("populateParserHintDictionary"),Wn=Symbol("sanitizeKey"),Un=Symbol("setKey"),Bn=Symbol("unfreeze"),_i=Symbol("validateAsync"),Si=Symbol("getCommandInstance"),Ci=Symbol("getContext"),Ai=Symbol("getHasOutput"),ji=Symbol("getLoggerInstance"),Pi=Symbol("getParseContext"),Ii=Symbol("getUsageInstance"),Fi=Symbol("getValidationInstance"),tn=Symbol("hasParseCallback"),Mi=Symbol("isGlobalContext"),pt=Symbol("postProcess"),Ri=Symbol("rebase"),Gn=Symbol("reset"),Nt=Symbol("runYargsParserAndExecuteCommands"),zn=Symbol("runValidation"),Ni=Symbol("setHasOutput"),gt=Symbol("kTrackManuallySetKeys"),Hn=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,we.set(this,void 0),ot.set(this,void 0),Rt.set(this,{commands:[],fullCommands:[]}),De.set(this,null),Fe.set(this,null),qt.set(this,"show-hidden"),Je.set(this,null),at.set(this,!0),Kt.set(this,{}),Te.set(this,!0),Xt.set(this,[]),$e.set(this,void 0),He.set(this,{}),Me.set(this,!1),Le.set(this,null),kt.set(this,!0),Et.set(this,void 0),xe.set(this,""),L.set(this,void 0),Zt.set(this,void 0),Jt.set(this,{}),Re.set(this,null),ut.set(this,null),vt.set(this,{}),ct.set(this,{}),Qe.set(this,void 0),Qt.set(this,!1),z.set(this,void 0),lt.set(this,!1),ft.set(this,!1),ht.set(this,!1),V.set(this,void 0),en.set(this,{}),Ye.set(this,null),he.set(this,void 0),T(this,z,r,"f"),T(this,Qe,e,"f"),T(this,ot,t,"f"),T(this,Zt,n,"f"),T(this,$e,new Ht(this),"f"),this.$0=this[yi](),this[Gn](),T(this,we,a(this,we,"f"),"f"),T(this,V,a(this,V,"f"),"f"),T(this,he,a(this,he,"f"),"f"),T(this,L,a(this,L,"f"),"f"),a(this,L,"f").showHiddenOpt=a(this,qt,"f"),T(this,Et,this[bi](),"f")}addHelpOpt(e,t){let n="help";return D("[string|boolean] [string]",[e,t],arguments.length),a(this,Le,"f")&&(this[Nn](a(this,Le,"f")),T(this,Le,null,"f")),e===!1&&t===void 0?this:(T(this,Le,typeof e=="string"?e:n,"f"),this.boolean(a(this,Le,"f")),this.describe(a(this,Le,"f"),t||a(this,V,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(D("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e=="string"?e:a(this,qt,"f");return this.boolean(n),this.describe(n,t||a(this,V,"f").deferY18nLookup("Show hidden options")),a(this,L,"f").showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return D("<object|string|array> [string|array]",[e,t],arguments.length),this[$n](this.alias.bind(this),"alias",e,t),this}array(e){return D("<array|string>",[e],arguments.length),this[et]("array",e),this[gt](e),this}boolean(e){return D("<array|string>",[e],arguments.length),this[et]("boolean",e),this[gt](e),this}check(e,t){return D("<function> [boolean]",[e,t],arguments.length),this.middleware((n,r)=>st(()=>e(n,r.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&a(this,V,"f").fail(s.toString(),s):a(this,V,"f").fail(a(this,z,"f").y18n.__("Argument check failed: %s",e.toString())),n),s=>(a(this,V,"f").fail(s.message?s.message:s.toString(),s),n)),!1,t),this}choices(e,t){return D("<object|string|array> [string|array]",[e,t],arguments.length),this[$n](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(D("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new ce("coerce callback must be provided");for(let n of e)this.coerce(n,t);return this}else if(typeof e=="object"){for(let n of Object.keys(e))this.coerce(n,e[n]);return this}if(!t)throw new ce("coerce callback must be provided");return a(this,L,"f").key[e]=!0,a(this,$e,"f").addCoerceMiddleware((n,r)=>{let s;return Object.prototype.hasOwnProperty.call(n,e)?st(()=>(s=r.getAliases(),t(n[e])),d=>{n[e]=d;let b=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[e]&&b!==!0)for(let y of s[e])n[y]=d;return n},d=>{throw new ce(d.message)}):n},e),this}conflicts(e,t){return D("<string|object> [string|array]",[e,t],arguments.length),a(this,he,"f").conflicts(e,t),this}config(e="config",t,n){return D("[object|string] [string|function] [function]",[e,t,n],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=Mt(e,a(this,ot,"f"),this[dt]()["deep-merge-config"]||!1,a(this,z,"f")),a(this,L,"f").configObjects=(a(this,L,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(n=t,t=void 0),this.describe(e,t||a(this,V,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{a(this,L,"f").config[r]=n||!0}),this)}completion(e,t,n){return D("[string] [string|boolean|function] [function]",[e,t,n],arguments.length),typeof t=="function"&&(n=t,t=void 0),T(this,Fe,e||a(this,Fe,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(a(this,Fe,"f"),t),n&&a(this,De,"f").registerFunction(n),this}command(e,t,n,r,s,c){return D("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,n,r,s,c],arguments.length),a(this,we,"f").addHandler(e,t,n,r,s,c),this}commands(e,t,n,r,s,c){return this.command(e,t,n,r,s,c)}commandDir(e,t){D("<string> [object]",[e,t],arguments.length);let n=a(this,Zt,"f")||a(this,z,"f").require;return a(this,we,"f").addDirectory(e,n,a(this,z,"f").getCallerFile(),t),this}count(e){return D("<array|string>",[e],arguments.length),this[et]("count",e),this[gt](e),this}default(e,t,n){return D("<object|string|array> [*] [string]",[e,t,n],arguments.length),n&&(jn(e,a(this,z,"f")),a(this,L,"f").defaultDescription[e]=n),typeof t=="function"&&(jn(e,a(this,z,"f")),a(this,L,"f").defaultDescription[e]||(a(this,L,"f").defaultDescription[e]=a(this,V,"f").functionDescription(t)),t=t.call()),this[Ot](this.default.bind(this),"default",e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return D("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,n,r],arguments.length),typeof t!="number"&&(n=t,t=1/0),this.global("_",!1),a(this,L,"f").demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(r=>{ve(n,!0,a(this,z,"f")),this.demandOption(r,n)}),t=1/0):typeof t!="number"&&(n=t,t=1/0),typeof e=="number"?(ve(n,!0,a(this,z,"f")),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(r=>{ve(n,!0,a(this,z,"f")),this.demandOption(r,n)}):typeof n=="string"?this.demandOption(e,n):(n===!0||typeof n>"u")&&this.demandOption(e),this}demandOption(e,t){return D("<object|string|array> [string]",[e,t],arguments.length),this[Ot](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return D("<string> [string|boolean]",[e,t],arguments.length),a(this,L,"f").deprecatedOptions[e]=t,this}describe(e,t){return D("<object|string|array> [string]",[e,t],arguments.length),this[Un](e,!0),a(this,V,"f").describe(e,t),this}detectLocale(e){return D("<boolean>",[e],arguments.length),T(this,at,e,"f"),this}env(e){return D("[string|boolean]",[e],arguments.length),e===!1?delete a(this,L,"f").envPrefix:a(this,L,"f").envPrefix=e||"",this}epilogue(e){return D("<string>",[e],arguments.length),a(this,V,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return D("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(n=>this.example(...n)):a(this,V,"f").example(e,t),this}exit(e,t){T(this,Me,!0,"f"),T(this,Je,t,"f"),a(this,Te,"f")&&a(this,z,"f").process.exit(e)}exitProcess(e=!0){return D("[boolean]",[e],arguments.length),T(this,Te,e,"f"),this}fail(e){if(D("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new ce("Invalid first argument. Expected function or boolean 'false'");return a(this,V,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return D("<array> [function]",[e,t],arguments.length),t?a(this,De,"f").getCompletion(e,t):new Promise((n,r)=>{a(this,De,"f").getCompletion(e,(s,c)=>{s?r(s):n(c)})})}getDemandedOptions(){return D([],0),a(this,L,"f").demandedOptions}getDemandedCommands(){return D([],0),a(this,L,"f").demandedCommands}getDeprecatedOptions(){return D([],0),a(this,L,"f").deprecatedOptions}getDetectLocale(){return a(this,at,"f")}getExitProcess(){return a(this,Te,"f")}getGroups(){return Object.assign({},a(this,He,"f"),a(this,ct,"f"))}getHelp(){if(T(this,Me,!0,"f"),!a(this,V,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Nt](a(this,Qe,"f"),void 0,void 0,0,!0);if(le(t))return t.then(()=>a(this,V,"f").help())}let e=a(this,we,"f").runDefaultBuilderOn(this);if(le(e))return e.then(()=>a(this,V,"f").help())}return Promise.resolve(a(this,V,"f").help())}getOptions(){return a(this,L,"f")}getStrict(){return a(this,lt,"f")}getStrictCommands(){return a(this,ft,"f")}getStrictOptions(){return a(this,ht,"f")}global(e,t){return D("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?a(this,L,"f").local=a(this,L,"f").local.filter(n=>e.indexOf(n)===-1):e.forEach(n=>{a(this,L,"f").local.includes(n)||a(this,L,"f").local.push(n)}),this}group(e,t){D("<string|array> <string>",[e,t],arguments.length);let n=a(this,ct,"f")[t]||a(this,He,"f")[t];a(this,ct,"f")[t]&&delete a(this,ct,"f")[t];let r={};return a(this,He,"f")[t]=(n||[]).concat(e).filter(s=>r[s]?!1:r[s]=!0),this}hide(e){return D("<string>",[e],arguments.length),a(this,L,"f").hiddenOptions.push(e),this}implies(e,t){return D("<string|object> [number|string|array]",[e,t],arguments.length),a(this,he,"f").implies(e,t),this}locale(e){return D("[string]",[e],arguments.length),e===void 0?(this[Dn](),a(this,z,"f").y18n.getLocale()):(T(this,at,!1,"f"),a(this,z,"f").y18n.setLocale(e),this)}middleware(e,t,n){return a(this,$e,"f").addMiddleware(e,!!t,n)}nargs(e,t){return D("<string|object|array> [number]",[e,t],arguments.length),this[Ot](this.nargs.bind(this),"narg",e,t),this}normalize(e){return D("<array|string>",[e],arguments.length),this[et]("normalize",e),this}number(e){return D("<array|string>",[e],arguments.length),this[et]("number",e),this[gt](e),this}option(e,t){if(D("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(n=>{this.options(n,e[n])});else{typeof t!="object"&&(t={}),this[gt](e),a(this,Ye,"f")&&(e==="version"||t?.alias==="version")&&this[wi](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
72
- `),void 0,"versionWarning"),a(this,L,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption=="string"?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),"default"in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type==="boolean")&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type==="array")&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type==="number")&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type==="string")&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type==="count")&&this.count(e),typeof t.global=="boolean"&&this.global(e,t.global),t.defaultDescription&&(a(this,L,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let s=t.describe||t.description||t.desc,c=a(this,V,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(c,e)||typeof s=="string")&&this.describe(e,s),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){D("[string|array] [function|boolean|object] [function]",[e,t,n],arguments.length),this[xi](),typeof e>"u"&&(e=a(this,Qe,"f")),typeof t=="object"&&(T(this,ut,t,"f"),t=n),typeof t=="function"&&(T(this,Re,t,"f"),t=!1),t||T(this,Qe,e,"f"),a(this,Re,"f")&&T(this,Te,!1,"f");let r=this[Nt](e,!!t),s=this.parsed;return a(this,De,"f").setParsed(this.parsed),le(r)?r.then(c=>(a(this,Re,"f")&&a(this,Re,"f").call(this,a(this,Je,"f"),c,a(this,xe,"f")),c)).catch(c=>{throw a(this,Re,"f")&&a(this,Re,"f")(c,this.parsed.argv,a(this,xe,"f")),c}).finally(()=>{this[Bn](),this.parsed=s}):(a(this,Re,"f")&&a(this,Re,"f").call(this,a(this,Je,"f"),r,a(this,xe,"f")),this[Bn](),this.parsed=s,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return le(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(le(r))throw new ce(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return D("<object>",[e],arguments.length),T(this,Jt,e,"f"),this}pkgConf(e,t){D("<string> [string]",[e,t],arguments.length);let n=null,r=this[Tn](t||a(this,ot,"f"));return r[e]&&typeof r[e]=="object"&&(n=Mt(r[e],t||a(this,ot,"f"),this[dt]()["deep-merge-config"]||!1,a(this,z,"f")),a(this,L,"f").configObjects=(a(this,L,"f").configObjects||[]).concat(n)),this}positional(e,t){D("<string> <object>",[e,t],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=ke(t,(c,d)=>c==="type"&&!["string","number","boolean"].includes(d)?!1:n.includes(c));let r=a(this,Rt,"f").fullCommands[a(this,Rt,"f").fullCommands.length-1],s=r?a(this,we,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return xt(s).forEach(c=>{let d=s[c];Array.isArray(d)?d.indexOf(e)!==-1&&(t[c]=!0):d[e]&&!(c in t)&&(t[c]=d[e])}),this.group(e,a(this,V,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return D("[boolean]",[e],arguments.length),T(this,Qt,e,"f"),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return D("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&a(this,L,"f").narg[e]?this:(this[Ot](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,t){return D("[string] [string]",[e,t],arguments.length),e=e||this.$0,a(this,Et,"f").log(a(this,De,"f").generateCompletionScript(e,t||a(this,Fe,"f")||"completion")),this}showHelp(e){if(D("[string|function]",[e],arguments.length),T(this,Me,!0,"f"),!a(this,V,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[Nt](a(this,Qe,"f"),void 0,void 0,0,!0);if(le(n))return n.then(()=>{a(this,V,"f").showHelp(e)}),this}let t=a(this,we,"f").runDefaultBuilderOn(this);if(le(t))return t.then(()=>{a(this,V,"f").showHelp(e)}),this}return a(this,V,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return D("[boolean|string] [string]",[e,t],arguments.length),a(this,V,"f").showHelpOnFail(e,t),this}showVersion(e){return D("[string|function]",[e],arguments.length),a(this,V,"f").showVersion(e),this}skipValidation(e){return D("<array|string>",[e],arguments.length),this[et]("skipValidation",e),this}strict(e){return D("[boolean]",[e],arguments.length),T(this,lt,e!==!1,"f"),this}strictCommands(e){return D("[boolean]",[e],arguments.length),T(this,ft,e!==!1,"f"),this}strictOptions(e){return D("[boolean]",[e],arguments.length),T(this,ht,e!==!1,"f"),this}string(e){return D("<array|string>",[e],arguments.length),this[et]("string",e),this[gt](e),this}terminalWidth(){return D([],0),a(this,z,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return D("<object>",[e],arguments.length),T(this,at,!1,"f"),a(this,z,"f").y18n.updateLocale(e),this}usage(e,t,n,r){if(D("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,n,r],arguments.length),t!==void 0){if(ve(e,null,a(this,z,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,n,r);throw new ce(".usage() description must start with $0 if being used as alias for .command()")}else return a(this,V,"f").usage(e),this}usageConfiguration(e){return D("<object>",[e],arguments.length),T(this,en,e,"f"),this}version(e,t,n){let r="version";if(D("[boolean|string] [string] [string]",[e,t,n],arguments.length),a(this,Ye,"f")&&(this[Nn](a(this,Ye,"f")),a(this,V,"f").version(void 0),T(this,Ye,null,"f")),arguments.length===0)n=this[vi](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return T(this,Ye,typeof e=="string"?e:r,"f"),t=t||a(this,V,"f").deferY18nLookup("Show version number"),a(this,V,"f").version(n||void 0),this.boolean(a(this,Ye,"f")),this.describe(a(this,Ye,"f"),t),this}wrap(e){return D("<number|null|undefined>",[e],arguments.length),a(this,V,"f").wrap(e),this}[(we=new WeakMap,ot=new WeakMap,Rt=new WeakMap,De=new WeakMap,Fe=new WeakMap,qt=new WeakMap,Je=new WeakMap,at=new WeakMap,Kt=new WeakMap,Te=new WeakMap,Xt=new WeakMap,$e=new WeakMap,He=new WeakMap,Me=new WeakMap,Le=new WeakMap,kt=new WeakMap,Et=new WeakMap,xe=new WeakMap,L=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Re=new WeakMap,ut=new WeakMap,vt=new WeakMap,ct=new WeakMap,Qe=new WeakMap,Qt=new WeakMap,z=new WeakMap,lt=new WeakMap,ft=new WeakMap,ht=new WeakMap,V=new WeakMap,en=new WeakMap,Ye=new WeakMap,he=new WeakMap,mi)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[bi](){return{log:(...e)=>{this[tn]()||console.log(...e),T(this,Me,!0,"f"),a(this,xe,"f").length&&T(this,xe,a(this,xe,"f")+`
73
- `,"f"),T(this,xe,a(this,xe,"f")+e.join(" "),"f")},error:(...e)=>{this[tn]()||console.error(...e),T(this,Me,!0,"f"),a(this,xe,"f").length&&T(this,xe,a(this,xe,"f")+`
74
- `,"f"),T(this,xe,a(this,xe,"f")+e.join(" "),"f")}}}[Nn](e){xt(a(this,L,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let n=a(this,L,"f")[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n=="object"&&delete n[e]}),delete a(this,V,"f").getDescriptions()[e]}[wi](e,t,n){a(this,Kt,"f")[n]||(a(this,z,"f").process.emitWarning(e,t),a(this,Kt,"f")[n]=!0)}[xi](){a(this,Xt,"f").push({options:a(this,L,"f"),configObjects:a(this,L,"f").configObjects.slice(0),exitProcess:a(this,Te,"f"),groups:a(this,He,"f"),strict:a(this,lt,"f"),strictCommands:a(this,ft,"f"),strictOptions:a(this,ht,"f"),completionCommand:a(this,Fe,"f"),output:a(this,xe,"f"),exitError:a(this,Je,"f"),hasOutput:a(this,Me,"f"),parsed:this.parsed,parseFn:a(this,Re,"f"),parseContext:a(this,ut,"f")}),a(this,V,"f").freeze(),a(this,he,"f").freeze(),a(this,we,"f").freeze(),a(this,$e,"f").freeze()}[yi](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(a(this,z,"f").process.argv()[0])?t=a(this,z,"f").process.argv().slice(1,2):t=a(this,z,"f").process.argv().slice(0,1),e=t.map(n=>{let r=this[Ri](a(this,ot,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<n.length?r:n}).join(" ").trim(),a(this,z,"f").getEnv("_")&&a(this,z,"f").getProcessArgvBin()===a(this,z,"f").getEnv("_")&&(e=a(this,z,"f").getEnv("_").replace(`${a(this,z,"f").path.dirname(a(this,z,"f").process.execPath())}/`,"")),e}[dt](){return a(this,Jt,"f")}[Ei](){return a(this,en,"f")}[Dn](){if(!a(this,at,"f"))return;let e=a(this,z,"f").getEnv("LC_ALL")||a(this,z,"f").getEnv("LC_MESSAGES")||a(this,z,"f").getEnv("LANG")||a(this,z,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[vi](){return this[Tn]().version||"unknown"}[Oi](e){let t=e["--"]?e["--"]:e._;for(let n=0,r;(r=t[n])!==void 0;n++)a(this,z,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[n]=Number(r));return e}[Tn](e){let t=e||"*";if(a(this,vt,"f")[t])return a(this,vt,"f")[t];let n={};try{let r=e||a(this,z,"f").mainFilename;!e&&a(this,z,"f").path.extname(r)&&(r=a(this,z,"f").path.dirname(r));let s=a(this,z,"f").findUp(r,(c,d)=>{if(d.includes("package.json"))return"package.json"});ve(s,void 0,a(this,z,"f")),n=JSON.parse(a(this,z,"f").readFileSync(s,"utf8"))}catch{}return a(this,vt,"f")[t]=n||{},a(this,vt,"f")[t]}[et](e,t){t=[].concat(t),t.forEach(n=>{n=this[Wn](n),a(this,L,"f")[e].push(n)})}[Ot](e,t,n,r){this[Ln](e,t,n,r,(s,c,d)=>{a(this,L,"f")[s][c]=d})}[$n](e,t,n,r){this[Ln](e,t,n,r,(s,c,d)=>{a(this,L,"f")[s][c]=(a(this,L,"f")[s][c]||[]).concat(d)})}[Ln](e,t,n,r,s){if(Array.isArray(n))n.forEach(c=>{e(c,r)});else if((c=>typeof c=="object")(n))for(let c of xt(n))e(c,n[c]);else s(t,this[Wn](n),r)}[Wn](e){return e==="__proto__"?"___proto___":e}[Un](e,t){return this[Ot](this[Un].bind(this),"key",e,t),this}[Bn](){var e,t,n,r,s,c,d,b,y,E,w,f;let _=a(this,Xt,"f").pop();ve(_,void 0,a(this,z,"f"));let F;e=this,t=this,n=this,r=this,s=this,c=this,d=this,b=this,y=this,E=this,w=this,f=this,{options:{set value(S){T(e,L,S,"f")}}.value,configObjects:F,exitProcess:{set value(S){T(t,Te,S,"f")}}.value,groups:{set value(S){T(n,He,S,"f")}}.value,output:{set value(S){T(r,xe,S,"f")}}.value,exitError:{set value(S){T(s,Je,S,"f")}}.value,hasOutput:{set value(S){T(c,Me,S,"f")}}.value,parsed:this.parsed,strict:{set value(S){T(d,lt,S,"f")}}.value,strictCommands:{set value(S){T(b,ft,S,"f")}}.value,strictOptions:{set value(S){T(y,ht,S,"f")}}.value,completionCommand:{set value(S){T(E,Fe,S,"f")}}.value,parseFn:{set value(S){T(w,Re,S,"f")}}.value,parseContext:{set value(S){T(f,ut,S,"f")}}.value}=_,a(this,L,"f").configObjects=F,a(this,V,"f").unfreeze(),a(this,he,"f").unfreeze(),a(this,we,"f").unfreeze(),a(this,$e,"f").unfreeze()}[_i](e,t){return st(t,n=>(e(n),n))}getInternalMethods(){return{getCommandInstance:this[Si].bind(this),getContext:this[Ci].bind(this),getHasOutput:this[Ai].bind(this),getLoggerInstance:this[ji].bind(this),getParseContext:this[Pi].bind(this),getParserConfiguration:this[dt].bind(this),getUsageConfiguration:this[Ei].bind(this),getUsageInstance:this[Ii].bind(this),getValidationInstance:this[Fi].bind(this),hasParseCallback:this[tn].bind(this),isGlobalContext:this[Mi].bind(this),postProcess:this[pt].bind(this),reset:this[Gn].bind(this),runValidation:this[zn].bind(this),runYargsParserAndExecuteCommands:this[Nt].bind(this),setHasOutput:this[Ni].bind(this)}}[Si](){return a(this,we,"f")}[Ci](){return a(this,Rt,"f")}[Ai](){return a(this,Me,"f")}[ji](){return a(this,Et,"f")}[Pi](){return a(this,ut,"f")||{}}[Ii](){return a(this,V,"f")}[Fi](){return a(this,he,"f")}[tn](){return!!a(this,Re,"f")}[Mi](){return a(this,kt,"f")}[pt](e,t,n,r){return n||le(e)||(t||(e=this[mi](e)),(this[dt]()["parse-positional-numbers"]||this[dt]()["parse-positional-numbers"]===void 0)&&(e=this[Oi](e)),r&&(e=it(e,this,a(this,$e,"f").getMiddleware(),!1))),e}[Gn](e={}){T(this,L,a(this,L,"f")||{},"f");let t={};t.local=a(this,L,"f").local||[],t.configObjects=a(this,L,"f").configObjects||[];let n={};t.local.forEach(c=>{n[c]=!0,(e[c]||[]).forEach(d=>{n[d]=!0})}),Object.assign(a(this,ct,"f"),Object.keys(a(this,He,"f")).reduce((c,d)=>{let b=a(this,He,"f")[d].filter(y=>!(y in n));return b.length>0&&(c[d]=b),c},{})),T(this,He,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(c=>{t[c]=(a(this,L,"f")[c]||[]).filter(d=>!n[d])}),s.forEach(c=>{t[c]=ke(a(this,L,"f")[c],d=>!n[d])}),t.envPrefix=a(this,L,"f").envPrefix,T(this,L,t,"f"),T(this,V,a(this,V,"f")?a(this,V,"f").reset(n):ui(this,a(this,z,"f")),"f"),T(this,he,a(this,he,"f")?a(this,he,"f").reset(n):pi(this,a(this,V,"f"),a(this,z,"f")),"f"),T(this,we,a(this,we,"f")?a(this,we,"f").reset():si(a(this,V,"f"),a(this,he,"f"),a(this,$e,"f"),a(this,z,"f")),"f"),a(this,De,"f")||T(this,De,fi(this,a(this,V,"f"),a(this,we,"f"),a(this,z,"f")),"f"),a(this,$e,"f").reset(),T(this,Fe,null,"f"),T(this,xe,"","f"),T(this,Je,null,"f"),T(this,Me,!1,"f"),this.parsed=!1,this}[Ri](e,t){return a(this,z,"f").path.relative(e,t)}[Nt](e,t,n,r=0,s=!1){let c=!!n||s;e=e||a(this,Qe,"f"),a(this,L,"f").__=a(this,z,"f").y18n.__,a(this,L,"f").configuration=this[dt]();let d=!!a(this,L,"f").configuration["populate--"],b=Object.assign({},a(this,L,"f").configuration,{"populate--":!0}),y=a(this,z,"f").Parser.detailed(e,Object.assign({},a(this,L,"f"),{configuration:{"parse-positional-numbers":!1,...b}})),E=Object.assign(y.argv,a(this,ut,"f")),w,f=y.aliases,_=!1,F=!1;Object.keys(E).forEach(S=>{S===a(this,Le,"f")&&E[S]?_=!0:S===a(this,Ye,"f")&&E[S]&&(F=!0)}),E.$0=this.$0,this.parsed=y,r===0&&a(this,V,"f").clearCachedHelpMessage();try{if(this[Dn](),t)return this[pt](E,d,!!n,!1);a(this,Le,"f")&&[a(this,Le,"f")].concat(f[a(this,Le,"f")]||[]).filter(X=>X.length>1).includes(""+E._[E._.length-1])&&(E._.pop(),_=!0),T(this,kt,!1,"f");let S=a(this,we,"f").getCommands(),x=a(this,De,"f").completionKey in E,B=_||x||s;if(E._.length){if(S.length){let G;for(let X=r||0,K;E._[X]!==void 0;X++)if(K=String(E._[X]),S.includes(K)&&K!==a(this,Fe,"f")){let k=a(this,we,"f").runCommand(K,this,y,X+1,s,_||F||s);return this[pt](k,d,!!n,!1)}else if(!G&&K!==a(this,Fe,"f")){G=K;break}!a(this,we,"f").hasDefaultCommand()&&a(this,Qt,"f")&&G&&!B&&a(this,he,"f").recommendCommands(G,S)}a(this,Fe,"f")&&E._.includes(a(this,Fe,"f"))&&!x&&(a(this,Te,"f")&&Ze(!0),this.showCompletionScript(),this.exit(0))}if(a(this,we,"f").hasDefaultCommand()&&!B){let G=a(this,we,"f").runCommand(null,this,y,0,s,_||F||s);return this[pt](G,d,!!n,!1)}if(x){a(this,Te,"f")&&Ze(!0),e=[].concat(e);let G=e.slice(e.indexOf(`--${a(this,De,"f").completionKey}`)+1);return a(this,De,"f").getCompletion(G,(X,K)=>{if(X)throw new ce(X.message);(K||[]).forEach(k=>{a(this,Et,"f").log(k)}),this.exit(0)}),this[pt](E,!d,!!n,!1)}if(a(this,Me,"f")||(_?(a(this,Te,"f")&&Ze(!0),c=!0,this.showHelp("log"),this.exit(0)):F&&(a(this,Te,"f")&&Ze(!0),c=!0,a(this,V,"f").showVersion("log"),this.exit(0))),!c&&a(this,L,"f").skipValidation.length>0&&(c=Object.keys(E).some(G=>a(this,L,"f").skipValidation.indexOf(G)>=0&&E[G]===!0)),!c){if(y.error)throw new ce(y.error.message);if(!x){let G=this[zn](f,{},y.error);n||(w=it(E,this,a(this,$e,"f").getMiddleware(),!0)),w=this[_i](G,w??E),le(w)&&!n&&(w=w.then(()=>it(E,this,a(this,$e,"f").getMiddleware(),!1)))}}}catch(S){if(S instanceof ce)a(this,V,"f").fail(S.message,S);else throw S}return this[pt](w??E,d,!!n,!0)}[zn](e,t,n,r){let s={...this.getDemandedOptions()};return c=>{if(n)throw new ce(n.message);a(this,he,"f").nonOptionCount(c),a(this,he,"f").requiredArguments(c,s);let d=!1;a(this,ft,"f")&&(d=a(this,he,"f").unknownCommands(c)),a(this,lt,"f")&&!d?a(this,he,"f").unknownArguments(c,e,t,!!r):a(this,ht,"f")&&a(this,he,"f").unknownArguments(c,e,{},!1,!1),a(this,he,"f").limitedChoices(c),a(this,he,"f").implications(c),a(this,he,"f").conflicting(c)}}[Ni](){T(this,Me,!0,"f")}[gt](e){if(typeof e=="string")a(this,L,"f").key[e]=!0;else for(let t of e)a(this,L,"f").key[t]=!0}};function oi(i){return!!i&&typeof i.getInternalMethods=="function"}var Ka=Di(An),Ti=Ka;await Ti(Sn(process.argv)).command("$0 <file-or-url>",'Convert a tldraw ".tldr" file or tldraw.com URL to an svg or png image',i=>i.scriptName("tldraw-cli").positional("file-or-url",{demandOption:!0,describe:'The sketch to convert to an image \u2014 either a path to a local ".tldr" file, or a tldraw.com sketch URL',type:"string"}).option("format",{alias:"f",choices:["png","svg"],default:"svg",describe:"Output image format",type:"string"}).option("output",{alias:"o",default:"./",describe:"Output image directory",type:"string"}).option("transparent",{alias:"t",default:!1,describe:"Output an image with a transparent background",type:"boolean"}).option("dark-mode",{alias:"d",default:!1,describe:"Output a dark theme version of the image",type:"boolean"}).option("frames",{coerce(e){return e.length===0?!0:e},defaultDescription:"false",describe:'Export each sketch "frame" as a separate image, use the option flag alone to export all frames, or pass one or more frame names or IDs',type:"array"}).option("verbose",{default:!1,describe:"Enable verbose output",type:"boolean"}),async i=>{let{darkMode:e,fileOrUrl:t,format:n,frames:r,output:s,transparent:c,verbose:d}=i;try{await Dr(t,{darkMode:e,format:n,frames:r,output:s,transparent:c,verbose:d}),process.exit(0)}catch(b){console.error("Conversion failed:",b),process.exit(1)}}).alias("h","help").version("version",Or).alias("v","version").help().parse();
74
+ `;var Qa=class{constructor(t,r,n,s){var i,u,o;this.yargs=t,this.usage=r,this.command=n,this.shim=s,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(o=((i=this.shim.getEnv("SHELL"))===null||i===void 0?void 0:i.includes("zsh"))||((u=this.shim.getEnv("ZSH_NAME"))===null||u===void 0?void 0:u.includes("zsh")))!==null&&o!==void 0?o:!1}defaultCompletion(t,r,n,s){let i=this.command.getCommandHandlers();for(let o=0,l=t.length;o<l;++o)if(i[t[o]]&&i[t[o]].builder){let p=i[t[o]].builder;if(oi(p)){this.indexAfterLastReset=o+1;let E=this.yargs.getInternalMethods().reset();return p(E,!0),E.argv}}let u=[];this.commandCompletions(u,t,n),this.optionCompletions(u,t,r,n),this.choicesFromOptionsCompletions(u,t,r,n),this.choicesFromPositionalsCompletions(u,t,r,n),s(null,u)}commandCompletions(t,r,n){let s=this.yargs.getInternalMethods().getContext().commands;!n.match(/^-/)&&s[s.length-1]!==n&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(i=>{let u=cr(i[0]).cmd;if(r.indexOf(u)===-1)if(!this.zshShell)t.push(u);else{let o=i[1]||"";t.push(u.replace(/:/g,"\\:")+":"+o)}})}optionCompletions(t,r,n,s){if((s.match(/^-/)||s===""&&t.length===0)&&!this.previousArgHasChoices(r)){let i=this.yargs.getOptions(),u=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(i.key).forEach(o=>{let l=!!i.configuration["boolean-negation"]&&i.boolean.includes(o);!u.includes(o)&&!i.hiddenOptions.includes(o)&&!this.argsContainKey(r,o,l)&&this.completeOptionKey(o,t,s,l&&!!i.default[o])})}}choicesFromOptionsCompletions(t,r,n,s){if(this.previousArgHasChoices(r)){let i=this.getPreviousArgChoices(r);i&&i.length>0&&t.push(...i.map(u=>u.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(t,r,n,s){if(s===""&&t.length>0&&this.previousArgHasChoices(r))return;let i=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],u=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),o=i[n._.length-u-1];if(!o)return;let l=this.yargs.getOptions().choices[o]||[];for(let p of l)p.startsWith(s)&&t.push(p.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let r=t[t.length-1],n="";if(!r.startsWith("-")&&t.length>1&&(n=r,r=t[t.length-2]),!r.startsWith("-"))return;let s=r.replace(/^-+/,""),i=this.yargs.getOptions(),u=[s,...this.yargs.getAliases()[s]||[]],o;for(let l of u)if(Object.prototype.hasOwnProperty.call(i.key,l)&&Array.isArray(i.choices[l])){o=i.choices[l];break}if(o)return o.filter(l=>!n||l.startsWith(n))}previousArgHasChoices(t){let r=this.getPreviousArgChoices(t);return r!==void 0&&r.length>0}argsContainKey(t,r,n){let s=i=>t.indexOf((/^[^0-9]$/.test(i)?"-":"--")+i)!==-1;if(s(r)||n&&s(`no-${r}`))return!0;if(this.aliases){for(let i of this.aliases[r])if(s(i))return!0}return!1}completeOptionKey(t,r,n,s){var i,u,o,l;let p=t;if(this.zshShell){let y=this.usage.getDescriptions(),w=(u=(i=this===null||this===void 0?void 0:this.aliases)===null||i===void 0?void 0:i[t])===null||u===void 0?void 0:u.find(q=>{let Z=y[q];return typeof Z=="string"&&Z.length>0}),M=w?y[w]:void 0,x=(l=(o=y[t])!==null&&o!==void 0?o:M)!==null&&l!==void 0?l:"";p=`${t.replace(/:/g,"\\:")}:${x.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let E=y=>/^--/.test(y),A=y=>/^[^0-9]$/.test(y),g=!E(n)&&A(t)?"-":"--";r.push(g+p),s&&r.push(g+"no-"+p)}customCompletion(t,r,n,s){if(Ke(this.customCompletionFunction,null,this.shim),Qg(this.customCompletionFunction)){let i=this.customCompletionFunction(n,r);return Re(i)?i.then(u=>{this.shim.process.nextTick(()=>{s(null,u)})}).catch(u=>{this.shim.process.nextTick(()=>{s(u,void 0)})}):s(null,i)}else return zg(this.customCompletionFunction)?this.customCompletionFunction(n,r,(i=s)=>this.defaultCompletion(t,r,n,i),i=>{s(null,i)}):this.customCompletionFunction(n,r,i=>{s(null,i)})}getCompletion(t,r){let n=t.length?t[t.length-1]:"",s=this.yargs.parse(t,!0),i=this.customCompletionFunction?u=>this.customCompletion(t,u,n,r):u=>this.defaultCompletion(t,u,n,r);return Re(s)?s.then(i):i(s)}generateCompletionScript(t,r){let n=this.zshShell?al:il,s=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),n=n.replace(/{{app_name}}/g,s),n=n.replace(/{{completion_command}}/g,r),n.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}};function ul(e,t,r,n){return new Qa(e,t,r,n)}function Qg(e){return e.length<3}function zg(e){return e.length>3}function ol(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],n;for(n=0;n<=t.length;n++)r[n]=[n];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(n=1;n<=t.length;n++)for(s=1;s<=e.length;s++)t.charAt(n-1)===e.charAt(s-1)?r[n][s]=r[n-1][s-1]:n>1&&s>1&&t.charAt(n-2)===e.charAt(s-1)&&t.charAt(n-1)===e.charAt(s-2)?r[n][s]=r[n-2][s-2]+1:r[n][s]=Math.min(r[n-1][s-1]+1,Math.min(r[n][s-1]+1,r[n-1][s]+1));return r[t.length][e.length]}var cl=["$0","--","_"];function ll(e,t,r){let n=r.y18n.__,s=r.y18n.__n,i={};i.nonOptionCount=function(A){let g=e.getDemandedCommands(),w=A._.length+(A["--"]?A["--"].length:0)-e.getInternalMethods().getContext().commands.length;g._&&(w<g._.min||w>g._.max)&&(w<g._.min?g._.minMsg!==void 0?t.fail(g._.minMsg?g._.minMsg.replace(/\$0/g,w.toString()).replace(/\$1/,g._.min.toString()):null):t.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",w,w.toString(),g._.min.toString())):w>g._.max&&(g._.maxMsg!==void 0?t.fail(g._.maxMsg?g._.maxMsg.replace(/\$0/g,w.toString()).replace(/\$1/,g._.max.toString()):null):t.fail(s("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",w,w.toString(),g._.max.toString()))))},i.positionalCount=function(A,g){g<A&&t.fail(s("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",g,g+"",A+""))},i.requiredArguments=function(A,g){let y=null;for(let w of Object.keys(g))(!Object.prototype.hasOwnProperty.call(A,w)||typeof A[w]>"u")&&(y=y||{},y[w]=g[w]);if(y){let w=[];for(let x of Object.keys(y)){let q=y[x];q&&w.indexOf(q)<0&&w.push(q)}let M=w.length?`
75
+ ${w.join(`
76
+ `)}`:"";t.fail(s("Missing required argument: %s","Missing required arguments: %s",Object.keys(y).length,Object.keys(y).join(", ")+M))}},i.unknownArguments=function(A,g,y,w,M=!0){var x;let q=e.getInternalMethods().getCommandInstance().getCommands(),Z=[],ne=e.getInternalMethods().getContext();if(Object.keys(A).forEach(te=>{!cl.includes(te)&&!Object.prototype.hasOwnProperty.call(y,te)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),te)&&!i.isValidAndSomeAliasIsNotNew(te,g)&&Z.push(te)}),M&&(ne.commands.length>0||q.length>0||w)&&A._.slice(ne.commands.length).forEach(te=>{q.includes(""+te)||Z.push(""+te)}),M){let ae=((x=e.getDemandedCommands()._)===null||x===void 0?void 0:x.max)||0,Ue=ne.commands.length+ae;Ue<A._.length&&A._.slice(Ue).forEach(ye=>{ye=String(ye),!ne.commands.includes(ye)&&!Z.includes(ye)&&Z.push(ye)})}Z.length&&t.fail(s("Unknown argument: %s","Unknown arguments: %s",Z.length,Z.map(te=>te.trim()?te:`"${te}"`).join(", ")))},i.unknownCommands=function(A){let g=e.getInternalMethods().getCommandInstance().getCommands(),y=[],w=e.getInternalMethods().getContext();return(w.commands.length>0||g.length>0)&&A._.slice(w.commands.length).forEach(M=>{g.includes(""+M)||y.push(""+M)}),y.length>0?(t.fail(s("Unknown command: %s","Unknown commands: %s",y.length,y.join(", "))),!0):!1},i.isValidAndSomeAliasIsNotNew=function(A,g){if(!Object.prototype.hasOwnProperty.call(g,A))return!1;let y=e.parsed.newAliases;return[A,...g[A]].some(w=>!Object.prototype.hasOwnProperty.call(y,w)||!y[A])},i.limitedChoices=function(A){let g=e.getOptions(),y={};if(!Object.keys(g.choices).length)return;Object.keys(A).forEach(x=>{cl.indexOf(x)===-1&&Object.prototype.hasOwnProperty.call(g.choices,x)&&[].concat(A[x]).forEach(q=>{g.choices[x].indexOf(q)===-1&&q!==void 0&&(y[x]=(y[x]||[]).concat(q))})});let w=Object.keys(y);if(!w.length)return;let M=n("Invalid values:");w.forEach(x=>{M+=`
77
+ ${n("Argument: %s, Given: %s, Choices: %s",x,t.stringifiedValues(y[x]),t.stringifiedValues(g.choices[x]))}`}),t.fail(M)};let u={};i.implies=function(A,g){$("<string|object> [array|number|string]",[A,g],arguments.length),typeof A=="object"?Object.keys(A).forEach(y=>{i.implies(y,A[y])}):(e.global(A),u[A]||(u[A]=[]),Array.isArray(g)?g.forEach(y=>i.implies(A,y)):(Ke(g,void 0,r),u[A].push(g)))},i.getImplied=function(){return u};function o(E,A){let g=Number(A);return A=isNaN(g)?A:g,typeof A=="number"?A=E._.length>=A:A.match(/^--no-.+/)?(A=A.match(/^--no-(.+)/)[1],A=!Object.prototype.hasOwnProperty.call(E,A)):A=Object.prototype.hasOwnProperty.call(E,A),A}i.implications=function(A){let g=[];if(Object.keys(u).forEach(y=>{let w=y;(u[y]||[]).forEach(M=>{let x=w,q=M;x=o(A,x),M=o(A,M),x&&!M&&g.push(` ${w} -> ${q}`)})}),g.length){let y=`${n("Implications failed:")}
78
+ `;g.forEach(w=>{y+=w}),t.fail(y)}};let l={};i.conflicts=function(A,g){$("<string|object> [array|string]",[A,g],arguments.length),typeof A=="object"?Object.keys(A).forEach(y=>{i.conflicts(y,A[y])}):(e.global(A),l[A]||(l[A]=[]),Array.isArray(g)?g.forEach(y=>i.conflicts(A,y)):l[A].push(g))},i.getConflicting=()=>l,i.conflicting=function(A){Object.keys(A).forEach(g=>{l[g]&&l[g].forEach(y=>{y&&A[g]!==void 0&&A[y]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",g,y))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach(g=>{l[g].forEach(y=>{y&&A[r.Parser.camelCase(g)]!==void 0&&A[r.Parser.camelCase(y)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",g,y))})})},i.recommendCommands=function(A,g){g=g.sort((x,q)=>q.length-x.length);let w=null,M=1/0;for(let x=0,q;(q=g[x])!==void 0;x++){let Z=ol(A,q);Z<=3&&Z<M&&(M=Z,w=q)}w&&t.fail(n("Did you mean %s?",w))},i.reset=function(A){return u=lr(u,g=>!A[g]),l=lr(l,g=>!A[g]),i};let p=[];return i.freeze=function(){p.push({implied:u,conflicting:l})},i.unfreeze=function(){let A=p.pop();Ke(A,void 0,r),{implied:u,conflicting:l}=A},i}var za=[],es;function ts(e,t,r,n){es=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let i=/\.json|\..*rc$/.test(e.extends),u=null;if(i)u=Zg(t,e.extends);else try{u=vt.resolve(e.extends)}catch{return e}Kg(u),za.push(u),s=i?JSON.parse(es.readFileSync(u,"utf8")):vt(e.extends),delete e.extends,s=ts(s,es.path.dirname(u),r,es)}return za=[],r?fl(s,e):Object.assign({},s,e)}function Kg(e){if(za.indexOf(e)>-1)throw new Oe(`Circular extended configurations: '${e}'.`)}function Zg(e,t){return es.path.resolve(e,t)}function fl(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=fl(e[s],t[s]):r[s]=t[s];return r}var X=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},d=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},ke,Lr,rs,St,mt,li,dr,yr,fi,It,di,xt,Ut,Et,Ot,hi,fn,qe,K,pi,mi,gt,Dr,dn,Pr,hr,Ei,re,wr,Mr,vr,ie,gi,Ht,we;function Dl(e){return(t=[],r=e.process.cwd(),n)=>{let s=new uu(t,r,n,e);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}var dl=Symbol("copyDoubleDash"),hl=Symbol("copyDoubleDash"),Ka=Symbol("deleteFromParserHintObject"),pl=Symbol("emitWarning"),ml=Symbol("freeze"),El=Symbol("getDollarZero"),Fr=Symbol("getParserConfiguration"),gl=Symbol("getUsageConfiguration"),Za=Symbol("guessLocale"),bl=Symbol("guessVersion"),Tl=Symbol("parsePositionalNumbers"),Ja=Symbol("pkgUp"),pr=Symbol("populateParserHintArray"),hn=Symbol("populateParserHintSingleValueDictionary"),eu=Symbol("populateParserHintArrayDictionary"),tu=Symbol("populateParserHintDictionary"),ru=Symbol("sanitizeKey"),nu=Symbol("setKey"),su=Symbol("unfreeze"),Al=Symbol("validateAsync"),_l=Symbol("getCommandInstance"),Cl=Symbol("getContext"),Nl=Symbol("getHasOutput"),Sl=Symbol("getLoggerInstance"),Il=Symbol("getParseContext"),xl=Symbol("getUsageInstance"),Ol=Symbol("getValidationInstance"),bi=Symbol("hasParseCallback"),Rl=Symbol("isGlobalContext"),Br=Symbol("postProcess"),Ll=Symbol("rebase"),iu=Symbol("reset"),ns=Symbol("runYargsParserAndExecuteCommands"),au=Symbol("runValidation"),yl=Symbol("setHasOutput"),kr=Symbol("kTrackManuallySetKeys"),uu=class{constructor(t=[],r,n,s){this.customScriptName=!1,this.parsed=!1,ke.set(this,void 0),Lr.set(this,void 0),rs.set(this,{commands:[],fullCommands:[]}),St.set(this,null),mt.set(this,null),li.set(this,"show-hidden"),dr.set(this,null),yr.set(this,!0),fi.set(this,{}),It.set(this,!0),di.set(this,[]),xt.set(this,void 0),Ut.set(this,{}),Et.set(this,!1),Ot.set(this,null),hi.set(this,!0),fn.set(this,void 0),qe.set(this,""),K.set(this,void 0),pi.set(this,void 0),mi.set(this,{}),gt.set(this,null),Dr.set(this,null),dn.set(this,{}),Pr.set(this,{}),hr.set(this,void 0),Ei.set(this,!1),re.set(this,void 0),wr.set(this,!1),Mr.set(this,!1),vr.set(this,!1),ie.set(this,void 0),gi.set(this,{}),Ht.set(this,null),we.set(this,void 0),X(this,re,s,"f"),X(this,hr,t,"f"),X(this,Lr,r,"f"),X(this,pi,n,"f"),X(this,xt,new ui(this),"f"),this.$0=this[El](),this[iu](),X(this,ke,d(this,ke,"f"),"f"),X(this,ie,d(this,ie,"f"),"f"),X(this,we,d(this,we,"f"),"f"),X(this,K,d(this,K,"f"),"f"),d(this,K,"f").showHiddenOpt=d(this,li,"f"),X(this,fn,this[hl](),"f")}addHelpOpt(t,r){let n="help";return $("[string|boolean] [string]",[t,r],arguments.length),d(this,Ot,"f")&&(this[Ka](d(this,Ot,"f")),X(this,Ot,null,"f")),t===!1&&r===void 0?this:(X(this,Ot,typeof t=="string"?t:n,"f"),this.boolean(d(this,Ot,"f")),this.describe(d(this,Ot,"f"),r||d(this,ie,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if($("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:d(this,li,"f");return this.boolean(n),this.describe(n,r||d(this,ie,"f").deferY18nLookup("Show hidden options")),d(this,K,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return $("<object|string|array> [string|array]",[t,r],arguments.length),this[eu](this.alias.bind(this),"alias",t,r),this}array(t){return $("<array|string>",[t],arguments.length),this[pr]("array",t),this[kr](t),this}boolean(t){return $("<array|string>",[t],arguments.length),this[pr]("boolean",t),this[kr](t),this}check(t,r){return $("<function> [boolean]",[t,r],arguments.length),this.middleware((n,s)=>Rr(()=>t(n,s.getOptions()),i=>(i?(typeof i=="string"||i instanceof Error)&&d(this,ie,"f").fail(i.toString(),i):d(this,ie,"f").fail(d(this,re,"f").y18n.__("Argument check failed: %s",t.toString())),n),i=>(d(this,ie,"f").fail(i.message?i.message:i.toString(),i),n)),!1,r),this}choices(t,r){return $("<object|string|array> [string|array]",[t,r],arguments.length),this[eu](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if($("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new Oe("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new Oe("coerce callback must be provided");return d(this,K,"f").key[t]=!0,d(this,xt,"f").addCoerceMiddleware((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,t)?Rr(()=>(i=s.getAliases(),r(n[t])),o=>{n[t]=o;let l=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[t]&&l!==!0)for(let p of i[t])n[p]=o;return n},o=>{throw new Oe(o.message)}):n},t),this}conflicts(t,r){return $("<string|object> [string|array]",[t,r],arguments.length),d(this,we,"f").conflicts(t,r),this}config(t="config",r,n){return $("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=ts(t,d(this,Lr,"f"),this[Fr]()["deep-merge-config"]||!1,d(this,re,"f")),d(this,K,"f").configObjects=(d(this,K,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||d(this,ie,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(s=>{d(this,K,"f").config[s]=n||!0}),this)}completion(t,r,n){return $("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),X(this,mt,t||d(this,mt,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(d(this,mt,"f"),r),n&&d(this,St,"f").registerFunction(n),this}command(t,r,n,s,i,u){return $("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,s,i,u],arguments.length),d(this,ke,"f").addHandler(t,r,n,s,i,u),this}commands(t,r,n,s,i,u){return this.command(t,r,n,s,i,u)}commandDir(t,r){$("<string> [object]",[t,r],arguments.length);let n=d(this,pi,"f")||d(this,re,"f").require;return d(this,ke,"f").addDirectory(t,n,d(this,re,"f").getCallerFile(),r),this}count(t){return $("<array|string>",[t],arguments.length),this[pr]("count",t),this[kr](t),this}default(t,r,n){return $("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(Va(t,d(this,re,"f")),d(this,K,"f").defaultDescription[t]=n),typeof r=="function"&&(Va(t,d(this,re,"f")),d(this,K,"f").defaultDescription[t]||(d(this,K,"f").defaultDescription[t]=d(this,ie,"f").functionDescription(r)),r=r.call()),this[hn](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,s){return $("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,s],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),d(this,K,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:s},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(s=>{Ke(n,!0,d(this,re,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(Ke(n,!0,d(this,re,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(s=>{Ke(n,!0,d(this,re,"f")),this.demandOption(s,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return $("<object|string|array> [string]",[t,r],arguments.length),this[hn](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return $("<string> [string|boolean]",[t,r],arguments.length),d(this,K,"f").deprecatedOptions[t]=r,this}describe(t,r){return $("<object|string|array> [string]",[t,r],arguments.length),this[nu](t,!0),d(this,ie,"f").describe(t,r),this}detectLocale(t){return $("<boolean>",[t],arguments.length),X(this,yr,t,"f"),this}env(t){return $("[string|boolean]",[t],arguments.length),t===!1?delete d(this,K,"f").envPrefix:d(this,K,"f").envPrefix=t||"",this}epilogue(t){return $("<string>",[t],arguments.length),d(this,ie,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return $("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):d(this,ie,"f").example(t,r),this}exit(t,r){X(this,Et,!0,"f"),X(this,dr,r,"f"),d(this,It,"f")&&d(this,re,"f").process.exit(t)}exitProcess(t=!0){return $("[boolean]",[t],arguments.length),X(this,It,t,"f"),this}fail(t){if($("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new Oe("Invalid first argument. Expected function or boolean 'false'");return d(this,ie,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return $("<array> [function]",[t,r],arguments.length),r?d(this,St,"f").getCompletion(t,r):new Promise((n,s)=>{d(this,St,"f").getCompletion(t,(i,u)=>{i?s(i):n(u)})})}getDemandedOptions(){return $([],0),d(this,K,"f").demandedOptions}getDemandedCommands(){return $([],0),d(this,K,"f").demandedCommands}getDeprecatedOptions(){return $([],0),d(this,K,"f").deprecatedOptions}getDetectLocale(){return d(this,yr,"f")}getExitProcess(){return d(this,It,"f")}getGroups(){return Object.assign({},d(this,Ut,"f"),d(this,Pr,"f"))}getHelp(){if(X(this,Et,!0,"f"),!d(this,ie,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ns](d(this,hr,"f"),void 0,void 0,0,!0);if(Re(r))return r.then(()=>d(this,ie,"f").help())}let t=d(this,ke,"f").runDefaultBuilderOn(this);if(Re(t))return t.then(()=>d(this,ie,"f").help())}return Promise.resolve(d(this,ie,"f").help())}getOptions(){return d(this,K,"f")}getStrict(){return d(this,wr,"f")}getStrictCommands(){return d(this,Mr,"f")}getStrictOptions(){return d(this,vr,"f")}global(t,r){return $("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?d(this,K,"f").local=d(this,K,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{d(this,K,"f").local.includes(n)||d(this,K,"f").local.push(n)}),this}group(t,r){$("<string|array> <string>",[t,r],arguments.length);let n=d(this,Pr,"f")[r]||d(this,Ut,"f")[r];d(this,Pr,"f")[r]&&delete d(this,Pr,"f")[r];let s={};return d(this,Ut,"f")[r]=(n||[]).concat(t).filter(i=>s[i]?!1:s[i]=!0),this}hide(t){return $("<string>",[t],arguments.length),d(this,K,"f").hiddenOptions.push(t),this}implies(t,r){return $("<string|object> [number|string|array]",[t,r],arguments.length),d(this,we,"f").implies(t,r),this}locale(t){return $("[string]",[t],arguments.length),t===void 0?(this[Za](),d(this,re,"f").y18n.getLocale()):(X(this,yr,!1,"f"),d(this,re,"f").y18n.setLocale(t),this)}middleware(t,r,n){return d(this,xt,"f").addMiddleware(t,!!r,n)}nargs(t,r){return $("<string|object|array> [number]",[t,r],arguments.length),this[hn](this.nargs.bind(this),"narg",t,r),this}normalize(t){return $("<array|string>",[t],arguments.length),this[pr]("normalize",t),this}number(t){return $("<array|string>",[t],arguments.length),this[pr]("number",t),this[kr](t),this}option(t,r){if($("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[kr](t),d(this,Ht,"f")&&(t==="version"||r?.alias==="version")&&this[pl](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
79
+ `),void 0,"versionWarning"),d(this,K,"f").key[t]=!0,r.alias&&this.alias(t,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(t,n);let s=r.demand||r.required||r.require;s&&this.demand(t,s),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(d(this,K,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let i=r.describe||r.description||r.desc,u=d(this,ie,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(u,t)||typeof i=="string")&&this.describe(t,i),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t)}return this}options(t,r){return this.option(t,r)}parse(t,r,n){$("[string|array] [function|boolean|object] [function]",[t,r,n],arguments.length),this[ml](),typeof t>"u"&&(t=d(this,hr,"f")),typeof r=="object"&&(X(this,Dr,r,"f"),r=n),typeof r=="function"&&(X(this,gt,r,"f"),r=!1),r||X(this,hr,t,"f"),d(this,gt,"f")&&X(this,It,!1,"f");let s=this[ns](t,!!r),i=this.parsed;return d(this,St,"f").setParsed(this.parsed),Re(s)?s.then(u=>(d(this,gt,"f")&&d(this,gt,"f").call(this,d(this,dr,"f"),u,d(this,qe,"f")),u)).catch(u=>{throw d(this,gt,"f")&&d(this,gt,"f")(u,this.parsed.argv,d(this,qe,"f")),u}).finally(()=>{this[su](),this.parsed=i}):(d(this,gt,"f")&&d(this,gt,"f").call(this,d(this,dr,"f"),s,d(this,qe,"f")),this[su](),this.parsed=i,s)}parseAsync(t,r,n){let s=this.parse(t,r,n);return Re(s)?s:Promise.resolve(s)}parseSync(t,r,n){let s=this.parse(t,r,n);if(Re(s))throw new Oe(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(t){return $("<object>",[t],arguments.length),X(this,mi,t,"f"),this}pkgConf(t,r){$("<string> [string]",[t,r],arguments.length);let n=null,s=this[Ja](r||d(this,Lr,"f"));return s[t]&&typeof s[t]=="object"&&(n=ts(s[t],r||d(this,Lr,"f"),this[Fr]()["deep-merge-config"]||!1,d(this,re,"f")),d(this,K,"f").configObjects=(d(this,K,"f").configObjects||[]).concat(n)),this}positional(t,r){$("<string> <object>",[t,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=lr(r,(u,o)=>u==="type"&&!["string","number","boolean"].includes(o)?!1:n.includes(u));let s=d(this,rs,"f").fullCommands[d(this,rs,"f").fullCommands.length-1],i=s?d(this,ke,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return cn(i).forEach(u=>{let o=i[u];Array.isArray(o)?o.indexOf(t)!==-1&&(r[u]=!0):o[t]&&!(u in r)&&(r[u]=o[t])}),this.group(t,d(this,ie,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=!0){return $("[boolean]",[t],arguments.length),X(this,Ei,t,"f"),this}required(t,r,n){return this.demand(t,r,n)}require(t,r,n){return this.demand(t,r,n)}requiresArg(t){return $("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&d(this,K,"f").narg[t]?this:(this[hn](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return $("[string] [string]",[t,r],arguments.length),t=t||this.$0,d(this,fn,"f").log(d(this,St,"f").generateCompletionScript(t,r||d(this,mt,"f")||"completion")),this}showHelp(t){if($("[string|function]",[t],arguments.length),X(this,Et,!0,"f"),!d(this,ie,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[ns](d(this,hr,"f"),void 0,void 0,0,!0);if(Re(n))return n.then(()=>{d(this,ie,"f").showHelp(t)}),this}let r=d(this,ke,"f").runDefaultBuilderOn(this);if(Re(r))return r.then(()=>{d(this,ie,"f").showHelp(t)}),this}return d(this,ie,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,r){return $("[boolean|string] [string]",[t,r],arguments.length),d(this,ie,"f").showHelpOnFail(t,r),this}showVersion(t){return $("[string|function]",[t],arguments.length),d(this,ie,"f").showVersion(t),this}skipValidation(t){return $("<array|string>",[t],arguments.length),this[pr]("skipValidation",t),this}strict(t){return $("[boolean]",[t],arguments.length),X(this,wr,t!==!1,"f"),this}strictCommands(t){return $("[boolean]",[t],arguments.length),X(this,Mr,t!==!1,"f"),this}strictOptions(t){return $("[boolean]",[t],arguments.length),X(this,vr,t!==!1,"f"),this}string(t){return $("<array|string>",[t],arguments.length),this[pr]("string",t),this[kr](t),this}terminalWidth(){return $([],0),d(this,re,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return $("<object>",[t],arguments.length),X(this,yr,!1,"f"),d(this,re,"f").y18n.updateLocale(t),this}usage(t,r,n,s){if($("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,n,s],arguments.length),r!==void 0){if(Ke(t,null,d(this,re,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,n,s);throw new Oe(".usage() description must start with $0 if being used as alias for .command()")}else return d(this,ie,"f").usage(t),this}usageConfiguration(t){return $("<object>",[t],arguments.length),X(this,gi,t,"f"),this}version(t,r,n){let s="version";if($("[boolean|string] [string] [string]",[t,r,n],arguments.length),d(this,Ht,"f")&&(this[Ka](d(this,Ht,"f")),d(this,ie,"f").version(void 0),X(this,Ht,null,"f")),arguments.length===0)n=this[bl](),t=s;else if(arguments.length===1){if(t===!1)return this;n=t,t=s}else arguments.length===2&&(n=r,r=void 0);return X(this,Ht,typeof t=="string"?t:s,"f"),r=r||d(this,ie,"f").deferY18nLookup("Show version number"),d(this,ie,"f").version(n||void 0),this.boolean(d(this,Ht,"f")),this.describe(d(this,Ht,"f"),r),this}wrap(t){return $("<number|null|undefined>",[t],arguments.length),d(this,ie,"f").wrap(t),this}[(ke=new WeakMap,Lr=new WeakMap,rs=new WeakMap,St=new WeakMap,mt=new WeakMap,li=new WeakMap,dr=new WeakMap,yr=new WeakMap,fi=new WeakMap,It=new WeakMap,di=new WeakMap,xt=new WeakMap,Ut=new WeakMap,Et=new WeakMap,Ot=new WeakMap,hi=new WeakMap,fn=new WeakMap,qe=new WeakMap,K=new WeakMap,pi=new WeakMap,mi=new WeakMap,gt=new WeakMap,Dr=new WeakMap,dn=new WeakMap,Pr=new WeakMap,hr=new WeakMap,Ei=new WeakMap,re=new WeakMap,wr=new WeakMap,Mr=new WeakMap,vr=new WeakMap,ie=new WeakMap,gi=new WeakMap,Ht=new WeakMap,we=new WeakMap,dl)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[hl](){return{log:(...t)=>{this[bi]()||console.log(...t),X(this,Et,!0,"f"),d(this,qe,"f").length&&X(this,qe,d(this,qe,"f")+`
80
+ `,"f"),X(this,qe,d(this,qe,"f")+t.join(" "),"f")},error:(...t)=>{this[bi]()||console.error(...t),X(this,Et,!0,"f"),d(this,qe,"f").length&&X(this,qe,d(this,qe,"f")+`
81
+ `,"f"),X(this,qe,d(this,qe,"f")+t.join(" "),"f")}}}[Ka](t){cn(d(this,K,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;let n=d(this,K,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete d(this,ie,"f").getDescriptions()[t]}[pl](t,r,n){d(this,fi,"f")[n]||(d(this,re,"f").process.emitWarning(t,r),d(this,fi,"f")[n]=!0)}[ml](){d(this,di,"f").push({options:d(this,K,"f"),configObjects:d(this,K,"f").configObjects.slice(0),exitProcess:d(this,It,"f"),groups:d(this,Ut,"f"),strict:d(this,wr,"f"),strictCommands:d(this,Mr,"f"),strictOptions:d(this,vr,"f"),completionCommand:d(this,mt,"f"),output:d(this,qe,"f"),exitError:d(this,dr,"f"),hasOutput:d(this,Et,"f"),parsed:this.parsed,parseFn:d(this,gt,"f"),parseContext:d(this,Dr,"f")}),d(this,ie,"f").freeze(),d(this,we,"f").freeze(),d(this,ke,"f").freeze(),d(this,xt,"f").freeze()}[El](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(d(this,re,"f").process.argv()[0])?r=d(this,re,"f").process.argv().slice(1,2):r=d(this,re,"f").process.argv().slice(0,1),t=r.map(n=>{let s=this[Ll](d(this,Lr,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),d(this,re,"f").getEnv("_")&&d(this,re,"f").getProcessArgvBin()===d(this,re,"f").getEnv("_")&&(t=d(this,re,"f").getEnv("_").replace(`${d(this,re,"f").path.dirname(d(this,re,"f").process.execPath())}/`,"")),t}[Fr](){return d(this,mi,"f")}[gl](){return d(this,gi,"f")}[Za](){if(!d(this,yr,"f"))return;let t=d(this,re,"f").getEnv("LC_ALL")||d(this,re,"f").getEnv("LC_MESSAGES")||d(this,re,"f").getEnv("LANG")||d(this,re,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[bl](){return this[Ja]().version||"unknown"}[Tl](t){let r=t["--"]?t["--"]:t._;for(let n=0,s;(s=r[n])!==void 0;n++)d(this,re,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return t}[Ja](t){let r=t||"*";if(d(this,dn,"f")[r])return d(this,dn,"f")[r];let n={};try{let s=t||d(this,re,"f").mainFilename;!t&&d(this,re,"f").path.extname(s)&&(s=d(this,re,"f").path.dirname(s));let i=d(this,re,"f").findUp(s,(u,o)=>{if(o.includes("package.json"))return"package.json"});Ke(i,void 0,d(this,re,"f")),n=JSON.parse(d(this,re,"f").readFileSync(i,"utf8"))}catch{}return d(this,dn,"f")[r]=n||{},d(this,dn,"f")[r]}[pr](t,r){r=[].concat(r),r.forEach(n=>{n=this[ru](n),d(this,K,"f")[t].push(n)})}[hn](t,r,n,s){this[tu](t,r,n,s,(i,u,o)=>{d(this,K,"f")[i][u]=o})}[eu](t,r,n,s){this[tu](t,r,n,s,(i,u,o)=>{d(this,K,"f")[i][u]=(d(this,K,"f")[i][u]||[]).concat(o)})}[tu](t,r,n,s,i){if(Array.isArray(n))n.forEach(u=>{t(u,s)});else if((u=>typeof u=="object")(n))for(let u of cn(n))t(u,n[u]);else i(r,this[ru](n),s)}[ru](t){return t==="__proto__"?"___proto___":t}[nu](t,r){return this[hn](this[nu].bind(this),"key",t,r),this}[su](){var t,r,n,s,i,u,o,l,p,E,A,g;let y=d(this,di,"f").pop();Ke(y,void 0,d(this,re,"f"));let w;t=this,r=this,n=this,s=this,i=this,u=this,o=this,l=this,p=this,E=this,A=this,g=this,{options:{set value(M){X(t,K,M,"f")}}.value,configObjects:w,exitProcess:{set value(M){X(r,It,M,"f")}}.value,groups:{set value(M){X(n,Ut,M,"f")}}.value,output:{set value(M){X(s,qe,M,"f")}}.value,exitError:{set value(M){X(i,dr,M,"f")}}.value,hasOutput:{set value(M){X(u,Et,M,"f")}}.value,parsed:this.parsed,strict:{set value(M){X(o,wr,M,"f")}}.value,strictCommands:{set value(M){X(l,Mr,M,"f")}}.value,strictOptions:{set value(M){X(p,vr,M,"f")}}.value,completionCommand:{set value(M){X(E,mt,M,"f")}}.value,parseFn:{set value(M){X(A,gt,M,"f")}}.value,parseContext:{set value(M){X(g,Dr,M,"f")}}.value}=y,d(this,K,"f").configObjects=w,d(this,ie,"f").unfreeze(),d(this,we,"f").unfreeze(),d(this,ke,"f").unfreeze(),d(this,xt,"f").unfreeze()}[Al](t,r){return Rr(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[_l].bind(this),getContext:this[Cl].bind(this),getHasOutput:this[Nl].bind(this),getLoggerInstance:this[Sl].bind(this),getParseContext:this[Il].bind(this),getParserConfiguration:this[Fr].bind(this),getUsageConfiguration:this[gl].bind(this),getUsageInstance:this[xl].bind(this),getValidationInstance:this[Ol].bind(this),hasParseCallback:this[bi].bind(this),isGlobalContext:this[Rl].bind(this),postProcess:this[Br].bind(this),reset:this[iu].bind(this),runValidation:this[au].bind(this),runYargsParserAndExecuteCommands:this[ns].bind(this),setHasOutput:this[yl].bind(this)}}[_l](){return d(this,ke,"f")}[Cl](){return d(this,rs,"f")}[Nl](){return d(this,Et,"f")}[Sl](){return d(this,fn,"f")}[Il](){return d(this,Dr,"f")||{}}[xl](){return d(this,ie,"f")}[Ol](){return d(this,we,"f")}[bi](){return!!d(this,gt,"f")}[Rl](){return d(this,hi,"f")}[Br](t,r,n,s){return n||Re(t)||(r||(t=this[dl](t)),(this[Fr]()["parse-positional-numbers"]||this[Fr]()["parse-positional-numbers"]===void 0)&&(t=this[Tl](t)),s&&(t=Or(t,this,d(this,xt,"f").getMiddleware(),!1))),t}[iu](t={}){X(this,K,d(this,K,"f")||{},"f");let r={};r.local=d(this,K,"f").local||[],r.configObjects=d(this,K,"f").configObjects||[];let n={};r.local.forEach(u=>{n[u]=!0,(t[u]||[]).forEach(o=>{n[o]=!0})}),Object.assign(d(this,Pr,"f"),Object.keys(d(this,Ut,"f")).reduce((u,o)=>{let l=d(this,Ut,"f")[o].filter(p=>!(p in n));return l.length>0&&(u[o]=l),u},{})),X(this,Ut,{},"f");let s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],i=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(u=>{r[u]=(d(this,K,"f")[u]||[]).filter(o=>!n[o])}),i.forEach(u=>{r[u]=lr(d(this,K,"f")[u],o=>!n[o])}),r.envPrefix=d(this,K,"f").envPrefix,X(this,K,r,"f"),X(this,ie,d(this,ie,"f")?d(this,ie,"f").reset(n):sl(this,d(this,re,"f")),"f"),X(this,we,d(this,we,"f")?d(this,we,"f").reset(n):ll(this,d(this,ie,"f"),d(this,re,"f")),"f"),X(this,ke,d(this,ke,"f")?d(this,ke,"f").reset():tl(d(this,ie,"f"),d(this,we,"f"),d(this,xt,"f"),d(this,re,"f")),"f"),d(this,St,"f")||X(this,St,ul(this,d(this,ie,"f"),d(this,ke,"f"),d(this,re,"f")),"f"),d(this,xt,"f").reset(),X(this,mt,null,"f"),X(this,qe,"","f"),X(this,dr,null,"f"),X(this,Et,!1,"f"),this.parsed=!1,this}[Ll](t,r){return d(this,re,"f").path.relative(t,r)}[ns](t,r,n,s=0,i=!1){let u=!!n||i;t=t||d(this,hr,"f"),d(this,K,"f").__=d(this,re,"f").y18n.__,d(this,K,"f").configuration=this[Fr]();let o=!!d(this,K,"f").configuration["populate--"],l=Object.assign({},d(this,K,"f").configuration,{"populate--":!0}),p=d(this,re,"f").Parser.detailed(t,Object.assign({},d(this,K,"f"),{configuration:{"parse-positional-numbers":!1,...l}})),E=Object.assign(p.argv,d(this,Dr,"f")),A,g=p.aliases,y=!1,w=!1;Object.keys(E).forEach(M=>{M===d(this,Ot,"f")&&E[M]?y=!0:M===d(this,Ht,"f")&&E[M]&&(w=!0)}),E.$0=this.$0,this.parsed=p,s===0&&d(this,ie,"f").clearCachedHelpMessage();try{if(this[Za](),r)return this[Br](E,o,!!n,!1);d(this,Ot,"f")&&[d(this,Ot,"f")].concat(g[d(this,Ot,"f")]||[]).filter(ne=>ne.length>1).includes(""+E._[E._.length-1])&&(E._.pop(),y=!0),X(this,hi,!1,"f");let M=d(this,ke,"f").getCommands(),x=d(this,St,"f").completionKey in E,q=y||x||i;if(E._.length){if(M.length){let Z;for(let ne=s||0,te;E._[ne]!==void 0;ne++)if(te=String(E._[ne]),M.includes(te)&&te!==d(this,mt,"f")){let ae=d(this,ke,"f").runCommand(te,this,p,ne+1,i,y||w||i);return this[Br](ae,o,!!n,!1)}else if(!Z&&te!==d(this,mt,"f")){Z=te;break}!d(this,ke,"f").hasDefaultCommand()&&d(this,Ei,"f")&&Z&&!q&&d(this,we,"f").recommendCommands(Z,M)}d(this,mt,"f")&&E._.includes(d(this,mt,"f"))&&!x&&(d(this,It,"f")&&fr(!0),this.showCompletionScript(),this.exit(0))}if(d(this,ke,"f").hasDefaultCommand()&&!q){let Z=d(this,ke,"f").runCommand(null,this,p,0,i,y||w||i);return this[Br](Z,o,!!n,!1)}if(x){d(this,It,"f")&&fr(!0),t=[].concat(t);let Z=t.slice(t.indexOf(`--${d(this,St,"f").completionKey}`)+1);return d(this,St,"f").getCompletion(Z,(ne,te)=>{if(ne)throw new Oe(ne.message);(te||[]).forEach(ae=>{d(this,fn,"f").log(ae)}),this.exit(0)}),this[Br](E,!o,!!n,!1)}if(d(this,Et,"f")||(y?(d(this,It,"f")&&fr(!0),u=!0,this.showHelp("log"),this.exit(0)):w&&(d(this,It,"f")&&fr(!0),u=!0,d(this,ie,"f").showVersion("log"),this.exit(0))),!u&&d(this,K,"f").skipValidation.length>0&&(u=Object.keys(E).some(Z=>d(this,K,"f").skipValidation.indexOf(Z)>=0&&E[Z]===!0)),!u){if(p.error)throw new Oe(p.error.message);if(!x){let Z=this[au](g,{},p.error);n||(A=Or(E,this,d(this,xt,"f").getMiddleware(),!0)),A=this[Al](Z,A??E),Re(A)&&!n&&(A=A.then(()=>Or(E,this,d(this,xt,"f").getMiddleware(),!1)))}}}catch(M){if(M instanceof Oe)d(this,ie,"f").fail(M.message,M);else throw M}return this[Br](A??E,o,!!n,!0)}[au](t,r,n,s){let i={...this.getDemandedOptions()};return u=>{if(n)throw new Oe(n.message);d(this,we,"f").nonOptionCount(u),d(this,we,"f").requiredArguments(u,i);let o=!1;d(this,Mr,"f")&&(o=d(this,we,"f").unknownCommands(u)),d(this,wr,"f")&&!o?d(this,we,"f").unknownArguments(u,t,r,!!s):d(this,vr,"f")&&d(this,we,"f").unknownArguments(u,t,{},!1,!1),d(this,we,"f").limitedChoices(u),d(this,we,"f").implications(u),d(this,we,"f").conflicting(u)}}[yl](){X(this,Et,!0,"f")}[kr](t){if(typeof t=="string")d(this,K,"f").key[t]=!0;else for(let r of t)d(this,K,"f").key[r]=!0}};function rl(e){return!!e&&typeof e.getInternalMethods=="function"}var Jg=Dl(Ga),Pl=Jg;await Pl(qa(process.argv)).command("$0 <file-or-url>",'Convert a tldraw ".tldr" file or tldraw.com URL to an svg or png image',e=>e.scriptName("tldraw-cli").positional("file-or-url",{demandOption:!0,describe:'The sketch to convert to an image \u2014 either a path to a local ".tldr" file, or a tldraw.com sketch URL',type:"string"}).option("format",{alias:"f",choices:["png","svg"],default:"svg",describe:"Output image format",type:"string"}).option("output",{alias:"o",default:"./",describe:"Output image directory",type:"string"}).option("name",{alias:"n",defaultDescription:"The original file name or URL id is used",describe:"Output image name",type:"string"}).option("transparent",{alias:"t",default:!1,describe:"Output an image with a transparent background",type:"boolean"}).option("dark-mode",{alias:"d",default:!1,describe:"Output a dark theme version of the image",type:"boolean"}).option("frames",{coerce(t){return t.length===0?!0:t},defaultDescription:"false",describe:'Export each sketch "frame" as a separate image, use the option flag alone to export all frames, or pass one or more frame names or IDs',type:"array"}).option("strip-style",{default:!1,describe:"Remove all style tags from the SVG output. Applies to SVG output only.",type:"boolean"}).option("verbose",{default:!1,describe:"Enable verbose output",type:"boolean"}),async e=>{let{darkMode:t,fileOrUrl:r,format:n,frames:s,name:i,output:u,stripStyle:o,transparent:l,verbose:p}=e;try{await D0(r,{darkMode:t,format:n,frames:s,name:i,output:u,stripStyle:o,transparent:l,verbose:p}),process.exit(0)}catch(E){console.error("Conversion failed:",E),process.exit(1)}}).alias("h","help").version("version",Uu).alias("v","version").help().parse();
75
82
  /*! Bundled license information:
76
83
 
77
84
  voca/index.js: