titanfiber 1.0.157 → 1.0.159
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/build.pkg.js +1 -1
- package/cli.pkg.js +1 -1
- package/eval.pkg.js +1 -1
- package/harness.pkg.js +1 -1
- package/package.json +2 -1
- package/script.js +1 -1
- package/script.pkg.js +1 -1
package/build.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e){var n,r=!1;return function(){return r||(r=!0,n=e.apply(this,arguments)),n}},n=e(function(){return process.argv.slice(2)}),r=n,u=function(e){return"string"==typeof e},i=function(e){return e instanceof String},o=function(e){return u(e)||i(e)},s=o,c=function(e,n){const r=[];let t="",u="outside",i=!1;for(let o=0;o<e.length;o++){const s=e[o];switch(u){case"outside":'"'===s?i?(t+=s,i=!1):(n&&(t+=s),u="insideQuote"):"\\"===s?i=!0:" "===s?(t.length>0&&(r.push(t),t=""),i=!1):(t+=s,i=!1);break;case"insideQuote":'"'!==s||i?"\\"!==s||i?(t+=s,i=!1):i=!0:(n&&(t+=s),u="outside")}}return t.length>0&&r.push(t),r},l=function(e,n){var t=e;return null==t?r():s(t)?c(t,n):t},a=function(e,n){for(var r=l(e,n),t=[],u=!1,i=r.length,o=0;o<i;o++){var s=r[o];if(!u){var c=s[0];let e;if("-"===c)if("-"===s[1]){if(2===s.length){u=!0;continue}e=2}else e=1;else"/"===c&&(e=1);if(e){var a,f,p=s.slice(e),d=p.indexOf("=");if(-1!==d)a=p.slice(0,d),f=p.slice(d+1);else{a=p;var h=r[o+1];null==h||"-"===h[0]?f=!0:(f=h,o++)}t[a]=f;continue}}t.push(s)}return t},f=a,p=f,d=function(e){return require(e)},h=function(e){return!!e.startsWith("node:")||d("node:module").isBuiltin(e)},v=function(e){return e.startsWith(".")},m=function(e){return Array.isArray(e)},g=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},y=g(globalThis.Error),w=class extends y{constructor(e,n){super(e??"Unexpected value",n)}},b=e(function(){return"undefined"==typeof window}),x=function(e){return require("node:"+e)},E=function(n){return e(()=>x(n))},F=E("util"),A=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),F().inspect(e,n)},O=function(e,n){return null!=e&&e.constructor===n},S=function(e){return O(e,Object)},_=function(e,n){return n<0?e.length+n:n},j=_,I=function(e,n,r,t){return void 0!==n&&(null===n||0===n?n=void 0:(n=j(e,n),t&&0==t.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=j(e,r),t&&t.inclusiveEnd&&r++)),[n,r]},k=function(e,n,r,t,u,i){if(r||null!=t){[r,t]=I(e,r,t,i);var o=e.slice(r,t),s=n(o);return u?u(s,r,t,o,e):s}return n(e)},N=function(e,n,r,t,u){return k(e,n,r,t,(n,r,t)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==t?e.slice(t):""),u)},q=O,R=function(e){return q(e,RegExp)},T=function(e){return m(e)?e:[e]},C=function(e){return e instanceof Promise},P=function(e,n){var r=e;return C(r)?r.then(n):n(r)},M=function(e){return"function"==typeof e},L=function(e){return M(e)&&null==e.prototype},D=L,W=function(e){return function(){return e.apply(this,arguments)}},K=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return P(r,()=>(delete this.super,r))}:D(e)?W(e):e,r._isConstructor=!0,r},B=function(e,n){return e._isConstructor?e:K(e,n)},U=function(){return this},Y=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},z=function(e){return!Y(e)},J=function(e,n,r){return!1===r?Object.keys(n).forEach(r=>{void 0===e[r]&&(e[r]=n[r])}):Object.assign(e,n),e},V=function(e,n){return J(e,n,!1)},G=function(e,n,r,t){return r||(r={}),t&&V(r,t),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(e,n,r)},Q=function(e,n,r,t){return G(e,n,{value:r,writable:!0,enumerable:!1},t),r},$=Q,H=class extends y{constructor(e,n){super(e??"Not yet implemented",n)}},X=function(e,n,r,t){var u=e[n];if(void 0===u){var i=r;!1!==t&&M(i)&&(i=i(e,n)),e[n]=u=i}return u},Z=function(e,n,r,t){return e||(e={}),X(e,n,r,t),e},ee=function(e,n){return Z(e,"fromFn",n,!1)},ne=function(e,n){return new H(e,ee(n,ne))},re=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),$(e,"displayName",n)},te=re,ue=function(e,n){return Object.assign(e,n)},ie=b()?require("util").inspect.custom:Symbol("Display"),oe=function(e,n){e.prototype[ie]=n},se=function(e,n,r,t,u,i){i||(i={}),s(n)&&(n=null);var o,c,l,a=r;a&&(m(a)?([c,l]=a,c&&(c=B(c))):o=B(a,n));var f=i.bareFn;i.singleton&&(f=function(){return null==h.default&&(h.default=new h(...arguments)),h.default});var p,d=c||o||n||U;function h(){if(!new.target&&f&&!(this instanceof h))return f.apply(this,arguments);var e=this;return P(d.apply(e,arguments),r=>{if(r&&z(r)&&(e=r,c)){if(!new.target)throw ne('Prototype repair is NYI for class instantiation without "new".');if(!n)throw ne("instanceFn is not yet supported when extendsClass is null.");var t=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==t&&Object.setPrototypeOf(e,t)}return l?P(l.apply(e,arguments),()=>e):e})}return e&&te(h,e),t?(p=t,n&&Object.setPrototypeOf(t,n.prototype)):p=n?Object.create(n.prototype):{},$(p,"constructor",h),h.prototype=p,u&&ue(h,u),i.display&&oe(h,i.display),i.implements&&T(i.implements).forEach(e=>e(h)),h},ce=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},le=ce,ae=function(e,n,r,t,u){var i=Symbol();return se(e,Function,[function(){var e=function(){return e[i].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[i]=e,le(this,i)}],r,t,u)},fe=function(e,n,r,t){return n=null==n?0:_(e,n),r=null==r?e.length:_(e,r),t&&(0==t.inclusiveStart&&n++,t.inclusiveEnd&&r++),[n,r]},pe=function(e,n,r,t){var u=n;if([r,t]=fe(e,r,t),M(u))for(var i=r;i<t;i++)e[i]=u(i,e);else e.fill(u,r,t);return e},de=function(e,n){var r=new Array(e||0);return arguments.length>1&&pe(r,n),r},he=function(e,n){return de(n.length,r=>e[n[r]])},ve=function(e,n){return e[n]},me=function(e,n,r){return e[n]=r},ge=function(e,n,r){var t=e;return M(t)?t.apply(r,n):t},ye=function(e,n,r,t,u){t||(t=ve);var i=t(e,n);return void 0===i&&(i=ge(r,[e,n]),u||(u=me),u(e,n,i)),i},we=function(e,n){return e.get(n)},be=function(e,n,r){return e.set(n,r)},xe=function(e,n,r){return ye(e,n,r,we,be)},Ee=class{constructor(){this.store=new Map}get(e,n){return xe(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Fe=function(e,n){return e.push(n),e},Ae=Fe,Oe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Se=Symbol("Value"),_e=function(){return{}},je=function(e){return[e.slice(0,-1),e[e.length-1]]},Ie=je,ke=function(e,n,r,t,u,i){r||(r=ve),null==t&&(t=_e),null==u&&(u=me),null==i&&(i=r);for(var[o,s]=Ie(n),c=e,l=o.length,a=0;a<l;a++){var f=o[a],p=r(c,f);if(void 0===p){if(!t)return;p=ye(c,f,t,r,u)}c=p}if(i)return i(c,s,u)},Ne=function(e,n,r,t,u,i){return ke(e,n,t,u,i,(e,n)=>ye(e,n,r,t,i))},qe=function(){return new Map},Re=function(e,n,r){return Ne(e,n,r,we,qe,be)},Te=function(e,n){return delete e[n],e},Ce=function(e,n,r,t){return ke(e,n,r,!1,!1,t||Te)},Pe=function(e,n){return e.delete(n)},Me=function(e,n){return Ce(e,n,we,Pe)},Le=class{constructor(){this.store=new Map}get(e,n){return e=Ae(Oe(e),Se),Re(this.store,e,n)}remove(e){return e=Ae(Oe(e),Se),Me(this.store,e)}delete(e){return this.remove(e)}},De=ae("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=T(n)).length){this.cache=new Ee;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new Le,this._cacheKeyFormatter=e=>he(e,n);else this.cache=new Le,this._cacheKeyFormatter=e=>e;var t=this;return function(){var n=t._cacheKeyFormatter(arguments);return t.cache.get(n,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),We=function(e,n){return new De(e,n)},Ke=function(e){return new Set(e)},Be=function(e){var n={};if(e){var r=Ke(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Ue=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Ye=function(e,n){var r=Be(e);return Ue(Object.assign(r,n))},ze=function(e,n){var r=n,t=void 0;return s(r)?t=r:S(r)&&(t=Ye(e.flags,r)),new RegExp(e,t)},Je=function(e,n){return ze(e,e.flags+n)},Ve=function(e){return Je(e,"g")},Ge=We(function(e){return e.global?e:Ve(e)},0),Qe=function(e){var n=e;return null==n?void 0:s(n)?n:Ue(n)},$e=function(e,n){return new RegExp(e,Qe(n))},He=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},Xe=function(e,n){return $e(He(e),n)},Ze=function(e,n,r,t,u,i){return N(e,function(e){return e.replaceAll?(R(n)&&(n=Ge(n)),e.replaceAll(n,r)):(n=s(n)?Xe(n,"g"):Ge(n),this.replace(n,r))},t,u,i)},en=function(e,n,r){return Ze(e,n,(r??"\\")+n)},nn=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=en(e,n,r)),n+e+n},rn=function(e){return nn(e,'"')},tn=S,un=function(e){return tn(e)?pn(e):String(e)},on=function(e,n){return n||(n=sn),"["+e.reduce(function(e,r){return e+n(r)+", "},"").slice(0,-2)+"]"},sn=function(e){return s(e)?rn(e):m(e)?on(e):un(e)},cn=function(e){return Reflect.ownKeys(e)},ln=function(e,n){return(n?cn:Object.keys)(e)},an=function(e,n,r){ln(e,r).forEach((r,t,u)=>n(r,e[r],t,u))},fn=function(e,n,r,t){var u=null!=r?r:"";return an(e,function(){u=n.call(this,u,...arguments)},t),u},pn=function(e,n){return n||(n=sn),"{"+fn(e,function(e,r,t){return e+r+":"+n(t)+", "},"",!0).slice(0,-2)+"}"},dn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":pn(e,e=>vn(e,n-1))},hn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":on(e,e=>vn(e,n-1))},vn=function(e,n){return void 0===e?"undefined":null===e?"null":b()?A(e,n):S(e)?dn(e,maxNumLevels):m(e)?hn(e,maxNumLevels):un(e)},mn=function(e,n,r,t){if(0===arguments.length)return new w("Unexpected value received");t||(t={});var u,{expected:i}=t;return u=i?"Received "+vn(e)+", expected one of "+vn(i):"Unexpected value received: "+vn(e),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),t.fromFn||(t.fromFn=mn),new w(u,t)},gn=g(globalThis.TypeError),yn=function(e){return null==e?e:e.constructor},wn=function(e,n,r,t){if(0===arguments.length)return new gn("Unexpected type received");t||(t={});var u,{type:i,expected:o}=t;return null==i&&(i=yn(e)),i&&i.name&&(i=i.name),o?(o.name&&(o=o.name),u="Expected "+o+", received "):u="Unexpected type received (",u+=i,null!=e&&(u+=" ("+vn(e)+")"),o||(u+=")"),r&&(u+=' for "'+r+'"'),null!=n&&(u+=" (index "+n+")"),t.fromFn||(t.fromFn=wn),new gn(u,t)},bn=function(e){var n=e.stdio;if(n){if(!m(n)){if(!s(n))throw wn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw mn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},xn=function(e,n,r){var t=new y(e,r);return n&&Object.assign(t,n),t},En=function(e,n){var r=n.length;e.length=r;for(var t=0;t<r;t++)e[t]=n[t];return e},Fn=function(e){return function(){return!e.apply(this,arguments)}},An=function(e,n){return En(e,e.filter(Fn(n)))},On=function(e){return An(e,e=>null==e)},Sn=E("child_process"),_n=e(function(){return"win32"===process.platform}),jn=function(e,n,r){if(r||(r={}),n(e))throw e;if(r.nullOnErr)return null;var t=r.onErr;if(void 0!==t)return ge(t);throw e},In=function(e,n,r){r||(r={}),r.dir&&(r.cwd=r.dir);var t=bn(r);if(null==t[0]){var u=r.allowInput,i=r.input;if(u&&i)throw xn("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");u&&(t[0]="inherit")}if(null==t[1]){var o=r.captureOutput??!1,s=r.showOutput;if(o&&s)throw xn("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");o?t[1]="pipe":(null==s&&(s=!0),t[1]=s?"inherit":"ignore")}if(null==t[2]){var c=r.captureErr??!1,l=r.showErr;if(c&&l)throw xn("captureErr and showErr cannot be used simultaneously for synchronous child processes.");c?t[2]="pipe":(null==l&&(l=!0),t[2]=l?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),n&&On(n);try{var a=Sn().execFileSync(e,n,r);null!=a&&!1!==r.trim&&(a=a.trim());var f=r.map??r.mapFn;return f&&(a=f(a)),a}catch(e){if(_n())return jn(e,e=>"ENOENT"===e.code,r);throw e}},kn=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,In("npm",e,n)},Nn=function(e,n,r){return kn(["install",e,n?"-g":null],r)},qn=E("path"),Rn=qn().sep,Tn=function(e,n,r){var t=qn().resolve,u=n?t(n,e):t(e);return r?u+Rn:u},Cn=function(e){return require(Tn(e))},Pn=class{constructor(){this.store={}}get(e,n){return X(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},Mn=new Pn,Ln=function(e){return e[e.length-1]},Dn=_,Wn=function(e,n,r){return e=ze(e,{global:!0}),null!=r&&(n=Dn(r,n)),e.lastIndex=n,e},Kn=function(e,n,r){return e=null!=r?Wn(e,r,n):Ge(e),Array.from(n.matchAll(e))},Bn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Ln(Kn(e,n))||null},Un=function(e,n){var r=Bn(e,n);return r&&n.length===r.index+r[0].length?r:null},Yn=function(e,n){if(s(n))return e.endsWith(n);if(R(n))return!!Un(n,e);throw wn(n,1,"matchThis")},zn=function(e){return Yn(e,Rn)?e:e+Rn},Jn=function(e,n,r){if(b()){var t=qn().join(e,n);return r?zn(t):t}throw ne()},Vn=function(e,n){return e.endsWith(n)?e:Jn(e,n)},Gn=E("module"),Qn=function(e){return e=Vn(e,"node_modules"),Gn().createRequire(e)},$n=function(e,n){return Mn.get(e,()=>Qn(e))(n)},Hn=function(e,n,r){return Object.keys(n).forEach(t=>X(e,t,n[t],r)),e},Xn=function(e,n,r){return n?Hn(e,n,r):e},Zn=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},er=function(e,n){var r=Un(n,e);return r?e.slice(0,r.index):e},nr=function(e,n){if(s(n))return Zn(e,n);if(R(n))return er(e,n);throw wn(n,1)},rr=nr,tr=function(e,n){return[e.slice(0,n),e.slice(n)]},ur=function(e){e=rr(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return tr(e,n+1)},ir=function(e,n){return e.startsWith(n)?e:n+e},or=function(e){var[n,r]=ur(e);return n+ir(r.trim(),"return ")},sr=function(e){return Ot("node-repl-await").processTopLevelAwait(e)},cr=function(e){return sr(e)??e},lr=Ze,ar=function(e,n){return""===e?e:(!1!==n&&(e=zn(e)),lr(e,"\\","/"))},fr=function(e,n){return l(e,n).slice()},pr=fr,dr=function(){var e=require.main?.filename;return e||(null!=process._eval?null:pr(process.argv)[1])},hr=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},vr=function(e){return e.split(".")[0]},mr=function(e){return qn().win32.basename(e)},gr=function(e){return vr(mr(e))},yr=function(e,n,r,t){e||(e=dr()??"_console.js");var u=hr(gr(e));return n&&(u+="_repl"),u+(r&&t?.dynamic?".dypkg.json":".pkg.js")},wr=function(e,n){return e=qn().dirname(e),!1===n?e:zn(e)},br=function(e,n,r,t){var u,i=yr(e,n,r,t);return u=e?wr(e):"./",Tn(u+i)},xr=function(e){return'require("'+ar(br(),!1)+'");\n'+e},Er=function(e,n){return Ze(e,n,"")},Fr=function(e,n){return n.forEach(n=>e=Er(e,n)),e},Ar=function(e){return Fr(e,["\r","\n"])},Or=function(e,n){return Ot("astring").generate(e,n)},Sr=function(e,n){return e.stack=n+"\n"+e.stack,e},_r=function(e,n,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==n&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var t=Ot("acorn");try{return t.parse(e,r)}catch(n){throw Sr(n,"Acorn parsing error: "+e)}},jr=function(e,n,r){return Or(_r(e,n,r))},Ir=function(e){return Ar(jr(e))},kr=function(e,n,r){return(n||r)&&(n||(n={}),r&&Xn(n,r),n.ensureReturn&&(e=or(e)),n.topLevelAwait&&(e=cr(e)),n.useTitan&&(e=xr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=Ir(e))),e},Nr=function(e){return s(e)?e:un(e)},qr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Rr=function(e,n,r,t,u){return k(e,n,r,t,(n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n),u)},Tr=function(e,n){return e.splice(e.length,0,...n),n},Cr=function(e,n){return Tr(e,n),e},Pr=Cr,Mr=class extends Array{constructor(e,n,r,t,u){if(-1===n)throw xn("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw xn("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,t&&Pr(this,t),this.index=n,this.input=r,u&&(this.groups=u)}fromParts(e){var n=e;return new Mr(n.match,n.index,n.input,n.captures,n.groups)}},Lr=function(e,n,r,t,u){return new Mr(e,n,r,t,u)},Dr=function(e,n,r,t,u){return-1===n||null==e?null:Lr(e,n,r,t,u)},Wr=Er,Kr=function(e,n){return ze(e,Wr(e.flags,n))},Br=function(e){return Kr(e,"g")},Ur=We(function(e){return e.global?Br(e):e},0),Yr=function(e,n,r){return(e=null!=r?Wn(e,r,n):Ur(e)).exec(n)},zr=function(e,n,r,t,u){return Rr(e,e=>{if(s(n)){var r=e.indexOf(n);return Dr(n,r,e)}return Yr(n,e)},r,t,u)},Jr=function(e){return e.index+e[0].length},Vr=function(e,n){var r=zr(e,n);return null===r[0]?null:e.slice(Jr(r))},Gr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Qr=function(e,n){var r=Yr(e,n);return r&&0===r.index?r:null},$r=function(e,n){var r=Qr(n,e);return r?e.slice(r[0].length):e},Hr=function(e,n){if(s(n))return Gr(e,n);if(R(n))return $r(e,n);throw wn(n,1)},Xr=Hr,Zr=function(e){var n=Vr(e,"=>").trim();return Xr(rr(n,"}"),"{")},et=function(e){return Vr(e,"{").slice(0,-1)},nt=function(e){var n=Nr(e);return qr(n)?Zr(n):et(n)},rt=function(e){return null==e?"":s(e)?e:M(e)?nt(e):String(e)},tt=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},t=kr(rt(e),n,r);return In("node",[n?.mode??"-p",t],n)},ut=function(e,n,r,t){var u="Required argument";return r&&(u+=' "'+r+'"'),null!=n&&(u+=" (index "+n+")"),u+=" missing",arguments.length>0&&(u+=" (received "+vn(e)+")"),xn(u,null,ee(t,ut))},it=function(e,n,r){if(null==e)throw ut(e,n,r,{fromFn:it});return e},ot=function(e,n){return process.kill(e,it(n,0,"signalName"))},st=function(e){return ot(e,"SIGINT")},ct=function(){return st(process.pid)},lt=ct,at=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw mn(e,0,"char")},ft=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=tt(function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var r=e.toUpperCase();"Y"===r||"N"===r?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),lt(),xn("Prompt was cancelled via interrupt.");return console.log(n),at(n)},pt=function(e){return m(e)?e:s(e)?e.split("."):[e]},dt=function(e,n,r,t,u,i){var o=r;return ke(e,n,t,u,i,(e,n,r)=>r(e,n,ge(o)))},ht=function(e,n){var r=n,t=globalThis.config;t||(t=globalThis.config={});var u,i=pt(e);return i.length>1?u=dt(t,i,r):(u=ge(r),t[i[0]]=u),u},vt=function(e,n){return ht("node.require.customDirs",r=>(r||(r=[]),!1!==n&&(e=Vn(e,"node_modules")),r.includes(e)||r.push(e),r)),e},mt=vt,gt=ke,yt=function(e){var n=globalThis.config;if(n){var r=pt(e);return r.length>1?gt(n,r):n[r[0]]}},wt=function(e,n,r){if(null!=e)return e;var t=yt(n);return null!=t?t:r},bt=E("fs"),xt=function(e){return!!bt().lstatSync(e,{throwIfNoEntry:!1})},Et=function(e){var n=wr(e,!1);return xt(n)||(n!==e&&Et(n),bt().mkdirSync(n)),e},Ft=function(e){return Et(e),bt().mkdirSync(e),e},At=function(e){return xt(e)?e:Ft(e)},Ot=function(e,n){if(h(e))return require(e);if(v(e))return Cn(e);try{return require(e)}catch(e){}var r=__dirname,t=process.mainModule?.path;if(t!==r)try{return $n(t,e)}catch(e){}var u=process.cwd();if(u!==t&&u!==r)try{return $n(u,e)}catch(e){}var i=yt("node.require.customDirs");if(i)for(var o of i)try{return $n(o,e)}catch(e){}var s=wt(n?.autoInstall,"node.require.autoInstall"),c=wt(n?.promptInstall,"node.require.promptInstall",!0);if(s||c){var l=s||c;!0===l&&(l="./node_modules"),l=Tn(l);var a=!1;if(s?(a=!0,console.log('Auto-installing "'+e+'" from npm to "'+l+'"...')):(a=ft('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+l+'"...'),a){l=At(l),Nn(e,!1,{cwd:l});try{return mt(l),$n(l,e)}catch(e){console.error("Failed to load from auto-install dir: ",l)}}}throw xn('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:t,cwd:u}})},St=function(e){return bt().readFileSync(e,"utf8")},_t=St,jt=function(e){return JSON.parse(_t(e))},It={env:{parseArgs:p,args:r,setConfig:ht,getConfig:yt,resolveConfig:wt},node:{parseArgs:f,args:n,pause:function(e){null!=e&&(e=String(e)),Ot("press-any-key-sync")(e)},require:Ot,_basicRequire:d,is:b,display:A,util:F,_builtInModule:E,requireBuiltIn:x,child_process:Sn,requireLocal:Cn,path:qn,_requireFromDir:$n,_requireDirCache:Mn,_createRequire:Qn,module:Gn,promptYNSync:ft,run:tt,getScriptPath:dr,positionalArgs:pr,sigint:lt,interrupt:ct,ensureRequireDir:mt,addRequireDir:vt,fs:bt,loadPackageJSON:function(e){var n=e??"./";return n.endsWith("package.json")||(n=Jn(n,"package.json")),xt(n)?jt(n):{}}},cli:{parseArgs:a,resolveArgs:l,splitArgs:c,positionalArgs:fr},f:{one:e,memoize:We,MemoizedFunction:De,createClass:ae,ensureConstructor:B,createConstructor:K,isArrowFn:D,isArrow:L,is:M,wrap:W,retThis:U,setName:re,not:Fn,body:nt,isArrowString:qr,_getArrowFnBody:Zr,_getNormalFnBody:et},s:{is:s,isAny:o,isPrimitive:u,isObject:i,toLiteral:rn,quote:nn,escape:en,replaceAll:Ze,apply:N,withIndices:k,chars:Ke,from:un,endsWith:Yn,resolveIndex:Dn,removeTrailing:rr,removeFromEnd:nr,_removeStringFromEnd:Zn,_removeRegexFromEnd:er,splitAtIndex:tr,ensureStartsWith:ir,replace:lr,decapitalize:hr,removeLineBreaks:Ar,removeMulti:Fr,removeAll:Er,resolve:rt,ensure:Nr,after:Vr,match:zr,_matchWithIndices:Rr,remove:Wr,removeLeading:Xr,removeFromStart:Hr,_removeStringFromStart:Gr,_removeRegexFromStart:$r},npm:{isBuiltIn:h,isFile:v,install:Nn,_runCommand:kn},os:{run:In,_resolveStdio:bn},a:{is:m,wrapIndices:I,wrapIndex:j,resolveIndex:_,ensure:T,pick:he,create:de,fill:pe,resolveIndices:fe,push:Ae,add:Fe,splitLast:Ie,splitTail:je,toLiteral:on,display:hn,removeNullish:On,removeByFilter:An,replaceContents:En,last:Ln,pushMulti:Pr,addMulti:Cr,pushThroughMulti:Tr},err:{value:mn,ValueError:w,Error:y,Enhanced:g,nyi:ne,NYIError:H,defaultFromFn:ee,type:wn,TypeError:gn,create:xn,prepend:Sr,req:ut},v:{display:vn,constructorMatches:O,toLiteral:sn,isPrimitive:Y,resolve:ge,type:yn,req:it},macro:{config:function(e){}},o:{is:S,display:dn,toLiteral:pn,constructorMatches:q,isAny:z,setHidden:$,addNonEnumerable:Q,defineProperty:G,weakAssign:V,merge:J,safeEnsure:Z,ensure:X,hideKey:le,makeNonEnumerable:ce,ensureCustom:ye,get:ve,set:me,createEmpty:_e,remove:Te,isPure:tn,reduce:fn,each:an,keys:ln,allKeys:cn,Cache:Pn,setDefaults:Xn,ensureMulti:Hn,resolveKeys:pt,diveGet:gt},re:{is:R,ensureGlobal:Ge,global:Ve,addFlag:Je,copy:ze,updateFlagString:Ye,parseFlagString:Be,createFlagString:Ue,createEscaped:Xe,create:$e,resolveFlags:Qe,escape:He,matchEnd:Un,matchLast:Bn,matchAll:Kn,setStartIndex:Wn,safeCreateResult:Dr,createResult:Lr,RegexResult:Mr,match:Yr,ensureLocal:Ur,local:Br,removeFlag:Kr,resultEndIndex:Jr,matchStart:Qr},class:{create:se,setName:te,addStatics:ue,setDisplay:oe},p:{asyncJoint:P,is:C},sym:{display:ie,value:Se},map:{Cache:Ee,ensure:xe,get:we,set:be,MultiCache:Le,diveEnsure:Re,createEmpty:qe,diveDelete:Me,remove:Pe},args:{ensureArray:Oe},tree:{ensure:Ne,dive:ke,remove:Ce,setCustom:dt},win:{is:_n},shell:{_handleError:jn},path:{abs:Tn,sep:Rn,ensureEndsWith:Vn,join:Jn,ensureTrailingSlash:zn,fws:ar,baseName:gr,_removeExtsFromFile:vr,file:mr,dir:wr},js:{enhance:kr,ensureReturn:or,splitLastExpression:ur,enableAwait:cr,_nodeEnableAwait:sr,useTitan:xr,inline:Ir,removeComments:jr,fromAST:Or,parse:_r},titan:{getPackagePath:br,getPackageName:yr},proc:{interrupt:st,signal:ot},bool:{fromYN:at},fs:{ensureDir:At,exists:xt,mkdir:Ft,ensureParent:Et,loadJSON:jt,loadText:_t,load:St}};globalThis.t?Object.keys(It).forEach(function(e){if(t[e]){var n=It[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=It[e]}):globalThis.t=Object.assign({},It),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var n=function(n){var e,r=!1;return function(){return r||(r=!0,e=n.apply(this,arguments)),e}},e=n(function(){return process.argv.slice(2)}),r=e,i=function(n){return"string"==typeof n},u=function(n){return n instanceof String},o=function(n){return i(n)||u(n)},c=o,s=function(n,e){const r=[];let t="",i="outside",u=!1;for(let o=0;o<n.length;o++){const c=n[o];switch(i){case"outside":'"'===c?u?(t+=c,u=!1):(e&&(t+=c),i="insideQuote"):"\\"===c?u=!0:" "===c?(t.length>0&&(r.push(t),t=""),u=!1):(t+=c,u=!1);break;case"insideQuote":'"'!==c||u?"\\"!==c||u?(t+=c,u=!1):u=!0:(e&&(t+=c),i="outside")}}return t.length>0&&r.push(t),r},l=function(n,e){var t=n;return null==t?r():c(t)?s(t,e):t},a=function(n,e){for(var r=l(n,e),t=[],i=!1,u=r.length,o=0;o<u;o++){var c=r[o];if(!i){var s=c[0];let n;if("-"===s)if("-"===c[1]){if(2===c.length){i=!0;continue}n=2}else n=1;else"/"===s&&(n=1);if(n){var a,f,p=c.slice(n),d=p.indexOf("=");if(-1!==d)a=p.slice(0,d),f=p.slice(d+1);else{a=p;var h=r[o+1];null==h||"-"===h[0]?f=!0:(f=h,o++)}t[a]=f;continue}}t.push(c)}return t},f=a,p=f,d=function(n){return require(n)},h=function(n){return!!n.startsWith("node:")||d("node:module").isBuiltin(n)},v=function(n){return n.startsWith(".")},g=function(n){return"function"==typeof n},m=function(n,e,r,t){var i=n[e];if(void 0===i){var u=r;!1!==t&&g(u)&&(u=u(n,e)),n[e]=i=u}return i},y=function(n,e,r){return Object.keys(e).forEach(t=>m(n,t,e[t],r)),n},w=function(n,e,r){return y(n||{},e,r)},b=function(n,e,r){return e?w(n,e,r):n??{}},x=function(n,e){return b(n,e,!0)},E=function(n){return Array.isArray(n)},O=function(n){return class extends n{constructor(n,e){super(n,e);var r=this.constructor.name;r&&(this.name=r)}}},S=O(globalThis.Error),F=class extends S{constructor(n,e){super(n??"Unexpected value",e)}},A=n(function(){return"undefined"==typeof window}),j=function(n){return require("node:"+n)},_=function(e){return n(()=>j(e))},I=_("util"),k=function(n,e){return e||(e={}),null==e.colors&&(e.colors=!0),I().inspect(n,e)},N=function(n,e){return null!=n&&n.constructor===e},q=function(n){return N(n,Object)},T=function(n,e){return e<0?n.length+e:e},C=T,P=function(n,e,r,t){return void 0!==e&&(null===e||0===e?e=void 0:(e=C(n,e),t&&0==t.inclusiveStart&&e++)),void 0!==r&&(null===r||r===n.length?r=void 0:(r=C(n,r),t&&t.inclusiveEnd&&r++)),[e,r]},R=function(n,e,r,t,i,u){if(r||null!=t){[r,t]=P(n,r,t,u);var o=n.slice(r,t),c=e(o);return i?i(c,r,t,o,n):c}return e(n)},L=function(n,e,r,t,i){return R(n,e,r,t,(e,r,t)=>(void 0!==r?n.slice(0,r):"")+(e||"")+(void 0!==t?n.slice(t):""),i)},M=N,D=function(n){return M(n,RegExp)},W=function(n){return E(n)?n:[n]},K=function(n){return n instanceof Promise},B=function(n,e){var r=n;return K(r)?r.then(e):e(r)},U=function(n){return g(n)&&null==n.prototype},Y=U,z=function(n){return function(){return n.apply(this,arguments)}},J=function(n,e){var r;return r=e?function(){this.super=e;var r=n.apply(this,arguments);return B(r,()=>(delete this.super,r))}:Y(n)?z(n):n,r._isConstructor=!0,r},V=function(n,e){return n._isConstructor?n:J(n,e)},G=function(){return this},Q=function(n){var e=typeof n;return"object"!==e&&"function"!==e||null===n},$=function(n){return!Q(n)},H=function(n,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===n[r]&&(n[r]=e[r])}):Object.assign(n,e),n},X=function(n,e){return H(n,e,!1)},Z=function(n,e,r,t){return r||(r={}),t&&X(r,t),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(n,e,r)},nn=function(n,e,r,t){return Z(n,e,{value:r,writable:!0,enumerable:!1},t),r},en=nn,rn=class extends S{constructor(n,e){super(n??"Not yet implemented",e)}},tn=function(n,e,r,t){return n||(n={}),m(n,e,r,t),n},un=function(n,e){return tn(n,"fromFn",e,!1)},on=function(n,e){return new rn(n,un(e,on))},cn=function(n,e){Object.defineProperty(n,"name",{value:e,configurable:!0}),en(n,"displayName",e)},sn=cn,ln=function(n,e){return Object.assign(n,e)},an=A()?require("util").inspect.custom:Symbol("Display"),fn=function(n,e){n.prototype[an]=e},pn=function(n,e,r,t,i,u){u||(u={}),c(e)&&(e=null);var o,s,l,a=r;a&&(E(a)?([s,l]=a,s&&(s=V(s))):o=V(a,e));var f=u.bareFn;u.singleton&&(f=function(){return null==h.default&&(h.default=new h(...arguments)),h.default});var p,d=s||o||e||G;function h(){if(!new.target&&f&&!(this instanceof h))return f.apply(this,arguments);var n=this;return B(d.apply(n,arguments),r=>{if(r&&$(r)&&(n=r,s)){if(!new.target)throw on('Prototype repair is NYI for class instantiation without "new".');if(!e)throw on("instanceFn is not yet supported when extendsClass is null.");var t=Object.getPrototypeOf(this);Object.getPrototypeOf(n)!==t&&Object.setPrototypeOf(n,t)}return l?B(l.apply(n,arguments),()=>n):n})}return n&&sn(h,n),e&&Object.setPrototypeOf(h,e),t?(p=t,e&&Object.setPrototypeOf(t,e.prototype)):p=e?Object.create(e.prototype):{},en(p,"constructor",h),h.prototype=p,i&&ln(h,i),u.display&&fn(h,u.display),u.implements&&W(u.implements).forEach(n=>n(h)),h},dn=function(n,e){Object.defineProperty(n,e,{enumerable:!1})},hn=dn,vn=function(n,e,r,t,i){var u=Symbol();return pn(n,Function,[function(){var n=function(){return n[u].apply(this,arguments)};return n},function(){var n=e.apply(this,arguments);if(!n)throw new Error("Constructor must return a function.");this[u]=n,hn(this,u)}],r,t,i)},gn=function(n,e,r,t){return e=null==e?0:T(n,e),r=null==r?n.length:T(n,r),t&&(0==t.inclusiveStart&&e++,t.inclusiveEnd&&r++),[e,r]},mn=function(n,e,r,t){var i=e;if([r,t]=gn(n,r,t),g(i))for(var u=r;u<t;u++)n[u]=i(u,n);else n.fill(i,r,t);return n},yn=function(n,e){var r=new Array(n||0);return arguments.length>1&&mn(r,e),r},wn=function(n,e){return yn(e.length,r=>n[e[r]])},bn=function(n,e){return n[e]},xn=function(n,e,r){return n[e]=r},En=function(n,e,r){var t=n;return g(t)?t.apply(r,e):t},On=function(n,e,r,t,i){t||(t=bn);var u=t(n,e);return void 0===u&&(u=En(r,[n,e]),i||(i=xn),i(n,e,u)),u},Sn=function(n,e){return n.get(e)},Fn=function(n,e,r){return n.set(e,r)},An=function(n,e,r){return On(n,e,r,Sn,Fn)},jn=class{constructor(){this.store=new Map}get(n,e){return An(this.store,n,e)}remove(n){return this.store.delete(n)}delete(n){return this.remove(n)}},_n=function(n,e){return n.push(e),n},In=_n,kn=function(n){var e=n;return Array.isArray(e)?e:Array.from(e)},Nn=Symbol("Value"),qn=function(){return{}},Tn=function(n){return[n.slice(0,-1),n[n.length-1]]},Cn=Tn,Pn=function(n,e,r,t,i,u){r||(r=bn),null==t&&(t=qn),null==i&&(i=xn),null==u&&(u=r);for(var[o,c]=Cn(e),s=n,l=o.length,a=0;a<l;a++){var f=o[a],p=r(s,f);if(void 0===p){if(!t)return;p=On(s,f,t,r,i)}s=p}if(u)return u(s,c,i)},Rn=function(n,e,r,t,i,u){return Pn(n,e,t,i,u,(n,e)=>On(n,e,r,t,u))},Ln=function(){return new Map},Mn=function(n,e,r){return Rn(n,e,r,Sn,Ln,Fn)},Dn=function(n,e){return delete n[e],n},Wn=function(n,e,r,t){return Pn(n,e,r,!1,!1,t||Dn)},Kn=function(n,e){return n.delete(e)},Bn=function(n,e){return Wn(n,e,Sn,Kn)},Un=class{constructor(){this.store=new Map}get(n,e){return n=In(kn(n),Nn),Mn(this.store,n,e)}remove(n){return n=In(kn(n),Nn),Bn(this.store,n)}delete(n){return this.remove(n)}},Yn=vn("MemoizedFunction",function(n,e){if(this.base=n,null!=e)if(1===(e=W(e)).length){this.cache=new jn;var r=e[0];this._cacheKeyFormatter=n=>n[r]}else this.cache=new Un,this._cacheKeyFormatter=n=>wn(n,e);else this.cache=new Un,this._cacheKeyFormatter=n=>n;var t=this;return function(){var e=t._cacheKeyFormatter(arguments);return t.cache.get(e,()=>n.apply(this,arguments))}},{remove(n){return this.cache.remove(this._cacheKeyFormatter(n))}}),zn=function(n,e){return new Yn(n,e)},Jn=function(n){return new Set(n)},Vn=function(n){var e={};if(n){var r=Jn(n);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},Gn=function(n){var e="";return n.global&&(e+="g"),(n.caseInsensitive||0==n.caseSensitive)&&(e+="i"),n.sticky&&(e+="y"),e},Qn=function(n,e){var r=Vn(n);return Gn(Object.assign(r,e))},$n=function(n,e){var r=e,t=void 0;return c(r)?t=r:q(r)&&(t=Qn(n.flags,r)),new RegExp(n,t)},Hn=function(n,e){return $n(n,n.flags+e)},Xn=function(n){return Hn(n,"g")},Zn=zn(function(n){return n.global?n:Xn(n)},0),ne=function(n){var e=n;return null==e?void 0:c(e)?e:Gn(e)},ee=function(n,e){return new RegExp(n,ne(e))},re=function(n){return n.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},te=function(n,e){return ee(re(n),e)},ie=function(n,e,r,t,i,u){return L(n,function(n){return n.replaceAll?(D(e)&&(e=Zn(e)),n.replaceAll(e,r)):(e=c(e)?te(e,"g"):Zn(e),this.replace(e,r))},t,i,u)},ue=function(n,e,r){return ie(n,e,(r??"\\")+e)},oe=function(n,e,r){return null==e&&(e='"'),!1!==r&&(n=ue(n,e,r)),e+n+e},ce=function(n){return oe(n,'"')},se=q,le=function(n){return se(n)?ge(n):String(n)},ae=function(n,e){return e||(e=fe),"["+n.reduce(function(n,r){return n+e(r)+", "},"").slice(0,-2)+"]"},fe=function(n){return c(n)?ce(n):E(n)?ae(n):le(n)},pe=function(n){return Reflect.ownKeys(n)},de=function(n,e){return(e?pe:Object.keys)(n)},he=function(n,e,r){de(n,r).forEach((r,t,i)=>e(r,n[r],t,i))},ve=function(n,e,r,t){var i=null!=r?r:"";return he(n,function(){i=e.call(this,i,...arguments)},t),i},ge=function(n,e){return e||(e=fe),"{"+ve(n,function(n,r,t){return n+r+":"+e(t)+", "},"",!0).slice(0,-2)+"}"},me=function(n,e){return null==e&&(e=1),e<=0?"[object Object]":ge(n,n=>we(n,e-1))},ye=function(n,e){return null==e&&(e=1),e<=0?"[object Array]":ae(n,n=>we(n,e-1))},we=function(n,e){return void 0===n?"undefined":null===n?"null":A()?k(n,e):q(n)?me(n,maxNumLevels):E(n)?ye(n,maxNumLevels):le(n)},be=function(n,e,r,t){if(0===arguments.length)return new F("Unexpected value received");t||(t={});var i,{expected:u}=t;return i=u?"Received "+we(n)+", expected one of "+we(u):"Unexpected value received: "+we(n),r&&(i+=' for "'+r+'"'),null!=e&&(i+=" (index "+e+")"),t.fromFn||(t.fromFn=be),new F(i,t)},xe=O(globalThis.TypeError),Ee=function(n){return null==n?n:n.constructor},Oe=function(n,e,r,t){if(0===arguments.length)return new xe("Unexpected type received");t||(t={});var i,{type:u,expected:o}=t;return null==u&&(u=Ee(n)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=n&&(i+=" ("+we(n)+")"),o||(i+=")"),r&&(i+=' for "'+r+'"'),null!=e&&(i+=" (index "+e+")"),t.fromFn||(t.fromFn=Oe),new xe(i,t)},Se=function(n){var e=n.stdio;if(e){if(!E(e)){if(!c(e))throw Oe(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw be(e,"stdio");e=["overlapped","overlapped","overlapped"]}n.stdio=e}}else e=n.stdio=[null,null,null];return e},Fe=function(n,e,r){var t=new S(n,r);return e&&Object.assign(t,e),t},Ae=function(n){if(!E(n))throw Oe(n,null,null,{expected:Array});return!0},je=function(n,e){var r=e.length;n.length=r;for(var t=0;t<r;t++)n[t]=e[t];return n},_e=function(n){return function(){return!n.apply(this,arguments)}},Ie=function(n,e){return je(n,n.filter(_e(e)))},ke=function(n){return Ie(n,n=>null==n)},Ne=_("child_process"),qe=n(function(){return"win32"===process.platform}),Te=function(n,e,r){if(r||(r={}),e(n))throw n;if(r.nullOnErr)return null;var t=r.onErr;if(void 0!==t)return En(t);throw n},Ce=function(n,e,r,t){var i=(r=x(r,t)).liveOutput,u=r.captureOutput??r.capture,o=r.captureErr??r.capture;u&&null==i&&(i=!1),r.dir&&(r.cwd=r.dir);var c=Se(r);if(null==c[0]&&!1!==r.allowInput){if(r.input)throw Fe("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");c[0]="inherit"}if(null==c[1])if(u){if(i)throw Fe("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");c[1]="pipe"}else c[1]=i??1?"inherit":"ignore";if(null==c[2]){o=r.captureErr??!1;var s=r.showErr;if(o&&s)throw Fe("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");c[2]=o?"pipe":s??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(Ae(e),ke(e));try{var l=Ne().execFileSync(n,e,r);null!=l&&r.trim&&(l=l.trim());var a=r.map??r.mapFn;return a&&(l=a(l)),l}catch(n){if(qe())return Te(n,n=>"ENOENT"===n.code,r);throw n}},Pe=function(n,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,Ce("npm",n,e)},Re=function(n,e,r){return Pe(["install",n,e?"-g":null],r)},Le=_("path"),Me=Le().sep,De=function(n,e,r){n=String(n);var t=Le().resolve,i=e?t(e,n):t(n);return r?i+Me:i},We=function(n){return require(De(n))},Ke=class{constructor(){this.store={}}get(n,e){return m(this.store,n,e)}remove(n){return delete this.store[n]}delete(n){return this.remove(n)}},Be=new Ke,Ue=function(n){return n[n.length-1]},Ye=T,ze=function(n,e,r){return n=$n(n,{global:!0}),null!=r&&(e=Ye(r,e)),n.lastIndex=e,n},Je=function(n,e,r){return n=null!=r?ze(n,r,e):Zn(n),Array.from(e.matchAll(n))},Ve=function(n,e,r){return null!=r&&(e=e.slice(0,r)),Ue(Je(n,e))||null},Ge=function(n,e){var r=Ve(n,e);return r&&e.length===r.index+r[0].length?r:null},Qe=function(n,e){if(c(e))return n.endsWith(e);if(D(e))return!!Ge(e,n);throw Oe(e,1,"matchThis")},$e=/\/|\\/,He=function(n){return Qe(n,$e)?n:n+Me},Xe=function(n,e,r){if(A()){var t=Le().join(String(n),String(e));return r?He(t):t}throw on()},Ze=function(n,e){return n.endsWith(e)?n:Xe(n,e)},nr=_("module"),er=function(n){return n=Ze(n,"node_modules"),nr().createRequire(n)},rr=function(n,e){return Be.get(n,()=>er(n))(e)},tr=function(n,e,r){return e?y(n,e,r):n},ir=function(n,e){return n.endsWith(e)?n.substring(0,n.length-e.length):n},ur=function(n,e){var r=Ge(e,n);return r?n.slice(0,r.index):n},or=function(n,e){if(c(e))return ir(n,e);if(D(e))return ur(n,e);throw Oe(e,1)},cr=or,sr=function(n,e){return[n.slice(0,e),n.slice(e)]},lr=function(n){n=cr(n.trim(),";");var e=Math.max(n.lastIndexOf(";"),n.lastIndexOf("\n"));return sr(n,e+1)},ar=function(n,e){return n.startsWith(e)?n:e+n},fr=function(n){var[e,r]=lr(n);return e+ar(r.trim(),"return ")},pr=function(n){return St("node-repl-await").processTopLevelAwait(n)},dr=function(n){return pr(n)??n},hr=ie,vr=function(n,e){return""===n?n:(!1!==e&&(n=He(n)),hr(n,"\\","/"))},gr=function(n,e){return l(n,e).slice()},mr=gr,yr=function(){var n=require.main?.filename;return n||(null!=process._eval?null:mr(process.argv)[1])},wr=function(n){return n.charAt(0).toLowerCase()+n.slice(1)},br=function(n){return n.split(".")[0]},xr=function(n){return Le().win32.basename(String(n))},Er=function(n){return br(xr(n))},Or=function(n,e,r,t){n||(n=yr()??"_console.js");var i=wr(Er(n));return e&&(i+="_repl"),i+(r&&t?.dynamic?".dypkg.json":".pkg.js")},Sr=function(n,e){return n=Le().dirname(String(n)),!1===e?n:He(n)},Fr=function(n,e,r,t){var i,u=Or(n,e,r,t);return i=n?Sr(n):"./",De(i+u)},Ar=function(n){return'require("'+vr(Fr(),!1)+'");\n'+n},jr=function(n,e){return ie(n,e,"")},_r=function(n,e){return e.forEach(e=>n=jr(n,e)),n},Ir=function(n){return _r(n,["\r","\n"])},kr=function(n,e){return St("astring").generate(n,e)},Nr=function(n,e){return n.stack=e+"\n"+n.stack,n},qr=function(n,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var t=St("acorn");try{return t.parse(n,r)}catch(e){throw Nr(e,"Acorn parsing error: "+n)}},Tr=function(n,e,r){return kr(qr(n,e,r))},Cr=function(n){return Ir(Tr(n))},Pr=function(n,e,r){return(e||r)&&(e||(e={}),r&&tr(e,r),e.ensureReturn&&(n=fr(n)),e.topLevelAwait&&(n=dr(n)),e.useTitan&&(n=Ar(n)),e.keepAlive&&(n="\nsetInterval(()=>{}, 100000);\n"+n),(e.logErrors||e.keepAlive)&&(n="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+n),e.inline&&(n=Cr(n))),n},Rr=function(n){return c(n)?n:le(n)},Lr=function(n){var e=n.indexOf("{");return-1===e||n.slice(0,e).includes("=>")},Mr=function(n,e,r,t,i){return R(n,e,r,t,(n,e)=>-1===n?-1:void 0===e?n:e+n,i)},Dr=function(n,e){return Array.prototype.findIndex.call(n,e)},Wr=function(n,e,r,t,i){var u=c(e);return u&&null==t&&!i?n.indexOf(e,r):Mr(n,n=>u?n.indexOf(e):D(e)?n.search(e):Dr(n,e),r,t,i)},Kr=function(n,e,r,t,i){var u=Wr(n,e,r,t,i);return-1===u?null:n.slice(u+1,t)},Br=function(n,e){return n.startsWith(e)?n.substring(e.length):n},Ur=jr,Yr=function(n,e){return $n(n,Ur(n.flags,e))},zr=function(n){return Yr(n,"g")},Jr=zn(function(n){return n.global?zr(n):n},0),Vr=function(n,e,r){return(n=null!=r?ze(n,r,e):Jr(n)).exec(e)},Gr=function(n,e){var r=Vr(n,e);return r&&0===r.index?r:null},Qr=function(n,e){var r=Gr(e,n);return r?n.slice(r[0].length):n},$r=function(n,e){if(c(e))return Br(n,e);if(D(e))return Qr(n,e);throw Oe(e,1)},Hr=$r,Xr=function(n){var e=Kr(n,"=>").trim();return Hr(cr(e,"}"),"{")},Zr=function(n){return Kr(n,"{").slice(0,-1)},nt=function(n){var e=Rr(n);return Lr(e)?Xr(e):Zr(e)},et=function(n){return null==n?"":c(n)?n:g(n)?nt(n):String(n)},rt=function(n,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},t=Pr(et(n),e,r);return Ce("node",[e?.mode??"-p",t],e)},tt=function(n,e,r,t){var i="Required argument";return r&&(i+=' "'+r+'"'),null!=e&&(i+=" (index "+e+")"),i+=" missing",arguments.length>0&&(i+=" (received "+we(n)+")"),Fe(i,null,un(t,tt))},it=function(n,e,r){if(null==n)throw tt(n,e,r,{fromFn:it});return n},ut=function(n,e){return process.kill(n,it(e,0,"signalName"))},ot=function(n){return ut(n,"SIGINT")},ct=function(){return ot(process.pid)},st=ct,lt=function(n){if("Y"===(n=n.toUpperCase()))return!0;if("N"===n)return!1;throw be(n,0,"char")},at=function(n){null==n&&(n="Are you sure? [y/n]: "),process.stdout.write(n);var e=rt(function(){const n=process.stdin,e=process.stdout;n.setRawMode(!0),n.setEncoding("utf8"),n.on("data",n=>{var r=n.toUpperCase();"Y"===r||"N"===r?(e.write(n),process.exit(0)):""===n&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),st(),Fe("Prompt was cancelled via interrupt.");return console.log(e),lt(e)},ft=function(n){return E(n)?n:c(n)?n.split("."):[n]},pt=function(n,e,r,t,i,u){var o=r;return Pn(n,e,t,i,u,(n,e,r)=>r(n,e,En(o)))},dt=function(n,e){var r=e,t=globalThis.config;t||(t=globalThis.config={});var i,u=ft(n);return u.length>1?i=pt(t,u,r):(i=En(r),t[u[0]]=i),i},ht=function(n,e){return dt("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(n=Ze(n,"node_modules")),r.includes(n)||r.push(n),r)),n},vt=ht,gt=Pn,mt=function(n){var e=globalThis.config;if(e){var r=ft(n);return r.length>1?gt(e,r):e[r[0]]}},yt=function(n,e,r){if(null!=n)return n;var t=mt(e);return null!=t?t:r},wt=_("fs"),bt=function(n){return!!wt().lstatSync(String(n),{throwIfNoEntry:!1})},xt=function(n){var e=Sr(n,!1);return bt(e)||(e!==n&&xt(e),wt().mkdirSync(String(e))),n},Et=function(n){return xt(n),wt().mkdirSync(String(n)),n},Ot=function(n){return bt(n)?n:Et(n)},St=function(n,e){if(h(n))return require(n);if(v(n))return We(n);try{return require(n)}catch(n){}var r=__dirname,t=process.mainModule?.path;if(t!==r)try{return rr(t,n)}catch(n){}var i=process.cwd();if(i!==t&&i!==r)try{return rr(i,n)}catch(n){}var u=mt("node.require.customDirs");if(u)for(var o of u)try{return rr(o,n)}catch(n){}var c=yt(e?.autoInstall,"node.require.autoInstall"),s=yt(e?.promptInstall,"node.require.promptInstall",!0);if(c||s){var l=c||s;!0===l&&(l="./node_modules"),l=De(l);var a=!1;if(c?(a=!0,console.log('Auto-installing "'+n+'" from npm to "'+l+'"...')):(a=at('Npm package "'+n+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+n+'" from npm to "'+l+'"...'),a){l=Ot(l),Re(n,!1,{cwd:l});try{return vt(l),rr(l,n)}catch(n){console.error("Failed to load from auto-install dir: ",l)}}}throw Fe('Module not found: "'+n+'"',{checked:{moduleDir:r,scriptDir:t,cwd:i}})},Ft=function(n){return wt().readFileSync(String(n),"utf8")},At=Ft,jt=function(n){return JSON.parse(At(n))},_t={env:{parseArgs:p,args:r,setConfig:dt,getConfig:mt,resolveConfig:yt},node:{parseArgs:f,args:e,pause:function(n){null!=n&&(n=String(n)),St("press-any-key-sync")(n)},require:St,_basicRequire:d,is:A,display:k,util:I,_builtInModule:_,requireBuiltIn:j,child_process:Ne,requireLocal:We,path:Le,_requireFromDir:rr,_requireDirCache:Be,_createRequire:er,module:nr,promptYNSync:at,run:rt,getScriptPath:yr,positionalArgs:mr,sigint:st,interrupt:ct,ensureRequireDir:vt,addRequireDir:ht,fs:wt,loadPackageJSON:function(n){var e=n??"./";return e.endsWith("package.json")||(e=Xe(e,"package.json")),bt(e)?jt(e):{}}},cli:{parseArgs:a,resolveArgs:l,splitArgs:s,positionalArgs:gr},f:{one:n,is:g,memoize:zn,MemoizedFunction:Yn,createClass:vn,ensureConstructor:V,createConstructor:J,isArrowFn:Y,isArrow:U,wrap:z,retThis:G,setName:cn,not:_e,body:nt,isArrowString:Lr,_getArrowFnBody:Xr,_getNormalFnBody:Zr},s:{is:c,isAny:o,isPrimitive:i,isObject:u,toLiteral:ce,quote:oe,escape:ue,replaceAll:ie,apply:L,withIndices:R,chars:Jn,from:le,endsWith:Qe,resolveIndex:Ye,removeTrailing:cr,removeFromEnd:or,_removeStringFromEnd:ir,_removeRegexFromEnd:ur,splitAtIndex:sr,ensureStartsWith:ar,replace:hr,decapitalize:wr,removeLineBreaks:Ir,removeMulti:_r,removeAll:jr,resolve:et,ensure:Rr,after:Kr,index:Wr,_indexWithIndices:Mr,indexOfFn:Dr,removeLeading:Hr,removeFromStart:$r,_removeStringFromStart:Br,_removeRegexFromStart:Qr,remove:Ur},npm:{isBuiltIn:h,isFile:v,install:Re,_runCommand:Pe},os:{run:Ce,_resolveStdio:Se},opt:{resolve:x},o:{safeSetDefaults:b,safeEnsureMulti:w,ensureMulti:y,ensure:m,is:q,display:me,toLiteral:ge,constructorMatches:M,isAny:$,setHidden:en,addNonEnumerable:nn,defineProperty:Z,weakAssign:X,merge:H,safeEnsure:tn,hideKey:hn,makeNonEnumerable:dn,ensureCustom:On,get:bn,set:xn,createEmpty:qn,remove:Dn,isPure:se,reduce:ve,each:he,keys:de,allKeys:pe,Cache:Ke,setDefaults:tr,resolveKeys:ft,diveGet:gt},a:{is:E,wrapIndices:P,wrapIndex:C,resolveIndex:T,ensure:W,pick:wn,create:yn,fill:mn,resolveIndices:gn,push:In,add:_n,splitLast:Cn,splitTail:Tn,toLiteral:ae,display:ye,assert:Ae,removeNullish:ke,removeByFilter:Ie,replaceContents:je,last:Ue},err:{value:be,ValueError:F,Error:S,Enhanced:O,nyi:on,NYIError:rn,defaultFromFn:un,type:Oe,TypeError:xe,create:Fe,prepend:Nr,req:tt},v:{display:we,constructorMatches:N,toLiteral:fe,isPrimitive:Q,resolve:En,type:Ee,req:it},macro:{config:function(n){}},re:{is:D,ensureGlobal:Zn,global:Xn,addFlag:Hn,copy:$n,updateFlagString:Qn,parseFlagString:Vn,createFlagString:Gn,createEscaped:te,create:ee,resolveFlags:ne,escape:re,matchEnd:Ge,matchLast:Ve,matchAll:Je,setStartIndex:ze,slash:$e,matchStart:Gr,match:Vr,ensureLocal:Jr,local:zr,removeFlag:Yr},class:{create:pn,setName:sn,addStatics:ln,setDisplay:fn},p:{asyncJoint:B,is:K},sym:{display:an,value:Nn},map:{Cache:jn,ensure:An,get:Sn,set:Fn,MultiCache:Un,diveEnsure:Mn,createEmpty:Ln,diveDelete:Bn,remove:Kn},args:{ensureArray:kn},tree:{ensure:Rn,dive:Pn,remove:Wn,setCustom:pt},win:{is:qe},shell:{_handleError:Te},path:{abs:De,sep:Me,ensureEndsWith:Ze,join:Xe,ensureTrailingSlash:He,fws:vr,baseName:Er,_removeExtsFromFile:br,file:xr,dir:Sr},js:{enhance:Pr,ensureReturn:fr,splitLastExpression:lr,enableAwait:dr,_nodeEnableAwait:pr,useTitan:Ar,inline:Cr,removeComments:Tr,fromAST:kr,parse:qr},titan:{getPackagePath:Fr,getPackageName:Or},proc:{interrupt:ot,signal:ut},bool:{fromYN:lt},fs:{ensureDir:Ot,exists:bt,mkdir:Et,ensureParent:xt,loadJSON:jt,loadText:At,load:Ft}};globalThis.t?Object.keys(_t).forEach(function(n){if(t[n]){var e=_t[n];Object.keys(e).forEach(function(r){t[n][r]=e[r]})}else t[n]=_t[n]}):globalThis.t=Object.assign({},_t),globalThis.exports&&(exports.default=globalThis.t);
|
package/cli.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e,t){return t(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},s=function(e){return o(e)?e:[e]},a=function(e){return e instanceof Promise},l=function(e,t){var n=e;return a(n)?n.then(t):t(n)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},h=f,p=function(e){return function(){return e.apply(this,arguments)}},d=function(e,t){var n;return n=t?function(){this.super=t;var n=e.apply(this,arguments);return l(n,()=>(delete this.super,n))}:h(e)?p(e):e,n._isConstructor=!0,n},v=function(e,t){return e._isConstructor?e:d(e,t)},m=function(){return this},y=function(e){var t=typeof e;return"object"!==t&&"function"!==t||null===e},g=function(e){return!y(e)},w=function(e,t,n){return!1===n?Object.keys(t).forEach(n=>{void 0===e[n]&&(e[n]=t[n])}):Object.assign(e,t),e},b=function(e,t){return w(e,t,!1)},E=function(e,t,n,r){return n||(n={}),r&&b(n,r),null==n.enumerable&&(n.enumerable=!0),null==n.configurable&&(n.configurable=!0),Object.defineProperty(e,t,n)},x=function(e,t,n,r){return E(e,t,{value:n,writable:!0,enumerable:!1},r),n},_=x,k=function(e){return class extends e{constructor(e,t){super(e,t);var n=this.constructor.name;n&&(this.name=n)}}},A=k(globalThis.Error),L=class extends A{constructor(e,t){super(e??"Not yet implemented",t)}},F=function(e,t,n,r){var i=e[t];if(void 0===i){var u=n;!1!==r&&c(u)&&(u=u(e,t)),e[t]=i=u}return i},O=function(e,t,n,r){return e||(e={}),F(e,t,n,r),e},S=function(e,t){return O(e,"fromFn",t,!1)},T=function(e,t){return new L(e,S(t,T))},C=function(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0}),_(e,"displayName",t)},I=C,j=function(e,t){return Object.assign(e,t)},R=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(this,arguments)),t}},P=R(function(){return"undefined"==typeof window}),N=P()?require("util").inspect.custom:Symbol("Display"),q=function(e,t){e.prototype[N]=t},M=function(e,t,n,r,i,a){a||(a={}),u(t)&&(t=null);var c,f,h,p=n;p&&(o(p)?([f,h]=p,f&&(f=v(f))):c=v(p,t));var d=a.bareFn;a.singleton&&(d=function(){return null==b.default&&(b.default=new b(...arguments)),b.default});var y,w=f||c||t||m;function b(){if(!new.target&&d&&!(this instanceof b))return d.apply(this,arguments);var e=this;return l(w.apply(e,arguments),n=>{if(n&&g(n)&&(e=n,f)){if(!new.target)throw T('Prototype repair is NYI for class instantiation without "new".');if(!t)throw T("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return h?l(h.apply(e,arguments),()=>e):e})}return e&&I(b,e),r?(y=r,t&&Object.setPrototypeOf(r,t.prototype)):y=t?Object.create(t.prototype):{},_(y,"constructor",b),b.prototype=y,i&&j(b,i),a.display&&q(b,a.display),a.implements&&s(a.implements).forEach(e=>e(b)),b},D=function(e,t){Object.defineProperty(e,t,{enumerable:!1})},B=D,W=function(e,t,n,r,i){var u=Symbol();return M(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=t.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],n,r,i)},H=function(e){return t=>t===e},K=function(e){return Reflect.ownKeys(e)},Y=function(e,t){return(t?K:Object.keys)(e)},U=function(e,t,n){var r={};for(var i of t)Object.hasOwn(e,i)&&(r[i]=e[i],!0===n&&delete e[i]);return r},V=function(e){return e instanceof Set},z=function(e){return V(e)?e:o(e)?new Set(e):new Set([e])},G=z,Q=function(e,t){var n=[],r=[];return e.forEach((i,u)=>(t(i,u,e)?n:r).push(i)),[n,r]},J=function(e,t,n,r){var i=t;if(c(i))throw T();var u=Y(e,r),o=G(i),[s,a]=Q(u,e=>o.has(e));return[U(e,s,n),!0===n?e:U(e,a,!1)]},$=function(e,t,n){var r=Y(e,n).filter(n=>t(e[n],n,e));return J(e,r,!1,n)},X=function(e,t){return t<e?t:e},Z=function(e,t){return X(e,t)},ee=function*(e,t){null==e&&(e=0),t=null==t?this.length:Z(t,this.length);for(var n=e;n<t;n++)yield this[n]},te=function(e,t,n){return null==t&&null==n?e[Symbol.iterator].call(e):ee.call(e,t,n)},ne=function(e,t){return t<0?e.length+t:t},re=function(e,t,n,r){return t=null==t?0:ne(e,t),n=null==n?e.length:ne(e,n),r&&(0==r.inclusiveStart&&t++,r.inclusiveEnd&&n++),[t,n]},ie=function(e,t,n,r){[n,r]=re(e,n,r);for(var i=n;i<r;i++){var u=t(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,t){return t?ie(Y(e,t),t=>[t,e[t]]):Object.entries(e)},oe=function(e){return te(ue(this,e))},se=function(e,t){var n=e[Symbol.iterator];return n?n.call(e):oe.call(e,t)},ae=function(e){return se(e,!0)},le=function(e,t){return null!=e&&e.constructor===t},ce=function(e){return le(e,Object)},fe=ce,he=function(e,t,n,r){return E(e,t,{get:n},r)},pe=function(e,t,n,r){return E(e,t,{value:n,writable:!0},r),n},de=function(e,t,n){he(e,t,function(){if(this===e)return null;var r=n.call(this);return pe(this,t,r),r})},ve=class extends A{constructor(e,t){super(e??"Unexpected value",t)}},me=function(e){return require("node:"+e)},ye=function(e){return R(()=>me(e))},ge=ye("util"),we=function(e,t){return t||(t={}),null==t.colors&&(t.colors=!0),ge().inspect(e,t)},be=ne,Ee=function(e,t,n,r){return void 0!==t&&(null===t||0===t?t=void 0:(t=be(e,t),r&&0==r.inclusiveStart&&t++)),void 0!==n&&(null===n||n===e.length?n=void 0:(n=be(e,n),r&&r.inclusiveEnd&&n++)),[t,n]},xe=function(e,t,n,r,i,u){if(n||null!=r){[n,r]=Ee(e,n,r,u);var o=e.slice(n,r),s=t(o);return i?i(s,n,r,o,e):s}return t(e)},_e=function(e,t,n,r,i){return xe(e,t,n,r,(t,n,r)=>(void 0!==n?e.slice(0,n):"")+(t||"")+(void 0!==r?e.slice(r):""),i)},ke=le,Ae=function(e){return ke(e,RegExp)},Le=function(e,t,n,r){var i=t;if([n,r]=re(e,n,r),c(i))for(var u=n;u<r;u++)e[u]=i(u,e);else e.fill(i,n,r);return e},Fe=function(e,t){var n=new Array(e||0);return arguments.length>1&&Le(n,t),n},Oe=function(e,t){return Fe(t.length,n=>e[t[n]])},Se=function(e,t){return e[t]},Te=function(e,t,n){return e[t]=n},Ce=function(e,t,n){var r=e;return c(r)?r.apply(n,t):r},Ie=function(e,t,n,r,i){r||(r=Se);var u=r(e,t);return void 0===u&&(u=Ce(n,[e,t]),i||(i=Te),i(e,t,u)),u},je=function(e,t){return e.get(t)},Re=function(e,t,n){return e.set(t,n)},Pe=function(e,t,n){return Ie(e,t,n,je,Re)},Ne=class{constructor(){this.store=new Map}get(e,t){return Pe(this.store,e,t)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},qe=function(e,t){return e.push(t),e},Me=qe,De=function(e){var t=e;return Array.isArray(t)?t:Array.from(t)},Be=Symbol("Value"),We=function(){return{}},He=function(e){return[e.slice(0,-1),e[e.length-1]]},Ke=He,Ye=function(e,t,n,r,i,u){n||(n=Se),null==r&&(r=We),null==i&&(i=Te),null==u&&(u=n);for(var[o,s]=Ke(t),a=e,l=o.length,c=0;c<l;c++){var f=o[c],h=n(a,f);if(void 0===h){if(!r)return;h=Ie(a,f,r,n,i)}a=h}if(u)return u(a,s,i)},Ue=function(e,t,n,r,i,u){return Ye(e,t,r,i,u,(e,t)=>Ie(e,t,n,r,u))},Ve=function(){return new Map},ze=function(e,t,n){return Ue(e,t,n,je,Ve,Re)},Ge=function(e,t){return delete e[t],e},Qe=function(e,t,n,r){return Ye(e,t,n,!1,!1,r||Ge)},Je=function(e,t){return e.delete(t)},$e=function(e,t){return Qe(e,t,je,Je)},Xe=class{constructor(){this.store=new Map}get(e,t){return e=Me(De(e),Be),ze(this.store,e,t)}remove(e){return e=Me(De(e),Be),$e(this.store,e)}delete(e){return this.remove(e)}},Ze=W("MemoizedFunction",function(e,t){if(this.base=e,null!=t)if(1===(t=s(t)).length){this.cache=new Ne;var n=t[0];this._cacheKeyFormatter=e=>e[n]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Oe(e,t);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var t=r._cacheKeyFormatter(arguments);return r.cache.get(t,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),et=function(e,t){return new Ze(e,t)},tt=function(e){return new Set(e)},nt=function(e){var t={};if(e){var n=tt(e);n.has("g")&&(t.global=!0),n.has("i")&&(t.caseInsensitive=!0),n.has("y")&&(t.sticky=!0)}return t},rt=function(e){var t="";return e.global&&(t+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(t+="i"),e.sticky&&(t+="y"),t},it=function(e,t){var n=nt(e);return rt(Object.assign(n,t))},ut=function(e,t){var n=t,r=void 0;return u(n)?r=n:ce(n)&&(r=it(e.flags,n)),new RegExp(e,r)},ot=function(e,t){return ut(e,e.flags+t)},st=function(e){return ot(e,"g")},at=et(function(e){return e.global?e:st(e)},0),lt=function(e){var t=e;return null==t?void 0:u(t)?t:rt(t)},ct=function(e,t){return new RegExp(e,lt(t))},ft=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},ht=function(e,t){return ct(ft(e),t)},pt=function(e,t,n,r,i,o){return _e(e,function(e){return e.replaceAll?(Ae(t)&&(t=at(t)),e.replaceAll(t,n)):(t=u(t)?ht(t,"g"):at(t),this.replace(t,n))},r,i,o)},dt=function(e,t,n){return pt(e,t,(n??"\\")+t)},vt=function(e,t,n){return null==t&&(t='"'),!1!==n&&(e=dt(e,t,n)),t+e+t},mt=function(e){return vt(e,'"')},yt=function(e){return fe(e)?xt(e):String(e)},gt=function(e,t){return t||(t=wt),"["+e.reduce(function(e,n){return e+t(n)+", "},"").slice(0,-2)+"]"},wt=function(e){return u(e)?mt(e):o(e)?gt(e):yt(e)},bt=function(e,t,n){Y(e,n).forEach((n,r,i)=>t(n,e[n],r,i))},Et=function(e,t,n,r){var i=null!=n?n:"";return bt(e,function(){i=t.call(this,i,...arguments)},r),i},xt=function(e,t){return t||(t=wt),"{"+Et(e,function(e,n,r){return e+n+":"+t(r)+", "},"",!0).slice(0,-2)+"}"},_t=function(e,t){return null==t&&(t=1),t<=0?"[object Object]":xt(e,e=>At(e,t-1))},kt=function(e,t){return null==t&&(t=1),t<=0?"[object Array]":gt(e,e=>At(e,t-1))},At=function(e,t){return void 0===e?"undefined":null===e?"null":P()?we(e,t):ce(e)?_t(e,maxNumLevels):o(e)?kt(e,maxNumLevels):yt(e)},Lt=function(e,t,n,r){if(0===arguments.length)return new ve("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+At(e)+", expected one of "+At(u):"Unexpected value received: "+At(e),n&&(i+=' for "'+n+'"'),null!=t&&(i+=" (index "+t+")"),r.fromFn||(r.fromFn=Lt),new ve(i,r)},Ft=function(e,t,n){var r=new A(e,n);return t&&Object.assign(r,t),r},Ot=function*(e,t){yield*e,yield*t},St=function(e){return e?" "+e:""},Tt=function(e){return u(e)?e:e.toString()},Ct=W("Interface",function(e,t,n){n||(n={}),C(this,e),t?[this.stubs,this.defaults]=$(t,H(!0),!0):(this.stubs={},this.defaults={});var r=n.implements?s(n.implements):null,i=this;return function(e){var t=e;return r&&r.forEach(e=>e(t)),i.decorate(t),i.assert(t),t}},{decorate(e){var t,n,r=e;for(var[i,u]of(r.prototype?(t=r.prototype,n=!0):(t=r,n=!1),ae(this.defaults)))if(void 0===t[i])if(fe(u))if(u.value)t[i]=u.value;else{if(!u.setup)throw Lt(u,null,"defaultVal");if(!n)throw u.setup(),T("setupFn is NYI for instances");de(t,i,u.setup)}else t[i]=u;return r},assert(e){var t=e,n=null!=t.prototype,r=t.prototype||t,i=Ot(ae(this.stubs),ae(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=n?"Class"+St(t.name):"Object "+At(t),o+=" does not satisfy interface "+this.name+' (missing key "'+Tt(u)+'")',Ft(o)}return t},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),It=function(e,t,n){return new Ct(e,t,n)},jt=Symbol("Cleanup"),Rt=It("Handle",{remove:!0,[jt](){this.remove()}}),Pt=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Rt),Nt=function(e){return 1===e.length&&o(e[0])?e[0]:array},qt=function(...e){return new Pt(Nt(e))},Mt=qt,Dt=Mt,Bt=function(e){var t,n,r=e;return null!=r&&(t=r.detail??r.data??r,g(r)&&(n=r)),[t,n,r]},Wt=function(e){return Ct.is(e)},Ht=Wt,Kt=k(globalThis.TypeError),Yt=function(e){return null==e?e:e.constructor},Ut=function(e,t,n,r){if(0===arguments.length)return new Kt("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=Yt(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+At(e)+")"),o||(i+=")"),n&&(i+=' for "'+n+'"'),null!=t&&(i+=" (index "+t+")"),r.fromFn||(r.fromFn=Ut),new Kt(i,r)},Vt=function(e,t,n){if(!Ht(t))throw Ut(t,1);return t.decorate(e),n&&n.call(e,e,t),t.assert(e),e},zt=It,Gt=Symbol("EventTarget"),Qt=function(e){return require(e)},Jt=function(e){return!!e.startsWith("node:")||Qt("node:module").isBuiltin(e)},$t=function(e){return e.startsWith(".")},Xt=function(e){var t=e.stdio;if(t){if(!o(t)){if(!u(t))throw Ut(t,"stdio");if("pipe"===t)t=["pipe","pipe","pipe"];else if("inherit"===t)t=["inherit","inherit","inherit"];else if("ignore"===t)t=["ignore","ignore","ignore"];else{if("overlapped"!==t)throw Lt(t,"stdio");t=["overlapped","overlapped","overlapped"]}e.stdio=t}}else t=e.stdio=[null,null,null];return t},Zt=function(e,t){var n=t.length;e.length=n;for(var r=0;r<n;r++)e[r]=t[r];return e},en=function(e){return function(){return!e.apply(this,arguments)}},tn=function(e,t){return Zt(e,e.filter(en(t)))},nn=function(e){return tn(e,e=>null==e)},rn=ye("child_process"),un=R(function(){return"win32"===process.platform}),on=function(e,t,n){if(n||(n={}),t(e))throw e;if(n.nullOnErr)return null;var r=n.onErr;if(void 0!==r)return Ce(r);throw e},sn=function(e,t,n){n||(n={}),n.dir&&(n.cwd=n.dir);var r=Xt(n);if(null==r[0]){var i=n.allowInput,u=n.input;if(i&&u)throw Ft("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");i&&(r[0]="inherit")}if(null==r[1]){var o=n.captureOutput??!1,s=n.showOutput;if(o&&s)throw Ft("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");o?r[1]="pipe":(null==s&&(s=!0),r[1]=s?"inherit":"ignore")}if(null==r[2]){var a=n.captureErr??!1,l=n.showErr;if(a&&l)throw Ft("captureErr and showErr cannot be used simultaneously for synchronous child processes.");a?r[2]="pipe":(null==l&&(l=!0),r[2]=l?"inherit":"ignore")}n.encoding||(n.encoding="utf8"),t&&nn(t);try{var c=rn().execFileSync(e,t,n);null!=c&&!1!==n.trim&&(c=c.trim());var f=n.map??n.mapFn;return f&&(c=f(c)),c}catch(e){if(un())return on(e,e=>"ENOENT"===e.code,n);throw e}},an=function(e,t){return t||(t={}),null==t.captureOutput&&(t.captureOutput=!1),t.shell=!0,t.filterExtensions=!1,sn("npm",e,t)},ln=function(e,t,n){return an(["install",e,t?"-g":null],n)},cn=ye("path"),fn=cn().sep,hn=function(e,t,n){var r=cn().resolve,i=t?r(t,e):r(e);return n?i+fn:i},pn=function(e){return require(hn(e))},dn=class{constructor(){this.store={}}get(e,t){return F(this.store,e,t)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},vn=new dn,mn=function(e){return e[e.length-1]},yn=ne,gn=function(e,t,n){return e=ut(e,{global:!0}),null!=n&&(t=yn(n,t)),e.lastIndex=t,e},wn=function(e,t,n){return e=null!=n?gn(e,n,t):at(e),Array.from(t.matchAll(e))},bn=function(e,t,n){return null!=n&&(t=t.slice(0,n)),mn(wn(e,t))||null},En=function(e,t){var n=bn(e,t);return n&&t.length===n.index+n[0].length?n:null},xn=function(e,t){if(u(t))return e.endsWith(t);if(Ae(t))return!!En(t,e);throw Ut(t,1,"matchThis")},_n=function(e){return xn(e,fn)?e:e+fn},kn=function(e,t,n){if(P()){var r=cn().join(e,t);return n?_n(r):r}throw T()},An=function(e,t){return e.endsWith(t)?e:kn(e,t)},Ln=ye("module"),Fn=function(e){return e=An(e,"node_modules"),Ln().createRequire(e)},On=function(e,t){return vn.get(e,()=>Fn(e))(t)},Sn=function(e,t,n){return Object.keys(t).forEach(r=>F(e,r,t[r],n)),e},Tn=function(e,t,n){return t?Sn(e,t,n):e},Cn=function(e,t){return e.endsWith(t)?e.substring(0,e.length-t.length):e},In=function(e,t){var n=En(t,e);return n?e.slice(0,n.index):e},jn=function(e,t){if(u(t))return Cn(e,t);if(Ae(t))return In(e,t);throw Ut(t,1)},Rn=jn,Pn=function(e,t){return[e.slice(0,t),e.slice(t)]},Nn=function(e){e=Rn(e.trim(),";");var t=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Pn(e,t+1)},qn=function(e,t){return e.startsWith(t)?e:t+e},Mn=function(e){var[t,n]=Nn(e);return t+qn(n.trim(),"return ")},Dn=function(e){return si("node-repl-await").processTopLevelAwait(e)},Bn=function(e){return Dn(e)??e},Wn=pt,Hn=function(e,t){return""===e?e:(!1!==t&&(e=_n(e)),Wn(e,"\\","/"))},Kn=R(function(){return process.argv.slice(2)}),Yn=Kn,Un=function(e,t){const n=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const s=e[o];switch(i){case"outside":'"'===s?u?(r+=s,u=!1):(t&&(r+=s),i="insideQuote"):"\\"===s?u=!0:" "===s?(r.length>0&&(n.push(r),r=""),u=!1):(r+=s,u=!1);break;case"insideQuote":'"'!==s||u?"\\"!==s||u?(r+=s,u=!1):u=!0:(t&&(r+=s),i="outside")}}return r.length>0&&n.push(r),n},Vn=function(e,t){var n=e;return null==n?Yn():u(n)?Un(n,t):n},zn=function(e,t){return Vn(e,t).slice()},Gn=zn,Qn=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Gn(process.argv)[1])},Jn=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},$n=function(e){return e.split(".")[0]},Xn=function(e){return cn().win32.basename(e)},Zn=function(e){return $n(Xn(e))},er=function(e,t,n,r){e||(e=Qn()??"_console.js");var i=Jn(Zn(e));return t&&(i+="_repl"),i+(n&&r?.dynamic?".dypkg.json":".pkg.js")},tr=function(e,t){return e=cn().dirname(e),!1===t?e:_n(e)},nr=function(e,t,n,r){var i,u=er(e,t,n,r);return i=e?tr(e):"./",hn(i+u)},rr=function(e){return'require("'+Hn(nr(),!1)+'");\n'+e},ir=function(e,t){return pt(e,t,"")},ur=function(e,t){return t.forEach(t=>e=ir(e,t)),e},or=function(e){return ur(e,["\r","\n"])},sr=function(e,t){return si("astring").generate(e,t)},ar=function(e,t){return e.stack=t+"\n"+e.stack,e},lr=function(e,t,n){n||(n={}),n.ecmaVersion||(n.ecmaVersion=2024),!1!==t&&(n.sourceType="module"),null==n.allowAwaitOutsideFunction&&(n.allowAwaitOutsideFunction=!0),null==n.allowReturnOutsideFunction&&(n.allowReturnOutsideFunction=!0);var r=si("acorn");try{return r.parse(e,n)}catch(t){throw ar(t,"Acorn parsing error: "+e)}},cr=function(e,t,n){return sr(lr(e,t,n))},fr=function(e){return or(cr(e))},hr=function(e,t,n){return(t||n)&&(t||(t={}),n&&Tn(t,n),t.ensureReturn&&(e=Mn(e)),t.topLevelAwait&&(e=Bn(e)),t.useTitan&&(e=rr(e)),t.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(t.logErrors||t.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),t.inline&&(e=fr(e))),e},pr=function(e){return u(e)?e:yt(e)},dr=function(e){var t=e.indexOf("{");return-1===t||e.slice(0,t).includes("=>")},vr=function(e,t,n,r,i){return xe(e,t,n,r,(t,n)=>null===t?null:(t.input=e,void 0!==n&&(t.index+=n),t),i)},mr=function(e,t){return e.splice(e.length,0,...t),t},yr=function(e,t){return mr(e,t),e},gr=yr,wr=class extends Array{constructor(e,t,n,r,i){if(-1===t)throw Ft("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw Ft("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&gr(this,r),this.index=t,this.input=n,i&&(this.groups=i)}fromParts(e){var t=e;return new wr(t.match,t.index,t.input,t.captures,t.groups)}},br=function(e,t,n,r,i){return new wr(e,t,n,r,i)},Er=function(e,t,n,r,i){return-1===t||null==e?null:br(e,t,n,r,i)},xr=ir,_r=function(e,t){return ut(e,xr(e.flags,t))},kr=function(e){return _r(e,"g")},Ar=et(function(e){return e.global?kr(e):e},0),Lr=function(e,t,n){return(e=null!=n?gn(e,n,t):Ar(e)).exec(t)},Fr=function(e,t,n,r,i){return vr(e,e=>{if(u(t)){var n=e.indexOf(t);return Er(t,n,e)}return Lr(t,e)},n,r,i)},Or=function(e){return e.index+e[0].length},Sr=function(e,t){var n=Fr(e,t);return null===n[0]?null:e.slice(Or(n))},Tr=function(e,t){return e.startsWith(t)?e.substring(t.length):e},Cr=function(e,t){var n=Lr(e,t);return n&&0===n.index?n:null},Ir=function(e,t){var n=Cr(t,e);return n?e.slice(n[0].length):e},jr=function(e,t){if(u(t))return Tr(e,t);if(Ae(t))return Ir(e,t);throw Ut(t,1)},Rr=jr,Pr=function(e){var t=Sr(e,"=>").trim();return Rr(Rn(t,"}"),"{")},Nr=function(e){return Sr(e,"{").slice(0,-1)},qr=function(e){var t=pr(e);return dr(t)?Pr(t):Nr(t)},Mr=function(e){return null==e?"":u(e)?e:c(e)?qr(e):String(e)},Dr=function(e,t){var n=t?.basic?null:{topLevelAwait:!0,useTitan:!0},r=hr(Mr(e),t,n);return sn("node",[t?.mode??"-p",r],t)},Br=function(e,t,n,r){var i="Required argument";return n&&(i+=' "'+n+'"'),null!=t&&(i+=" (index "+t+")"),i+=" missing",arguments.length>0&&(i+=" (received "+At(e)+")"),Ft(i,null,S(r,Br))},Wr=function(e,t,n){if(null==e)throw Br(e,t,n,{fromFn:Wr});return e},Hr=function(e,t){return process.kill(e,Wr(t,0,"signalName"))},Kr=function(e){return Hr(e,"SIGINT")},Yr=function(){return Kr(process.pid)},Ur=Yr,Vr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw Lt(e,0,"char")},zr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var t=Dr(function(){const e=process.stdin,t=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var n=e.toUpperCase();"Y"===n||"N"===n?(t.write(e),process.exit(0)):""===e&&(t.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===t)throw process.stdout.write(t),Ur(),Ft("Prompt was cancelled via interrupt.");return console.log(t),Vr(t)},Gr=function(e){return o(e)?e:u(e)?e.split("."):[e]},Qr=function(e,t,n,r,i,u){var o=n;return Ye(e,t,r,i,u,(e,t,n)=>n(e,t,Ce(o)))},Jr=function(e,t){var n=t,r=globalThis.config;r||(r=globalThis.config={});var i,u=Gr(e);return u.length>1?i=Qr(r,u,n):(i=Ce(n),r[u[0]]=i),i},$r=function(e,t){return Jr("node.require.customDirs",n=>(n||(n=[]),!1!==t&&(e=An(e,"node_modules")),n.includes(e)||n.push(e),n)),e},Xr=$r,Zr=Ye,ei=function(e){var t=globalThis.config;if(t){var n=Gr(e);return n.length>1?Zr(t,n):t[n[0]]}},ti=function(e,t,n){if(null!=e)return e;var r=ei(t);return null!=r?r:n},ni=ye("fs"),ri=function(e){return!!ni().lstatSync(e,{throwIfNoEntry:!1})},ii=function(e){var t=tr(e,!1);return ri(t)||(t!==e&&ii(t),ni().mkdirSync(t)),e},ui=function(e){return ii(e),ni().mkdirSync(e),e},oi=function(e){return ri(e)?e:ui(e)},si=function(e,t){if(Jt(e))return require(e);if($t(e))return pn(e);try{return require(e)}catch(e){}var n=__dirname,r=process.mainModule?.path;if(r!==n)try{return On(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==n)try{return On(i,e)}catch(e){}var u=ei("node.require.customDirs");if(u)for(var o of u)try{return On(o,e)}catch(e){}var s=ti(t?.autoInstall,"node.require.autoInstall"),a=ti(t?.promptInstall,"node.require.promptInstall",!0);if(s||a){var l=s||a;!0===l&&(l="./node_modules"),l=hn(l);var c=!1;if(s?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+l+'"...')):(c=zr('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+l+'"...'),c){l=oi(l),ln(e,!1,{cwd:l});try{return Xr(l),On(l,e)}catch(e){console.error("Failed to load from auto-install dir: ",l)}}}throw Ft('Module not found: "'+e+'"',{checked:{moduleDir:n,scriptDir:r,cwd:i}})},ai=R(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=si("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,t){super(e,t),t?.detail&&(this.detail=t.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),li=ai().EventTarget,ci=function(e){var t=Gt,n=e[t];return void 0===n&&(n=new li,_(e,t,n)),n},fi=zt("EventInterface",{addEventListener(e,t,n){ci(this).addEventListener(e,t,n)},on(e,t){this.addEventListener(e,t)},removeEventListener(e,t){ci(this).removeEventListener(e,t)},off(e,t){this.removeEventListener(e,t)},dispatchEvent(e){return ci(this).dispatchEvent(e)}}),hi=fi,pi=function(e){return Vt(e,hi)},di=function(e){return!(!e.addEventListener&&!e.on)},vi=function(e){return di(e)||pi(e),e},mi=function(e,t,n){return e[t]=n,e},yi=function(e,t,n){return mi(e||{},t,n)},gi=function(e,t,n,r){return Si(e,t,n,yi(r,"once",!0))},wi=function(e,t){return function(){var n=t.apply(this,arguments);return e.apply(this,arguments),n}},bi=wi,Ei=function(e,t,n){return e[t]=bi(e[t],n)},xi=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,t,n){n&&vi(e);var r=gi(target,t,()=>this.remove());return Ei(this,"remove",()=>r.remove()),this}},Rt),_i=class extends xi{constructor(e,t){super(e),this.handleEvent=t}},ki=function(e,t){return new _i(e,t)},Ai=function(e,t,n){(e.removeEventListener||e.off).call(e,t,n)},Li=function(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];return e[t]=n,e.length++,e},Fi=function(e,t){return Li(e,0,t)},Oi=Fi,Si=function(e,t,n,r){if(r?.valueFirst){var i=n;n=function(e){var[t,n]=Bt(e);return Oi(arguments,t),arguments[1]=n,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(pi(e),u=e.addEventListener)),u.call(e,t,n,r),ki(()=>Ai(e,t,n),n)},Ti=function(e,t,n,r){return Dt(t.map(t=>Si(e,t,n,r)))},Ci=function(){return globalThis.repl?.repl},Ii=function(e,t){return null==t&&(t=1),function(){var n=Array.from(arguments),r=n.pop(),i=e.apply(this,n);0===t?(i.then(e=>r(null,e)),i.catch(r)):(i.then(r),i.catch(e=>r.apply(null,mi([],t,e))))}},ji=async function(){}.constructor,Ri=function(e){return le(e,ji)},Pi=function(e){return Ri(e)?e:async function(){return e.apply(this,arguments)}},Ni=R(function(){return si("node:stream")}),qi=P()&&Ni().Writable,Mi=function(e,t){return t||(t={}),null==t.objectMode&&(t.objectMode=!0),e?t.write=Ii(Pi(e),0):t.write||(t.write=(e,t,n)=>n()),new qi(t)},Di=function(){},Bi=async function(e){var t=Ci();if(t){var n,r=t.eval,i=t.output;t.output=Mi(Di),t.eval=Di;try{t.quickDisableHistory?await t.quickDisableHistory(async function(){n=await e(),t._line()}):n=await e()}finally{t.output=i,t.eval=r}return n}return e()},Wi=ye("readline"),Hi=/\r?\n/,Ki=function(e){return null==e||void 0!==e.length&&0===e.length},Yi=function(e,t){return tn(e,Ki)},Ui=function(e,t){return e.splice(t,1),e},Vi=function(e,t,n){for(var r={},i=e.length,u=0;u<i;u++){var o=t(e[u],u,e);if(o){var[s,a]=o;n?(r[s]||(r[s]=[]),r[s].push(a)):r[s]=a}}return r},zi=function(e,t,n,r){return[t,n]=re(e,t,n,r),e.slice(t,n)},Gi=function(e,t){return Fe(t,e).join("")},Qi=function(e){return e?e[0]:null},Ji=function(e,t){var n=null==t?-1:t.index;if(-1===n)return[e];var r=Pn(e,n);return r[1]=r[1].slice(t[0].length),r},$i=function(e,t,n,r,i){return Ji(e,Fr(e,t,n,r,i))},Xi=function(e){return isNaN(e)?null:e},Zi=function(e){return null==e?null:Xi(Number(e))},eu=Zi,tu=function(e){return eu(e)??e},nu=function(e,t){null==t&&(t="=");var n={};return e.forEach(function(e){var[r,i]=$i(e,t);null!=i&&(i=tu(i.trim())),n[r.trim()]=i}),n},ru=O,iu=class extends Array{constructor(e){var t,n=e;null!=n&&(o(n)?t=n:u(n)&&(t=n.split(Hi))),t?(super(t.length),Object.assign(this,t)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return Yi(this)}removeComments(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.indexOf(e);-1!==r&&(""===(n=n.slice(0,r)).trim()?(Ui(this,t),t--):this[t]=n)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return nu(this,e)}mapToObj(e,t){return Vi(this,e,t)}between(e,t,n){return n=ru(n,"inclusiveEnd",!0),zi(this,e,t,n)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===mn(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),t=Qi(Lr(/^\s*/,e));if(t){var n=t.length;this.apply(e=>{if(e.startsWith(t))return e.slice(n)})}}return this}deindent(e,t,n){throw T()}indent(e,t){var n=Gi(t??"\t",e??1);return this.apply(e=>n+e)}static is(e){return le(e,this)}static fromChunks(e){return e.map(e=>Rn(e,Hi)).flatMap(e=>ou(e,!1))}},uu=function(e,t){var n=new iu(e);return t&&n.condense(),n},ou=function(e,t,n){var r=e.split(Hi);return t?uu(r,n):r},su=function(e){return ni().readFileSync(e,"utf8")},au=su,lu=function(e,t){return ou(au(e),!0,t)},cu=function(e){var t=typeof e;return"number"===t||"bigint"===t},fu=function(e){return e instanceof Buffer},hu=function(e){return ArrayBuffer.isView(e)},pu=hu,du=function(e){return fu(e)||pu(e)||u(e)},vu=function(e){return e.constructor===ArrayBuffer},mu=function(e){return du(e)?e:vu(e)?Buffer.from(e):yt(e)},yu=function(e){return cu(e)?String(e):mu(e)},gu=function(e,t){return ii(e),ni().appendFileSync(e,yu(t)),e},wu=function(e,t){return gu(e,"\n"+t)},bu=wu,Eu=function(e){return pt(e,"\n","\\n")},xu=Eu,_u=function(e,t){if(0===e)return t[0];for(var n=t.length,r="";e>0;){var i=e%n;r=t.charAt(i)+r,e=Math.floor(e/n)}return r},ku="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Au=function(e){return _u(e,ku)},Lu=function(e,t){for(var n=pr(e),r=t.length,i=0,u=0;u<n.length;u++){var o=n[u],s=t.indexOf(o);if(-1===s)throw'Error: "'+o+'" not found in base charset "'+t+'"';i=i*r+s}return i},Fu=function(e){return Lu(e,ku)},Ou=function(e,t){return Object.keys(e).map((n,r)=>t(n,e[n],r,e))},Su=function(e){return e.slice()},Tu=function(e,t){return e.includes(t)||e.push(t),e},Cu=class{constructor(e,t,n,r){(t=o(t)?Su(t):[t]).forEach(r),e&&Tu(t,e),this.members=t,this._enableFn=n,this._disableFn=r}enable(e){this.members.forEach(t=>{t!==e&&this._disableFn(t)}),this._enableFn(e)}disableAll(){this.members.forEach(e=>this._disableFn(e))}},Iu=function(e,t,n,r){return new Cu(e,t,n,r)},ju=function(e,t,n){return new Promise(function(r,i){var u=Dt([gi(e,t||"load",e=>{u.remove(),r(e)}),gi(e,n||"error",e=>{u.remove(),i(e)})])})},Ru=M("CLI",P()&&Wi().Interface,[function(e){if(e||(e={}),e.input||(e.input=process.stdin),e.output||null==e.output&&(e.output=process.stdout),null==e.terminal&&(e.terminal=!0),e.historyPath){var t=ri(e.historyPath)?lu(e.historyPath):[];e.history=t.reverse()}var n={inputWasRaw:e.input.isRaw},r=Wi().createInterface(e);return r.options=e,r.internal=n,r},function(){var e=this.options;this.rl=Wi(),e.historyPath&&this.on("history",t=>bu(e.historyPath,t[0])),e.disabled&&this.disable()}],{prompt(e){this._muted||(this._isPrompt=!0,null!=e&&this.setPrompt(e),super.prompt.apply(this,arguments),delete this._isPrompt)},_refreshLine(){this._muted||(this._isRefresh=!0,super._refreshLine(...arguments),delete this._isRefresh)},_ttyWrite(e,t){(!this._blockExcept||t&&this._blockExcept.includes(t.name))&&super._ttyWrite.apply(this,arguments)},_addHistory(){return this._historyDisabled||null!=this._mask||super._addHistory(),this.line},_writeToOutput(e){if(!this._muted){var t=this._mask;if(null!=t){if(this._isRefresh){var n=this._prompt;e.startsWith(n)&&(super._writeToOutput(n),e=e.slice(n.length))}this._isPrompt||(e=Wn(e,/[^\r\n]/,t))}super._writeToOutput(e)}},async promptLine(e){return this.prompt(e),this.awaitLine()},async prefillPrompt(e,t){var n=t,r=await Ce(n);return this.prompt(e),r&&this.write(xu(pr(r))),this.awaitLine()},async promptMultiline(e,t,n,r){if(null==t&&(t="... "),null==n)n=e=>""===e,r||(r=e=>(e.pop(),e));else if(u(n)){var i=n;n=e=>e.endsWith(i)}for(var o=await this.promptLine(e),s=[o];!n(o,s.length,s);)o=await this.promptLine(t),s.push(o);return r&&r(s),s.join("\n")},async promptKey(e,t){this.prompt(e);var n=await this.quickBlockExcept(t,!1,()=>this.awaitKey(t));return this.newLine(),n},async promptYN(e){return"y"===(await this.promptKey(e,["y","n"])).toLowerCase()},async promptSelect(e,t,n){var r=t;n||(n={});var i=0;function u(){return i++,Au(i)}if(fe(r))r=Ou(r,(e,t,n)=>[u(),e,t]);else{if(!o(r))throw Ut(r);r=r.map((e,t)=>{if(null==e)return null;if(o(e)){var n=e[0];if(null==n)n=u();else if((n=pr(n)).length>1)throw Ft("Input key must be a single character:",e);var r=e.length;if(1===r)return[n,n,n];if(2===r){var i=e[1];return[n,i,i]}if(3===r)return[n,e[1],e[2]];throw Ft("Unexpected array length in choices: "+r)}return[u(),e,e]}),nn(r)}if(r.length>35)throw Ft("promptSelect only supports up to 35 options.");var s=n.displayFn||((e,t)=>"["+e+"] "+t);this.quickDisableHistory(()=>{for(var e=0;e<r.length;e++){var[t,n,i]=r[e];this.write(s(t,n,i,r)+"\n")}});var a=Vi(r,e=>[e[0],e]),l=await this.promptKey(e,Object.keys(a)),f=a[l];if(null==f)throw Lt(f,"choice");var h=f[2];return c(h)&&(h=await h(f)),n.asObj?{key:l,name:f[1],value:h}:n.asIndex?Fu(l)-1:h},blockExcept(e,t){e=s(e).map(e=>String(e).toLowerCase()),0!=t&&Tu(e,"return"),this._blockExcept=e},unblock(){delete this._blockExcept},async quickBlockExcept(e,t,n){var r=this._blockExcept;this.blockExcept(e,t);var i=await n();return r?this.blockExcept(r):this.unblock(),i},disable(){this.pause(),this.mute()},enable(){this._mutex?this._mutex.enable(this):this._enable()},_enable(){this.resume(),this.unmute()},mutex(e){var t=Iu(this,e,e=>e._enable(),e=>e.disable());this.pause(),this.resume(),t.members.forEach(e=>e._mutex=t)},mask(e){this._mask=e},unmask(){delete this._mask},mute(){this._muted=!0},unmute(){delete this._muted},disableHistory(){this._historyDisabled=!0,this._historyPrev=Di,this._historyNext=Di},enableHistory(){delete this._historyDisabled,delete this._historyPrev,delete this._historyNext},async quickDisableHistory(e){var t=this._historyDisabled;this.disableHistory();try{var n=await e()}finally{return t||this.enableHistory(),n}},awaitLine(){return ju(this,"line")},newLine(){this.write("\n")},newline(){return this.newLine()},onKey(e,t,n){var r=e,i=this.input;if(this.rl.emitKeypressEvents(i),i.isTTY&&i.setRawMode(!0),r){var u=t;if(o(r)){var s=r.map(e=>String(e).toLowerCase());t=(e,t)=>{e||(e=t.name),s.includes(e.toLowerCase())&&u.call(this,e,t)}}else{var a=String(r).toLowerCase();t=(e,t)=>{e||(e=t.name),e.toLowerCase()===a&&u.call(this,e,t)}}}return Si(i,"keypress",t,n)},async awaitKey(e){return new Promise(t=>{var n=this.onKey(e,e=>{n.remove(),t(e)})})},moveCursor(e,t){return this._moveCursor(e,t)},cursorLeft(e){return this.moveCursor(-e)},cursorRight(e){return this.moveCursor(e)},cursorUp(e){return this.moveCursor(null,-e)},cursorDown(e){return this.moveCursor(null,e)},close(){super.close(),this.input.setRawMode(this.internal.inputWasRaw)}}),Pu=function(e,t){return Bi(async function(){var n=new Ru(t);try{var r=await e(n)}finally{n.close()}return r})},Nu=function(e,t){return Pu(t=>t.promptLine(e),t)},qu=async function(e,t,n){for(var r={},i=t.length,u=0;u<i;u++){var o,s=t[u];if(s.endsWith("?")&&(s=s.slice(0,-1),o=!0),void 0===(a=e[s])){var a=e[u];if(void 0===a&&!o&&(!1!==n?.prompt&&(a=await Nu(s+": ")),!a))throw Wr(void 0,u,s)}r[s]=a}return r},Mu={node:{onError:function(e){return Ti(process,["uncaughtException","unhandledRejection"],e)},is:P,display:we,util:ge,_builtInModule:ye,requireBuiltIn:me,require:si,_basicRequire:Qt,child_process:rn,requireLocal:pn,path:cn,_requireFromDir:On,_requireDirCache:vn,_createRequire:Fn,module:Ln,promptYNSync:zr,run:Dr,getScriptPath:Qn,positionalArgs:Gn,args:Kn,sigint:Ur,interrupt:Yr,ensureRequireDir:Xr,addRequireDir:$r,fs:ni,pause:function(e){null!=e&&(e=String(e)),si("press-any-key-sync")(e)},beforeExit:function(e){return Si(process,"beforeExit",e)},prompt:Nu,quickCLI:Pu,quickDisableREPL:Bi,getREPL:Ci,CLI:Ru,readline:Wi},ev:{onAny:Ti,multiHandle:Dt,on:Si,resolveValue:Bt,enable:pi,EventInterface:hi,Interface:fi,_ensureHasTarget:ci,targetSym:Gt,EventTarget:li,polyfill:ai,handle:ki,ListenerHandle:_i,ensureEnabled:vi,can:di,once:gi,off:Ai,promise:ju},o:{multiHandle:Mt,isAny:g,setHidden:_,addNonEnumerable:x,defineProperty:E,weakAssign:b,merge:w,safeEnsure:O,ensure:F,hideKey:B,makeNonEnumerable:D,filterSplit:$,keys:Y,allKeys:K,split:J,pick:U,iterateAll:ae,iterate:se,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:de,setGetter:he,forceSet:pe,display:_t,toLiteral:xt,constructorMatches:ke,ensureCustom:Ie,get:Se,set:Te,createEmpty:We,remove:Ge,reduce:Et,each:bt,addInterface:Vt,Cache:dn,setDefaults:Tn,ensureMulti:Sn,resolveKeys:Gr,diveGet:Zr,safeSet:yi,touch:mi,fromLines:nu,safeDefault:ru,mapArr:Ou,mutex:Iu,_Mutex:Cu},handle:{createMulti:qt,MultiHandle:Pt,HandleInterface:Rt,Handle:xi},class:{addInterface:e,create:M,setName:I,addStatics:j,setDisplay:q,isInterface:Ht,interface:zt},ifc:{create:It,Interface:Ct,is:Wt},f:{createClass:W,ensureConstructor:v,createConstructor:d,isArrowFn:h,isArrow:f,is:c,wrap:p,retThis:m,setName:C,one:R,eq:H,memoize:et,MemoizedFunction:Ze,not:en,body:qr,isArrowString:dr,_getArrowFnBody:Pr,_getNormalFnBody:Nr,hookAfterMethod:Ei,hookAfter:bi,injectAfter:wi,callbackify:Ii,ensureAsync:Pi,isAsync:Ri,AsyncFunction:ji,noop:Di},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:mt,quote:vt,escape:dt,replaceAll:pt,apply:_e,withIndices:xe,chars:tt,from:yt,spaceBefore:St,fromKey:Tt,endsWith:xn,resolveIndex:yn,removeTrailing:Rn,removeFromEnd:jn,_removeStringFromEnd:Cn,_removeRegexFromEnd:In,splitAtIndex:Pn,ensureStartsWith:qn,replace:Wn,decapitalize:Jn,removeLineBreaks:or,removeMulti:ur,removeAll:ir,resolve:Mr,ensure:pr,after:Sr,match:Fr,_matchWithIndices:vr,remove:xr,removeLeading:Rr,removeFromStart:jr,_removeStringFromStart:Tr,_removeRegexFromStart:Ir,splitLines:ou,lines:uu,LinesArray:iu,repeat:Gi,splitFirst:$i,_splitByMatch:Ji,escapeLineBreaks:xu,escapeNewLines:Eu},a:{is:o,ensure:s,filterSplit:Q,iterate:te,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:ne,wrapIndices:Ee,wrapIndex:be,pick:Oe,create:Fe,fill:Le,push:Me,add:qe,splitLast:Ke,splitTail:He,toLiteral:gt,display:kt,unboxArgs:Nt,removeNullish:nn,removeByFilter:tn,replaceContents:Zt,last:mn,pushMulti:gr,addMulti:yr,pushThroughMulti:mr,removeEmpty:Yi,removeIndex:Ui,mapToObj:Vi,slice:zi,copy:Su,ensureContains:Tu},p:{asyncJoint:l,is:a},v:{isPrimitive:y,constructorMatches:le,display:At,toLiteral:wt,resolve:Ce,type:Yt,req:Wr,isEmpty:Ki,nullIfNaN:Xi},err:{nyi:T,NYIError:L,Error:A,Enhanced:k,defaultFromFn:S,value:Lt,ValueError:ve,create:Ft,type:Ut,TypeError:Kt,prepend:ar,req:Br},sym:{display:N,value:Be,cleanup:jt},macro:{config:function(e){}},set:{resolve:G,ensure:z,is:V},n:{cap:Z,least:X,tryCoerce:tu,tryParse:eu,ensure:Zi,is:cu,toBase36:Au,toCustomBase:_u,_base36Digits:ku,fromBase36:Fu,fromCustomBase:Lu},re:{is:Ae,ensureGlobal:at,global:st,addFlag:ot,copy:ut,updateFlagString:it,parseFlagString:nt,createFlagString:rt,createEscaped:ht,create:ct,resolveFlags:lt,escape:ft,matchEnd:En,matchLast:bn,matchAll:wn,setStartIndex:gn,safeCreateResult:Er,createResult:br,RegexResult:wr,match:Lr,ensureLocal:Ar,local:kr,removeFlag:_r,resultEndIndex:Or,matchStart:Cr,newline:Hi,text:Qi},map:{Cache:Ne,ensure:Pe,get:je,set:Re,MultiCache:Xe,diveEnsure:ze,createEmpty:Ve,diveDelete:$e,remove:Je},args:{ensureArray:De,unshift:Oi,prepend:Fi,insert:Li},tree:{ensure:Ue,dive:Ye,remove:Qe,setCustom:Qr},gen:{join:Ot},npm:{isBuiltIn:Jt,isFile:$t,install:ln,_runCommand:an},os:{run:sn,_resolveStdio:Xt},win:{is:un},shell:{_handleError:on},path:{abs:hn,sep:fn,ensureEndsWith:An,join:kn,ensureTrailingSlash:_n,fws:Hn,baseName:Zn,_removeExtsFromFile:$n,file:Xn,dir:tr},js:{enhance:hr,ensureReturn:Mn,splitLastExpression:Nn,enableAwait:Bn,_nodeEnableAwait:Dn,useTitan:rr,inline:fr,removeComments:cr,fromAST:sr,parse:lr},titan:{getPackagePath:nr,getPackageName:er},cli:{positionalArgs:zn,resolveArgs:Vn,splitArgs:Un,parseArgs:function(e,t){for(var n=Vn(e,t),r=[],i=!1,u=n.length,o=0;o<u;o++){var s=n[o];if(!i){var a=s[0];let e;if("-"===a)if("-"===s[1]){if(2===s.length){i=!0;continue}e=2}else e=1;else"/"===a&&(e=1);if(e){var l,c,f=s.slice(e),h=f.indexOf("=");if(-1!==h)l=f.slice(0,h),c=f.slice(h+1);else{l=f;var p=n[o+1];null==p||"-"===p[0]?c=!0:(c=p,o++)}r[l]=c;continue}}r.push(s)}return r},paramsFrom:async function(e,t,n){var r=await qu(e,t,n);Object.assign(globalThis,r)},validateParams:qu},env:{args:Yn,setConfig:Jr,getConfig:ei,resolveConfig:ti},proc:{interrupt:Kr,signal:Hr},bool:{fromYN:Vr},fs:{ensureDir:oi,exists:ri,mkdir:ui,ensureParent:ii,loadLines:lu,loadText:au,load:su,appendLine:bu,addLine:wu,append:gu,formatRaw:yu},stream:{nodeWritable:Mi,NodeWritableStream:qi,_useNode:Ni},bin:{ensureByteSafe:mu,isByteSafe:du,isNodeBuffer:fu,isTA:pu},ab:{isTA:hu,is:vu}};globalThis.t?Object.keys(Mu).forEach(function(e){if(t[e]){var n=Mu[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Mu[e]}):globalThis.t=Object.assign({},Mu),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var e=function(e,t){return t(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},s=function(e){return o(e)?e:[e]},a=function(e){return e instanceof Promise},l=function(e,t){var n=e;return a(n)?n.then(t):t(n)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},h=f,p=function(e){return function(){return e.apply(this,arguments)}},d=function(e,t){var n;return n=t?function(){this.super=t;var n=e.apply(this,arguments);return l(n,()=>(delete this.super,n))}:h(e)?p(e):e,n._isConstructor=!0,n},v=function(e,t){return e._isConstructor?e:d(e,t)},m=function(){return this},y=function(e){var t=typeof e;return"object"!==t&&"function"!==t||null===e},g=function(e){return!y(e)},w=function(e,t,n){return!1===n?Object.keys(t).forEach(n=>{void 0===e[n]&&(e[n]=t[n])}):Object.assign(e,t),e},b=function(e,t){return w(e,t,!1)},E=function(e,t,n,r){return n||(n={}),r&&b(n,r),null==n.enumerable&&(n.enumerable=!0),null==n.configurable&&(n.configurable=!0),Object.defineProperty(e,t,n)},x=function(e,t,n,r){return E(e,t,{value:n,writable:!0,enumerable:!1},r),n},_=x,S=function(e){return class extends e{constructor(e,t){super(e,t);var n=this.constructor.name;n&&(this.name=n)}}},k=S(globalThis.Error),O=class extends k{constructor(e,t){super(e??"Not yet implemented",t)}},A=function(e,t,n,r){var i=e[t];if(void 0===i){var u=n;!1!==r&&c(u)&&(u=u(e,t)),e[t]=i=u}return i},F=function(e,t,n,r){return e||(e={}),A(e,t,n,r),e},L=function(e,t){return F(e,"fromFn",t,!1)},T=function(e,t){return new O(e,L(t,T))},C=function(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0}),_(e,"displayName",t)},I=C,j=function(e,t){return Object.assign(e,t)},P=function(e){var t,n=!1;return function(){return n||(n=!0,t=e.apply(this,arguments)),t}},R=P(function(){return"undefined"==typeof window}),N=R()?require("util").inspect.custom:Symbol("Display"),q=function(e,t){e.prototype[N]=t},M=function(e,t,n,r,i,a){a||(a={}),u(t)&&(t=null);var c,f,h,p=n;p&&(o(p)?([f,h]=p,f&&(f=v(f))):c=v(p,t));var d=a.bareFn;a.singleton&&(d=function(){return null==b.default&&(b.default=new b(...arguments)),b.default});var y,w=f||c||t||m;function b(){if(!new.target&&d&&!(this instanceof b))return d.apply(this,arguments);var e=this;return l(w.apply(e,arguments),n=>{if(n&&g(n)&&(e=n,f)){if(!new.target)throw T('Prototype repair is NYI for class instantiation without "new".');if(!t)throw T("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return h?l(h.apply(e,arguments),()=>e):e})}return e&&I(b,e),t&&Object.setPrototypeOf(b,t),r?(y=r,t&&Object.setPrototypeOf(r,t.prototype)):y=t?Object.create(t.prototype):{},_(y,"constructor",b),b.prototype=y,i&&j(b,i),a.display&&q(b,a.display),a.implements&&s(a.implements).forEach(e=>e(b)),b},D=function(e,t){Object.defineProperty(e,t,{enumerable:!1})},B=D,W=function(e,t,n,r,i){var u=Symbol();return M(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=t.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],n,r,i)},H=function(e){return t=>t===e},K=function(e){return Reflect.ownKeys(e)},Y=function(e,t){return(t?K:Object.keys)(e)},U=function(e,t,n){var r={};for(var i of t)Object.hasOwn(e,i)&&(r[i]=e[i],!0===n&&delete e[i]);return r},V=function(e){return e instanceof Set},z=function(e){return V(e)?e:o(e)?new Set(e):new Set([e])},G=z,Q=function(e,t){var n=[],r=[];return e.forEach((i,u)=>(t(i,u,e)?n:r).push(i)),[n,r]},J=function(e,t,n,r){var i=t;if(c(i))throw T();var u=Y(e,r),o=G(i),[s,a]=Q(u,e=>o.has(e));return[U(e,s,n),!0===n?e:U(e,a,!1)]},$=function(e,t,n){var r=Y(e,n).filter(n=>t(e[n],n,e));return J(e,r,!1,n)},X=function(e,t){return t<e?t:e},Z=function(e,t){return X(e,t)},ee=function*(e,t){null==e&&(e=0),t=null==t?this.length:Z(t,this.length);for(var n=e;n<t;n++)yield this[n]},te=function(e,t,n){return null==t&&null==n?e[Symbol.iterator].call(e):ee.call(e,t,n)},ne=function(e,t){return t<0?e.length+t:t},re=function(e,t,n,r){return t=null==t?0:ne(e,t),n=null==n?e.length:ne(e,n),r&&(0==r.inclusiveStart&&t++,r.inclusiveEnd&&n++),[t,n]},ie=function(e,t,n,r){[n,r]=re(e,n,r);for(var i=n;i<r;i++){var u=t(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,t){return t?ie(Y(e,t),t=>[t,e[t]]):Object.entries(e)},oe=function(e){return te(ue(this,e))},se=function(e,t){var n=e[Symbol.iterator];return n?n.call(e):oe.call(e,t)},ae=function(e){return se(e,!0)},le=function(e,t){return null!=e&&e.constructor===t},ce=function(e){return le(e,Object)},fe=ce,he=function(e,t,n,r){return E(e,t,{get:n},r)},pe=function(e,t,n,r){return E(e,t,{value:n,writable:!0},r),n},de=function(e,t,n){he(e,t,function(){if(this===e)return null;var r=n.call(this);return pe(this,t,r),r})},ve=class extends k{constructor(e,t){super(e??"Unexpected value",t)}},me=function(e){return require("node:"+e)},ye=function(e){return P(()=>me(e))},ge=ye("util"),we=function(e,t){return t||(t={}),null==t.colors&&(t.colors=!0),ge().inspect(e,t)},be=ne,Ee=function(e,t,n,r){return void 0!==t&&(null===t||0===t?t=void 0:(t=be(e,t),r&&0==r.inclusiveStart&&t++)),void 0!==n&&(null===n||n===e.length?n=void 0:(n=be(e,n),r&&r.inclusiveEnd&&n++)),[t,n]},xe=function(e,t,n,r,i,u){if(n||null!=r){[n,r]=Ee(e,n,r,u);var o=e.slice(n,r),s=t(o);return i?i(s,n,r,o,e):s}return t(e)},_e=function(e,t,n,r,i){return xe(e,t,n,r,(t,n,r)=>(void 0!==n?e.slice(0,n):"")+(t||"")+(void 0!==r?e.slice(r):""),i)},Se=le,ke=function(e){return Se(e,RegExp)},Oe=function(e,t,n,r){var i=t;if([n,r]=re(e,n,r),c(i))for(var u=n;u<r;u++)e[u]=i(u,e);else e.fill(i,n,r);return e},Ae=function(e,t){var n=new Array(e||0);return arguments.length>1&&Oe(n,t),n},Fe=function(e,t){return Ae(t.length,n=>e[t[n]])},Le=function(e,t){return e[t]},Te=function(e,t,n){return e[t]=n},Ce=function(e,t,n){var r=e;return c(r)?r.apply(n,t):r},Ie=function(e,t,n,r,i){r||(r=Le);var u=r(e,t);return void 0===u&&(u=Ce(n,[e,t]),i||(i=Te),i(e,t,u)),u},je=function(e,t){return e.get(t)},Pe=function(e,t,n){return e.set(t,n)},Re=function(e,t,n){return Ie(e,t,n,je,Pe)},Ne=class{constructor(){this.store=new Map}get(e,t){return Re(this.store,e,t)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},qe=function(e,t){return e.push(t),e},Me=qe,De=function(e){var t=e;return Array.isArray(t)?t:Array.from(t)},Be=Symbol("Value"),We=function(){return{}},He=function(e){return[e.slice(0,-1),e[e.length-1]]},Ke=He,Ye=function(e,t,n,r,i,u){n||(n=Le),null==r&&(r=We),null==i&&(i=Te),null==u&&(u=n);for(var[o,s]=Ke(t),a=e,l=o.length,c=0;c<l;c++){var f=o[c],h=n(a,f);if(void 0===h){if(!r)return;h=Ie(a,f,r,n,i)}a=h}if(u)return u(a,s,i)},Ue=function(e,t,n,r,i,u){return Ye(e,t,r,i,u,(e,t)=>Ie(e,t,n,r,u))},Ve=function(){return new Map},ze=function(e,t,n){return Ue(e,t,n,je,Ve,Pe)},Ge=function(e,t){return delete e[t],e},Qe=function(e,t,n,r){return Ye(e,t,n,!1,!1,r||Ge)},Je=function(e,t){return e.delete(t)},$e=function(e,t){return Qe(e,t,je,Je)},Xe=class{constructor(){this.store=new Map}get(e,t){return e=Me(De(e),Be),ze(this.store,e,t)}remove(e){return e=Me(De(e),Be),$e(this.store,e)}delete(e){return this.remove(e)}},Ze=W("MemoizedFunction",function(e,t){if(this.base=e,null!=t)if(1===(t=s(t)).length){this.cache=new Ne;var n=t[0];this._cacheKeyFormatter=e=>e[n]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Fe(e,t);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var t=r._cacheKeyFormatter(arguments);return r.cache.get(t,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),et=function(e,t){return new Ze(e,t)},tt=function(e){return new Set(e)},nt=function(e){var t={};if(e){var n=tt(e);n.has("g")&&(t.global=!0),n.has("i")&&(t.caseInsensitive=!0),n.has("y")&&(t.sticky=!0)}return t},rt=function(e){var t="";return e.global&&(t+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(t+="i"),e.sticky&&(t+="y"),t},it=function(e,t){var n=nt(e);return rt(Object.assign(n,t))},ut=function(e,t){var n=t,r=void 0;return u(n)?r=n:ce(n)&&(r=it(e.flags,n)),new RegExp(e,r)},ot=function(e,t){return ut(e,e.flags+t)},st=function(e){return ot(e,"g")},at=et(function(e){return e.global?e:st(e)},0),lt=function(e){var t=e;return null==t?void 0:u(t)?t:rt(t)},ct=function(e,t){return new RegExp(e,lt(t))},ft=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},ht=function(e,t){return ct(ft(e),t)},pt=function(e,t,n,r,i,o){return _e(e,function(e){return e.replaceAll?(ke(t)&&(t=at(t)),e.replaceAll(t,n)):(t=u(t)?ht(t,"g"):at(t),this.replace(t,n))},r,i,o)},dt=function(e,t,n){return pt(e,t,(n??"\\")+t)},vt=function(e,t,n){return null==t&&(t='"'),!1!==n&&(e=dt(e,t,n)),t+e+t},mt=function(e){return vt(e,'"')},yt=function(e){return fe(e)?xt(e):String(e)},gt=function(e,t){return t||(t=wt),"["+e.reduce(function(e,n){return e+t(n)+", "},"").slice(0,-2)+"]"},wt=function(e){return u(e)?mt(e):o(e)?gt(e):yt(e)},bt=function(e,t,n){Y(e,n).forEach((n,r,i)=>t(n,e[n],r,i))},Et=function(e,t,n,r){var i=null!=n?n:"";return bt(e,function(){i=t.call(this,i,...arguments)},r),i},xt=function(e,t){return t||(t=wt),"{"+Et(e,function(e,n,r){return e+n+":"+t(r)+", "},"",!0).slice(0,-2)+"}"},_t=function(e,t){return null==t&&(t=1),t<=0?"[object Object]":xt(e,e=>kt(e,t-1))},St=function(e,t){return null==t&&(t=1),t<=0?"[object Array]":gt(e,e=>kt(e,t-1))},kt=function(e,t){return void 0===e?"undefined":null===e?"null":R()?we(e,t):ce(e)?_t(e,maxNumLevels):o(e)?St(e,maxNumLevels):yt(e)},Ot=function(e,t,n,r){if(0===arguments.length)return new ve("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+kt(e)+", expected one of "+kt(u):"Unexpected value received: "+kt(e),n&&(i+=' for "'+n+'"'),null!=t&&(i+=" (index "+t+")"),r.fromFn||(r.fromFn=Ot),new ve(i,r)},At=function(e,t,n){var r=new k(e,n);return t&&Object.assign(r,t),r},Ft=function*(e,t){yield*e,yield*t},Lt=function(e){return e?" "+e:""},Tt=function(e){return u(e)?e:e.toString()},Ct=W("Interface",function(e,t,n){n||(n={}),C(this,e),t?[this.stubs,this.defaults]=$(t,H(!0),!0):(this.stubs={},this.defaults={});var r=n.implements?s(n.implements):null,i=this;return function(e){var t=e;return r&&r.forEach(e=>e(t)),i.decorate(t),i.assert(t),t}},{decorate(e){var t,n,r=e;for(var[i,u]of(r.prototype?(t=r.prototype,n=!0):(t=r,n=!1),ae(this.defaults)))if(void 0===t[i])if(fe(u))if(u.value)t[i]=u.value;else{if(!u.setup)throw Ot(u,null,"defaultVal");if(!n)throw u.setup(),T("setupFn is NYI for instances");de(t,i,u.setup)}else t[i]=u;return r},assert(e){var t=e,n=null!=t.prototype,r=t.prototype||t,i=Ft(ae(this.stubs),ae(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=n?"Class"+Lt(t.name):"Object "+kt(t),o+=" does not satisfy interface "+this.name+' (missing key "'+Tt(u)+'")',At(o)}return t},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),It=function(e,t,n){return new Ct(e,t,n)},jt=Symbol("Cleanup"),Pt=It("Handle",{remove:!0,[jt](){this.remove()}}),Rt=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Pt),Nt=function(e){return 1===e.length&&o(e[0])?e[0]:array},qt=function(...e){return new Rt(Nt(e))},Mt=qt,Dt=Mt,Bt=function(e){var t,n,r=e;return null!=r&&(t=r.detail??r.data??r,g(r)&&(n=r)),[t,n,r]},Wt=function(e){return Ct.is(e)},Ht=Wt,Kt=S(globalThis.TypeError),Yt=function(e){return null==e?e:e.constructor},Ut=function(e,t,n,r){if(0===arguments.length)return new Kt("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=Yt(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+kt(e)+")"),o||(i+=")"),n&&(i+=' for "'+n+'"'),null!=t&&(i+=" (index "+t+")"),r.fromFn||(r.fromFn=Ut),new Kt(i,r)},Vt=function(e,t,n){if(!Ht(t))throw Ut(t,1);return t.decorate(e),n&&n.call(e,e,t),t.assert(e),e},zt=It,Gt=Symbol("EventTarget"),Qt=function(e){return require(e)},Jt=function(e){return!!e.startsWith("node:")||Qt("node:module").isBuiltin(e)},$t=function(e){return e.startsWith(".")},Xt=function(e,t,n){return Object.keys(t).forEach(r=>A(e,r,t[r],n)),e},Zt=function(e,t,n){return Xt(e||{},t,n)},en=function(e,t,n){return t?Zt(e,t,n):e??{}},tn=function(e,t){return en(e,t,!0)},nn=function(e){var t=e.stdio;if(t){if(!o(t)){if(!u(t))throw Ut(t,"stdio");if("pipe"===t)t=["pipe","pipe","pipe"];else if("inherit"===t)t=["inherit","inherit","inherit"];else if("ignore"===t)t=["ignore","ignore","ignore"];else{if("overlapped"!==t)throw Ot(t,"stdio");t=["overlapped","overlapped","overlapped"]}e.stdio=t}}else t=e.stdio=[null,null,null];return t},rn=function(e){if(!o(e))throw Ut(e,null,null,{expected:Array});return!0},un=function(e,t){var n=t.length;e.length=n;for(var r=0;r<n;r++)e[r]=t[r];return e},on=function(e){return function(){return!e.apply(this,arguments)}},sn=function(e,t){return un(e,e.filter(on(t)))},an=function(e){return sn(e,e=>null==e)},ln=ye("child_process"),cn=P(function(){return"win32"===process.platform}),fn=function(e,t,n){if(n||(n={}),t(e))throw e;if(n.nullOnErr)return null;var r=n.onErr;if(void 0!==r)return Ce(r);throw e},hn=function(e,t,n,r){var i=(n=tn(n,r)).liveOutput,u=n.captureOutput??n.capture,o=n.captureErr??n.capture;u&&null==i&&(i=!1),n.dir&&(n.cwd=n.dir);var s=nn(n);if(null==s[0]&&!1!==n.allowInput){if(n.input)throw At("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");s[0]="inherit"}if(null==s[1])if(u){if(i)throw At("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");s[1]="pipe"}else s[1]=i??1?"inherit":"ignore";if(null==s[2]){o=n.captureErr??!1;var a=n.showErr;if(o&&a)throw At("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");s[2]=o?"pipe":a??1?"inherit":"ignore"}n.encoding||(n.encoding="utf8"),t&&(rn(t),an(t));try{var l=ln().execFileSync(e,t,n);null!=l&&n.trim&&(l=l.trim());var c=n.map??n.mapFn;return c&&(l=c(l)),l}catch(e){if(cn())return fn(e,e=>"ENOENT"===e.code,n);throw e}},pn=function(e,t){return t||(t={}),null==t.captureOutput&&(t.captureOutput=!1),t.shell=!0,t.filterExtensions=!1,hn("npm",e,t)},dn=function(e,t,n){return pn(["install",e,t?"-g":null],n)},vn=ye("path"),mn=vn().sep,yn=function(e,t,n){e=String(e);var r=vn().resolve,i=t?r(t,e):r(e);return n?i+mn:i},gn=function(e){return require(yn(e))},wn=class{constructor(){this.store={}}get(e,t){return A(this.store,e,t)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},bn=new wn,En=function(e){return e[e.length-1]},xn=ne,_n=function(e,t,n){return e=ut(e,{global:!0}),null!=n&&(t=xn(n,t)),e.lastIndex=t,e},Sn=function(e,t,n){return e=null!=n?_n(e,n,t):at(e),Array.from(t.matchAll(e))},kn=function(e,t,n){return null!=n&&(t=t.slice(0,n)),En(Sn(e,t))||null},On=function(e,t){var n=kn(e,t);return n&&t.length===n.index+n[0].length?n:null},An=function(e,t){if(u(t))return e.endsWith(t);if(ke(t))return!!On(t,e);throw Ut(t,1,"matchThis")},Fn=/\/|\\/,Ln=function(e){return An(e,Fn)?e:e+mn},Tn=function(e,t,n){if(R()){var r=vn().join(String(e),String(t));return n?Ln(r):r}throw T()},Cn=function(e,t){return e.endsWith(t)?e:Tn(e,t)},In=ye("module"),jn=function(e){return e=Cn(e,"node_modules"),In().createRequire(e)},Pn=function(e,t){return bn.get(e,()=>jn(e))(t)},Rn=function(e,t,n){return t?Xt(e,t,n):e},Nn=function(e,t){return e.endsWith(t)?e.substring(0,e.length-t.length):e},qn=function(e,t){var n=On(t,e);return n?e.slice(0,n.index):e},Mn=function(e,t){if(u(t))return Nn(e,t);if(ke(t))return qn(e,t);throw Ut(t,1)},Dn=Mn,Bn=function(e,t){return[e.slice(0,t),e.slice(t)]},Wn=function(e){e=Dn(e.trim(),";");var t=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Bn(e,t+1)},Hn=function(e,t){return e.startsWith(t)?e:t+e},Kn=function(e){var[t,n]=Wn(e);return t+Hn(n.trim(),"return ")},Yn=function(e){return oi("node-repl-await").processTopLevelAwait(e)},Un=function(e){return Yn(e)??e},Vn=pt,zn=function(e,t){return""===e?e:(!1!==t&&(e=Ln(e)),Vn(e,"\\","/"))},Gn=P(function(){return process.argv.slice(2)}),Qn=Gn,Jn=function(e,t){const n=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const s=e[o];switch(i){case"outside":'"'===s?u?(r+=s,u=!1):(t&&(r+=s),i="insideQuote"):"\\"===s?u=!0:" "===s?(r.length>0&&(n.push(r),r=""),u=!1):(r+=s,u=!1);break;case"insideQuote":'"'!==s||u?"\\"!==s||u?(r+=s,u=!1):u=!0:(t&&(r+=s),i="outside")}}return r.length>0&&n.push(r),n},$n=function(e,t){var n=e;return null==n?Qn():u(n)?Jn(n,t):n},Xn=function(e,t){return $n(e,t).slice()},Zn=Xn,er=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Zn(process.argv)[1])},tr=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},nr=function(e){return e.split(".")[0]},rr=function(e){return vn().win32.basename(String(e))},ir=function(e){return nr(rr(e))},ur=function(e,t,n,r){e||(e=er()??"_console.js");var i=tr(ir(e));return t&&(i+="_repl"),i+(n&&r?.dynamic?".dypkg.json":".pkg.js")},or=function(e,t){return e=vn().dirname(String(e)),!1===t?e:Ln(e)},sr=function(e,t,n,r){var i,u=ur(e,t,n,r);return i=e?or(e):"./",yn(i+u)},ar=function(e){return'require("'+zn(sr(),!1)+'");\n'+e},lr=function(e,t){return pt(e,t,"")},cr=function(e,t){return t.forEach(t=>e=lr(e,t)),e},fr=function(e){return cr(e,["\r","\n"])},hr=function(e,t){return oi("astring").generate(e,t)},pr=function(e,t){return e.stack=t+"\n"+e.stack,e},dr=function(e,t,n){n||(n={}),n.ecmaVersion||(n.ecmaVersion=2024),!1!==t&&(n.sourceType="module"),null==n.allowAwaitOutsideFunction&&(n.allowAwaitOutsideFunction=!0),null==n.allowReturnOutsideFunction&&(n.allowReturnOutsideFunction=!0);var r=oi("acorn");try{return r.parse(e,n)}catch(t){throw pr(t,"Acorn parsing error: "+e)}},vr=function(e,t,n){return hr(dr(e,t,n))},mr=function(e){return fr(vr(e))},yr=function(e,t,n){return(t||n)&&(t||(t={}),n&&Rn(t,n),t.ensureReturn&&(e=Kn(e)),t.topLevelAwait&&(e=Un(e)),t.useTitan&&(e=ar(e)),t.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(t.logErrors||t.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),t.inline&&(e=mr(e))),e},gr=function(e){return u(e)?e:yt(e)},wr=function(e){var t=e.indexOf("{");return-1===t||e.slice(0,t).includes("=>")},br=function(e,t,n,r,i){return xe(e,t,n,r,(e,t)=>-1===e?-1:void 0===t?e:t+e,i)},Er=function(e,t){return Array.prototype.findIndex.call(e,t)},xr=function(e,t,n,r,i){var o=u(t);return o&&null==r&&!i?e.indexOf(t,n):br(e,e=>o?e.indexOf(t):ke(t)?e.search(t):Er(e,t),n,r,i)},_r=function(e,t,n,r,i){var u=xr(e,t,n,r,i);return-1===u?null:e.slice(u+1,r)},Sr=function(e,t){return e.startsWith(t)?e.substring(t.length):e},kr=lr,Or=function(e,t){return ut(e,kr(e.flags,t))},Ar=function(e){return Or(e,"g")},Fr=et(function(e){return e.global?Ar(e):e},0),Lr=function(e,t,n){return(e=null!=n?_n(e,n,t):Fr(e)).exec(t)},Tr=function(e,t){var n=Lr(e,t);return n&&0===n.index?n:null},Cr=function(e,t){var n=Tr(t,e);return n?e.slice(n[0].length):e},Ir=function(e,t){if(u(t))return Sr(e,t);if(ke(t))return Cr(e,t);throw Ut(t,1)},jr=Ir,Pr=function(e){var t=_r(e,"=>").trim();return jr(Dn(t,"}"),"{")},Rr=function(e){return _r(e,"{").slice(0,-1)},Nr=function(e){var t=gr(e);return wr(t)?Pr(t):Rr(t)},qr=function(e){return null==e?"":u(e)?e:c(e)?Nr(e):String(e)},Mr=function(e,t){var n=t?.basic?null:{topLevelAwait:!0,useTitan:!0},r=yr(qr(e),t,n);return hn("node",[t?.mode??"-p",r],t)},Dr=function(e,t,n,r){var i="Required argument";return n&&(i+=' "'+n+'"'),null!=t&&(i+=" (index "+t+")"),i+=" missing",arguments.length>0&&(i+=" (received "+kt(e)+")"),At(i,null,L(r,Dr))},Br=function(e,t,n){if(null==e)throw Dr(e,t,n,{fromFn:Br});return e},Wr=function(e,t){return process.kill(e,Br(t,0,"signalName"))},Hr=function(e){return Wr(e,"SIGINT")},Kr=function(){return Hr(process.pid)},Yr=Kr,Ur=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw Ot(e,0,"char")},Vr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var t=Mr(function(){const e=process.stdin,t=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var n=e.toUpperCase();"Y"===n||"N"===n?(t.write(e),process.exit(0)):""===e&&(t.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===t)throw process.stdout.write(t),Yr(),At("Prompt was cancelled via interrupt.");return console.log(t),Ur(t)},zr=function(e){return o(e)?e:u(e)?e.split("."):[e]},Gr=function(e,t,n,r,i,u){var o=n;return Ye(e,t,r,i,u,(e,t,n)=>n(e,t,Ce(o)))},Qr=function(e,t){var n=t,r=globalThis.config;r||(r=globalThis.config={});var i,u=zr(e);return u.length>1?i=Gr(r,u,n):(i=Ce(n),r[u[0]]=i),i},Jr=function(e,t){return Qr("node.require.customDirs",n=>(n||(n=[]),!1!==t&&(e=Cn(e,"node_modules")),n.includes(e)||n.push(e),n)),e},$r=Jr,Xr=Ye,Zr=function(e){var t=globalThis.config;if(t){var n=zr(e);return n.length>1?Xr(t,n):t[n[0]]}},ei=function(e,t,n){if(null!=e)return e;var r=Zr(t);return null!=r?r:n},ti=ye("fs"),ni=function(e){return!!ti().lstatSync(String(e),{throwIfNoEntry:!1})},ri=function(e){var t=or(e,!1);return ni(t)||(t!==e&&ri(t),ti().mkdirSync(String(t))),e},ii=function(e){return ri(e),ti().mkdirSync(String(e)),e},ui=function(e){return ni(e)?e:ii(e)},oi=function(e,t){if(Jt(e))return require(e);if($t(e))return gn(e);try{return require(e)}catch(e){}var n=__dirname,r=process.mainModule?.path;if(r!==n)try{return Pn(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==n)try{return Pn(i,e)}catch(e){}var u=Zr("node.require.customDirs");if(u)for(var o of u)try{return Pn(o,e)}catch(e){}var s=ei(t?.autoInstall,"node.require.autoInstall"),a=ei(t?.promptInstall,"node.require.promptInstall",!0);if(s||a){var l=s||a;!0===l&&(l="./node_modules"),l=yn(l);var c=!1;if(s?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+l+'"...')):(c=Vr('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+l+'"...'),c){l=ui(l),dn(e,!1,{cwd:l});try{return $r(l),Pn(l,e)}catch(e){console.error("Failed to load from auto-install dir: ",l)}}}throw At('Module not found: "'+e+'"',{checked:{moduleDir:n,scriptDir:r,cwd:i}})},si=P(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=oi("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,t){super(e,t),t?.detail&&(this.detail=t.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),ai=si().EventTarget,li=function(e){var t=Gt,n=e[t];return void 0===n&&(n=new ai,_(e,t,n)),n},ci=zt("EventInterface",{addEventListener(e,t,n){li(this).addEventListener(e,t,n)},on(e,t){this.addEventListener(e,t)},removeEventListener(e,t){li(this).removeEventListener(e,t)},off(e,t){this.removeEventListener(e,t)},dispatchEvent(e){return li(this).dispatchEvent(e)}}),fi=ci,hi=function(e){return Vt(e,fi)},pi=function(e){return!(!e.addEventListener&&!e.on)},di=function(e){return pi(e)||hi(e),e},vi=function(e,t,n){return e[t]=n,e},mi=function(e,t,n){return vi(e||{},t,n)},yi=function(e,t,n,r){return Fi(e,t,n,mi(r,"once",!0))},gi=function(e,t){return function(){var n=t.apply(this,arguments);return e.apply(this,arguments),n}},wi=gi,bi=function(e,t,n){return e[t]=wi(e[t],n)},Ei=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,t,n){n&&di(e);var r=yi(target,t,()=>this.remove());return bi(this,"remove",()=>r.remove()),this}},Pt),xi=class extends Ei{constructor(e,t){super(e),this.handleEvent=t}},_i=function(e,t){return new xi(e,t)},Si=function(e,t,n){(e.removeEventListener||e.off).call(e,t,n)},ki=function(e,t,n){for(var r=e.length-1;r>=t;r--)e[r+1]=e[r];return e[t]=n,e.length++,e},Oi=function(e,t){return ki(e,0,t)},Ai=Oi,Fi=function(e,t,n,r){if(r?.valueFirst){var i=n;n=function(e){var[t,n]=Bt(e);return Ai(arguments,t),arguments[1]=n,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(hi(e),u=e.addEventListener)),u.call(e,t,n,r),_i(()=>Si(e,t,n),n)},Li=function(e,t,n,r){return Dt(t.map(t=>Fi(e,t,n,r)))},Ti=function(){return globalThis.repl?.repl},Ci=function(e,t){return null==t&&(t=1),function(){var n=Array.from(arguments),r=n.pop(),i=e.apply(this,n);0===t?(i.then(e=>r(null,e)),i.catch(r)):(i.then(r),i.catch(e=>r.apply(null,vi([],t,e))))}},Ii=async function(){}.constructor,ji=function(e){return le(e,Ii)},Pi=function(e){return ji(e)?e:async function(){return e.apply(this,arguments)}},Ri=P(function(){return oi("node:stream")}),Ni=R()&&Ri().Writable,qi=function(e,t){return t||(t={}),null==t.objectMode&&(t.objectMode=!0),e?t.write=Ci(Pi(e),0):t.write||(t.write=(e,t,n)=>n()),new Ni(t)},Mi=function(){},Di=async function(e){var t=Ti();if(t){var n,r=t.eval,i=t.output;t.output=qi(Mi),t.eval=Mi;try{t.quickDisableHistory?await t.quickDisableHistory(async function(){n=await e(),t._line()}):n=await e()}finally{t.output=i,t.eval=r}return n}return e()},Bi=ye("readline"),Wi=/\r?\n/,Hi=function(e){return null==e||void 0!==e.length&&0===e.length},Ki=function(e,t){return sn(e,Hi)},Yi=function(e,t){return e.splice(t,1),e},Ui=function(e,t,n){for(var r={},i=e.length,u=0;u<i;u++){var o=t(e[u],u,e);if(o){var[s,a]=o;n?(r[s]||(r[s]=[]),r[s].push(a)):r[s]=a}}return r},Vi=function(e,t,n,r){return[t,n]=re(e,t,n,r),e.slice(t,n)},zi=function(e,t){return Ae(t,e).join("")},Gi=function(e){return e?e[0]:null},Qi=function(e,t){var n=null==t?-1:t.index;if(-1===n)return[e];var r=Bn(e,n);return r[1]=r[1].slice(t[0].length),r},Ji=function(e,t,n,r,i){return xe(e,t,n,r,(t,n)=>null===t?null:(t.input=e,void 0!==n&&(t.index+=n),t),i)},$i=function(e,t){return e.splice(e.length,0,...t),t},Xi=function(e,t){return $i(e,t),e},Zi=Xi,eu=class extends Array{constructor(e,t,n,r,i){if(-1===t)throw At("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw At("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&Zi(this,r),this.index=t,this.input=n,i&&(this.groups=i)}fromParts(e){var t=e;return new eu(t.match,t.index,t.input,t.captures,t.groups)}},tu=function(e,t,n,r,i){return new eu(e,t,n,r,i)},nu=function(e,t,n,r,i){return-1===t||null==e?null:tu(e,t,n,r,i)},ru=function(e,t,n,r,i){return Ji(e,e=>{if(u(t)){var n=e.indexOf(t);return nu(t,n,e)}return Lr(t,e)},n,r,i)},iu=function(e,t,n,r,i){return Qi(e,ru(e,t,n,r,i))},uu=function(e){return isNaN(e)?null:e},ou=function(e){return null==e?null:uu(Number(e))},su=ou,au=function(e){return su(e)??e},lu=function(e,t){null==t&&(t="=");var n={};return e.forEach(function(e){var[r,i]=iu(e,t);null!=i&&(i=au(i.trim())),n[r.trim()]=i}),n},cu=F,fu=class extends Array{constructor(e){var t,n=e;null!=n&&(o(n)?t=n:u(n)&&(t=n.split(Wi))),t?(super(t.length),Object.assign(this,t)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return Ki(this)}removeComments(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.indexOf(e);-1!==r&&(""===(n=n.slice(0,r)).trim()?(Yi(this,t),t--):this[t]=n)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return lu(this,e)}mapToObj(e,t){return Ui(this,e,t)}between(e,t,n){return n=cu(n,"inclusiveEnd",!0),Vi(this,e,t,n)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===En(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),t=Gi(Lr(/^\s*/,e));if(t){var n=t.length;this.apply(e=>{if(e.startsWith(t))return e.slice(n)})}}return this}deindent(e,t,n){throw T()}indent(e,t){var n=zi(t??"\t",e??1);return this.apply(e=>n+e)}static is(e){return le(e,this)}static fromChunks(e){return e.map(e=>Dn(e,Wi)).flatMap(e=>pu(e,!1))}},hu=function(e,t){var n=new fu(e);return t&&n.condense(),n},pu=function(e,t,n){var r=e.split(Wi);return t?hu(r,n):r},du=function(e){return ti().readFileSync(String(e),"utf8")},vu=du,mu=function(e,t){return pu(vu(e),!0,t)},yu=function(e){var t=typeof e;return"number"===t||"bigint"===t},gu=function(e){return e instanceof Buffer},wu=function(e){return ArrayBuffer.isView(e)},bu=wu,Eu=function(e){return gu(e)||bu(e)||u(e)},xu=function(e){return e.constructor===ArrayBuffer},_u=function(e){return Eu(e)?e:xu(e)?Buffer.from(e):yt(e)},Su=function(e){return yu(e)?String(e):_u(e)},ku=function(e,t){return ri(e),ti().appendFileSync(String(e),Su(t)),e},Ou=function(e,t){return ku(e,"\n"+t)},Au=Ou,Fu=function(e){return pt(e,"\n","\\n")},Lu=Fu,Tu=function(e,t){if(0===e)return t[0];for(var n=t.length,r="";e>0;){var i=e%n;r=t.charAt(i)+r,e=Math.floor(e/n)}return r},Cu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Iu=function(e){return Tu(e,Cu)},ju=function(e,t){for(var n=gr(e),r=t.length,i=0,u=0;u<n.length;u++){var o=n[u],s=t.indexOf(o);if(-1===s)throw'Error: "'+o+'" not found in base charset "'+t+'"';i=i*r+s}return i},Pu=function(e){return ju(e,Cu)},Ru=function(e,t){return Object.keys(e).map((n,r)=>t(n,e[n],r,e))},Nu=function(e){return e.slice()},qu=function(e,t){return e.includes(t)||e.push(t),e},Mu=class{constructor(e,t,n,r){(t=o(t)?Nu(t):[t]).forEach(r),e&&qu(t,e),this.members=t,this._enableFn=n,this._disableFn=r}enable(e){this.members.forEach(t=>{t!==e&&this._disableFn(t)}),this._enableFn(e)}disableAll(){this.members.forEach(e=>this._disableFn(e))}},Du=function(e,t,n,r){return new Mu(e,t,n,r)},Bu=function(e,t,n){return new Promise(function(r,i){var u=Dt([yi(e,t||"load",e=>{u.remove(),r(e)}),yi(e,n||"error",e=>{u.remove(),i(e)})])})},Wu=M("CLI",R()&&Bi().Interface,[function(e){if(e||(e={}),e.input||(e.input=process.stdin),e.output||null==e.output&&(e.output=process.stdout),null==e.terminal&&(e.terminal=!0),e.historyPath){var t=ni(e.historyPath)?mu(e.historyPath):[];e.history=t.reverse()}var n={inputWasRaw:e.input.isRaw},r=Bi().createInterface(e);return r.options=e,r.internal=n,r},function(){var e=this.options;this.rl=Bi(),e.historyPath&&this.on("history",t=>Au(e.historyPath,t[0])),e.disabled&&this.disable()}],{prompt(e){this._muted||(this._isPrompt=!0,null!=e&&this.setPrompt(e),super.prompt.apply(this,arguments),delete this._isPrompt)},_refreshLine(){this._muted||(this._isRefresh=!0,super._refreshLine(...arguments),delete this._isRefresh)},_ttyWrite(e,t){(!this._blockExcept||t&&this._blockExcept.includes(t.name))&&super._ttyWrite.apply(this,arguments)},_addHistory(){return this._historyDisabled||null!=this._mask||super._addHistory(),this.line},_writeToOutput(e){if(!this._muted){var t=this._mask;if(null!=t){if(this._isRefresh){var n=this._prompt;e.startsWith(n)&&(super._writeToOutput(n),e=e.slice(n.length))}this._isPrompt||(e=Vn(e,/[^\r\n]/,t))}super._writeToOutput(e)}},async promptLine(e){return this.prompt(e),this.awaitLine()},async prefillPrompt(e,t){var n=t,r=await Ce(n);return this.prompt(e),r&&this.write(Lu(gr(r))),this.awaitLine()},async promptMultiline(e,t,n,r){if(null==t&&(t="... "),null==n)n=e=>""===e,r||(r=e=>(e.pop(),e));else if(u(n)){var i=n;n=e=>e.endsWith(i)}for(var o=await this.promptLine(e),s=[o];!n(o,s.length,s);)o=await this.promptLine(t),s.push(o);return r&&r(s),s.join("\n")},async promptKey(e,t){this.prompt(e);var n=await this.quickBlockExcept(t,!1,()=>this.awaitKey(t));return this.newLine(),n},async promptYN(e){return"y"===(await this.promptKey(e,["y","n"])).toLowerCase()},async promptSelect(e,t,n){var r=t;n||(n={});var i=0;function u(){return i++,Iu(i)}if(fe(r))r=Ru(r,(e,t,n)=>[u(),e,t]);else{if(!o(r))throw Ut(r);r=r.map((e,t)=>{if(null==e)return null;if(o(e)){var n=e[0];if(null==n)n=u();else if((n=gr(n)).length>1)throw At("Input key must be a single character:",e);var r=e.length;if(1===r)return[n,n,n];if(2===r){var i=e[1];return[n,i,i]}if(3===r)return[n,e[1],e[2]];throw At("Unexpected array length in choices: "+r)}return[u(),e,e]}),an(r)}if(r.length>35)throw At("promptSelect only supports up to 35 options.");var s=n.displayFn||((e,t)=>"["+e+"] "+t);this.quickDisableHistory(()=>{for(var e=0;e<r.length;e++){var[t,n,i]=r[e];this.write(s(t,n,i,r)+"\n")}});var a=Ui(r,e=>[e[0],e]),l=await this.promptKey(e,Object.keys(a)),f=a[l];if(null==f)throw Ot(f,"choice");var h=f[2];return c(h)&&(h=await h(f)),n.asObj?{key:l,name:f[1],value:h}:n.asIndex?Pu(l)-1:h},blockExcept(e,t){e=s(e).map(e=>String(e).toLowerCase()),0!=t&&qu(e,"return"),this._blockExcept=e},unblock(){delete this._blockExcept},async quickBlockExcept(e,t,n){var r=this._blockExcept;this.blockExcept(e,t);var i=await n();return r?this.blockExcept(r):this.unblock(),i},disable(){this.pause(),this.mute()},enable(){this._mutex?this._mutex.enable(this):this._enable()},_enable(){this.resume(),this.unmute()},mutex(e){var t=Du(this,e,e=>e._enable(),e=>e.disable());this.pause(),this.resume(),t.members.forEach(e=>e._mutex=t)},mask(e){this._mask=e},unmask(){delete this._mask},mute(){this._muted=!0},unmute(){delete this._muted},disableHistory(){this._historyDisabled=!0,this._historyPrev=Mi,this._historyNext=Mi},enableHistory(){delete this._historyDisabled,delete this._historyPrev,delete this._historyNext},async quickDisableHistory(e){var t=this._historyDisabled;this.disableHistory();try{var n=await e()}finally{return t||this.enableHistory(),n}},awaitLine(){return Bu(this,"line")},newLine(){this.write("\n")},newline(){return this.newLine()},onKey(e,t,n){var r=e,i=this.input;if(this.rl.emitKeypressEvents(i),i.isTTY&&i.setRawMode(!0),r){var u=t;if(o(r)){var s=r.map(e=>String(e).toLowerCase());t=(e,t)=>{e||(e=t.name),s.includes(e.toLowerCase())&&u.call(this,e,t)}}else{var a=String(r).toLowerCase();t=(e,t)=>{e||(e=t.name),e.toLowerCase()===a&&u.call(this,e,t)}}}return Fi(i,"keypress",t,n)},async awaitKey(e){return new Promise(t=>{var n=this.onKey(e,e=>{n.remove(),t(e)})})},moveCursor(e,t){return this._moveCursor(e,t)},cursorLeft(e){return this.moveCursor(-e)},cursorRight(e){return this.moveCursor(e)},cursorUp(e){return this.moveCursor(null,-e)},cursorDown(e){return this.moveCursor(null,e)},close(){super.close(),this.input.setRawMode(this.internal.inputWasRaw)}}),Hu=function(e,t){return Di(async function(){var n=new Wu(t);try{var r=await e(n)}finally{n.close()}return r})},Ku=function(e,t){return Hu(t=>t.promptLine(e),t)},Yu=async function(e,t,n){for(var r={},i=t.length,u=0;u<i;u++){var o,s=t[u];if(s.endsWith("?")&&(s=s.slice(0,-1),o=!0),void 0===(a=e[s])){var a=e[u];if(void 0===a&&!o&&(!1!==n?.prompt&&(a=await Ku(s+": ")),!a))throw Br(void 0,u,s)}r[s]=a}return r},Uu={node:{onError:function(e){return Li(process,["uncaughtException","unhandledRejection"],e)},is:R,display:we,util:ge,_builtInModule:ye,requireBuiltIn:me,require:oi,_basicRequire:Qt,child_process:ln,requireLocal:gn,path:vn,_requireFromDir:Pn,_requireDirCache:bn,_createRequire:jn,module:In,promptYNSync:Vr,run:Mr,getScriptPath:er,positionalArgs:Zn,args:Gn,sigint:Yr,interrupt:Kr,ensureRequireDir:$r,addRequireDir:Jr,fs:ti,pause:function(e){null!=e&&(e=String(e)),oi("press-any-key-sync")(e)},beforeExit:function(e){return Fi(process,"beforeExit",e)},prompt:Ku,quickCLI:Hu,quickDisableREPL:Di,getREPL:Ti,CLI:Wu,readline:Bi},ev:{onAny:Li,multiHandle:Dt,on:Fi,resolveValue:Bt,enable:hi,EventInterface:fi,Interface:ci,_ensureHasTarget:li,targetSym:Gt,EventTarget:ai,polyfill:si,handle:_i,ListenerHandle:xi,ensureEnabled:di,can:pi,once:yi,off:Si,promise:Bu},o:{multiHandle:Mt,isAny:g,setHidden:_,addNonEnumerable:x,defineProperty:E,weakAssign:b,merge:w,safeEnsure:F,ensure:A,hideKey:B,makeNonEnumerable:D,filterSplit:$,keys:Y,allKeys:K,split:J,pick:U,iterateAll:ae,iterate:se,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:de,setGetter:he,forceSet:pe,display:_t,toLiteral:xt,constructorMatches:Se,ensureCustom:Ie,get:Le,set:Te,createEmpty:We,remove:Ge,reduce:Et,each:bt,addInterface:Vt,safeSetDefaults:en,safeEnsureMulti:Zt,ensureMulti:Xt,Cache:wn,setDefaults:Rn,resolveKeys:zr,diveGet:Xr,safeSet:mi,touch:vi,fromLines:lu,safeDefault:cu,mapArr:Ru,mutex:Du,_Mutex:Mu},handle:{createMulti:qt,MultiHandle:Rt,HandleInterface:Pt,Handle:Ei},class:{addInterface:e,create:M,setName:I,addStatics:j,setDisplay:q,isInterface:Ht,interface:zt},ifc:{create:It,Interface:Ct,is:Wt},f:{createClass:W,ensureConstructor:v,createConstructor:d,isArrowFn:h,isArrow:f,is:c,wrap:p,retThis:m,setName:C,one:P,eq:H,memoize:et,MemoizedFunction:Ze,not:on,body:Nr,isArrowString:wr,_getArrowFnBody:Pr,_getNormalFnBody:Rr,hookAfterMethod:bi,hookAfter:wi,injectAfter:gi,callbackify:Ci,ensureAsync:Pi,isAsync:ji,AsyncFunction:Ii,noop:Mi},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:mt,quote:vt,escape:dt,replaceAll:pt,apply:_e,withIndices:xe,chars:tt,from:yt,spaceBefore:Lt,fromKey:Tt,endsWith:An,resolveIndex:xn,removeTrailing:Dn,removeFromEnd:Mn,_removeStringFromEnd:Nn,_removeRegexFromEnd:qn,splitAtIndex:Bn,ensureStartsWith:Hn,replace:Vn,decapitalize:tr,removeLineBreaks:fr,removeMulti:cr,removeAll:lr,resolve:qr,ensure:gr,after:_r,index:xr,_indexWithIndices:br,indexOfFn:Er,removeLeading:jr,removeFromStart:Ir,_removeStringFromStart:Sr,_removeRegexFromStart:Cr,remove:kr,splitLines:pu,lines:hu,LinesArray:fu,repeat:zi,splitFirst:iu,_splitByMatch:Qi,match:ru,_matchWithIndices:Ji,escapeLineBreaks:Lu,escapeNewLines:Fu},a:{is:o,ensure:s,filterSplit:Q,iterate:te,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:ne,wrapIndices:Ee,wrapIndex:be,pick:Fe,create:Ae,fill:Oe,push:Me,add:qe,splitLast:Ke,splitTail:He,toLiteral:gt,display:St,unboxArgs:Nt,assert:rn,removeNullish:an,removeByFilter:sn,replaceContents:un,last:En,removeEmpty:Ki,removeIndex:Yi,mapToObj:Ui,slice:Vi,pushMulti:Zi,addMulti:Xi,pushThroughMulti:$i,copy:Nu,ensureContains:qu},p:{asyncJoint:l,is:a},v:{isPrimitive:y,constructorMatches:le,display:kt,toLiteral:wt,resolve:Ce,type:Yt,req:Br,isEmpty:Hi,nullIfNaN:uu},err:{nyi:T,NYIError:O,Error:k,Enhanced:S,defaultFromFn:L,value:Ot,ValueError:ve,create:At,type:Ut,TypeError:Kt,prepend:pr,req:Dr},sym:{display:N,value:Be,cleanup:jt},macro:{config:function(e){}},set:{resolve:G,ensure:z,is:V},n:{cap:Z,least:X,tryCoerce:au,tryParse:su,ensure:ou,is:yu,toBase36:Iu,toCustomBase:Tu,_base36Digits:Cu,fromBase36:Pu,fromCustomBase:ju},re:{is:ke,ensureGlobal:at,global:st,addFlag:ot,copy:ut,updateFlagString:it,parseFlagString:nt,createFlagString:rt,createEscaped:ht,create:ct,resolveFlags:lt,escape:ft,matchEnd:On,matchLast:kn,matchAll:Sn,setStartIndex:_n,slash:Fn,matchStart:Tr,match:Lr,ensureLocal:Fr,local:Ar,removeFlag:Or,newline:Wi,text:Gi,safeCreateResult:nu,createResult:tu,RegexResult:eu},map:{Cache:Ne,ensure:Re,get:je,set:Pe,MultiCache:Xe,diveEnsure:ze,createEmpty:Ve,diveDelete:$e,remove:Je},args:{ensureArray:De,unshift:Ai,prepend:Oi,insert:ki},tree:{ensure:Ue,dive:Ye,remove:Qe,setCustom:Gr},gen:{join:Ft},npm:{isBuiltIn:Jt,isFile:$t,install:dn,_runCommand:pn},os:{run:hn,_resolveStdio:nn},opt:{resolve:tn},win:{is:cn},shell:{_handleError:fn},path:{abs:yn,sep:mn,ensureEndsWith:Cn,join:Tn,ensureTrailingSlash:Ln,fws:zn,baseName:ir,_removeExtsFromFile:nr,file:rr,dir:or},js:{enhance:yr,ensureReturn:Kn,splitLastExpression:Wn,enableAwait:Un,_nodeEnableAwait:Yn,useTitan:ar,inline:mr,removeComments:vr,fromAST:hr,parse:dr},titan:{getPackagePath:sr,getPackageName:ur},cli:{positionalArgs:Xn,resolveArgs:$n,splitArgs:Jn,parseArgs:function(e,t){for(var n=$n(e,t),r=[],i=!1,u=n.length,o=0;o<u;o++){var s=n[o];if(!i){var a=s[0];let e;if("-"===a)if("-"===s[1]){if(2===s.length){i=!0;continue}e=2}else e=1;else"/"===a&&(e=1);if(e){var l,c,f=s.slice(e),h=f.indexOf("=");if(-1!==h)l=f.slice(0,h),c=f.slice(h+1);else{l=f;var p=n[o+1];null==p||"-"===p[0]?c=!0:(c=p,o++)}r[l]=c;continue}}r.push(s)}return r},paramsFrom:async function(e,t,n){var r=await Yu(e,t,n);Object.assign(globalThis,r)},validateParams:Yu},env:{args:Qn,setConfig:Qr,getConfig:Zr,resolveConfig:ei},proc:{interrupt:Hr,signal:Wr},bool:{fromYN:Ur},fs:{ensureDir:ui,exists:ni,mkdir:ii,ensureParent:ri,loadLines:mu,loadText:vu,load:du,appendLine:Au,addLine:Ou,append:ku,formatRaw:Su},stream:{nodeWritable:qi,NodeWritableStream:Ni,_useNode:Ri},bin:{ensureByteSafe:_u,isByteSafe:Eu,isNodeBuffer:gu,isTA:bu},ab:{isTA:wu,is:xu}};globalThis.t?Object.keys(Uu).forEach(function(e){if(t[e]){var n=Uu[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Uu[e]}):globalThis.t=Object.assign({},Uu),globalThis.exports&&(exports.default=globalThis.t);
|
package/eval.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(t,"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(t,e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(t,e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(t,{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(t)},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_path_sep)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(t),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r){r||(r={}),r.dir&&(r.cwd=r.dir);var _=t_os__resolveStdio(r);if(null==_[0]){var n=r.allowInput,s=r.input;if(n&&s)throw t_err_create("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");n&&(_[0]="inherit")}if(null==_[1]){var i=r.captureOutput??!1,a=r.showOutput;if(i&&a)throw t_err_create("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");i?_[1]="pipe":(null==a&&(a=!0),_[1]=a?"inherit":"ignore")}if(null==_[2]){var o=r.captureErr??!1,u=r.showErr;if(o&&u)throw t_err_create("captureErr and showErr cannot be used simultaneously for synchronous child processes.");o?_[2]="pipe":(null==u&&(u=!0),_[2]=u?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),e&&t_a_removeNullish(e);try{var l=t_node_child_process().execFileSync(t,e,r);null!=l&&!1!==r.trim&&(l=l.trim());var c=r.map??r.mapFn;return c&&(l=c(l)),l}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(t,e);return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_re_resultEndIndex=function(t){return t.index+t[0].length},t_s_after=function(t,e){var r=t_s_match(t,e);return null===r[0]?null:t.slice(t_re_resultEndIndex(r))},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(e)),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(t),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_path_sep)},t_path_dirPart=function(t){var e=t.lastIndexOf(t_path_sep);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(t,t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,remove:t_s_remove,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,Cache:t_o_Cache,setDefaults:t_o_setDefaults,ensureMulti:t_o_ensureMulti,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,resultEndIndex:t_re_resultEndIndex,matchStart:t_re_matchStart,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,test:t_re_test},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/Newest/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/Newest/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
|
package/harness.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},a=function(e){return o(e)?e:[e]},l=function(e){return e instanceof Promise},s=function(e,n){var t=e;return l(t)?t.then(n):n(t)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},p=f,v=function(e){return function(){return e.apply(this,arguments)}},h=function(e,n){var t;return t=n?function(){this.super=n;var t=e.apply(this,arguments);return s(t,()=>(delete this.super,t))}:p(e)?v(e):e,t._isConstructor=!0,t},d=function(e,n){return e._isConstructor?e:h(e,n)},m=function(){return this},g=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},y=function(e){return!g(e)},b=function(e,n,t){return!1===t?Object.keys(n).forEach(t=>{void 0===e[t]&&(e[t]=n[t])}):Object.assign(e,n),e},w=function(e,n){return b(e,n,!1)},E=function(e,n,t,r){return t||(t={}),r&&w(t,r),null==t.enumerable&&(t.enumerable=!0),null==t.configurable&&(t.configurable=!0),Object.defineProperty(e,n,t)},x=function(e,n,t,r){return E(e,n,{value:t,writable:!0,enumerable:!1},r),t},T=x,O=function(e){return class extends e{constructor(e,n){super(e,n);var t=this.constructor.name;t&&(this.name=t)}}},S=O(globalThis.Error),_=class extends S{constructor(e,n){super(e??"Not yet implemented",n)}},A=function(e,n,t,r){var i=e[n];if(void 0===i){var u=t;!1!==r&&c(u)&&(u=u(e,n)),e[n]=i=u}return i},N=function(e,n,t,r){return e||(e={}),A(e,n,t,r),e},j=function(e,n){return N(e,"fromFn",n,!1)},I=function(e,n){return new _(e,j(n,I))},F=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),T(e,"displayName",n)},k=F,C=function(e,n){return Object.assign(e,n)},L=function(e){var n,t=!1;return function(){return t||(t=!0,n=e.apply(this,arguments)),n}},D=L(function(){return"undefined"==typeof window}),M=D()?require("util").inspect.custom:Symbol("Display"),P=function(e,n){e.prototype[M]=n},R=function(e,n,t,r,i,l){l||(l={}),u(n)&&(n=null);var c,f,p,v=t;v&&(o(v)?([f,p]=v,f&&(f=d(f))):c=d(v,n));var h=l.bareFn;l.singleton&&(h=function(){return null==w.default&&(w.default=new w(...arguments)),w.default});var g,b=f||c||n||m;function w(){if(!new.target&&h&&!(this instanceof w))return h.apply(this,arguments);var e=this;return s(b.apply(e,arguments),t=>{if(t&&y(t)&&(e=t,f)){if(!new.target)throw I('Prototype repair is NYI for class instantiation without "new".');if(!n)throw I("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return p?s(p.apply(e,arguments),()=>e):e})}return e&&k(w,e),r?(g=r,n&&Object.setPrototypeOf(r,n.prototype)):g=n?Object.create(n.prototype):{},T(g,"constructor",w),w.prototype=g,i&&C(w,i),l.display&&P(w,l.display),l.implements&&a(l.implements).forEach(e=>e(w)),w},q=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},B=q,G=function(e,n,t,r,i){var u=Symbol();return R(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],t,r,i)},K=function(e){return n=>n===e},W=function(e){return Reflect.ownKeys(e)},H=function(e,n){return(n?W:Object.keys)(e)},z=function(e,n,t){var r={};for(var i of n)Object.hasOwn(e,i)&&(r[i]=e[i],!0===t&&delete e[i]);return r},Y=function(e){return e instanceof Set},U=function(e){return Y(e)?e:o(e)?new Set(e):new Set([e])},V=U,Q=function(e,n){var t=[],r=[];return e.forEach((i,u)=>(n(i,u,e)?t:r).push(i)),[t,r]},$=function(e,n,t,r){var i=n;if(c(i))throw I();var u=H(e,r),o=V(i),[a,l]=Q(u,e=>o.has(e));return[z(e,a,t),!0===t?e:z(e,l,!1)]},J=function(e,n,t){var r=H(e,t).filter(t=>n(e[t],t,e));return $(e,r,!1,t)},X=function(e,n){return n<e?n:e},Z=function(e,n){return X(e,n)},ee=function*(e,n){null==e&&(e=0),n=null==n?this.length:Z(n,this.length);for(var t=e;t<n;t++)yield this[t]},ne=function(e,n,t){return null==n&&null==t?e[Symbol.iterator].call(e):ee.call(e,n,t)},te=function(e,n){return n<0?e.length+n:n},re=function(e,n,t,r){return n=null==n?0:te(e,n),t=null==t?e.length:te(e,t),r&&(0==r.inclusiveStart&&n++,r.inclusiveEnd&&t++),[n,t]},ie=function(e,n,t,r){[t,r]=re(e,t,r);for(var i=t;i<r;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,n){return n?ie(H(e,n),n=>[n,e[n]]):Object.entries(e)},oe=function(e){return ne(ue(this,e))},ae=function(e,n){var t=e[Symbol.iterator];return t?t.call(e):oe.call(e,n)},le=function(e){return ae(e,!0)},se=function(e,n){return null!=e&&e.constructor===n},ce=function(e){return se(e,Object)},fe=ce,pe=function(e,n,t,r){return E(e,n,{get:t},r)},ve=function(e,n,t,r){return E(e,n,{value:t,writable:!0},r),t},he=function(e,n,t){pe(e,n,function(){if(this===e)return null;var r=t.call(this);return ve(this,n,r),r})},de=class extends S{constructor(e,n){super(e??"Unexpected value",n)}},me=function(e){return require("node:"+e)},ge=function(e){return L(()=>me(e))},ye=ge("util"),be=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),ye().inspect(e,n)},we=te,Ee=function(e,n,t,r){return void 0!==n&&(null===n||0===n?n=void 0:(n=we(e,n),r&&0==r.inclusiveStart&&n++)),void 0!==t&&(null===t||t===e.length?t=void 0:(t=we(e,t),r&&r.inclusiveEnd&&t++)),[n,t]},xe=function(e,n,t,r,i,u){if(t||null!=r){[t,r]=Ee(e,t,r,u);var o=e.slice(t,r),a=n(o);return i?i(a,t,r,o,e):a}return n(e)},Te=function(e,n,t,r,i){return xe(e,n,t,r,(n,t,r)=>(void 0!==t?e.slice(0,t):"")+(n||"")+(void 0!==r?e.slice(r):""),i)},Oe=se,Se=function(e){return Oe(e,RegExp)},_e=function(e,n,t,r){var i=n;if([t,r]=re(e,t,r),c(i))for(var u=t;u<r;u++)e[u]=i(u,e);else e.fill(i,t,r);return e},Ae=function(e,n){var t=new Array(e||0);return arguments.length>1&&_e(t,n),t},Ne=function(e,n){return Ae(n.length,t=>e[n[t]])},je=function(e,n){return e[n]},Ie=function(e,n,t){return e[n]=t},Fe=function(e,n,t){var r=e;return c(r)?r.apply(t,n):r},ke=function(e,n,t,r,i){r||(r=je);var u=r(e,n);return void 0===u&&(u=Fe(t,[e,n]),i||(i=Ie),i(e,n,u)),u},Ce=function(e,n){return e.get(n)},Le=function(e,n,t){return e.set(n,t)},De=function(e,n,t){return ke(e,n,t,Ce,Le)},Me=class{constructor(){this.store=new Map}get(e,n){return De(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Pe=function(e,n){return e.push(n),e},Re=Pe,qe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Be=Symbol("Value"),Ge=function(){return{}},Ke=function(e){return[e.slice(0,-1),e[e.length-1]]},We=Ke,He=function(e,n,t,r,i,u){t||(t=je),null==r&&(r=Ge),null==i&&(i=Ie),null==u&&(u=t);for(var[o,a]=We(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=t(l,f);if(void 0===p){if(!r)return;p=ke(l,f,r,t,i)}l=p}if(u)return u(l,a,i)},ze=function(e,n,t,r,i,u){return He(e,n,r,i,u,(e,n)=>ke(e,n,t,r,u))},Ye=function(){return new Map},Ue=function(e,n,t){return ze(e,n,t,Ce,Ye,Le)},Ve=function(e,n){return delete e[n],e},Qe=function(e,n,t,r){return He(e,n,t,!1,!1,r||Ve)},$e=function(e,n){return e.delete(n)},Je=function(e,n){return Qe(e,n,Ce,$e)},Xe=class{constructor(){this.store=new Map}get(e,n){return e=Re(qe(e),Be),Ue(this.store,e,n)}remove(e){return e=Re(qe(e),Be),Je(this.store,e)}delete(e){return this.remove(e)}},Ze=G("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=a(n)).length){this.cache=new Me;var t=n[0];this._cacheKeyFormatter=e=>e[t]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Ne(e,n);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var n=r._cacheKeyFormatter(arguments);return r.cache.get(n,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),en=function(e,n){return new Ze(e,n)},nn=function(e){return new Set(e)},tn=function(e){var n={};if(e){var t=nn(e);t.has("g")&&(n.global=!0),t.has("i")&&(n.caseInsensitive=!0),t.has("y")&&(n.sticky=!0)}return n},rn=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},un=function(e,n){var t=tn(e);return rn(Object.assign(t,n))},on=function(e,n){var t=n,r=void 0;return u(t)?r=t:ce(t)&&(r=un(e.flags,t)),new RegExp(e,r)},an=function(e,n){return on(e,e.flags+n)},ln=function(e){return an(e,"g")},sn=en(function(e){return e.global?e:ln(e)},0),cn=function(e){var n=e;return null==n?void 0:u(n)?n:rn(n)},fn=function(e,n){return new RegExp(e,cn(n))},pn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},vn=function(e,n){return fn(pn(e),n)},hn=function(e,n,t,r,i,o){return Te(e,function(e){return e.replaceAll?(Se(n)&&(n=sn(n)),e.replaceAll(n,t)):(n=u(n)?vn(n,"g"):sn(n),this.replace(n,t))},r,i,o)},dn=function(e,n,t){return hn(e,n,(t??"\\")+n)},mn=function(e,n,t){return null==n&&(n='"'),!1!==t&&(e=dn(e,n,t)),n+e+n},gn=function(e){return mn(e,'"')},yn=function(e){return fe(e)?Tn(e):String(e)},bn=function(e,n){return n||(n=wn),"["+e.reduce(function(e,t){return e+n(t)+", "},"").slice(0,-2)+"]"},wn=function(e){return u(e)?gn(e):o(e)?bn(e):yn(e)},En=function(e,n,t){H(e,t).forEach((t,r,i)=>n(t,e[t],r,i))},xn=function(e,n,t,r){var i=null!=t?t:"";return En(e,function(){i=n.call(this,i,...arguments)},r),i},Tn=function(e,n){return n||(n=wn),"{"+xn(e,function(e,t,r){return e+t+":"+n(r)+", "},"",!0).slice(0,-2)+"}"},On=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":Tn(e,e=>_n(e,n-1))},Sn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":bn(e,e=>_n(e,n-1))},_n=function(e,n){return void 0===e?"undefined":null===e?"null":D()?be(e,n):ce(e)?On(e,maxNumLevels):o(e)?Sn(e,maxNumLevels):yn(e)},An=function(e,n,t,r){if(0===arguments.length)return new de("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+_n(e)+", expected one of "+_n(u):"Unexpected value received: "+_n(e),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=An),new de(i,r)},Nn=function(e,n,t){var r=new S(e,t);return n&&Object.assign(r,n),r},jn=function*(e,n){yield*e,yield*n},In=function(e){return e?" "+e:""},Fn=function(e){return u(e)?e:e.toString()},kn=G("Interface",function(e,n,t){t||(t={}),F(this,e),n?[this.stubs,this.defaults]=J(n,K(!0),!0):(this.stubs={},this.defaults={});var r=t.implements?a(t.implements):null,i=this;return function(e){var n=e;return r&&r.forEach(e=>e(n)),i.decorate(n),i.assert(n),n}},{decorate(e){var n,t,r=e;for(var[i,u]of(r.prototype?(n=r.prototype,t=!0):(n=r,t=!1),le(this.defaults)))if(void 0===n[i])if(fe(u))if(u.value)n[i]=u.value;else{if(!u.setup)throw An(u,null,"defaultVal");if(!t)throw u.setup(),I("setupFn is NYI for instances");he(n,i,u.setup)}else n[i]=u;return r},assert(e){var n=e,t=null!=n.prototype,r=n.prototype||n,i=jn(le(this.stubs),le(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=t?"Class"+In(n.name):"Object "+_n(n),o+=" does not satisfy interface "+this.name+' (missing key "'+Fn(u)+'")',Nn(o)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),Cn=function(e,n,t){return new kn(e,n,t)},Ln=Symbol("Cleanup"),Dn=Cn("Handle",{remove:!0,[Ln](){this.remove()}}),Mn=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Dn),Pn=function(e){return 1===e.length&&o(e[0])?e[0]:array},Rn=function(...e){return new Mn(Pn(e))},qn=Rn,Bn=qn,Gn=function(e){var n,t,r=e;return null!=r&&(n=r.detail??r.data??r,y(r)&&(t=r)),[n,t,r]},Kn=function(e){return kn.is(e)},Wn=Kn,Hn=O(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Yn=function(e,n,t,r){if(0===arguments.length)return new Hn("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=zn(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+_n(e)+")"),o||(i+=")"),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Yn),new Hn(i,r)},Un=function(e,n,t){if(!Wn(n))throw Yn(n,1);return n.decorate(e),t&&t.call(e,e,n),n.assert(e),e},Vn=Cn,Qn=Symbol("EventTarget"),$n=function(e){return require(e)},Jn=function(e){return!!e.startsWith("node:")||$n("node:module").isBuiltin(e)},Xn=function(e){return e.startsWith(".")},Zn=function(e){var n=e.stdio;if(n){if(!o(n)){if(!u(n))throw Yn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw An(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},et=function(e,n){var t=n.length;e.length=t;for(var r=0;r<t;r++)e[r]=n[r];return e},nt=function(e){return function(){return!e.apply(this,arguments)}},tt=function(e,n){return et(e,e.filter(nt(n)))},rt=function(e){return tt(e,e=>null==e)},it=ge("child_process"),ut=L(function(){return"win32"===process.platform}),ot=function(e,n,t){if(t||(t={}),n(e))throw e;if(t.nullOnErr)return null;var r=t.onErr;if(void 0!==r)return Fe(r);throw e},at=function(e,n,t){t||(t={}),t.dir&&(t.cwd=t.dir);var r=Zn(t);if(null==r[0]){var i=t.allowInput,u=t.input;if(i&&u)throw Nn("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");i&&(r[0]="inherit")}if(null==r[1]){var o=t.captureOutput??!1,a=t.showOutput;if(o&&a)throw Nn("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");o?r[1]="pipe":(null==a&&(a=!0),r[1]=a?"inherit":"ignore")}if(null==r[2]){var l=t.captureErr??!1,s=t.showErr;if(l&&s)throw Nn("captureErr and showErr cannot be used simultaneously for synchronous child processes.");l?r[2]="pipe":(null==s&&(s=!0),r[2]=s?"inherit":"ignore")}t.encoding||(t.encoding="utf8"),n&&rt(n);try{var c=it().execFileSync(e,n,t);null!=c&&!1!==t.trim&&(c=c.trim());var f=t.map??t.mapFn;return f&&(c=f(c)),c}catch(e){if(ut())return ot(e,e=>"ENOENT"===e.code,t);throw e}},lt=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,at("npm",e,n)},st=function(e,n,t){return lt(["install",e,n?"-g":null],t)},ct=ge("path"),ft=ct().sep,pt=function(e,n,t){var r=ct().resolve,i=n?r(n,e):r(e);return t?i+ft:i},vt=function(e){return require(pt(e))},ht=class{constructor(){this.store={}}get(e,n){return A(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},dt=new ht,mt=function(e){return e[e.length-1]},gt=te,yt=function(e,n,t){return e=on(e,{global:!0}),null!=t&&(n=gt(t,n)),e.lastIndex=n,e},bt=function(e,n,t){return e=null!=t?yt(e,t,n):sn(e),Array.from(n.matchAll(e))},wt=function(e,n,t){return null!=t&&(n=n.slice(0,t)),mt(bt(e,n))||null},Et=function(e,n){var t=wt(e,n);return t&&n.length===t.index+t[0].length?t:null},xt=function(e,n){if(u(n))return e.endsWith(n);if(Se(n))return!!Et(n,e);throw Yn(n,1,"matchThis")},Tt=function(e){return xt(e,ft)?e:e+ft},Ot=function(e,n,t){if(D()){var r=ct().join(e,n);return t?Tt(r):r}throw I()},St=function(e,n){return e.endsWith(n)?e:Ot(e,n)},_t=ge("module"),At=function(e){return e=St(e,"node_modules"),_t().createRequire(e)},Nt=function(e,n){return dt.get(e,()=>At(e))(n)},jt=function(e,n,t){return Object.keys(n).forEach(r=>A(e,r,n[r],t)),e},It=function(e,n,t){return n?jt(e,n,t):e},Ft=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},kt=function(e,n){var t=Et(n,e);return t?e.slice(0,t.index):e},Ct=function(e,n){if(u(n))return Ft(e,n);if(Se(n))return kt(e,n);throw Yn(n,1)},Lt=Ct,Dt=function(e,n){return[e.slice(0,n),e.slice(n)]},Mt=function(e){e=Lt(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Dt(e,n+1)},Pt=function(e,n){return e.startsWith(n)?e:n+e},Rt=function(e){var[n,t]=Mt(e);return n+Pt(t.trim(),"return ")},qt=function(e){return ai("node-repl-await").processTopLevelAwait(e)},Bt=function(e){return qt(e)??e},Gt=hn,Kt=function(e,n){return""===e?e:(!1!==n&&(e=Tt(e)),Gt(e,"\\","/"))},Wt=L(function(){return process.argv.slice(2)}),Ht=Wt,zt=function(e,n){const t=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(r+=a,u=!1):(n&&(r+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(r.length>0&&(t.push(r),r=""),u=!1):(r+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(r+=a,u=!1):u=!0:(n&&(r+=a),i="outside")}}return r.length>0&&t.push(r),t},Yt=function(e,n){var t=e;return null==t?Ht():u(t)?zt(t,n):t},Ut=function(e,n){return Yt(e,n).slice()},Vt=Ut,Qt=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Vt(process.argv)[1])},$t=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Jt=function(e){return e.split(".")[0]},Xt=function(e){return ct().win32.basename(e)},Zt=function(e){return Jt(Xt(e))},er=function(e,n,t,r){e||(e=Qt()??"_console.js");var i=$t(Zt(e));return n&&(i+="_repl"),i+(t&&r?.dynamic?".dypkg.json":".pkg.js")},nr=function(e,n){return e=ct().dirname(e),!1===n?e:Tt(e)},tr=function(e,n,t,r){var i,u=er(e,n,t,r);return i=e?nr(e):"./",pt(i+u)},rr=function(e){return'require("'+Kt(tr(),!1)+'");\n'+e},ir=function(e,n){return hn(e,n,"")},ur=function(e,n){return n.forEach(n=>e=ir(e,n)),e},or=function(e){return ur(e,["\r","\n"])},ar=function(e,n){return ai("astring").generate(e,n)},lr=function(e,n){return e.stack=n+"\n"+e.stack,e},sr=function(e,n,t){t||(t={}),t.ecmaVersion||(t.ecmaVersion=2024),!1!==n&&(t.sourceType="module"),null==t.allowAwaitOutsideFunction&&(t.allowAwaitOutsideFunction=!0),null==t.allowReturnOutsideFunction&&(t.allowReturnOutsideFunction=!0);var r=ai("acorn");try{return r.parse(e,t)}catch(n){throw lr(n,"Acorn parsing error: "+e)}},cr=function(e,n,t){return ar(sr(e,n,t))},fr=function(e){return or(cr(e))},pr=function(e,n,t){return(n||t)&&(n||(n={}),t&&It(n,t),n.ensureReturn&&(e=Rt(e)),n.topLevelAwait&&(e=Bt(e)),n.useTitan&&(e=rr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=fr(e))),e},vr=function(e){return u(e)?e:yn(e)},hr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},dr=function(e,n,t,r,i){return xe(e,n,t,r,(n,t)=>null===n?null:(n.input=e,void 0!==t&&(n.index+=t),n),i)},mr=function(e,n){return e.splice(e.length,0,...n),n},gr=function(e,n){return mr(e,n),e},yr=gr,br=class extends Array{constructor(e,n,t,r,i){if(-1===n)throw Nn("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw Nn("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&yr(this,r),this.index=n,this.input=t,i&&(this.groups=i)}fromParts(e){var n=e;return new br(n.match,n.index,n.input,n.captures,n.groups)}},wr=function(e,n,t,r,i){return new br(e,n,t,r,i)},Er=function(e,n,t,r,i){return-1===n||null==e?null:wr(e,n,t,r,i)},xr=ir,Tr=function(e,n){return on(e,xr(e.flags,n))},Or=function(e){return Tr(e,"g")},Sr=en(function(e){return e.global?Or(e):e},0),_r=function(e,n,t){return(e=null!=t?yt(e,t,n):Sr(e)).exec(n)},Ar=function(e,n,t,r,i){return dr(e,e=>{if(u(n)){var t=e.indexOf(n);return Er(n,t,e)}return _r(n,e)},t,r,i)},Nr=function(e){return e.index+e[0].length},jr=function(e,n){var t=Ar(e,n);return null===t[0]?null:e.slice(Nr(t))},Ir=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Fr=function(e,n){var t=_r(e,n);return t&&0===t.index?t:null},kr=function(e,n){var t=Fr(n,e);return t?e.slice(t[0].length):e},Cr=function(e,n){if(u(n))return Ir(e,n);if(Se(n))return kr(e,n);throw Yn(n,1)},Lr=Cr,Dr=function(e){var n=jr(e,"=>").trim();return Lr(Lt(n,"}"),"{")},Mr=function(e){return jr(e,"{").slice(0,-1)},Pr=function(e){var n=vr(e);return hr(n)?Dr(n):Mr(n)},Rr=function(e){return null==e?"":u(e)?e:c(e)?Pr(e):String(e)},qr=function(e,n){var t=n?.basic?null:{topLevelAwait:!0,useTitan:!0},r=pr(Rr(e),n,t);return at("node",[n?.mode??"-p",r],n)},Br=function(e,n,t,r){var i="Required argument";return t&&(i+=' "'+t+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+_n(e)+")"),Nn(i,null,j(r,Br))},Gr=function(e,n,t){if(null==e)throw Br(e,n,t,{fromFn:Gr});return e},Kr=function(e,n){return process.kill(e,Gr(n,0,"signalName"))},Wr=function(e){return Kr(e,"SIGINT")},Hr=function(){return Wr(process.pid)},zr=Hr,Yr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw An(e,0,"char")},Ur=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=qr(function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var t=e.toUpperCase();"Y"===t||"N"===t?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),zr(),Nn("Prompt was cancelled via interrupt.");return console.log(n),Yr(n)},Vr=function(e){return o(e)?e:u(e)?e.split("."):[e]},Qr=function(e,n,t,r,i,u){var o=t;return He(e,n,r,i,u,(e,n,t)=>t(e,n,Fe(o)))},$r=function(e,n){var t=n,r=globalThis.config;r||(r=globalThis.config={});var i,u=Vr(e);return u.length>1?i=Qr(r,u,t):(i=Fe(t),r[u[0]]=i),i},Jr=function(e,n){return $r("node.require.customDirs",t=>(t||(t=[]),!1!==n&&(e=St(e,"node_modules")),t.includes(e)||t.push(e),t)),e},Xr=Jr,Zr=He,ei=function(e){var n=globalThis.config;if(n){var t=Vr(e);return t.length>1?Zr(n,t):n[t[0]]}},ni=function(e,n,t){if(null!=e)return e;var r=ei(n);return null!=r?r:t},ti=ge("fs"),ri=function(e){return!!ti().lstatSync(e,{throwIfNoEntry:!1})},ii=function(e){var n=nr(e,!1);return ri(n)||(n!==e&&ii(n),ti().mkdirSync(n)),e},ui=function(e){return ii(e),ti().mkdirSync(e),e},oi=function(e){return ri(e)?e:ui(e)},ai=function(e,n){if(Jn(e))return require(e);if(Xn(e))return vt(e);try{return require(e)}catch(e){}var t=__dirname,r=process.mainModule?.path;if(r!==t)try{return Nt(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==t)try{return Nt(i,e)}catch(e){}var u=ei("node.require.customDirs");if(u)for(var o of u)try{return Nt(o,e)}catch(e){}var a=ni(n?.autoInstall,"node.require.autoInstall"),l=ni(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=pt(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=Ur('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=oi(s),st(e,!1,{cwd:s});try{return Xr(s),Nt(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw Nn('Module not found: "'+e+'"',{checked:{moduleDir:t,scriptDir:r,cwd:i}})},li=L(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=ai("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),si=li().EventTarget,ci=function(e){var n=Qn,t=e[n];return void 0===t&&(t=new si,T(e,n,t)),t},fi=Vn("EventInterface",{addEventListener(e,n,t){ci(this).addEventListener(e,n,t)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){ci(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return ci(this).dispatchEvent(e)}}),pi=fi,vi=function(e){return Un(e,pi)},hi=function(e){return!(!e.addEventListener&&!e.on)},di=function(e){return hi(e)||vi(e),e},mi=function(e,n,t){return e[n]=t,e},gi=function(e,n,t){return mi(e||{},n,t)},yi=function(e,n,t,r){return ji(e,n,t,gi(r,"once",!0))},bi=function(e,n){return function(){var t=n.apply(this,arguments);return e.apply(this,arguments),t}},wi=bi,Ei=function(e,n,t){return e[n]=wi(e[n],t)},xi=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,t){t&&di(e);var r=yi(target,n,()=>this.remove());return Ei(this,"remove",()=>r.remove()),this}},Dn),Ti=class extends xi{constructor(e,n){super(e),this.handleEvent=n}},Oi=function(e,n){return new Ti(e,n)},Si=function(e,n,t){(e.removeEventListener||e.off).call(e,n,t)},_i=function(e,n,t){for(var r=e.length-1;r>=n;r--)e[r+1]=e[r];return e[n]=t,e.length++,e},Ai=function(e,n){return _i(e,0,n)},Ni=Ai,ji=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ni(arguments,n),arguments[1]=t,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(vi(e),u=e.addEventListener)),u.call(e,n,t,r),Oi(()=>Si(e,n,t),t)},Ii=class extends xi{constructor(e){super(()=>clearInterval(e))}stop(){this.remove()}},Fi=function(e,n){return new Ii(setInterval(n,e))},ki=function(){},Ci=function(){return Fi(1e9,ki)},Li=function(){return Bn([Ci(),ji(process,"uncaughtException",console.error),ji(process,"unhandledRejection",console.error)])},Di=function(e){var n=pt(e);return delete require.cache[n],vt(n)},Mi=L(function(){var e=process.env.TITAN_PATH;if(!e)throw Nn("Environment variable TITAN_PATH is not set.");return Tt(e)}),Pi=L(function(){return Mi()+"Compiled/"}),Ri=function(e){return ti().readFileSync(e,"utf8")},qi=function(){return new Date},Bi=function(e){return new Date(e.getTime())},Gi=function(e){return new Date(e,null)},Ki=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Wi=function(e){return isNaN(e)?null:e},Hi=function(e){return null==e?null:Wi(Number(e))},zi=Hi,Yi=function(e){var n=typeof e;return"number"===n||"bigint"===n},Ui=function(e,n){if(null==e)throw Br(e,0);if(e.constructor===Date)return n?Bi(e):e;if(u(e)){var t=zi(e);return null!=t?Gi(t):Ki(e)||null}return Yi(e)?Gi(e):void 0},Vi=function(e,n){return null==e?qi():Ui(e,n)},Qi=function(e){return Vi(e,!0)},$i=Qi,Ji=function(){var e=Pi()+"LastCompileTime.txt";return ri(e)?$i(Ri(e)):null},Xi=function(e,n){return ti().statSync(e,n)},Zi=function(e,n){return ti().lstatSync(e,n)},eu=function(e,n,t){return(n?Xi:Zi)(e,t)},nu=function(e){return eu(e).mtime},tu=function(e,n,t){return e=Ui(e),n=Ui(n),!1===t?e<n:e<=n},ru=function(e){var n=Ji();if(n){var t=nu(e);if(tu(t,n))return!0}return!1},iu=/(['"])(.*?)\1/,uu=ln(iu),ou=function(e){return e.replace(uu,"")},au=ou,lu=function(e){return globalThis.structuredClone(e)},su=lu,cu=en,fu=/\r?\n/,pu=function(e){return null==e||void 0!==e.length&&0===e.length},vu=function(e,n){return tt(e,pu)},hu=function(e,n){return e.splice(n,1),e},du=function(e,n,t){for(var r={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;t?(r[a]||(r[a]=[]),r[a].push(l)):r[a]=l}}return r},mu=function(e,n,t,r){return[n,t]=re(e,n,t,r),e.slice(n,t)},gu=function(e,n){return Ae(n,e).join("")},yu=function(e){return e?e[0]:null},bu=function(e,n){var t=null==n?-1:n.index;if(-1===t)return[e];var r=Dt(e,t);return r[1]=r[1].slice(n[0].length),r},wu=function(e,n,t,r,i){return bu(e,Ar(e,n,t,r,i))},Eu=Hi,xu=function(e){return Eu(e)??e},Tu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=wu(e,n);null!=i&&(i=xu(i.trim())),t[r.trim()]=i}),t},Ou=N,Su=class extends Array{constructor(e){var n,t=e;null!=t&&(o(t)?n=t:u(t)&&(n=t.split(fu))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return vu(this)}removeComments(e){for(var n=0;n<this.length;n++){var t=this[n],r=t.indexOf(e);-1!==r&&(""===(t=t.slice(0,r)).trim()?(hu(this,n),n--):this[n]=t)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return Tu(this,e)}mapToObj(e,n){return du(this,e,n)}between(e,n,t){return t=Ou(t,"inclusiveEnd",!0),mu(this,e,n,t)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===mt(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=yu(_r(/^\s*/,e));if(n){var t=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(t)})}}return this}deindent(e,n,t){throw I()}indent(e,n){var t=gu(n??"\t",e??1);return this.apply(e=>t+e)}static is(e){return se(e,this)}static fromChunks(e){return e.map(e=>Lt(e,fu)).flatMap(e=>Au(e,!1))}},_u=function(e,n){var t=new Su(e);return n&&t.condense(),t},Au=function(e,n,t){var r=e.split(fu);return n?_u(r,t):r},Nu=Ri,ju=function(e,n){return Au(Nu(e),!0,n)},Iu=function(e,n){return Sr(e).test(n)},Fu=function(e,n){return Se(n)?Iu(n,e):e.includes(n)},ku=function(e,n,t,r){null==e&&(e=""),null==n&&(n="");var i={},u=(t,r)=>i[e+t+n]=r;return r&&En(r,u),t&&En(t,u),i},Cu=function(e,n){return En(n,(n,t)=>e=hn(e,n,t)),e},Lu=function(e,n,t,r){var i,a,l=r?.paramIdentifier??"$";if(l)if(u(l)){if(!Fu(e,l))return e;i=l}else{if(!o(l))throw Yn(l,1,"paramIdentifier");if([i,a]=l,!Fu(e,i)&&!Fu(e,a))return e}var s=ku(i,a,n,t);return Cu(e,s)},Du=function(e){return u(e)?e:String(e)},Mu=globalThis.process?.env.windir,Pu=ge("os"),Ru=function(){return Pu().tmpdir()+ft},qu=function(e){if(e)throw I();return Pu().homedir()+ft},Bu=function(e){return qu(e)+"Desktop/"},Gu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Mu,SYSTEM32:Mu&&Mu+"System32",TEMP:Ru(),DESKTOP:Bu()},Ku=function(e,n){return Lu(Du(e),n,Gu)},Wu=function(){return Mi()+"Source/SourceMap.txt"},Hu=function(e){return e?Ku(e,{TITAN:Mi()}):Wu()},zu=function(e,n,t,r,i){return xe(e,n,t,r,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},Yu=function(e,n){return Array.prototype.findIndex.call(e,n)},Uu=function(e,n,t,r,i){var o=u(n);return o&&null==r&&!i?e.indexOf(n,t):zu(e,e=>o?e.indexOf(n):Se(n)?e.search(n):Yu(e,n),t,r,i)},Vu=function(e,n,t,r,i){var u=Uu(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Qu=function(e){var n=e[0];return n===n.toUpperCase()},$u=cu(function(e){var n=ju(Hu(e),!0),t={};return n.forEach(e=>{var n=Vu(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Qu(e)),u=r[0];if(!u)throw Nn('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),Ju=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),Xu=/\bt\.(\w+)\.(\w+)/g,Zu=function(e,n){n||(n={});var t={},r=t.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?su(n.additionalGlobals):{},t.globals=i;var u=$u(),o=Ju(u),a=bt(o,e).filter(n=>{var t=n[1],r=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[t];return!u||void 0===u[r]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,t])=>{var r=u[n];if(!r)throw Nn("No short name found for global: "+n);return"t."+r+"."+t+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(Xu))r[p]||(r[p]={}),r[p][c]=!0;return t},eo=function(e,n){return e=cr(e),e=au(e),Zu(e,n)},no=function(e,n){return n in e},to=no,ro=function(e,n){for(var t of(Gr(n,1),Object.keys(e))){if(!to(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!ro(r,n[t]))return!1}return!0},io=function(e,n){return!ro(n.t,e)||!(!n.globals||e._globals&&ro(n.globals,e._globals))},uo=function(e){return xt(e,ft)},oo=function(e){var n=e.lastIndexOf(ft);return-1===n?null:e.slice(0,n+1)},ao=function(e,n,t){if(uo(e))return t?[e,null]:e;var r,i,u=oo(e),o=n(Xt(e),u,e);return t?[r,i]=o:r=o,null!=r&&(e=u?u+r:r),t?[e,i]:e},lo=function(e,n,t,r,i){return dr(e,e=>{if(Se(n))return wt(n,e);if(u(n)){var t=e.lastIndexOf(n);return-1!==t?new br(n,t):null}throw Yn(n,1)},t,r,i)},so=function(e,n,t,r,i){return bu(e,lo(e,n,t,r,i))},co=function(e){return ao(e,e=>so(e,"."),!0)},fo=function(e,n){var t=co(e)[1];return t?!1!==n?t.toLowerCase():t:null},po=function(e,n){return Zu(e,n)},vo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return eo(e,n);if("html"===t)return po(e,n)}return Zu(e,n)},ho={},mo=cu(function(e){e=Hu(e);var n=nr(e)+"../Compiled/",t=ju(e,"//"),r=ho;for(var i of t){var u=i.indexOf("="),o=i.slice(0,u).trim();o=o.split(",").map(e=>e.trim()).filter(e=>!Qu(e));var a=i.slice(u+1).trim(),l=Ot(n,a).replaceAll("\\","/");for(var s of o)r[s]=l}return r},0),go=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},yo=function(e){return e.slice()},bo=function(e,n){return _i(e,e.length,n)},wo=bo,Eo=function(e,n){return e.call(this,...n,function n(){return mt(arguments)!==n&&wo(arguments,n),e.apply(this,arguments)})},xo=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var t=e.recurseIf;if(!t){var r=this.constructor;t=e=>se(e,r)||fe(e)||o(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return Eo(function*(e,r,o,a){var l=n(e,r,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],v=yo(r);v.push(f);var h=null,d={value:p,key:f,object:e,path:v,level:o,isLeaf:h,root:u},m=t(p,d);d.isLeaf=h=!m,i&&!h||(yield d),m&&(yield*a(p,v,o+1,a))}},[this,[],0])},To=function(e,n){return xo.call(e,n)},Oo=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},So=function(e,n,t,r){var i=sr(e,n,r);ai("acorn-walk").full(i,t)},_o=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=Oo(t);i=e=>a[e.type]}else i=t;var l=[];return So(e,n,function(e){i.apply(this,arguments)&&l.push(e)},r),l},Ao=ar,No=function(e){var n,t,r,i=e,o=u(i)?sr(i).body[0]:i,a=o.type;if("VariableDeclaration"===a){n="variable";var l=o.declarations[0];t=l.id.name,r=l.init?l.init.raw??ar(l.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),t=o.id.name;var s={type:n,name:t};return r&&(s.value=r),s.text=Ao(o),s.node=o,s},jo=function(e){return _o(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=No(n);return t.node=e,t}return{node:e}})},Io=function(e,n){n||(n={});var t=n.enableGlobals,r=mo(n.sourceMap),i={},u=[];return function e(n,o){var a=go(To(n),e=>e.isLeaf);for(var l of a){var[s,c]=l.path,f=i[s];if(f||(f=i[s]={}),null==f[c]){var p=r[s];if(p){var v=Kt(p)+c+".js";if(!ri(v)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),Nn(h+=".")}var d=Ri(v),m=jo(d)[0];f[c]=m;var g="t."+s+"."+c;e(vo(d,{fileType:"js",enableGlobals:t}).t,g),u.push([s,c])}else console.log('Skipping unmapped module "'+s+'"'),f[c]=!1}}}(e.t),{t:i,globals:e.globals,order:u}},Fo=function(e){return _u(e).normalize().join()},ko=Fo,Co=function(e,n){var t=e,r=c(t)?Pr(t):t;return!1!==n&&(r=Fo(r)),r},Lo=function(e,n,t){H(e,t).forEach(n)},Do=function(e,n,t){return jt(e||{},n,t)},Mo=function(e,n,t){return n?Do(e,n,t):e??{}},Po=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Ro=function(e,n){En(n,(n,t)=>Po(e,n,t))},qo=Ro,Bo=function(e,n,t){return null==(n=Mo(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),qo(n,{isModule:e=>n.compress.module=e,originalQuotes:e=>n.format.quote_style=e?3:null,mangleEval:e=>n.mangle.eval=e,mangleExcept:e=>n.mangle.reserved=a(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=cr(e),ai("terser").minify_sync(e,n).code},Go=function(e,n){n||(n={});var t=n.minify??!1,r=n.debug??!1,i=n.deps??vo(e,n),{t:u,globals:o,order:a}=Io(i,n),l="//Flat references:\n";for(var[s,c]of a){var f=u[s][c],p="t_"+s+"_"+c,v="variable"===f.type?f.value:"("+f.text+")";v=v.replaceAll(Xu,(e,n,t)=>"t_"+n+"_"+t),l+="var "+p+" = "+v+"\n"}for(var[s,h]of(r&&(l+="//Debug functions:\n",l+=ko('\n function _isFn(value) {\n return typeof value === "function";\n }\n function _withName(value, name) {\n if(_isFn(value)) { Object.defineProperty(value, "name", {value:name}); }\n return value;\n }\n\n ')),l+="//New tree items:\n",l+="var newItems = {",ae(u))){for(var c of(l+="\n\t"+s+": {",Object.keys(h))){var d="t_"+s+"_"+c;r&&(d="_withName("+d+", 't."+s+"."+c+"')"),l+="\n\t\t"+c+": "+d+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=Fo("\n if(globalThis.t) {\n //If t already exists, integrate new items.\n Object.keys(newItems).forEach(function(modName) {\n if(t[modName]) {\n var newModule = newItems[modName];\n Object.keys(newModule).forEach(function(item) {\n t[modName][item] = newModule[item];\n });\n } else {\n t[modName] = newItems[modName];\n }\n });\n } else {\n globalThis.t = Object.assign({}, newItems);\n }\n "),n.enableGlobals&&o){l+="\n//Add weak global aliases:\n",l+=Co("\n if(!t._globals) { t._globals = {}; }\n function _ensureGlobal(name) {\n if(!globalThis[name]) { globalThis[name] = {}; }\n if(!t._globals[name]) { t._globals[name] = {}; }\n }\n function _weakGlobalize(globalName, shortName, itemName) {\n var globalObj = globalThis[globalName];\n if(!globalObj[itemName]) { globalObj[itemName] = t[shortName][itemName]; }\n t._globals[globalName][itemName] = true;\n }\n ");var m=$u();En(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',Lo(n,n=>{var t=m[e];l+='\n_weakGlobalize("'+e+'", "'+t+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",t){var g=ce(t)?t:null;l=Bo(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},Ko=function(e){return e instanceof Buffer},Wo=function(e){return ArrayBuffer.isView(e)},Ho=Wo,zo=function(e){return Ko(e)||Ho(e)||u(e)},Yo=function(e){return e.constructor===ArrayBuffer},Uo=function(e){return zo(e)?e:Yo(e)?Buffer.from(e):yn(e)},Vo=function(e){return Yi(e)?String(e):Uo(e)},Qo=function(e,n){return ii(e),ti().writeFileSync(e,Vo(n)),e},$o=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=fo(n));var r=Go(e,t),i=t.packagePath||tr(n,t.repl);return Qo(i,r),i},Jo={titan:{harness:function(e,n){n||(n=e,e=null);var r=e??{};null==r.minify&&(r.minify=!1),r.keepAlive&&Li();var i,u,o=r.packagePath||tr();if(o=pt(o),ri(o)){if(ru(o)&&(i="New compile"),!i){u=r.text??Pr(n);var a=eo(u,r);require(o),io(t,a)&&(i="New deps")}}else i="No package";return i&&(r.onPack&&r.onPack(i),null==u&&(u=r.text??Pr(n)),r.packagePath=o,$o(u,Qt(),r),Di(o)),n()},getPackagePath:tr,getPackageName:er,hasNewCompile:ru,getLastCompileTime:Ji,getCompiledDir:Pi,locate:Mi,getDepsFromJS:eo,_getDepsBasic:Zu,loadGlobalsMap:$u,_resolveSourceMapPath:Hu,locateSourceMap:Wu,_getGlobalsRegex:Ju,depsRegex:Xu,hasNewDeps:io,packTextToFile:$o,packText:Go,getDeps:vo,getDepsFromHTML:po,_getAllDeps:Io,loadSourceMap:mo,sourceMap:ho},node:{keepAlive:Li,is:D,display:be,util:ye,_builtInModule:ge,requireBuiltIn:me,require:ai,_basicRequire:$n,child_process:it,requireLocal:vt,path:ct,_requireFromDir:Nt,_requireDirCache:dt,_createRequire:At,module:_t,promptYNSync:Ur,run:qr,getScriptPath:Qt,positionalArgs:Vt,args:Wt,sigint:zr,interrupt:Hr,ensureRequireDir:Xr,addRequireDir:Jr,fs:ti,reloadRequireLocal:Di,os:Pu},ev:{multiHandle:Bn,on:ji,resolveValue:Gn,enable:vi,EventInterface:pi,Interface:fi,_ensureHasTarget:ci,targetSym:Qn,EventTarget:si,polyfill:li,handle:Oi,ListenerHandle:Ti,ensureEnabled:di,can:hi,once:yi,off:Si},o:{multiHandle:qn,isAny:y,setHidden:T,addNonEnumerable:x,defineProperty:E,weakAssign:w,merge:b,safeEnsure:N,ensure:A,hideKey:B,makeNonEnumerable:q,filterSplit:J,keys:H,allKeys:W,split:$,pick:z,iterateAll:le,iterate:ae,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:he,setGetter:pe,forceSet:ve,display:On,toLiteral:Tn,constructorMatches:Oe,ensureCustom:ke,get:je,set:Ie,createEmpty:Ge,remove:Ve,reduce:xn,each:En,addInterface:Un,Cache:ht,setDefaults:It,ensureMulti:jt,resolveKeys:Vr,diveGet:Zr,safeSet:gi,touch:mi,deepCopy:su,fromLines:Tu,safeDefault:Ou,hasKey:to,has:no,fromKeys:Oo,eachKey:Lo,safeSetDefaults:Mo,safeEnsureMulti:Do,consumeOptions:qo,consumeMulti:Ro,consume:Po},handle:{createMulti:Rn,MultiHandle:Mn,HandleInterface:Dn,Handle:xi},class:{addInterface:e,create:R,setName:k,addStatics:C,setDisplay:P,isInterface:Wn,interface:Vn},ifc:{create:Cn,Interface:kn,is:Kn},f:{createClass:G,ensureConstructor:d,createConstructor:h,isArrowFn:p,isArrow:f,is:c,wrap:v,retThis:m,setName:F,one:L,eq:K,memoize:en,MemoizedFunction:Ze,not:nt,body:Pr,isArrowString:hr,_getArrowFnBody:Dr,_getNormalFnBody:Mr,hookAfterMethod:Ei,hookAfter:wi,injectAfter:bi,interval:Fi,TimerHandle:Ii,noop:ki,cache:cu,recurse:Eo},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:gn,quote:mn,escape:dn,replaceAll:hn,apply:Te,withIndices:xe,chars:nn,from:yn,spaceBefore:In,fromKey:Fn,endsWith:xt,resolveIndex:gt,removeTrailing:Lt,removeFromEnd:Ct,_removeStringFromEnd:Ft,_removeRegexFromEnd:kt,splitAtIndex:Dt,ensureStartsWith:Pt,replace:Gt,decapitalize:$t,removeLineBreaks:or,removeMulti:ur,removeAll:ir,resolve:Rr,ensure:vr,after:jr,match:Ar,_matchWithIndices:dr,remove:xr,removeLeading:Lr,removeFromStart:Cr,_removeStringFromStart:Ir,_removeRegexFromStart:kr,removeQuotes:ou,splitLines:Au,lines:_u,LinesArray:Su,repeat:gu,splitFirst:wu,_splitByMatch:bu,replaceParams:Lu,contains:Fu,_createParamsObj:ku,_replaceByObj:Cu,before:Vu,index:Uu,_indexWithIndices:zu,indexOfFn:Yu,isCapitalized:Qu,splitLast:so,matchLast:lo,normalize:ko,normalizeMLS:Fo,mls:Co},a:{is:o,ensure:a,filterSplit:Q,iterate:ne,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:te,wrapIndices:Ee,wrapIndex:we,pick:Ne,create:Ae,fill:_e,push:Re,add:Pe,splitLast:We,splitTail:Ke,toLiteral:bn,display:Sn,unboxArgs:Pn,removeNullish:rt,removeByFilter:tt,replaceContents:et,last:mt,pushMulti:yr,addMulti:gr,pushThroughMulti:mr,removeEmpty:vu,removeIndex:hu,mapToObj:du,slice:mu,copy:yo},p:{asyncJoint:s,is:l},v:{isPrimitive:g,constructorMatches:se,display:_n,toLiteral:wn,resolve:Fe,type:zn,req:Gr,nullIfNaN:Wi,isEmpty:pu},err:{nyi:I,NYIError:_,Error:S,Enhanced:O,defaultFromFn:j,value:An,ValueError:de,create:Nn,type:Yn,TypeError:Hn,prepend:lr,req:Br},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:V,ensure:U,is:Y},n:{cap:Z,least:X,fromString:zi,ensure:Hi,is:Yi,tryCoerce:xu,tryParse:Eu},re:{is:Se,ensureGlobal:sn,global:ln,addFlag:an,copy:on,updateFlagString:un,parseFlagString:tn,createFlagString:rn,createEscaped:vn,create:fn,resolveFlags:cn,escape:pn,matchEnd:Et,matchLast:wt,matchAll:bt,setStartIndex:yt,safeCreateResult:Er,createResult:wr,RegexResult:br,match:_r,ensureLocal:Sr,local:Or,removeFlag:Tr,resultEndIndex:Nr,matchStart:Fr,quotes:uu,quote:iu,newline:fu,text:yu,test:Iu},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ue,createEmpty:Ye,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ni,prepend:Ai,insert:_i,push:wo,append:bo},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Qr,copy:lu,isSubsetOf:ro,iterate:To,iterator:xo},gen:{join:jn,filter:go},npm:{isBuiltIn:Jn,isFile:Xn,install:st,_runCommand:lt},os:{run:at,_resolveStdio:Zn},win:{is:ut},shell:{_handleError:ot},path:{abs:pt,sep:ft,ensureEndsWith:St,join:Ot,ensureTrailingSlash:Tt,fws:Kt,baseName:Zt,_removeExtsFromFile:Jt,file:Xt,dir:nr,resolveVars:Ku,string:Du,_defaultParams:Gu,windir:Mu,_getDefaultTempDir:Ru,getDesktop:Bu,getUserDir:qu,ext:fo,splitExt:co,ignoreDir:ao,isDir:uo,dirPart:oo},js:{enhance:pr,ensureReturn:Rt,splitLastExpression:Mt,enableAwait:Bt,_nodeEnableAwait:qt,useTitan:rr,inline:fr,removeComments:cr,fromAST:ar,parse:sr,removeQuotes:au,getExports:jo,getNodes:_o,eachNode:So,parseDeclaration:No,fromASTNode:Ao,minify:Bo},cli:{positionalArgs:Ut,resolveArgs:Yt,splitArgs:zt},env:{args:Ht,setConfig:$r,getConfig:ei,resolveConfig:ni,keepAlive:Ci},proc:{interrupt:Wr,signal:Kr},bool:{fromYN:Yr},fs:{ensureDir:oi,exists:ri,mkdir:ui,ensureParent:ii,load:Ri,getModifiedDate:nu,stat:eu,deepStat:Xi,shallowStat:Zi,loadLines:ju,loadText:Nu,write:Qo,formatRaw:Vo},d:{from:$i,create:Qi,resolve:Vi,now:qi,ensure:Ui,copy:Bi,fromYear:Gi,_resolveNative:Ki,isBefore:tu},bin:{ensureByteSafe:Uo,isByteSafe:zo,isNodeBuffer:Ko,isTA:Ho},ab:{isTA:Wo,is:Yo}};globalThis.t?Object.keys(Jo).forEach(function(e){if(t[e]){var n=Jo[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Jo[e]}):globalThis.t=Object.assign({},Jo),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},a=function(e){return o(e)?e:[e]},l=function(e){return e instanceof Promise},s=function(e,n){var t=e;return l(t)?t.then(n):n(t)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},p=f,v=function(e){return function(){return e.apply(this,arguments)}},h=function(e,n){var t;return t=n?function(){this.super=n;var t=e.apply(this,arguments);return s(t,()=>(delete this.super,t))}:p(e)?v(e):e,t._isConstructor=!0,t},d=function(e,n){return e._isConstructor?e:h(e,n)},m=function(){return this},g=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},y=function(e){return!g(e)},b=function(e,n,t){return!1===t?Object.keys(n).forEach(t=>{void 0===e[t]&&(e[t]=n[t])}):Object.assign(e,n),e},w=function(e,n){return b(e,n,!1)},E=function(e,n,t,r){return t||(t={}),r&&w(t,r),null==t.enumerable&&(t.enumerable=!0),null==t.configurable&&(t.configurable=!0),Object.defineProperty(e,n,t)},x=function(e,n,t,r){return E(e,n,{value:t,writable:!0,enumerable:!1},r),t},T=x,S=function(e){return class extends e{constructor(e,n){super(e,n);var t=this.constructor.name;t&&(this.name=t)}}},O=S(globalThis.Error),_=class extends O{constructor(e,n){super(e??"Not yet implemented",n)}},N=function(e,n,t,r){var i=e[n];if(void 0===i){var u=t;!1!==r&&c(u)&&(u=u(e,n)),e[n]=i=u}return i},A=function(e,n,t,r){return e||(e={}),N(e,n,t,r),e},j=function(e,n){return A(e,"fromFn",n,!1)},I=function(e,n){return new _(e,j(n,I))},F=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),T(e,"displayName",n)},k=F,C=function(e,n){return Object.assign(e,n)},L=function(e){var n,t=!1;return function(){return t||(t=!0,n=e.apply(this,arguments)),n}},D=L(function(){return"undefined"==typeof window}),M=D()?require("util").inspect.custom:Symbol("Display"),P=function(e,n){e.prototype[M]=n},R=function(e,n,t,r,i,l){l||(l={}),u(n)&&(n=null);var c,f,p,v=t;v&&(o(v)?([f,p]=v,f&&(f=d(f))):c=d(v,n));var h=l.bareFn;l.singleton&&(h=function(){return null==w.default&&(w.default=new w(...arguments)),w.default});var g,b=f||c||n||m;function w(){if(!new.target&&h&&!(this instanceof w))return h.apply(this,arguments);var e=this;return s(b.apply(e,arguments),t=>{if(t&&y(t)&&(e=t,f)){if(!new.target)throw I('Prototype repair is NYI for class instantiation without "new".');if(!n)throw I("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return p?s(p.apply(e,arguments),()=>e):e})}return e&&k(w,e),n&&Object.setPrototypeOf(w,n),r?(g=r,n&&Object.setPrototypeOf(r,n.prototype)):g=n?Object.create(n.prototype):{},T(g,"constructor",w),w.prototype=g,i&&C(w,i),l.display&&P(w,l.display),l.implements&&a(l.implements).forEach(e=>e(w)),w},q=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},B=q,G=function(e,n,t,r,i){var u=Symbol();return R(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],t,r,i)},K=function(e){return n=>n===e},W=function(e){return Reflect.ownKeys(e)},H=function(e,n){return(n?W:Object.keys)(e)},z=function(e,n,t){var r={};for(var i of n)Object.hasOwn(e,i)&&(r[i]=e[i],!0===t&&delete e[i]);return r},Y=function(e){return e instanceof Set},U=function(e){return Y(e)?e:o(e)?new Set(e):new Set([e])},V=U,Q=function(e,n){var t=[],r=[];return e.forEach((i,u)=>(n(i,u,e)?t:r).push(i)),[t,r]},$=function(e,n,t,r){var i=n;if(c(i))throw I();var u=H(e,r),o=V(i),[a,l]=Q(u,e=>o.has(e));return[z(e,a,t),!0===t?e:z(e,l,!1)]},J=function(e,n,t){var r=H(e,t).filter(t=>n(e[t],t,e));return $(e,r,!1,t)},X=function(e,n){return n<e?n:e},Z=function(e,n){return X(e,n)},ee=function*(e,n){null==e&&(e=0),n=null==n?this.length:Z(n,this.length);for(var t=e;t<n;t++)yield this[t]},ne=function(e,n,t){return null==n&&null==t?e[Symbol.iterator].call(e):ee.call(e,n,t)},te=function(e,n){return n<0?e.length+n:n},re=function(e,n,t,r){return n=null==n?0:te(e,n),t=null==t?e.length:te(e,t),r&&(0==r.inclusiveStart&&n++,r.inclusiveEnd&&t++),[n,t]},ie=function(e,n,t,r){[t,r]=re(e,t,r);for(var i=t;i<r;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,n){return n?ie(H(e,n),n=>[n,e[n]]):Object.entries(e)},oe=function(e){return ne(ue(this,e))},ae=function(e,n){var t=e[Symbol.iterator];return t?t.call(e):oe.call(e,n)},le=function(e){return ae(e,!0)},se=function(e,n){return null!=e&&e.constructor===n},ce=function(e){return se(e,Object)},fe=ce,pe=function(e,n,t,r){return E(e,n,{get:t},r)},ve=function(e,n,t,r){return E(e,n,{value:t,writable:!0},r),t},he=function(e,n,t){pe(e,n,function(){if(this===e)return null;var r=t.call(this);return ve(this,n,r),r})},de=class extends O{constructor(e,n){super(e??"Unexpected value",n)}},me=function(e){return require("node:"+e)},ge=function(e){return L(()=>me(e))},ye=ge("util"),be=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),ye().inspect(e,n)},we=te,Ee=function(e,n,t,r){return void 0!==n&&(null===n||0===n?n=void 0:(n=we(e,n),r&&0==r.inclusiveStart&&n++)),void 0!==t&&(null===t||t===e.length?t=void 0:(t=we(e,t),r&&r.inclusiveEnd&&t++)),[n,t]},xe=function(e,n,t,r,i,u){if(t||null!=r){[t,r]=Ee(e,t,r,u);var o=e.slice(t,r),a=n(o);return i?i(a,t,r,o,e):a}return n(e)},Te=function(e,n,t,r,i){return xe(e,n,t,r,(n,t,r)=>(void 0!==t?e.slice(0,t):"")+(n||"")+(void 0!==r?e.slice(r):""),i)},Se=se,Oe=function(e){return Se(e,RegExp)},_e=function(e,n,t,r){var i=n;if([t,r]=re(e,t,r),c(i))for(var u=t;u<r;u++)e[u]=i(u,e);else e.fill(i,t,r);return e},Ne=function(e,n){var t=new Array(e||0);return arguments.length>1&&_e(t,n),t},Ae=function(e,n){return Ne(n.length,t=>e[n[t]])},je=function(e,n){return e[n]},Ie=function(e,n,t){return e[n]=t},Fe=function(e,n,t){var r=e;return c(r)?r.apply(t,n):r},ke=function(e,n,t,r,i){r||(r=je);var u=r(e,n);return void 0===u&&(u=Fe(t,[e,n]),i||(i=Ie),i(e,n,u)),u},Ce=function(e,n){return e.get(n)},Le=function(e,n,t){return e.set(n,t)},De=function(e,n,t){return ke(e,n,t,Ce,Le)},Me=class{constructor(){this.store=new Map}get(e,n){return De(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Pe=function(e,n){return e.push(n),e},Re=Pe,qe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Be=Symbol("Value"),Ge=function(){return{}},Ke=function(e){return[e.slice(0,-1),e[e.length-1]]},We=Ke,He=function(e,n,t,r,i,u){t||(t=je),null==r&&(r=Ge),null==i&&(i=Ie),null==u&&(u=t);for(var[o,a]=We(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=t(l,f);if(void 0===p){if(!r)return;p=ke(l,f,r,t,i)}l=p}if(u)return u(l,a,i)},ze=function(e,n,t,r,i,u){return He(e,n,r,i,u,(e,n)=>ke(e,n,t,r,u))},Ye=function(){return new Map},Ue=function(e,n,t){return ze(e,n,t,Ce,Ye,Le)},Ve=function(e,n){return delete e[n],e},Qe=function(e,n,t,r){return He(e,n,t,!1,!1,r||Ve)},$e=function(e,n){return e.delete(n)},Je=function(e,n){return Qe(e,n,Ce,$e)},Xe=class{constructor(){this.store=new Map}get(e,n){return e=Re(qe(e),Be),Ue(this.store,e,n)}remove(e){return e=Re(qe(e),Be),Je(this.store,e)}delete(e){return this.remove(e)}},Ze=G("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=a(n)).length){this.cache=new Me;var t=n[0];this._cacheKeyFormatter=e=>e[t]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Ae(e,n);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var n=r._cacheKeyFormatter(arguments);return r.cache.get(n,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),en=function(e,n){return new Ze(e,n)},nn=function(e){return new Set(e)},tn=function(e){var n={};if(e){var t=nn(e);t.has("g")&&(n.global=!0),t.has("i")&&(n.caseInsensitive=!0),t.has("y")&&(n.sticky=!0)}return n},rn=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},un=function(e,n){var t=tn(e);return rn(Object.assign(t,n))},on=function(e,n){var t=n,r=void 0;return u(t)?r=t:ce(t)&&(r=un(e.flags,t)),new RegExp(e,r)},an=function(e,n){return on(e,e.flags+n)},ln=function(e){return an(e,"g")},sn=en(function(e){return e.global?e:ln(e)},0),cn=function(e){var n=e;return null==n?void 0:u(n)?n:rn(n)},fn=function(e,n){return new RegExp(e,cn(n))},pn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},vn=function(e,n){return fn(pn(e),n)},hn=function(e,n,t,r,i,o){return Te(e,function(e){return e.replaceAll?(Oe(n)&&(n=sn(n)),e.replaceAll(n,t)):(n=u(n)?vn(n,"g"):sn(n),this.replace(n,t))},r,i,o)},dn=function(e,n,t){return hn(e,n,(t??"\\")+n)},mn=function(e,n,t){return null==n&&(n='"'),!1!==t&&(e=dn(e,n,t)),n+e+n},gn=function(e){return mn(e,'"')},yn=function(e){return fe(e)?Tn(e):String(e)},bn=function(e,n){return n||(n=wn),"["+e.reduce(function(e,t){return e+n(t)+", "},"").slice(0,-2)+"]"},wn=function(e){return u(e)?gn(e):o(e)?bn(e):yn(e)},En=function(e,n,t){H(e,t).forEach((t,r,i)=>n(t,e[t],r,i))},xn=function(e,n,t,r){var i=null!=t?t:"";return En(e,function(){i=n.call(this,i,...arguments)},r),i},Tn=function(e,n){return n||(n=wn),"{"+xn(e,function(e,t,r){return e+t+":"+n(r)+", "},"",!0).slice(0,-2)+"}"},Sn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":Tn(e,e=>_n(e,n-1))},On=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":bn(e,e=>_n(e,n-1))},_n=function(e,n){return void 0===e?"undefined":null===e?"null":D()?be(e,n):ce(e)?Sn(e,maxNumLevels):o(e)?On(e,maxNumLevels):yn(e)},Nn=function(e,n,t,r){if(0===arguments.length)return new de("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+_n(e)+", expected one of "+_n(u):"Unexpected value received: "+_n(e),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Nn),new de(i,r)},An=function(e,n,t){var r=new O(e,t);return n&&Object.assign(r,n),r},jn=function*(e,n){yield*e,yield*n},In=function(e){return e?" "+e:""},Fn=function(e){return u(e)?e:e.toString()},kn=G("Interface",function(e,n,t){t||(t={}),F(this,e),n?[this.stubs,this.defaults]=J(n,K(!0),!0):(this.stubs={},this.defaults={});var r=t.implements?a(t.implements):null,i=this;return function(e){var n=e;return r&&r.forEach(e=>e(n)),i.decorate(n),i.assert(n),n}},{decorate(e){var n,t,r=e;for(var[i,u]of(r.prototype?(n=r.prototype,t=!0):(n=r,t=!1),le(this.defaults)))if(void 0===n[i])if(fe(u))if(u.value)n[i]=u.value;else{if(!u.setup)throw Nn(u,null,"defaultVal");if(!t)throw u.setup(),I("setupFn is NYI for instances");he(n,i,u.setup)}else n[i]=u;return r},assert(e){var n=e,t=null!=n.prototype,r=n.prototype||n,i=jn(le(this.stubs),le(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=t?"Class"+In(n.name):"Object "+_n(n),o+=" does not satisfy interface "+this.name+' (missing key "'+Fn(u)+'")',An(o)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),Cn=function(e,n,t){return new kn(e,n,t)},Ln=Symbol("Cleanup"),Dn=Cn("Handle",{remove:!0,[Ln](){this.remove()}}),Mn=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Dn),Pn=function(e){return 1===e.length&&o(e[0])?e[0]:array},Rn=function(...e){return new Mn(Pn(e))},qn=Rn,Bn=qn,Gn=function(e){var n,t,r=e;return null!=r&&(n=r.detail??r.data??r,y(r)&&(t=r)),[n,t,r]},Kn=function(e){return kn.is(e)},Wn=Kn,Hn=S(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Yn=function(e,n,t,r){if(0===arguments.length)return new Hn("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=zn(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+_n(e)+")"),o||(i+=")"),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Yn),new Hn(i,r)},Un=function(e,n,t){if(!Wn(n))throw Yn(n,1);return n.decorate(e),t&&t.call(e,e,n),n.assert(e),e},Vn=Cn,Qn=Symbol("EventTarget"),$n=function(e){return require(e)},Jn=function(e){return!!e.startsWith("node:")||$n("node:module").isBuiltin(e)},Xn=function(e){return e.startsWith(".")},Zn=function(e,n,t){return Object.keys(n).forEach(r=>N(e,r,n[r],t)),e},et=function(e,n,t){return Zn(e||{},n,t)},nt=function(e,n,t){return n?et(e,n,t):e??{}},tt=function(e,n){return nt(e,n,!0)},rt=function(e){var n=e.stdio;if(n){if(!o(n)){if(!u(n))throw Yn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw Nn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},it=function(e){if(!o(e))throw Yn(e,null,null,{expected:Array});return!0},ut=function(e,n){var t=n.length;e.length=t;for(var r=0;r<t;r++)e[r]=n[r];return e},ot=function(e){return function(){return!e.apply(this,arguments)}},at=function(e,n){return ut(e,e.filter(ot(n)))},lt=function(e){return at(e,e=>null==e)},st=ge("child_process"),ct=L(function(){return"win32"===process.platform}),ft=function(e,n,t){if(t||(t={}),n(e))throw e;if(t.nullOnErr)return null;var r=t.onErr;if(void 0!==r)return Fe(r);throw e},pt=function(e,n,t,r){var i=(t=tt(t,r)).liveOutput,u=t.captureOutput??t.capture,o=t.captureErr??t.capture;u&&null==i&&(i=!1),t.dir&&(t.cwd=t.dir);var a=rt(t);if(null==a[0]&&!1!==t.allowInput){if(t.input)throw An("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(u){if(i)throw An("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=i??1?"inherit":"ignore";if(null==a[2]){o=t.captureErr??!1;var l=t.showErr;if(o&&l)throw An("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":l??1?"inherit":"ignore"}t.encoding||(t.encoding="utf8"),n&&(it(n),lt(n));try{var s=st().execFileSync(e,n,t);null!=s&&t.trim&&(s=s.trim());var c=t.map??t.mapFn;return c&&(s=c(s)),s}catch(e){if(ct())return ft(e,e=>"ENOENT"===e.code,t);throw e}},vt=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,pt("npm",e,n)},ht=function(e,n,t){return vt(["install",e,n?"-g":null],t)},dt=ge("path"),mt=dt().sep,gt=function(e,n,t){e=String(e);var r=dt().resolve,i=n?r(n,e):r(e);return t?i+mt:i},yt=function(e){return require(gt(e))},bt=class{constructor(){this.store={}}get(e,n){return N(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},wt=new bt,Et=function(e){return e[e.length-1]},xt=te,Tt=function(e,n,t){return e=on(e,{global:!0}),null!=t&&(n=xt(t,n)),e.lastIndex=n,e},St=function(e,n,t){return e=null!=t?Tt(e,t,n):sn(e),Array.from(n.matchAll(e))},Ot=function(e,n,t){return null!=t&&(n=n.slice(0,t)),Et(St(e,n))||null},_t=function(e,n){var t=Ot(e,n);return t&&n.length===t.index+t[0].length?t:null},Nt=function(e,n){if(u(n))return e.endsWith(n);if(Oe(n))return!!_t(n,e);throw Yn(n,1,"matchThis")},At=/\/|\\/,jt=function(e){return Nt(e,At)?e:e+mt},It=function(e,n,t){if(D()){var r=dt().join(String(e),String(n));return t?jt(r):r}throw I()},Ft=function(e,n){return e.endsWith(n)?e:It(e,n)},kt=ge("module"),Ct=function(e){return e=Ft(e,"node_modules"),kt().createRequire(e)},Lt=function(e,n){return wt.get(e,()=>Ct(e))(n)},Dt=function(e,n,t){return n?Zn(e,n,t):e},Mt=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pt=function(e,n){var t=_t(n,e);return t?e.slice(0,t.index):e},Rt=function(e,n){if(u(n))return Mt(e,n);if(Oe(n))return Pt(e,n);throw Yn(n,1)},qt=Rt,Bt=function(e,n){return[e.slice(0,n),e.slice(n)]},Gt=function(e){e=qt(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Bt(e,n+1)},Kt=function(e,n){return e.startsWith(n)?e:n+e},Wt=function(e){var[n,t]=Gt(e);return n+Kt(t.trim(),"return ")},Ht=function(e){return oi("node-repl-await").processTopLevelAwait(e)},zt=function(e){return Ht(e)??e},Yt=hn,Ut=function(e,n){return""===e?e:(!1!==n&&(e=jt(e)),Yt(e,"\\","/"))},Vt=L(function(){return process.argv.slice(2)}),Qt=Vt,$t=function(e,n){const t=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(r+=a,u=!1):(n&&(r+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(r.length>0&&(t.push(r),r=""),u=!1):(r+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(r+=a,u=!1):u=!0:(n&&(r+=a),i="outside")}}return r.length>0&&t.push(r),t},Jt=function(e,n){var t=e;return null==t?Qt():u(t)?$t(t,n):t},Xt=function(e,n){return Jt(e,n).slice()},Zt=Xt,er=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Zt(process.argv)[1])},nr=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},tr=function(e){return e.split(".")[0]},rr=function(e){return dt().win32.basename(String(e))},ir=function(e){return tr(rr(e))},ur=function(e,n,t,r){e||(e=er()??"_console.js");var i=nr(ir(e));return n&&(i+="_repl"),i+(t&&r?.dynamic?".dypkg.json":".pkg.js")},or=function(e,n){return e=dt().dirname(String(e)),!1===n?e:jt(e)},ar=function(e,n,t,r){var i,u=ur(e,n,t,r);return i=e?or(e):"./",gt(i+u)},lr=function(e){return'require("'+Ut(ar(),!1)+'");\n'+e},sr=function(e,n){return hn(e,n,"")},cr=function(e,n){return n.forEach(n=>e=sr(e,n)),e},fr=function(e){return cr(e,["\r","\n"])},pr=function(e,n){return oi("astring").generate(e,n)},vr=function(e,n){return e.stack=n+"\n"+e.stack,e},hr=function(e,n,t){t||(t={}),t.ecmaVersion||(t.ecmaVersion=2024),!1!==n&&(t.sourceType="module"),null==t.allowAwaitOutsideFunction&&(t.allowAwaitOutsideFunction=!0),null==t.allowReturnOutsideFunction&&(t.allowReturnOutsideFunction=!0);var r=oi("acorn");try{return r.parse(e,t)}catch(n){throw vr(n,"Acorn parsing error: "+e)}},dr=function(e,n,t){return pr(hr(e,n,t))},mr=function(e){return fr(dr(e))},gr=function(e,n,t){return(n||t)&&(n||(n={}),t&&Dt(n,t),n.ensureReturn&&(e=Wt(e)),n.topLevelAwait&&(e=zt(e)),n.useTitan&&(e=lr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=mr(e))),e},yr=function(e){return u(e)?e:yn(e)},br=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},wr=function(e,n,t,r,i){return xe(e,n,t,r,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},Er=function(e,n){return Array.prototype.findIndex.call(e,n)},xr=function(e,n,t,r,i){var o=u(n);return o&&null==r&&!i?e.indexOf(n,t):wr(e,e=>o?e.indexOf(n):Oe(n)?e.search(n):Er(e,n),t,r,i)},Tr=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(u+1,r)},Sr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Or=sr,_r=function(e,n){return on(e,Or(e.flags,n))},Nr=function(e){return _r(e,"g")},Ar=en(function(e){return e.global?Nr(e):e},0),jr=function(e,n,t){return(e=null!=t?Tt(e,t,n):Ar(e)).exec(n)},Ir=function(e,n){var t=jr(e,n);return t&&0===t.index?t:null},Fr=function(e,n){var t=Ir(n,e);return t?e.slice(t[0].length):e},kr=function(e,n){if(u(n))return Sr(e,n);if(Oe(n))return Fr(e,n);throw Yn(n,1)},Cr=kr,Lr=function(e){var n=Tr(e,"=>").trim();return Cr(qt(n,"}"),"{")},Dr=function(e){return Tr(e,"{").slice(0,-1)},Mr=function(e){var n=yr(e);return br(n)?Lr(n):Dr(n)},Pr=function(e){return null==e?"":u(e)?e:c(e)?Mr(e):String(e)},Rr=function(e,n){var t=n?.basic?null:{topLevelAwait:!0,useTitan:!0},r=gr(Pr(e),n,t);return pt("node",[n?.mode??"-p",r],n)},qr=function(e,n,t,r){var i="Required argument";return t&&(i+=' "'+t+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+_n(e)+")"),An(i,null,j(r,qr))},Br=function(e,n,t){if(null==e)throw qr(e,n,t,{fromFn:Br});return e},Gr=function(e,n){return process.kill(e,Br(n,0,"signalName"))},Kr=function(e){return Gr(e,"SIGINT")},Wr=function(){return Kr(process.pid)},Hr=Wr,zr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw Nn(e,0,"char")},Yr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Rr(function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var t=e.toUpperCase();"Y"===t||"N"===t?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Hr(),An("Prompt was cancelled via interrupt.");return console.log(n),zr(n)},Ur=function(e){return o(e)?e:u(e)?e.split("."):[e]},Vr=function(e,n,t,r,i,u){var o=t;return He(e,n,r,i,u,(e,n,t)=>t(e,n,Fe(o)))},Qr=function(e,n){var t=n,r=globalThis.config;r||(r=globalThis.config={});var i,u=Ur(e);return u.length>1?i=Vr(r,u,t):(i=Fe(t),r[u[0]]=i),i},$r=function(e,n){return Qr("node.require.customDirs",t=>(t||(t=[]),!1!==n&&(e=Ft(e,"node_modules")),t.includes(e)||t.push(e),t)),e},Jr=$r,Xr=He,Zr=function(e){var n=globalThis.config;if(n){var t=Ur(e);return t.length>1?Xr(n,t):n[t[0]]}},ei=function(e,n,t){if(null!=e)return e;var r=Zr(n);return null!=r?r:t},ni=ge("fs"),ti=function(e){return!!ni().lstatSync(String(e),{throwIfNoEntry:!1})},ri=function(e){var n=or(e,!1);return ti(n)||(n!==e&&ri(n),ni().mkdirSync(String(n))),e},ii=function(e){return ri(e),ni().mkdirSync(String(e)),e},ui=function(e){return ti(e)?e:ii(e)},oi=function(e,n){if(Jn(e))return require(e);if(Xn(e))return yt(e);try{return require(e)}catch(e){}var t=__dirname,r=process.mainModule?.path;if(r!==t)try{return Lt(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==t)try{return Lt(i,e)}catch(e){}var u=Zr("node.require.customDirs");if(u)for(var o of u)try{return Lt(o,e)}catch(e){}var a=ei(n?.autoInstall,"node.require.autoInstall"),l=ei(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=gt(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=Yr('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=ui(s),ht(e,!1,{cwd:s});try{return Jr(s),Lt(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw An('Module not found: "'+e+'"',{checked:{moduleDir:t,scriptDir:r,cwd:i}})},ai=L(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=oi("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),li=ai().EventTarget,si=function(e){var n=Qn,t=e[n];return void 0===t&&(t=new li,T(e,n,t)),t},ci=Vn("EventInterface",{addEventListener(e,n,t){si(this).addEventListener(e,n,t)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){si(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return si(this).dispatchEvent(e)}}),fi=ci,pi=function(e){return Un(e,fi)},vi=function(e){return!(!e.addEventListener&&!e.on)},hi=function(e){return vi(e)||pi(e),e},di=function(e,n,t){return e[n]=t,e},mi=function(e,n,t){return di(e||{},n,t)},gi=function(e,n,t,r){return Ai(e,n,t,mi(r,"once",!0))},yi=function(e,n){return function(){var t=n.apply(this,arguments);return e.apply(this,arguments),t}},bi=yi,wi=function(e,n,t){return e[n]=bi(e[n],t)},Ei=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,t){t&&hi(e);var r=gi(target,n,()=>this.remove());return wi(this,"remove",()=>r.remove()),this}},Dn),xi=class extends Ei{constructor(e,n){super(e),this.handleEvent=n}},Ti=function(e,n){return new xi(e,n)},Si=function(e,n,t){(e.removeEventListener||e.off).call(e,n,t)},Oi=function(e,n,t){for(var r=e.length-1;r>=n;r--)e[r+1]=e[r];return e[n]=t,e.length++,e},_i=function(e,n){return Oi(e,0,n)},Ni=_i,Ai=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ni(arguments,n),arguments[1]=t,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(pi(e),u=e.addEventListener)),u.call(e,n,t,r),Ti(()=>Si(e,n,t),t)},ji=class extends Ei{constructor(e){super(()=>clearInterval(e))}stop(){this.remove()}},Ii=function(e,n){return new ji(setInterval(n,e))},Fi=function(){},ki=function(){return Ii(1e9,Fi)},Ci=function(){return Bn([ki(),Ai(process,"uncaughtException",console.error),Ai(process,"unhandledRejection",console.error)])},Li=function(e){var n=gt(e);return delete require.cache[n],yt(n)},Di=L(function(){var e=process.env.TITAN_PATH;if(!e)throw An("Environment variable TITAN_PATH is not set.");return jt(e)}),Mi=L(function(){return Di()+"Compiled/Newest/"}),Pi=function(e){return ni().readFileSync(String(e),"utf8")},Ri=function(){return new Date},qi=function(e){return new Date(e.getTime())},Bi=function(e){return new Date(e,null)},Gi=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Ki=function(e){return isNaN(e)?null:e},Wi=function(e){return null==e?null:Ki(Number(e))},Hi=Wi,zi=function(e){var n=typeof e;return"number"===n||"bigint"===n},Yi=function(e,n){if(null==e)throw qr(e,0);if(e.constructor===Date)return n?qi(e):e;if(u(e)){var t=Hi(e);return null!=t?Bi(t):Gi(e)||null}return zi(e)?Bi(e):void 0},Ui=function(e,n){return null==e?Ri():Yi(e,n)},Vi=function(e){return Ui(e,!0)},Qi=Vi,$i=function(){var e=Mi()+"LastCompileTime.txt";return ti(e)?Qi(Pi(e)):null},Ji=function(e,n){return ni().statSync(String(e),n)},Xi=function(e,n){return ni().lstatSync(String(e),n)},Zi=function(e,n,t){return(n?Ji:Xi)(e,t)},eu=function(e){return Zi(e).mtime},nu=function(e,n,t){return e=Yi(e),n=Yi(n),!1===t?e<n:e<=n},tu=function(e){var n=$i();if(n){var t=eu(e);if(nu(t,n))return!0}return!1},ru=/(['"])(.*?)\1/,iu=ln(ru),uu=function(e){return e.replace(iu,"")},ou=uu,au=function(e){return globalThis.structuredClone(e)},lu=au,su=en,cu=/\r?\n/,fu=function(e){return null==e||void 0!==e.length&&0===e.length},pu=function(e,n){return at(e,fu)},vu=function(e,n){return e.splice(n,1),e},hu=function(e,n,t){for(var r={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;t?(r[a]||(r[a]=[]),r[a].push(l)):r[a]=l}}return r},du=function(e,n,t,r){return[n,t]=re(e,n,t,r),e.slice(n,t)},mu=function(e,n){return Ne(n,e).join("")},gu=function(e){return e?e[0]:null},yu=function(e,n){var t=null==n?-1:n.index;if(-1===t)return[e];var r=Bt(e,t);return r[1]=r[1].slice(n[0].length),r},bu=function(e,n,t,r,i){return xe(e,n,t,r,(n,t)=>null===n?null:(n.input=e,void 0!==t&&(n.index+=t),n),i)},wu=function(e,n){return e.splice(e.length,0,...n),n},Eu=function(e,n){return wu(e,n),e},xu=Eu,Tu=class extends Array{constructor(e,n,t,r,i){if(-1===n)throw An("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw An("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&xu(this,r),this.index=n,this.input=t,i&&(this.groups=i)}fromParts(e){var n=e;return new Tu(n.match,n.index,n.input,n.captures,n.groups)}},Su=function(e,n,t,r,i){return new Tu(e,n,t,r,i)},Ou=function(e,n,t,r,i){return-1===n||null==e?null:Su(e,n,t,r,i)},_u=function(e,n,t,r,i){return bu(e,e=>{if(u(n)){var t=e.indexOf(n);return Ou(n,t,e)}return jr(n,e)},t,r,i)},Nu=function(e,n,t,r,i){return yu(e,_u(e,n,t,r,i))},Au=Wi,ju=function(e){return Au(e)??e},Iu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=Nu(e,n);null!=i&&(i=ju(i.trim())),t[r.trim()]=i}),t},Fu=A,ku=class extends Array{constructor(e){var n,t=e;null!=t&&(o(t)?n=t:u(t)&&(n=t.split(cu))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return pu(this)}removeComments(e){for(var n=0;n<this.length;n++){var t=this[n],r=t.indexOf(e);-1!==r&&(""===(t=t.slice(0,r)).trim()?(vu(this,n),n--):this[n]=t)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return Iu(this,e)}mapToObj(e,n){return hu(this,e,n)}between(e,n,t){return t=Fu(t,"inclusiveEnd",!0),du(this,e,n,t)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Et(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=gu(jr(/^\s*/,e));if(n){var t=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(t)})}}return this}deindent(e,n,t){throw I()}indent(e,n){var t=mu(n??"\t",e??1);return this.apply(e=>t+e)}static is(e){return se(e,this)}static fromChunks(e){return e.map(e=>qt(e,cu)).flatMap(e=>Lu(e,!1))}},Cu=function(e,n){var t=new ku(e);return n&&t.condense(),t},Lu=function(e,n,t){var r=e.split(cu);return n?Cu(r,t):r},Du=Pi,Mu=function(e,n){return Lu(Du(e),!0,n)},Pu=function(e,n){return Ar(e).test(n)},Ru=function(e,n){return Oe(n)?Pu(n,e):e.includes(n)},qu=function(e,n,t,r){null==e&&(e=""),null==n&&(n="");var i={},u=(t,r)=>i[e+t+n]=r;return r&&En(r,u),t&&En(t,u),i},Bu=function(e,n){return En(n,(n,t)=>e=hn(e,n,t)),e},Gu=function(e,n,t,r){var i,a,l=r?.paramIdentifier??"$";if(l)if(u(l)){if(!Ru(e,l))return e;i=l}else{if(!o(l))throw Yn(l,1,"paramIdentifier");if([i,a]=l,!Ru(e,i)&&!Ru(e,a))return e}var s=qu(i,a,n,t);return Bu(e,s)},Ku=function(e){return u(e)?e:String(e)},Wu=globalThis.process?.env.windir,Hu=ge("os"),zu=function(){return Hu().tmpdir()+mt},Yu=function(e){if(e)throw I();return Hu().homedir()+mt},Uu=function(e){return Yu(e)+"Desktop/"},Vu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Wu,SYSTEM32:Wu&&Wu+"System32",TEMP:zu(),DESKTOP:Uu()},Qu=function(e,n){return Gu(Ku(e),n,Vu)},$u=function(){return Di()+"Source/SourceMap.txt"},Ju=function(e){return e?Qu(e,{TITAN:Di()}):$u()},Xu=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Zu=function(e){var n=e[0];return n===n.toUpperCase()},eo=su(function(e){var n=Mu(Ju(e),!0),t={};return n.forEach(e=>{var n=Xu(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Zu(e)),u=r[0];if(!u)throw An('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),no=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),to=/\bt\.(\w+)\.(\w+)/g,ro=function(e,n){n||(n={});var t={},r=t.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?lu(n.additionalGlobals):{},t.globals=i;var u=eo(),o=no(u),a=St(o,e).filter(n=>{var t=n[1],r=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[t];return!u||void 0===u[r]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,t])=>{var r=u[n];if(!r)throw An("No short name found for global: "+n);return"t."+r+"."+t+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(to))r[p]||(r[p]={}),r[p][c]=!0;return t},io=function(e,n){return e=dr(e),e=ou(e),ro(e,n)},uo=function(e,n){return n in e},oo=uo,ao=function(e,n){for(var t of(Br(n,1),Object.keys(e))){if(!oo(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!ao(r,n[t]))return!1}return!0},lo=function(e,n){return!ao(n.t,e)||!(!n.globals||e._globals&&ao(n.globals,e._globals))},so=function(e){return Nt(e,At)},co=function(e,n){var t=Ot(e,n);return t?t.index:-1},fo=function(e){var n=co(At,e);return-1===n?null:e.slice(0,n+1)},po=function(e,n,t){if(so(e))return t?[e,null]:e;var r,i,u=fo(e),o=n(rr(e),u,e);return t?[r,i]=o:r=o,null!=r&&(e=u?u+r:r),t?[e,i]:e},vo=function(e,n,t,r,i){return bu(e,e=>{if(Oe(n))return Ot(n,e);if(u(n)){var t=e.lastIndexOf(n);return-1!==t?new Tu(n,t):null}throw Yn(n,1)},t,r,i)},ho=function(e,n,t,r,i){return yu(e,vo(e,n,t,r,i))},mo=function(e){return po(e,e=>ho(e,"."),!0)},go=function(e,n){var t=mo(e)[1];return t?!1!==n?t.toLowerCase():t:null},yo=function(e,n){return ro(e,n)},bo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return io(e,n);if("html"===t)return yo(e,n)}return ro(e,n)},wo={},Eo=su(function(e){e=Ju(e);var n=or(e)+"../Compiled/Newest/",t=Mu(e,"//"),r=wo;for(var i of t){var u=i.indexOf("="),o=i.slice(0,u).trim();o=o.split(",").map(e=>e.trim()).filter(e=>!Zu(e));var a=i.slice(u+1).trim(),l=It(n,a).replaceAll("\\","/");for(var s of o)r[s]=l}return r},0),xo=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},To=function(e){return e.slice()},So=function(e,n){return Oi(e,e.length,n)},Oo=So,_o=function(e,n){return e.call(this,...n,function n(){return Et(arguments)!==n&&Oo(arguments,n),e.apply(this,arguments)})},No=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var t=e.recurseIf;if(!t){var r=this.constructor;t=e=>se(e,r)||fe(e)||o(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return _o(function*(e,r,o,a){var l=n(e,r,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],v=To(r);v.push(f);var h=null,d={value:p,key:f,object:e,path:v,level:o,isLeaf:h,root:u},m=t(p,d);d.isLeaf=h=!m,i&&!h||(yield d),m&&(yield*a(p,v,o+1,a))}},[this,[],0])},Ao=function(e,n){return No.call(e,n)},jo=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},Io=function(e,n,t,r){var i=hr(e,n,r);oi("acorn-walk").full(i,t)},Fo=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=jo(t);i=e=>a[e.type]}else i=t;var l=[];return Io(e,n,function(e){i.apply(this,arguments)&&l.push(e)},r),l},ko=pr,Co=function(e){var n,t,r,i=e,o=u(i)?hr(i).body[0]:i,a=o.type;if("VariableDeclaration"===a){n="variable";var l=o.declarations[0];t=l.id.name,r=l.init?l.init.raw??pr(l.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),t=o.id.name;var s={type:n,name:t};return r&&(s.value=r),s.text=ko(o),s.node=o,s},Lo=function(e){return Fo(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=Co(n);return t.node=e,t}return{node:e}})},Do=function(e,n){n||(n={});var t=n.enableGlobals,r=Eo(n.sourceMap),i={},u=[];return function e(n,o){var a=xo(Ao(n),e=>e.isLeaf);for(var l of a){var[s,c]=l.path,f=i[s];if(f||(f=i[s]={}),null==f[c]){var p=r[s];if(p){var v=Ut(p)+c+".js";if(!ti(v)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),An(h+=".")}var d=Pi(v),m=Lo(d)[0];f[c]=m;var g="t."+s+"."+c;e(bo(d,{fileType:"js",enableGlobals:t}).t,g),u.push([s,c])}else console.log('Skipping unmapped module "'+s+'"'),f[c]=!1}}}(e.t),{t:i,globals:e.globals,order:u}},Mo=function(e){return Cu(e).normalize().join()},Po=Mo,Ro=function(e,n){var t=e,r=c(t)?Mr(t):t;return!1!==n&&(r=Mo(r)),r},qo=function(e,n,t){H(e,t).forEach(n)},Bo=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Go=function(e,n){En(n,(n,t)=>Bo(e,n,t))},Ko=Go,Wo=function(e,n,t){return null==(n=tt(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Ko(n,{isModule:e=>n.compress.module=e,originalQuotes:e=>n.format.quote_style=e?3:null,mangleEval:e=>n.mangle.eval=e,mangleExcept:e=>n.mangle.reserved=a(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=dr(e),oi("terser").minify_sync(e,n).code},Ho=function(e,n){n||(n={});var t=n.minify??!1,r=n.debug??!1,i=n.deps??bo(e,n),{t:u,globals:o,order:a}=Do(i,n),l="//Flat references:\n";for(var[s,c]of a){var f=u[s][c],p="t_"+s+"_"+c,v="variable"===f.type?f.value:"("+f.text+")";v=v.replaceAll(to,(e,n,t)=>"t_"+n+"_"+t),l+="var "+p+" = "+v+"\n"}for(var[s,h]of(r&&(l+="//Debug functions:\n",l+=Po('\n function _isFn(value) {\n return typeof value === "function";\n }\n function _withName(value, name) {\n if(_isFn(value)) { Object.defineProperty(value, "name", {value:name}); }\n return value;\n }\n\n ')),l+="//New tree items:\n",l+="var newItems = {",ae(u))){for(var c of(l+="\n\t"+s+": {",Object.keys(h))){var d="t_"+s+"_"+c;r&&(d="_withName("+d+", 't."+s+"."+c+"')"),l+="\n\t\t"+c+": "+d+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=Mo("\n if(globalThis.t) {\n //If t already exists, integrate new items.\n Object.keys(newItems).forEach(function(modName) {\n if(t[modName]) {\n var newModule = newItems[modName];\n Object.keys(newModule).forEach(function(item) {\n t[modName][item] = newModule[item];\n });\n } else {\n t[modName] = newItems[modName];\n }\n });\n } else {\n globalThis.t = Object.assign({}, newItems);\n }\n "),n.enableGlobals&&o){l+="\n//Add weak global aliases:\n",l+=Ro("\n if(!t._globals) { t._globals = {}; }\n function _ensureGlobal(name) {\n if(!globalThis[name]) { globalThis[name] = {}; }\n if(!t._globals[name]) { t._globals[name] = {}; }\n }\n function _weakGlobalize(globalName, shortName, itemName) {\n var globalObj = globalThis[globalName];\n if(!globalObj[itemName]) { globalObj[itemName] = t[shortName][itemName]; }\n t._globals[globalName][itemName] = true;\n }\n ");var m=eo();En(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',qo(n,n=>{var t=m[e];l+='\n_weakGlobalize("'+e+'", "'+t+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",t){var g=ce(t)?t:null;l=Wo(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},zo=function(e){return e instanceof Buffer},Yo=function(e){return ArrayBuffer.isView(e)},Uo=Yo,Vo=function(e){return zo(e)||Uo(e)||u(e)},Qo=function(e){return e.constructor===ArrayBuffer},$o=function(e){return Vo(e)?e:Qo(e)?Buffer.from(e):yn(e)},Jo=function(e){return zi(e)?String(e):$o(e)},Xo=function(e,n){return ri(e),ni().writeFileSync(String(e),Jo(n)),e},Zo=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=go(n));var r=Ho(e,t),i=t.packagePath||ar(n,t.repl);return Xo(i,r),i},ea={titan:{harness:function(e,n,r){n||(n=e,e=null);var i=e??{};null==i.minify&&(i.minify=!1),i.keepAlive&&Ci();var u,o,a=i.packagePath||ar();if(a=gt(a),ti(a)){if(tu(a)&&(u="New compile"),!u){o=i.text??Mr(n);var l=io(o,i);require(a),lo(t,l)&&(u="New deps")}}else u="No package";return u&&(i.onPack&&i.onPack(u),null==o&&(o=i.text??Mr(n)),i.packagePath=a,Zo(o,er(),i),Li(a)),n.apply(null,r)},getPackagePath:ar,getPackageName:ur,hasNewCompile:tu,getLastCompileTime:$i,getCompiledDir:Mi,locate:Di,getDepsFromJS:io,_getDepsBasic:ro,loadGlobalsMap:eo,_resolveSourceMapPath:Ju,locateSourceMap:$u,_getGlobalsRegex:no,depsRegex:to,hasNewDeps:lo,packTextToFile:Zo,packText:Ho,getDeps:bo,getDepsFromHTML:yo,_getAllDeps:Do,loadSourceMap:Eo,sourceMap:wo},node:{keepAlive:Ci,is:D,display:be,util:ye,_builtInModule:ge,requireBuiltIn:me,require:oi,_basicRequire:$n,child_process:st,requireLocal:yt,path:dt,_requireFromDir:Lt,_requireDirCache:wt,_createRequire:Ct,module:kt,promptYNSync:Yr,run:Rr,getScriptPath:er,positionalArgs:Zt,args:Vt,sigint:Hr,interrupt:Wr,ensureRequireDir:Jr,addRequireDir:$r,fs:ni,reloadRequireLocal:Li,os:Hu},ev:{multiHandle:Bn,on:Ai,resolveValue:Gn,enable:pi,EventInterface:fi,Interface:ci,_ensureHasTarget:si,targetSym:Qn,EventTarget:li,polyfill:ai,handle:Ti,ListenerHandle:xi,ensureEnabled:hi,can:vi,once:gi,off:Si},o:{multiHandle:qn,isAny:y,setHidden:T,addNonEnumerable:x,defineProperty:E,weakAssign:w,merge:b,safeEnsure:A,ensure:N,hideKey:B,makeNonEnumerable:q,filterSplit:J,keys:H,allKeys:W,split:$,pick:z,iterateAll:le,iterate:ae,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:he,setGetter:pe,forceSet:ve,display:Sn,toLiteral:Tn,constructorMatches:Se,ensureCustom:ke,get:je,set:Ie,createEmpty:Ge,remove:Ve,reduce:xn,each:En,addInterface:Un,safeSetDefaults:nt,safeEnsureMulti:et,ensureMulti:Zn,Cache:bt,setDefaults:Dt,resolveKeys:Ur,diveGet:Xr,safeSet:mi,touch:di,deepCopy:lu,fromLines:Iu,safeDefault:Fu,hasKey:oo,has:uo,fromKeys:jo,eachKey:qo,consumeOptions:Ko,consumeMulti:Go,consume:Bo},handle:{createMulti:Rn,MultiHandle:Mn,HandleInterface:Dn,Handle:Ei},class:{addInterface:e,create:R,setName:k,addStatics:C,setDisplay:P,isInterface:Wn,interface:Vn},ifc:{create:Cn,Interface:kn,is:Kn},f:{createClass:G,ensureConstructor:d,createConstructor:h,isArrowFn:p,isArrow:f,is:c,wrap:v,retThis:m,setName:F,one:L,eq:K,memoize:en,MemoizedFunction:Ze,not:ot,body:Mr,isArrowString:br,_getArrowFnBody:Lr,_getNormalFnBody:Dr,hookAfterMethod:wi,hookAfter:bi,injectAfter:yi,interval:Ii,TimerHandle:ji,noop:Fi,cache:su,recurse:_o},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:gn,quote:mn,escape:dn,replaceAll:hn,apply:Te,withIndices:xe,chars:nn,from:yn,spaceBefore:In,fromKey:Fn,endsWith:Nt,resolveIndex:xt,removeTrailing:qt,removeFromEnd:Rt,_removeStringFromEnd:Mt,_removeRegexFromEnd:Pt,splitAtIndex:Bt,ensureStartsWith:Kt,replace:Yt,decapitalize:nr,removeLineBreaks:fr,removeMulti:cr,removeAll:sr,resolve:Pr,ensure:yr,after:Tr,index:xr,_indexWithIndices:wr,indexOfFn:Er,removeLeading:Cr,removeFromStart:kr,_removeStringFromStart:Sr,_removeRegexFromStart:Fr,remove:Or,removeQuotes:uu,splitLines:Lu,lines:Cu,LinesArray:ku,repeat:mu,splitFirst:Nu,_splitByMatch:yu,match:_u,_matchWithIndices:bu,replaceParams:Gu,contains:Ru,_createParamsObj:qu,_replaceByObj:Bu,before:Xu,isCapitalized:Zu,splitLast:ho,matchLast:vo,normalize:Po,normalizeMLS:Mo,mls:Ro},a:{is:o,ensure:a,filterSplit:Q,iterate:ne,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:te,wrapIndices:Ee,wrapIndex:we,pick:Ae,create:Ne,fill:_e,push:Re,add:Pe,splitLast:We,splitTail:Ke,toLiteral:bn,display:On,unboxArgs:Pn,assert:it,removeNullish:lt,removeByFilter:at,replaceContents:ut,last:Et,removeEmpty:pu,removeIndex:vu,mapToObj:hu,slice:du,pushMulti:xu,addMulti:Eu,pushThroughMulti:wu,copy:To},p:{asyncJoint:s,is:l},v:{isPrimitive:g,constructorMatches:se,display:_n,toLiteral:wn,resolve:Fe,type:zn,req:Br,nullIfNaN:Ki,isEmpty:fu},err:{nyi:I,NYIError:_,Error:O,Enhanced:S,defaultFromFn:j,value:Nn,ValueError:de,create:An,type:Yn,TypeError:Hn,prepend:vr,req:qr},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:V,ensure:U,is:Y},n:{cap:Z,least:X,fromString:Hi,ensure:Wi,is:zi,tryCoerce:ju,tryParse:Au},re:{is:Oe,ensureGlobal:sn,global:ln,addFlag:an,copy:on,updateFlagString:un,parseFlagString:tn,createFlagString:rn,createEscaped:vn,create:fn,resolveFlags:cn,escape:pn,matchEnd:_t,matchLast:Ot,matchAll:St,setStartIndex:Tt,slash:At,matchStart:Ir,match:jr,ensureLocal:Ar,local:Nr,removeFlag:_r,quotes:iu,quote:ru,newline:cu,text:gu,safeCreateResult:Ou,createResult:Su,RegexResult:Tu,test:Pu,lastIndex:co},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ue,createEmpty:Ye,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ni,prepend:_i,insert:Oi,push:Oo,append:So},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Vr,copy:au,isSubsetOf:ao,iterate:Ao,iterator:No},gen:{join:jn,filter:xo},npm:{isBuiltIn:Jn,isFile:Xn,install:ht,_runCommand:vt},os:{run:pt,_resolveStdio:rt},opt:{resolve:tt},win:{is:ct},shell:{_handleError:ft},path:{abs:gt,sep:mt,ensureEndsWith:Ft,join:It,ensureTrailingSlash:jt,fws:Ut,baseName:ir,_removeExtsFromFile:tr,file:rr,dir:or,resolveVars:Qu,string:Ku,_defaultParams:Vu,windir:Wu,_getDefaultTempDir:zu,getDesktop:Uu,getUserDir:Yu,ext:go,splitExt:mo,ignoreDir:po,isDir:so,dirPart:fo},js:{enhance:gr,ensureReturn:Wt,splitLastExpression:Gt,enableAwait:zt,_nodeEnableAwait:Ht,useTitan:lr,inline:mr,removeComments:dr,fromAST:pr,parse:hr,removeQuotes:ou,getExports:Lo,getNodes:Fo,eachNode:Io,parseDeclaration:Co,fromASTNode:ko,minify:Wo},cli:{positionalArgs:Xt,resolveArgs:Jt,splitArgs:$t},env:{args:Qt,setConfig:Qr,getConfig:Zr,resolveConfig:ei,keepAlive:ki},proc:{interrupt:Kr,signal:Gr},bool:{fromYN:zr},fs:{ensureDir:ui,exists:ti,mkdir:ii,ensureParent:ri,load:Pi,getModifiedDate:eu,stat:Zi,deepStat:Ji,shallowStat:Xi,loadLines:Mu,loadText:Du,write:Xo,formatRaw:Jo},d:{from:Qi,create:Vi,resolve:Ui,now:Ri,ensure:Yi,copy:qi,fromYear:Bi,_resolveNative:Gi,isBefore:nu},bin:{ensureByteSafe:$o,isByteSafe:Vo,isNodeBuffer:zo,isTA:Uo},ab:{isTA:Yo,is:Qo}};globalThis.t?Object.keys(ea).forEach(function(e){if(t[e]){var n=ea[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=ea[e]}):globalThis.t=Object.assign({},ea),globalThis.exports&&(exports.default=globalThis.t);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "titanfiber",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.159",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./router.js",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"./harness": "./harness.js",
|
|
11
11
|
"./repl": "./repl.js",
|
|
12
12
|
"./cli": "./cli.js",
|
|
13
|
+
"./tool": "./cli.js",
|
|
13
14
|
"./build": "./build.js",
|
|
14
15
|
"./build/stable": "./build_stable.js"
|
|
15
16
|
},
|
package/script.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./script.pkg.js");var a=globalThis.__titanfiberOptions??{},e=t.node.getScriptPath()
|
|
1
|
+
require("./script.pkg.js");var a=globalThis.__titanfiberOptions??{},e=t.node.getScriptPath();if(!e)throw new Error("titanfiber/script could not determine the main file path");var i=t.fs.loadText(e),n={};dynPackagePath=e?t.titan.getTempDir()+"TitanFiber/"+t.path.baseName(e)+"_"+t.fs.getID(e)+"/main.pkg.json":t.titan.getPackagePath(null,!1,!0,a),a.packagePath=dynPackagePath,a.enableGlobals=!0,t.fs.exists(dynPackagePath)&&!t.titan.hasNewCompile(dynPackagePath)&&t.titan._loadDynamicDeps(dynPackagePath,n,a),t.titan.autoPackAndLoadJSON(e,i,n,a),globalThis.t=n;
|
package/script.pkg.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(t,"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(t,e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(t,e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(t,{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(t)},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_path_sep)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(t),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r){r||(r={}),r.dir&&(r.cwd=r.dir);var _=t_os__resolveStdio(r);if(null==_[0]){var n=r.allowInput,s=r.input;if(n&&s)throw t_err_create("allowInput (user) and input (programmatic) cannot be used simultaneously for synchronous child processes.");n&&(_[0]="inherit")}if(null==_[1]){var i=r.captureOutput??!1,a=r.showOutput;if(i&&a)throw t_err_create("captureOutput and showOutput cannot be used simultaneously for synchronous child processes.");i?_[1]="pipe":(null==a&&(a=!0),_[1]=a?"inherit":"ignore")}if(null==_[2]){var o=r.captureErr??!1,u=r.showErr;if(o&&u)throw t_err_create("captureErr and showErr cannot be used simultaneously for synchronous child processes.");o?_[2]="pipe":(null==u&&(u=!0),_[2]=u?"inherit":"ignore")}r.encoding||(r.encoding="utf8"),e&&t_a_removeNullish(e);try{var l=t_node_child_process().execFileSync(t,e,r);null!=l&&!1!==r.trim&&(l=l.trim());var c=r.map??r.mapFn;return c&&(l=c(l)),l}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(t,e);return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_re_resultEndIndex=function(t){return t.index+t[0].length},t_s_after=function(t,e){var r=t_s_match(t,e);return null===r[0]?null:t.slice(t_re_resultEndIndex(r))},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(e)),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(t),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_path_sep)},t_path_dirPart=function(t){var e=t.lastIndexOf(t_path_sep);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(t,t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,remove:t_s_remove,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,Cache:t_o_Cache,setDefaults:t_o_setDefaults,ensureMulti:t_o_ensureMulti,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,resultEndIndex:t_re_resultEndIndex,matchStart:t_re_matchStart,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,test:t_re_test},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
|
|
1
|
+
var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/Newest/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/Newest/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
|