titanfiber 1.0.164 → 1.0.166
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/eval.pkg.js +1 -1
- package/harness.pkg.js +1 -1
- package/package.json +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,i=function(e){return"string"==typeof e},u=function(e){return e instanceof String},o=function(e){return i(e)||u(e)},a=o,l=function(e,n){const r=[];let t="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(t+=a,u=!1):(n&&(t+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(t.length>0&&(r.push(t),t=""),u=!1):(t+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(t+=a,u=!1):u=!0:(n&&(t+=a),i="outside")}}return t.length>0&&r.push(t),r},s=function(e,n){var t=e;return null==t?r():a(t)?l(t,n):t},c=function(e,n){for(var r=s(e,n),t=[],i=!1,u=r.length,o=0;o<u;o++){var a=r[o];if(!i){var l=a[0];let e;if("-"===l)if("-"===a[1]){if(2===a.length){i=!0;continue}e=2}else e=1;else"/"===l&&(e=1);if(e){var c,f,p=a.slice(e),d=p.indexOf("=");if(-1!==d)c=p.slice(0,d),f=p.slice(d+1);else{c=p;var h=r[o+1];null==h||"-"===h[0]?f=!0:(f=h,o++)}t[c]=f;continue}}t.push(a)}return t},f=c,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"function"==typeof e},g=function(e,n,r,t){var i=e[n];if(void 0===i){var u=r;!1!==t&&m(u)&&(u=u(e,n)),e[n]=i=u}return i},y=function(e,n,r){return Object.keys(n).forEach(t=>g(e,t,n[t],r)),e},b=function(e,n,r){return y(e||{},n,r)},w=function(e,n,r){return n?b(e,n,r):e??{}},x=function(e,n){return w(e,n,!0)},E=function(e){return Array.isArray(e)},O=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},S=O(globalThis.Error),_=class extends S{constructor(e,n){super(e??"Unexpected value",n)}},A=e(function(){return"undefined"==typeof window}),N=function(e){return require("node:"+e)},T=function(n){return e(()=>N(n))},j=T("util"),F=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),j().inspect(e,n)},I=function(e,n){return null!=e&&e.constructor===n},k=function(e){return I(e,Object)},C=function(e,n){return n<0?e.length+n:n},M=C,D=function(e,n,r,t){return void 0!==n&&(null===n||0===n?n=void 0:(n=M(e,n),t&&0==t.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=M(e,r),t&&t.inclusiveEnd&&r++)),[n,r]},P=function(e,n,r,t,i,u){if(r||null!=t){[r,t]=D(e,r,t,u);var o=e.slice(r,t),a=n(o);return i?i(a,r,t,o,e):a}return n(e)},R=function(e,n,r,t,i){return P(e,n,r,t,(n,r,t)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==t?e.slice(t):""),i)},L=I,q=function(e){return L(e,RegExp)},B=function(e){return E(e)?e:[e]},G=function(e){return e instanceof Promise},W=function(e,n){var r=e;return G(r)?r.then(n):n(r)},K=function(e){return m(e)&&null==e.prototype},z=K,U=function(e){return function(){return e.apply(this,arguments)}},Y=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return W(r,()=>(delete this.super,r))}:z(e)?U(e):e,r._isConstructor=!0,r},V=function(e,n){return e._isConstructor?e:Y(e,n)},J=function(){return this},Q=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},H=function(e){return!Q(e)},$=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},X=function(e,n){return $(e,n,!1)},Z=function(e,n,r,t){return r||(r={}),t&&X(r,t),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(e,n,r)},ee=function(e,n,r,t){return Z(e,n,{value:r,writable:!0,enumerable:!1},t),r},ne=ee,re=class extends S{constructor(e,n){super(e??"Not yet implemented",n)}},te=function(e,n,r,t){return e||(e={}),g(e,n,r,t),e},ie=function(e,n){return te(e,"fromFn",n,!1)},ue=function(e,n){return new re(e,ie(n,ue))},oe=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),ne(e,"displayName",n)},ae=oe,le=function(e,n){return Object.assign(e,n)},se=A()?require("util").inspect.custom:Symbol("Display"),ce=function(e,n){e.prototype[se]=n},fe=function(e,n,r,t,i,u){u||(u={}),a(n)&&(n=null);var o,l,s,c=r;c&&(E(c)?([l,s]=c,l&&(l=V(l))):o=V(c,n));var f=u.bareFn;u.singleton&&(f=function(){return null==h.default&&(h.default=new h(...arguments)),h.default});var p,d=l||o||n||J;function h(){if(!new.target&&f&&!(this instanceof h))return f.apply(this,arguments);var e=this;return W(d.apply(e,arguments),r=>{if(r&&H(r)&&(e=r,l)){if(!new.target)throw ue('Prototype repair is NYI for class instantiation without "new".');if(!n)throw ue("instanceFn is not yet supported when extendsClass is null.");var t=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==t&&Object.setPrototypeOf(e,t)}return s?W(s.apply(e,arguments),()=>e):e})}return e&&ae(h,e),n&&Object.setPrototypeOf(h,n),t?(p=t,n&&Object.setPrototypeOf(t,n.prototype)):p=n?Object.create(n.prototype):{},ne(p,"constructor",h),h.prototype=p,i&&le(h,i),u.display&&ce(h,u.display),u.implements&&B(u.implements).forEach(e=>e(h)),h},pe=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},de=pe,he=function(e,n,r,t,i){var u=Symbol();return fe(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,de(this,u)}],r,t,i)},ve=function(e,n,r,t){return n=null==n?0:C(e,n),r=null==r?e.length:C(e,r),t&&(0==t.inclusiveStart&&n++,t.inclusiveEnd&&r++),[n,r]},me=function(e,n,r,t){var i=n;if([r,t]=ve(e,r,t),m(i))for(var u=r;u<t;u++)e[u]=i(u,e);else e.fill(i,r,t);return e},ge=function(e,n){var r=new Array(e||0);return arguments.length>1&&me(r,n),r},ye=function(e,n){return ge(n.length,r=>e[n[r]])},be=function(e,n){return e[n]},we=function(e,n,r){return e[n]=r},xe=function(e,n,r){var t=e;return m(t)?t.apply(r,n):t},Ee=function(e,n,r,t,i){t||(t=be);var u=t(e,n);return void 0===u&&(u=xe(r,[e,n]),i||(i=we),i(e,n,u)),u},Oe=function(e,n){return e.get(n)},Se=function(e,n,r){return e.set(n,r)},_e=function(e,n,r){return Ee(e,n,r,Oe,Se)},Ae=class{constructor(){this.store=new Map}get(e,n){return _e(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Ne=function(e,n){return e.push(n),e},Te=Ne,je=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Fe=Symbol("Value"),Ie=function(){return{}},ke=function(e){return[e.slice(0,-1),e[e.length-1]]},Ce=ke,Me=function(e,n,r,t,i,u){r||(r=be),null==t&&(t=Ie),null==i&&(i=we),null==u&&(u=r);for(var[o,a]=Ce(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=r(l,f);if(void 0===p){if(!t)return;p=Ee(l,f,t,r,i)}l=p}if(u)return u(l,a,i)},De=function(e,n,r,t,i,u){return Me(e,n,t,i,u,(e,n)=>Ee(e,n,r,t,u))},Pe=function(){return new Map},Re=function(e,n,r){return De(e,n,r,Oe,Pe,Se)},Le=function(e,n){return delete e[n],e},qe=function(e,n,r,t){return Me(e,n,r,!1,!1,t||Le)},Be=function(e,n){return e.delete(n)},Ge=function(e,n){return qe(e,n,Oe,Be)},We=class{constructor(){this.store=new Map}get(e,n){return e=Te(je(e),Fe),Re(this.store,e,n)}remove(e){return e=Te(je(e),Fe),Ge(this.store,e)}delete(e){return this.remove(e)}},Ke=he("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=B(n)).length){this.cache=new Ae;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new We,this._cacheKeyFormatter=e=>ye(e,n);else this.cache=new We,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))}}),ze=function(e,n){return new Ke(e,n)},Ue=function(e){return new Set(e)},Ye=function(e){var n={};if(e){var r=Ue(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Ve=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Je=function(e,n){var r=Ye(e);return Ve(Object.assign(r,n))},Qe=function(e,n){var r=n,t=void 0;return a(r)?t=r:k(r)&&(t=Je(e.flags,r)),new RegExp(e,t)},He=function(e,n){return Qe(e,e.flags+n)},$e=function(e){return He(e,"g")},Xe=ze(function(e){return e.global?e:$e(e)},0),Ze=function(e){var n=e;return null==n?void 0:a(n)?n:Ve(n)},en=function(e,n){return new RegExp(e,Ze(n))},nn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},rn=function(e,n){return en(nn(e),n)},tn=function(e,n,r,t,i,u){return R(e,function(e){return e.replaceAll?(q(n)&&(n=Xe(n)),e.replaceAll(n,r)):(n=a(n)?rn(n,"g"):Xe(n),this.replace(n,r))},t,i,u)},un=function(e,n,r){return tn(e,n,(r??"\\")+n)},on=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=un(e,n,r)),n+e+n},an=function(e){return on(e,'"')},ln=k,sn=function(e){return ln(e)?mn(e):String(e)},cn=function(e,n){return n||(n=fn),"["+e.reduce(function(e,r){return e+n(r)+", "},"").slice(0,-2)+"]"},fn=function(e){return a(e)?an(e):E(e)?cn(e):sn(e)},pn=function(e){return Reflect.ownKeys(e)},dn=function(e,n){return(n?pn:Object.keys)(e)},hn=function(e,n,r){dn(e,r).forEach((r,t,i)=>n(r,e[r],t,i))},vn=function(e,n,r,t){var i=null!=r?r:"";return hn(e,function(){i=n.call(this,i,...arguments)},t),i},mn=function(e,n){return n||(n=fn),"{"+vn(e,function(e,r,t){return e+r+":"+n(t)+", "},"",!0).slice(0,-2)+"}"},gn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":mn(e,e=>bn(e,n-1))},yn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":cn(e,e=>bn(e,n-1))},bn=function(e,n){return void 0===e?"undefined":null===e?"null":A()?F(e,n):k(e)?gn(e,maxNumLevels):E(e)?yn(e,maxNumLevels):sn(e)},wn=function(e,n,r,t){if(0===arguments.length)return new _("Unexpected value received");t||(t={});var i,{expected:u}=t;return i=u?"Received "+bn(e)+", expected one of "+bn(u):"Unexpected value received: "+bn(e),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),t.fromFn||(t.fromFn=wn),new _(i,t)},xn=O(globalThis.TypeError),En=function(e){return null==e?e:e.constructor},On=function(e,n,r,t){if(0===arguments.length)return new xn("Unexpected type received");t||(t={});var i,{type:u,expected:o}=t;return null==u&&(u=En(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+=" ("+bn(e)+")"),o||(i+=")"),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),t.fromFn||(t.fromFn=On),new xn(i,t)},Sn=function(e){var n=e.stdio;if(n){if(!E(n)){if(!a(n))throw On(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 wn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},_n=function(e,n,r){var t=new S(e,r);return n&&Object.assign(t,n),t},An=function(e){if(!E(e))throw On(e,null,null,{expected:Array});return!0},Nn=function(e,n){var r=n.length;e.length=r;for(var t=0;t<r;t++)e[t]=n[t];return e},Tn=function(e){return function(){return!e.apply(this,arguments)}},jn=function(e,n){return Nn(e,e.filter(Tn(n)))},Fn=function(e){return jn(e,e=>null==e)},In=T("child_process"),kn=e(function(){return"win32"===process.platform}),Cn=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 xe(t);throw e},Mn=function(e,n,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 a=Sn(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw _n("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 _n("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=r.captureErr??!1;var l=r.showErr;if(o&&l)throw _n("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":l??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),n&&(An(n),Fn(n));try{var s=In().execFileSync(e,n,r);null!=s&&r.trim&&(s=s.trim());var c=r.map??r.mapFn;return c&&(s=c(s)),s}catch(e){if(kn())return Cn(e,e=>"ENOENT"===e.code,r);throw e}},Dn=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Mn("npm",e,n)},Pn=function(e,n,r){return Dn(["install",e,n?"-g":null],r)},Rn=T("path"),Ln=Rn().sep,qn=function(e,n,r){e=String(e);var t=Rn().resolve,i=n?t(n,e):t(e);return r?i+Ln:i},Bn=function(e){return require(qn(e))},Gn=class{constructor(){this.store={}}get(e,n){return g(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},Wn=new Gn,Kn=function(e){return e[e.length-1]},zn=C,Un=function(e,n,r){return e=Qe(e,{global:!0}),null!=r&&(n=zn(r,n)),e.lastIndex=n,e},Yn=function(e,n,r){return e=null!=r?Un(e,r,n):Xe(e),Array.from(n.matchAll(e))},Vn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Kn(Yn(e,n))||null},Jn=function(e,n){var r=Vn(e,n);return r&&n.length===r.index+r[0].length?r:null},Qn=function(e,n){if(a(n))return e.endsWith(n);if(q(n))return!!Jn(n,e);throw On(n,1,"matchThis")},Hn=/\/|\\/,$n=function(e){return Qn(e,Hn)?e:e+Ln},Xn=function(e,n,r){if(A()){var t=Rn().join(String(e),String(n));return r?$n(t):t}throw ue()},Zn=function(e,n){return e.endsWith(n)?e:Xn(e,n)},er=T("module"),nr=function(e){return e=Zn(e,"node_modules"),er().createRequire(e)},rr=function(e,n){return Wn.get(e,()=>nr(e))(n)},tr=function(e,n,r){return n?y(e,n,r):e},ir=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},ur=function(e,n){var r=Jn(n,e);return r?e.slice(0,r.index):e},or=function(e,n){if(a(n))return ir(e,n);if(q(n))return ur(e,n);throw On(n,1)},ar=or,lr=function(e,n){return[e.slice(0,n),e.slice(n)]},sr=function(e){e=ar(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return lr(e,n+1)},cr=function(e,n){return e.startsWith(n)?e:n+e},fr=function(e){var[n,r]=sr(e);return n+cr(r.trim(),"return ")},pr=function(e){return St("node-repl-await").processTopLevelAwait(e)},dr=function(e){return pr(e)??e},hr=tn,vr=function(e,n){return""===e?e:(!1!==n&&(e=$n(e)),hr(e,"\\","/"))},mr=function(e,n){return s(e,n).slice()},gr=mr,yr=function(){var e=require.main?.filename;return e||(null!=process._eval?null:gr(process.argv)[1])},br=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},wr=function(e){return e.split(".")[0]},xr=function(e){return Rn().win32.basename(String(e))},Er=function(e){return wr(xr(e))},Or=function(e,n,r,t){e||(e=yr()??"_console.js");var i=br(Er(e));return n&&(i+="_repl"),i+(r&&t?.dynamic?".dypkg.json":".pkg.js")},Sr=function(e,n){return e=Rn().dirname(String(e)),!1===n?e:$n(e)},_r=function(e,n,r,t){var i,u=Or(e,n,r,t);return i=e?Sr(e):"./",qn(i+u)},Ar=function(e){return'require("'+vr(_r(),!1)+'");\n'+e},Nr=function(e,n){return tn(e,n,"")},Tr=function(e,n){return n.forEach(n=>e=Nr(e,n)),e},jr=function(e){return Tr(e,["\r","\n"])},Fr=function(e,n){return St("astring").generate(e,n)},Ir=function(e,n){return e.stack=n+"\n"+e.stack,e},kr=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=St("acorn");try{return t.parse(e,r)}catch(n){throw Ir(n,"Acorn parsing error: "+e)}},Cr=function(e,n,r){return Fr(kr(e,n,r))},Mr=function(e){return jr(Cr(e))},Dr=function(e,n,r){return(n||r)&&(n||(n={}),r&&tr(n,r),n.ensureReturn&&(e=fr(e)),n.topLevelAwait&&(e=dr(e)),n.useTitan&&(e=Ar(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},Pr=function(e){return a(e)?e:sn(e)},Rr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Lr=function(e,n,r,t,i){return P(e,n,r,t,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},qr=function(e,n){return Array.prototype.findIndex.call(e,n)},Br=function(e,n,r,t,i){var u=a(n);return u&&null==t&&!i?e.indexOf(n,r):Lr(e,e=>u?e.indexOf(n):q(n)?e.search(n):qr(e,n),r,t,i)},Gr=function(e,n,r,t,i){var u=Br(e,n,r,t,i);return-1===u?null:e.slice(u+1,t)},Wr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Kr=Nr,zr=function(e,n){return Qe(e,Kr(e.flags,n))},Ur=function(e){return zr(e,"g")},Yr=ze(function(e){return e.global?Ur(e):e},0),Vr=function(e,n,r){return(e=null!=r?Un(e,r,n):Yr(e)).exec(n)},Jr=function(e,n){var r=Vr(e,n);return r&&0===r.index?r:null},Qr=function(e,n){var r=Jr(n,e);return r?e.slice(r[0].length):e},Hr=function(e,n){if(a(n))return Wr(e,n);if(q(n))return Qr(e,n);throw On(n,1)},$r=Hr,Xr=function(e){var n=Gr(e,"=>").trim();return $r(ar(n,"}"),"{")},Zr=function(e){return Gr(e,"{").slice(0,-1)},et=function(e){var n=Pr(e);return Rr(n)?Xr(n):Zr(n)},nt=function(e){return null==e?"":a(e)?e:m(e)?et(e):String(e)},rt=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},t=Dr(nt(e),n,r);return Mn("node",[n?.mode??"-p",t],n)},tt=function(e,n,r,t){var i="Required argument";return r&&(i+=' "'+r+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+bn(e)+")"),_n(i,null,ie(t,tt))},it=function(e,n,r){if(null==e)throw tt(e,n,r,{fromFn:it});return e},ut=function(e,n){return process.kill(e,it(n,0,"signalName"))},ot=function(e){return ut(e,"SIGINT")},at=function(){return ot(process.pid)},lt=at,st=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw wn(e,0,"char")},ct=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=rt(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(),_n("Prompt was cancelled via interrupt.");return console.log(n),st(n)},ft=function(e){return E(e)?e:a(e)?e.split("."):[e]},pt=function(e,n,r,t,i,u){var o=r;return Me(e,n,t,i,u,(e,n,r)=>r(e,n,xe(o)))},dt=function(e,n){var r=n,t=globalThis.config;t||(t=globalThis.config={});var i,u=ft(e);return u.length>1?i=pt(t,u,r):(i=xe(r),t[u[0]]=i),i},ht=function(e,n){return dt("node.require.customDirs",r=>(r||(r=[]),!1!==n&&(e=Zn(e,"node_modules")),r.includes(e)||r.push(e),r)),e},vt=ht,mt=Me,gt=function(e){var n=globalThis.config;if(n){var r=ft(e);return r.length>1?mt(n,r):n[r[0]]}},yt=function(e,n,r){if(null!=e)return e;var t=gt(n);return null!=t?t:r},bt=T("fs"),wt=function(e){return!!bt().lstatSync(String(e),{throwIfNoEntry:!1})},xt=function(e){var n=Sr(e,!1);return wt(n)||(n!==e&&xt(n),bt().mkdirSync(String(n))),e},Et=function(e){return xt(e),bt().mkdirSync(String(e)),e},Ot=function(e){return wt(e)?e:Et(e)},St=function(e,n){if(h(e))return require(e);if(v(e))return Bn(e);try{return require(e)}catch(e){}var r=__dirname,t=process.mainModule?.path;if(t!==r)try{return rr(t,e)}catch(e){}var i=process.cwd();if(i!==t&&i!==r)try{return rr(i,e)}catch(e){}var u=gt("node.require.customDirs");if(u)for(var o of u)try{return rr(o,e)}catch(e){}var a=yt(n?.autoInstall,"node.require.autoInstall"),l=yt(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=qn(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=ct('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=Ot(s),Pn(e,!1,{cwd:s});try{return vt(s),rr(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw _n('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:t,cwd:i}})},_t=function(e){return bt().readFileSync(String(e),"utf8")},At=_t,Nt=function(e){return JSON.parse(At(e))},Tt=function(e){return Qn(e,Hn)},jt=function(e,n){var r=Vn(e,n);return r?r.index:-1},Ft=function(e){var n=jt(Hn,e);return-1===n?null:e.slice(0,n+1)},It=function(e,n,r){if(Tt(e))return r?[e,null]:e;var t,i,u=Ft(e),o=n(xr(e),u,e);return r?[t,i]=o:t=o,null!=t&&(e=u?u+t:t),r?[e,i]:e},kt=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var t=lr(e,r);return t[1]=t[1].slice(n[0].length),t},Ct=function(e,n,r,t,i){return P(e,n,r,t,(n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n),i)},Mt=function(e,n){return e.splice(e.length,0,...n),n},Dt=function(e,n){return Mt(e,n),e},Pt=Dt,Rt=class extends Array{constructor(e,n,r,t,i){if(-1===n)throw _n("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw _n("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,t&&Pt(this,t),this.index=n,this.input=r,i&&(this.groups=i)}fromParts(e){var n=e;return new Rt(n.match,n.index,n.input,n.captures,n.groups)}},Lt=function(e,n,r,t,i){return Ct(e,e=>{if(q(n))return Vn(n,e);if(a(n)){var r=e.lastIndexOf(n);return-1!==r?new Rt(n,r):null}throw On(n,1)},r,t,i)},qt=function(e,n,r,t,i){return kt(e,Lt(e,n,r,t,i))},Bt=function(e){return It(e,e=>qt(e,"."),!0)},Gt=function(e,n){var r=Bt(e)[1];return r?!1!==n?r.toLowerCase():r:null},Wt=/(['"])(.*?)\1/,Kt=$e(Wt),zt=function(e){return e.replace(Kt,"")},Ut=zt,Yt=function(e){return globalThis.structuredClone(e)},Vt=Yt,Jt=ze,Qt=/\r?\n/,Ht=function(e){return null==e||void 0!==e.length&&0===e.length},$t=function(e,n){return jn(e,Ht)},Xt=function(e,n){return e.splice(n,1),e},Zt=function(e,n,r,t){[r,t]=ve(e,r,t);for(var i=r;i<t;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ei=function(e,n,r){for(var t={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;r?(t[a]||(t[a]=[]),t[a].push(l)):t[a]=l}}return t},ni=function(e,n,r,t){return[n,r]=ve(e,n,r,t),e.slice(n,r)},ri=function(e,n){return ge(n,e).join("")},ti=function(e){return e?e[0]:null},ii=function(e,n,r,t,i){return new Rt(e,n,r,t,i)},ui=function(e,n,r,t,i){return-1===n||null==e?null:ii(e,n,r,t,i)},oi=function(e,n,r,t,i){return Ct(e,e=>{if(a(n)){var r=e.indexOf(n);return ui(n,r,e)}return Vr(n,e)},r,t,i)},ai=function(e,n,r,t,i){return kt(e,oi(e,n,r,t,i))},li=function(e){return isNaN(e)?null:e},si=function(e){return null==e?null:li(Number(e))},ci=si,fi=function(e){return ci(e)??e},pi=function(e,n){null==n&&(n="=");var r={};return e.forEach(function(e){var[t,i]=ai(e,n);null!=i&&(i=fi(i.trim())),r[t.trim()]=i}),r},di=te,hi=class extends Array{constructor(e){var n,r=e;null!=r&&(E(r)?n=r:a(r)&&(n=r.split(Qt))),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 $t(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],t=r.indexOf(e);-1!==t&&(""===(r=r.slice(0,t)).trim()?(Xt(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return Zt(this,e)}join(){return super.join("\n")}toObj(e){return pi(this,e)}mapToObj(e,n){return ei(this,e,n)}between(e,n,r){return r=di(r,"inclusiveEnd",!0),ni(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Kn(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=ti(Vr(/^\s*/,e));if(n){var r=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(r)})}}return this}deindent(e,n,r){throw ue()}indent(e,n){var r=ri(n??"\t",e??1);return this.apply(e=>r+e)}static is(e){return I(e,this)}static fromChunks(e){return e.map(e=>ar(e,Qt)).flatMap(e=>mi(e,!1))}},vi=function(e,n){var r=new hi(e);return n&&r.condense(),r},mi=function(e,n,r){var t=e.split(Qt);return n?vi(t,r):t},gi=function(e,n){return mi(At(e),!0,n)},yi=function(e,n){return Yr(e).test(n)},bi=function(e,n){return q(n)?yi(n,e):e.includes(n)},wi=function(e,n,r,t){null==e&&(e=""),null==n&&(n="");var i={},u=(r,t)=>i[e+r+n]=t;return t&&hn(t,u),r&&hn(r,u),i},xi=function(e,n){return hn(n,(n,r)=>e=tn(e,n,r)),e},Ei=function(e,n,r,t){var i,u,o=t?.paramIdentifier??"$";if(o)if(a(o)){if(!bi(e,o))return e;i=o}else{if(!E(o))throw On(o,1,"paramIdentifier");if([i,u]=o,!bi(e,i)&&!bi(e,u))return e}var l=wi(i,u,n,r);return xi(e,l)},Oi=function(e){return a(e)?e:String(e)},Si=globalThis.process?.env.windir,_i=T("os"),Ai=function(){return _i().tmpdir()+Ln},Ni=function(e){if(e)throw ue();return _i().homedir()+Ln},Ti=function(e){return Ni(e)+"Desktop/"},ji={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Si,SYSTEM32:Si&&Si+"System32",TEMP:Ai(),DESKTOP:Ti()},Fi=function(e,n){return Ei(Oi(e),n,ji)},Ii=e(function(){var e=process.env.TITAN_PATH;if(!e)throw _n("Environment variable TITAN_PATH is not set.");return $n(e)}),ki=function(e){return e||(e="Newest"),Ii()+"Compiled/"+e+"/"},Ci=function(e,n){return e?Fi(e,{TITAN:Ii()}):ki(n)+"SourceMap.txt"},Mi=function(e,n,r,t,i){var u=Br(e,n,r,t,i);return-1===u?null:e.slice(r,u)},Di=function(e){var n=e[0];return n===n.toUpperCase()},Pi=function(e,n){var r=[],t=[];return e.forEach((i,u)=>(n(i,u,e)?r:t).push(i)),[r,t]},Ri=Jt(function(e){var n=gi(Ci(e),!0),r={};return n.forEach(e=>{var n=Mi(e,"=").split(",").map(e=>e.trim()),[t,i]=Pi(n,e=>!Di(e)),u=t[0];if(!u)throw _n('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{r[e]=u})}),r},0),Li=e(function(e){var n=Object.keys(e);return en("\\b("+n.join("|")+")\\.(\\w+)","g")}),qi=/\bt\.(\w+)\.(\w+)/g,Bi=function(e,n){n||(n={});var r={},t=r.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?Vt(n.additionalGlobals):{},r.globals=i;var u=Ri(),o=Li(u),a=Yn(o,e).filter(n=>{var r=n[1],t=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[r];return!u||void 0===u[t]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,r])=>{var t=u[n];if(!t)throw _n("No short name found for global: "+n);return"t."+t+"."+r+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(qi))t[p]||(t[p]={}),t[p][c]=!0;return r},Gi=function(e,n){return e=Cr(e),e=Ut(e),Bi(e,n)},Wi=function(e,n){return Bi(e,n)},Ki=function(e,n){var r=n?.fileType;if(r){if("js"===(r=r.toLowerCase()))return Gi(e,n);if("html"===r)return Wi(e,n)}return Bi(e,n)},zi={},Ui=Jt(function(e,n){e=Ci(e,n);var r=Sr(e),t=gi(e,"//"),i=zi;for(var u of t){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map(e=>e.trim()).filter(e=>!Di(e));var l=u.slice(o+1).trim(),s=Xn(r,l).replaceAll("\\","/");for(var c of a)i[c]=s}return i}),Yi=function*(e,n){var r=0;for(var t of e)n(t,r++,e)&&(yield t)},Vi=function(e){return e.slice()},Ji=function(e,n,r){for(var t=e.length-1;t>=n;t--)e[t+1]=e[t];return e[n]=r,e.length++,e},Qi=function(e,n){return Ji(e,e.length,n)},Hi=Qi,$i=function(e,n){return e.call(this,...n,function n(){return Kn(arguments)!==n&&Hi(arguments,n),e.apply(this,arguments)})},Xi=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var r=e.recurseIf;if(!r){var t=this.constructor;r=e=>I(e,t)||ln(e)||E(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return $i(function*(e,t,o,a){var l=n(e,t,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],d=Vi(t);d.push(f);var h=null,v={value:p,key:f,object:e,path:d,level:o,isLeaf:h,root:u},m=r(p,v);v.isLeaf=h=!m,i&&!h||(yield v),m&&(yield*a(p,d,o+1,a))}},[this,[],0])},Zi=function(e,n){return Xi.call(e,n)},eu=function(e,n){1===arguments.length&&(n=!0);var r={};for(var t of e)r[t]=n;return r},nu=function(e,n,r,t){var i=kr(e,n,t);St("acorn-walk").full(i,r)},ru=function(e,n,r,t){var i;if(a(r))i=e=>e.type===r;else if(E(r)){var u=eu(r);i=e=>u[e.type]}else i=r;var o=[];return nu(e,n,function(e){i.apply(this,arguments)&&o.push(e)},t),o},tu=Fr,iu=function(e){var n,r,t,i=e,u=a(i)?kr(i).body[0]:i,o=u.type;if("VariableDeclaration"===o){n="variable";var l=u.declarations[0];r=l.id.name,t=l.init?l.init.raw??Fr(l.init):"undefined"}else"FunctionDeclaration"===o?n="function":"ClassDeclaration"===o&&(n="class"),r=u.id.name;var s={type:n,name:r};return t&&(s.value=t),s.text=tu(u),s.node=u,s},uu=function(e){return ru(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var r=iu(n);return r.node=e,r}return{node:e}})},ou=function(e,n){n||(n={});var r=n.enableGlobals,t=Ui(n.sourceMap,n.stability);console.log("SOURCEMAP",t);var i={},u=[];return function e(n,o){var a=Yi(Zi(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=t[s];if(p){var d=vr(p)+c+".js";if(!wt(d)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),_n(h+=".")}var v=_t(d),m=uu(v)[0];f[c]=m;var g="t."+s+"."+c;e(Ki(v,{fileType:"js",enableGlobals:r}).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}},au=function(e){return vi(e).normalize().join()},lu=au,su=function(e,n){var r=e,t=m(r)?et(r):r;return!1!==n&&(t=au(t)),t},cu=function(e,n){return n<e?n:e},fu=function(e,n){return cu(e,n)},pu=function*(e,n){null==e&&(e=0),n=null==n?this.length:fu(n,this.length);for(var r=e;r<n;r++)yield this[r]},du=function(e,n,r){return null==n&&null==r?e[Symbol.iterator].call(e):pu.call(e,n,r)},hu=function(e,n){return n?Zt(dn(e,n),n=>[n,e[n]]):Object.entries(e)},vu=function(e){return du(hu(this,e))},mu=function(e,n){var r=e[Symbol.iterator];return r?r.call(e):vu.call(e,n)},gu=function(e,n,r){dn(e,r).forEach(n)},yu=function(e,n,r){if(Object.hasOwn(e,n)){var t=e[n];return delete e[n],r?r(t,e,n):t}},bu=function(e,n){hn(n,(n,r)=>yu(e,n,r))},wu=bu,xu=function(e,n,r){return null==(n=x(n,r)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),wu(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=B(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=Cr(e),St("terser").minify_sync(e,n).code},Eu=function(e,n){n||(n={});var r=n.minify??!1,t=n.debug??!1,i=n.deps??Ki(e,n),{t:u,globals:o,order:a}=ou(i,n),l="//Flat references:\n";for(var[s,c]of a){var f=u[s][c],p="t_"+s+"_"+c,d="variable"===f.type?f.value:"("+f.text+")";d=d.replaceAll(qi,(e,n,r)=>"t_"+n+"_"+r),l+="var "+p+" = "+d+"\n"}for(var[s,h]of(t&&(l+="//Debug functions:\n",l+=lu('\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 = {",mu(u))){for(var c of(l+="\n\t"+s+": {",Object.keys(h))){var v="t_"+s+"_"+c;t&&(v="_withName("+v+", 't."+s+"."+c+"')"),l+="\n\t\t"+c+": "+v+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=au("\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+=su("\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=Ri();hn(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',gu(n,n=>{var r=m[e];l+='\n_weakGlobalize("'+e+'", "'+r+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",r){var g=k(r)?r:null;l=xu(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},Ou=function(e){var n=typeof e;return"number"===n||"bigint"===n},Su=function(e){return e instanceof Buffer},_u=function(e){return ArrayBuffer.isView(e)},Au=_u,Nu=function(e){return Su(e)||Au(e)||a(e)},Tu=function(e){return e.constructor===ArrayBuffer},ju=function(e){return Nu(e)?e:Tu(e)?Buffer.from(e):sn(e)},Fu=function(e){return Ou(e)?String(e):ju(e)},Iu=function(e,n){return xt(e),bt().writeFileSync(String(e),Fu(n)),e},ku=function(e,n,r){r||(r={}),r.fileType||!n||r.deps||(r.fileType=Gt(n));var t=Eu(e,r),i=r.packagePath||_r(n,r.repl);return Iu(i,t),i},Cu={env:{parseArgs:p,args:r,setConfig:dt,getConfig:gt,resolveConfig:yt},node:{parseArgs:f,args:n,pause:function(e){null!=e&&(e=String(e)),St("press-any-key-sync")(e)},require:St,_basicRequire:d,is:A,display:F,util:j,_builtInModule:T,requireBuiltIn:N,child_process:In,requireLocal:Bn,path:Rn,_requireFromDir:rr,_requireDirCache:Wn,_createRequire:nr,module:er,promptYNSync:ct,run:rt,getScriptPath:yr,positionalArgs:gr,sigint:lt,interrupt:at,ensureRequireDir:vt,addRequireDir:ht,fs:bt,loadPackageJSON:function(e){var n=e??"./";return n.endsWith("package.json")||(n=Xn(n,"package.json")),wt(n)?Nt(n):{}},os:_i},cli:{parseArgs:c,resolveArgs:s,splitArgs:l,positionalArgs:mr},f:{one:e,is:m,memoize:ze,MemoizedFunction:Ke,createClass:he,ensureConstructor:V,createConstructor:Y,isArrowFn:z,isArrow:K,wrap:U,retThis:J,setName:oe,not:Tn,body:et,isArrowString:Rr,_getArrowFnBody:Xr,_getNormalFnBody:Zr,cache:Jt,recurse:$i},s:{is:a,isAny:o,isPrimitive:i,isObject:u,toLiteral:an,quote:on,escape:un,replaceAll:tn,apply:R,withIndices:P,chars:Ue,from:sn,endsWith:Qn,resolveIndex:zn,removeTrailing:ar,removeFromEnd:or,_removeStringFromEnd:ir,_removeRegexFromEnd:ur,splitAtIndex:lr,ensureStartsWith:cr,replace:hr,decapitalize:br,removeLineBreaks:jr,removeMulti:Tr,removeAll:Nr,resolve:nt,ensure:Pr,after:Gr,index:Br,_indexWithIndices:Lr,indexOfFn:qr,removeLeading:$r,removeFromStart:Hr,_removeStringFromStart:Wr,_removeRegexFromStart:Qr,remove:Kr,splitLast:qt,_splitByMatch:kt,matchLast:Lt,_matchWithIndices:Ct,removeQuotes:zt,splitLines:mi,lines:vi,LinesArray:hi,repeat:ri,splitFirst:ai,match:oi,replaceParams:Ei,contains:bi,_createParamsObj:wi,_replaceByObj:xi,before:Mi,isCapitalized:Di,normalize:lu,normalizeMLS:au,mls:su},npm:{isBuiltIn:h,isFile:v,install:Pn,_runCommand:Dn},os:{run:Mn,_resolveStdio:Sn},opt:{resolve:x},o:{safeSetDefaults:w,safeEnsureMulti:b,ensureMulti:y,ensure:g,is:k,display:gn,toLiteral:mn,constructorMatches:L,isAny:H,setHidden:ne,addNonEnumerable:ee,defineProperty:Z,weakAssign:X,merge:$,safeEnsure:te,hideKey:de,makeNonEnumerable:pe,ensureCustom:Ee,get:be,set:we,createEmpty:Ie,remove:Le,isPure:ln,reduce:vn,each:hn,keys:dn,allKeys:pn,Cache:Gn,setDefaults:tr,resolveKeys:ft,diveGet:mt,deepCopy:Vt,fromLines:pi,safeDefault:di,fromKeys:eu,iterate:mu,iterator:vu,entries:hu,eachKey:gu,consumeOptions:wu,consumeMulti:bu,consume:yu},a:{is:E,wrapIndices:D,wrapIndex:M,resolveIndex:C,ensure:B,pick:ye,create:ge,fill:me,resolveIndices:ve,push:Te,add:Ne,splitLast:Ce,splitTail:ke,toLiteral:cn,display:yn,assert:An,removeNullish:Fn,removeByFilter:jn,replaceContents:Nn,last:Kn,pushMulti:Pt,addMulti:Dt,pushThroughMulti:Mt,removeEmpty:$t,removeIndex:Xt,apply:Zt,mapToObj:ei,slice:ni,filterSplit:Pi,copy:Vi,iterate:du,iterator:pu},err:{value:wn,ValueError:_,Error:S,Enhanced:O,nyi:ue,NYIError:re,defaultFromFn:ie,type:On,TypeError:xn,create:_n,prepend:Ir,req:tt},v:{display:bn,constructorMatches:I,toLiteral:fn,isPrimitive:Q,resolve:xe,type:En,req:it,isEmpty:Ht,nullIfNaN:li},macro:{config:function(e){}},re:{is:q,ensureGlobal:Xe,global:$e,addFlag:He,copy:Qe,updateFlagString:Je,parseFlagString:Ye,createFlagString:Ve,createEscaped:rn,create:en,resolveFlags:Ze,escape:nn,matchEnd:Jn,matchLast:Vn,matchAll:Yn,setStartIndex:Un,slash:Hn,matchStart:Jr,match:Vr,ensureLocal:Yr,local:Ur,removeFlag:zr,lastIndex:jt,RegexResult:Rt,quotes:Kt,quote:Wt,newline:Qt,text:ti,safeCreateResult:ui,createResult:ii,test:yi},class:{create:fe,setName:ae,addStatics:le,setDisplay:ce},p:{asyncJoint:W,is:G},sym:{display:se,value:Fe},map:{Cache:Ae,ensure:_e,get:Oe,set:Se,MultiCache:We,diveEnsure:Re,createEmpty:Pe,diveDelete:Ge,remove:Be},args:{ensureArray:je,push:Hi,append:Qi,insert:Ji},tree:{ensure:De,dive:Me,remove:qe,setCustom:pt,copy:Yt,iterate:Zi,iterator:Xi},win:{is:kn},shell:{_handleError:Cn},path:{abs:qn,sep:Ln,ensureEndsWith:Zn,join:Xn,ensureTrailingSlash:$n,fws:vr,baseName:Er,_removeExtsFromFile:wr,file:xr,dir:Sr,ext:Gt,splitExt:Bt,ignoreDir:It,isDir:Tt,dirPart:Ft,resolveVars:Fi,string:Oi,_defaultParams:ji,windir:Si,_getDefaultTempDir:Ai,getDesktop:Ti,getUserDir:Ni},js:{enhance:Dr,ensureReturn:fr,splitLastExpression:sr,enableAwait:dr,_nodeEnableAwait:pr,useTitan:Ar,inline:Mr,removeComments:Cr,fromAST:Fr,parse:kr,removeQuotes:Ut,getExports:uu,getNodes:ru,eachNode:nu,parseDeclaration:iu,fromASTNode:tu,minify:xu},titan:{getPackagePath:_r,getPackageName:Or,packFile:function(e,n){return ku(_t(e),e,n)},packTextToFile:ku,packText:Eu,getDeps:Ki,getDepsFromJS:Gi,_getDepsBasic:Bi,loadGlobalsMap:Ri,_resolveSourceMapPath:Ci,locate:Ii,getCompiledDir:ki,_getGlobalsRegex:Li,depsRegex:qi,getDepsFromHTML:Wi,_getAllDeps:ou,loadSourceMap:Ui,sourceMap:zi},proc:{interrupt:ot,signal:ut},bool:{fromYN:st},fs:{ensureDir:Ot,exists:wt,mkdir:Et,ensureParent:xt,loadJSON:Nt,loadText:At,load:_t,loadLines:gi,write:Iu,formatRaw:Fu},n:{tryCoerce:fi,tryParse:ci,ensure:si,cap:fu,least:cu,is:Ou},gen:{filter:Yi},bin:{ensureByteSafe:ju,isByteSafe:Nu,isNodeBuffer:Su,isTA:Au},ab:{isTA:_u,is:Tu}};globalThis.t?Object.keys(Cu).forEach(function(e){if(t[e]){var n=Cu[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Cu[e]}):globalThis.t=Object.assign({},Cu),globalThis.exports&&(exports.default=globalThis.t);
|
|
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,i=function(e){return"string"==typeof e},u=function(e){return e instanceof String},o=function(e){return i(e)||u(e)},a=o,l=function(e,n){const r=[];let t="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(t+=a,u=!1):(n&&(t+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(t.length>0&&(r.push(t),t=""),u=!1):(t+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(t+=a,u=!1):u=!0:(n&&(t+=a),i="outside")}}return t.length>0&&r.push(t),r},s=function(e,n){var t=e;return null==t?r():a(t)?l(t,n):t},c=function(e,n){for(var r=s(e,n),t=[],i=!1,u=r.length,o=0;o<u;o++){var a=r[o];if(!i){var l=a[0];let e;if("-"===l)if("-"===a[1]){if(2===a.length){i=!0;continue}e=2}else e=1;else"/"===l&&(e=1);if(e){var c,f,p=a.slice(e),d=p.indexOf("=");if(-1!==d)c=p.slice(0,d),f=p.slice(d+1);else{c=p;var v=r[o+1];null==v||"-"===v[0]?f=!0:(f=v,o++)}t[c]=f;continue}}t.push(a)}return t},f=c,p=f,d=function(e){return require(e)},v=function(e){return!!e.startsWith("node:")||d("node:module").isBuiltin(e)},h=function(e){return e.startsWith(".")},m=function(e){return"function"==typeof e},g=function(e,n,r,t){var i=e[n];if(void 0===i){var u=r;!1!==t&&m(u)&&(u=u(e,n)),e[n]=i=u}return i},y=function(e,n,r){return Object.keys(n).forEach(t=>g(e,t,n[t],r)),e},b=function(e,n,r){return y(e||{},n,r)},w=function(e,n,r){return n?b(e,n,r):e??{}},x=function(e,n){return w(e,n,!0)},E=function(e){return Array.isArray(e)},O=function(e){return class extends e{constructor(e,n){super(e,n);var r=this.constructor.name;r&&(this.name=r)}}},S=O(globalThis.Error),_=class extends S{constructor(e,n){super(e??"Unexpected value",n)}},A=e(function(){return"undefined"==typeof window}),N=function(e){return require("node:"+e)},T=function(n){return e(()=>N(n))},j=T("util"),F=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),j().inspect(e,n)},I=function(e,n){return null!=e&&e.constructor===n},k=function(e){return I(e,Object)},C=function(e,n){return n<0?e.length+n:n},D=C,M=function(e,n,r,t){return void 0!==n&&(null===n||0===n?n=void 0:(n=D(e,n),t&&0==t.inclusiveStart&&n++)),void 0!==r&&(null===r||r===e.length?r=void 0:(r=D(e,r),t&&t.inclusiveEnd&&r++)),[n,r]},P=function(e,n,r,t,i,u){if(r||null!=t){[r,t]=M(e,r,t,u);var o=e.slice(r,t),a=n(o);return i?i(a,r,t,o,e):a}return n(e)},R=function(e,n,r,t,i){return P(e,n,r,t,(n,r,t)=>(void 0!==r?e.slice(0,r):"")+(n||"")+(void 0!==t?e.slice(t):""),i)},L=I,q=function(e){return L(e,RegExp)},B=function(e){return E(e)?e:[e]},G=function(e){return e instanceof Promise},W=function(e,n){var r=e;return G(r)?r.then(n):n(r)},K=function(e){return m(e)&&null==e.prototype},z=K,U=function(e){return function(){return e.apply(this,arguments)}},V=function(e,n){var r;return r=n?function(){this.super=n;var r=e.apply(this,arguments);return W(r,()=>(delete this.super,r))}:z(e)?U(e):e,r._isConstructor=!0,r},Y=function(e,n){return e._isConstructor?e:V(e,n)},J=function(){return this},Q=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},H=function(e){return!Q(e)},$=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},X=function(e,n){return $(e,n,!1)},Z=function(e,n,r,t){return r||(r={}),t&&X(r,t),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(e,n,r)},ee=function(e,n,r,t){return Z(e,n,{value:r,writable:!0,enumerable:!1},t),r},ne=ee,re=class extends S{constructor(e,n){super(e??"Not yet implemented",n)}},te=function(e,n,r,t){return e||(e={}),g(e,n,r,t),e},ie=function(e,n){return te(e,"fromFn",n,!1)},ue=function(e,n){return new re(e,ie(n,ue))},oe=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),ne(e,"displayName",n)},ae=oe,le=function(e,n){return Object.assign(e,n)},se=A()?require("util").inspect.custom:Symbol("Display"),ce=function(e,n){e.prototype[se]=n},fe=function(e,n,r,t,i,u){u||(u={}),a(n)&&(n=null);var o,l,s,c=r;c&&(E(c)?([l,s]=c,l&&(l=Y(l))):o=Y(c,n));var f=u.bareFn;u.singleton&&(f=function(){return null==v.default&&(v.default=new v(...arguments)),v.default});var p,d=l||o||n||J;function v(){if(!new.target&&f&&!(this instanceof v))return f.apply(this,arguments);var e=this;return W(d.apply(e,arguments),r=>{if(r&&H(r)&&(e=r,l)){if(!new.target)throw ue('Prototype repair is NYI for class instantiation without "new".');if(!n)throw ue("instanceFn is not yet supported when extendsClass is null.");var t=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==t&&Object.setPrototypeOf(e,t)}return s?W(s.apply(e,arguments),()=>e):e})}return e&&ae(v,e),n&&Object.setPrototypeOf(v,n),t?(p=t,n&&Object.setPrototypeOf(t,n.prototype)):p=n?Object.create(n.prototype):{},ne(p,"constructor",v),v.prototype=p,i&&le(v,i),u.display&&ce(v,u.display),u.implements&&B(u.implements).forEach(e=>e(v)),v},pe=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},de=pe,ve=function(e,n,r,t,i){var u=Symbol();return fe(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,de(this,u)}],r,t,i)},he=function(e,n,r,t){return n=null==n?0:C(e,n),r=null==r?e.length:C(e,r),t&&(0==t.inclusiveStart&&n++,t.inclusiveEnd&&r++),[n,r]},me=function(e,n,r,t){var i=n;if([r,t]=he(e,r,t),m(i))for(var u=r;u<t;u++)e[u]=i(u,e);else e.fill(i,r,t);return e},ge=function(e,n){var r=new Array(e||0);return arguments.length>1&&me(r,n),r},ye=function(e,n){return ge(n.length,r=>e[n[r]])},be=function(e,n){return e[n]},we=function(e,n,r){return e[n]=r},xe=function(e,n,r){var t=e;return m(t)?t.apply(r,n):t},Ee=function(e,n,r,t,i){t||(t=be);var u=t(e,n);return void 0===u&&(u=xe(r,[e,n]),i||(i=we),i(e,n,u)),u},Oe=function(e,n){return e.get(n)},Se=function(e,n,r){return e.set(n,r)},_e=function(e,n,r){return Ee(e,n,r,Oe,Se)},Ae=class{constructor(){this.store=new Map}get(e,n){return _e(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Ne=function(e,n){return e.push(n),e},Te=Ne,je=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Fe=Symbol("Value"),Ie=function(){return{}},ke=function(e){return[e.slice(0,-1),e[e.length-1]]},Ce=ke,De=function(e,n,r,t,i,u){r||(r=be),null==t&&(t=Ie),null==i&&(i=we),null==u&&(u=r);for(var[o,a]=Ce(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=r(l,f);if(void 0===p){if(!t)return;p=Ee(l,f,t,r,i)}l=p}if(u)return u(l,a,i)},Me=function(e,n,r,t,i,u){return De(e,n,t,i,u,(e,n)=>Ee(e,n,r,t,u))},Pe=function(){return new Map},Re=function(e,n,r){return Me(e,n,r,Oe,Pe,Se)},Le=function(e,n){return delete e[n],e},qe=function(e,n,r,t){return De(e,n,r,!1,!1,t||Le)},Be=function(e,n){return e.delete(n)},Ge=function(e,n){return qe(e,n,Oe,Be)},We=class{constructor(){this.store=new Map}get(e,n){return e=Te(je(e),Fe),Re(this.store,e,n)}remove(e){return e=Te(je(e),Fe),Ge(this.store,e)}delete(e){return this.remove(e)}},Ke=ve("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=B(n)).length){this.cache=new Ae;var r=n[0];this._cacheKeyFormatter=e=>e[r]}else this.cache=new We,this._cacheKeyFormatter=e=>ye(e,n);else this.cache=new We,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))}}),ze=function(e,n){return new Ke(e,n)},Ue=function(e){return new Set(e)},Ve=function(e){var n={};if(e){var r=Ue(e);r.has("g")&&(n.global=!0),r.has("i")&&(n.caseInsensitive=!0),r.has("y")&&(n.sticky=!0)}return n},Ye=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},Je=function(e,n){var r=Ve(e);return Ye(Object.assign(r,n))},Qe=function(e,n){var r=n,t=void 0;return a(r)?t=r:k(r)&&(t=Je(e.flags,r)),new RegExp(e,t)},He=function(e,n){return Qe(e,e.flags+n)},$e=function(e){return He(e,"g")},Xe=ze(function(e){return e.global?e:$e(e)},0),Ze=function(e){var n=e;return null==n?void 0:a(n)?n:Ye(n)},en=function(e,n){return new RegExp(e,Ze(n))},nn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},rn=function(e,n){return en(nn(e),n)},tn=function(e,n,r,t,i,u){return R(e,function(e){return e.replaceAll?(q(n)&&(n=Xe(n)),e.replaceAll(n,r)):(n=a(n)?rn(n,"g"):Xe(n),this.replace(n,r))},t,i,u)},un=function(e,n,r){return tn(e,n,(r??"\\")+n)},on=function(e,n,r){return null==n&&(n='"'),!1!==r&&(e=un(e,n,r)),n+e+n},an=function(e){return on(e,'"')},ln=k,sn=function(e){return ln(e)?mn(e):String(e)},cn=function(e,n){return n||(n=fn),"["+e.reduce(function(e,r){return e+n(r)+", "},"").slice(0,-2)+"]"},fn=function(e){return a(e)?an(e):E(e)?cn(e):sn(e)},pn=function(e){return Reflect.ownKeys(e)},dn=function(e,n){return(n?pn:Object.keys)(e)},vn=function(e,n,r){dn(e,r).forEach((r,t,i)=>n(r,e[r],t,i))},hn=function(e,n,r,t){var i=null!=r?r:"";return vn(e,function(){i=n.call(this,i,...arguments)},t),i},mn=function(e,n){return n||(n=fn),"{"+hn(e,function(e,r,t){return e+r+":"+n(t)+", "},"",!0).slice(0,-2)+"}"},gn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":mn(e,e=>bn(e,n-1))},yn=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":cn(e,e=>bn(e,n-1))},bn=function(e,n){return void 0===e?"undefined":null===e?"null":A()?F(e,n):k(e)?gn(e,maxNumLevels):E(e)?yn(e,maxNumLevels):sn(e)},wn=function(e,n,r,t){if(0===arguments.length)return new _("Unexpected value received");t||(t={});var i,{expected:u}=t;return i=u?"Received "+bn(e)+", expected one of "+bn(u):"Unexpected value received: "+bn(e),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),t.fromFn||(t.fromFn=wn),new _(i,t)},xn=O(globalThis.TypeError),En=function(e){return null==e?e:e.constructor},On=function(e,n,r,t){if(0===arguments.length)return new xn("Unexpected type received");t||(t={});var i,{type:u,expected:o}=t;return null==u&&(u=En(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+=" ("+bn(e)+")"),o||(i+=")"),r&&(i+=' for "'+r+'"'),null!=n&&(i+=" (index "+n+")"),t.fromFn||(t.fromFn=On),new xn(i,t)},Sn=function(e){var n=e.stdio;if(n){if(!E(n)){if(!a(n))throw On(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 wn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},_n=function(e,n,r){var t=new S(e,r);return n&&Object.assign(t,n),t},An=function(e){if(!E(e))throw On(e,null,null,{expected:Array});return!0},Nn=function(e,n){var r=n.length;e.length=r;for(var t=0;t<r;t++)e[t]=n[t];return e},Tn=function(e){return function(){return!e.apply(this,arguments)}},jn=function(e,n){return Nn(e,e.filter(Tn(n)))},Fn=function(e){return jn(e,e=>null==e)},In=T("child_process"),kn=e(function(){return"win32"===process.platform}),Cn=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 xe(t);throw e},Dn=function(e,n,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 a=Sn(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw _n("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 _n("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=r.captureErr??!1;var l=r.showErr;if(o&&l)throw _n("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":l??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),n&&(An(n),Fn(n));try{var s=In().execFileSync(e,n,r);null!=s&&r.trim&&(s=s.trim());var c=r.map??r.mapFn;return c&&(s=c(s)),s}catch(e){if(kn())return Cn(e,e=>"ENOENT"===e.code,r);throw e}},Mn=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,Dn("npm",e,n)},Pn=function(e,n,r){return Mn(["install",e,n?"-g":null],r)},Rn=T("path"),Ln=Rn().sep,qn=function(e,n,r){e=String(e);var t=Rn().resolve,i=n?t(n,e):t(e);return r?i+Ln:i},Bn=function(e){return require(qn(e))},Gn=class{constructor(){this.store={}}get(e,n){return g(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},Wn=new Gn,Kn=function(e){return e[e.length-1]},zn=C,Un=function(e,n,r){return e=Qe(e,{global:!0}),null!=r&&(n=zn(r,n)),e.lastIndex=n,e},Vn=function(e,n,r){return e=null!=r?Un(e,r,n):Xe(e),Array.from(n.matchAll(e))},Yn=function(e,n,r){return null!=r&&(n=n.slice(0,r)),Kn(Vn(e,n))||null},Jn=function(e,n){var r=Yn(e,n);return r&&n.length===r.index+r[0].length?r:null},Qn=function(e,n){if(a(n))return e.endsWith(n);if(q(n))return!!Jn(n,e);throw On(n,1,"matchThis")},Hn=/\/|\\/,$n=function(e){return Qn(e,Hn)?e:e+Ln},Xn=function(e,n,r){if(A()){var t=Rn().join(String(e),String(n));return r?$n(t):t}throw ue()},Zn=function(e,n){return e.endsWith(n)?e:Xn(e,n)},er=T("module"),nr=function(e){return e=Zn(e,"node_modules"),er().createRequire(e)},rr=function(e,n){return Wn.get(e,()=>nr(e))(n)},tr=function(e,n,r){return n?y(e,n,r):e},ir=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},ur=function(e,n){var r=Jn(n,e);return r?e.slice(0,r.index):e},or=function(e,n){if(a(n))return ir(e,n);if(q(n))return ur(e,n);throw On(n,1)},ar=or,lr=function(e,n){return[e.slice(0,n),e.slice(n)]},sr=function(e){e=ar(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return lr(e,n+1)},cr=function(e,n){return e.startsWith(n)?e:n+e},fr=function(e){var[n,r]=sr(e);return n+cr(r.trim(),"return ")},pr=function(e){return St("node-repl-await").processTopLevelAwait(e)},dr=function(e){return pr(e)??e},vr=tn,hr=function(e,n){return""===e?e:(!1!==n&&(e=$n(e)),vr(e,"\\","/"))},mr=function(e,n){return s(e,n).slice()},gr=mr,yr=function(){var e=require.main?.filename;return e||(null!=process._eval?null:gr(process.argv)[1])},br=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},wr=function(e){return e.split(".")[0]},xr=function(e){return Rn().win32.basename(String(e))},Er=function(e){return wr(xr(e))},Or=function(e,n,r,t){e||(e=yr()??"_console.js");var i=br(Er(e));return n&&(i+="_repl"),i+(r&&t?.dynamic?".dypkg.json":".pkg.js")},Sr=function(e,n){return e=Rn().dirname(String(e)),!1===n?e:$n(e)},_r=function(e,n,r,t){var i,u=Or(e,n,r,t);return i=e?Sr(e):"./",qn(i+u)},Ar=function(e){return'require("'+hr(_r(),!1)+'");\n'+e},Nr=function(e,n){return tn(e,n,"")},Tr=function(e,n){return n.forEach(n=>e=Nr(e,n)),e},jr=function(e){return Tr(e,["\r","\n"])},Fr=function(e,n){return St("astring").generate(e,n)},Ir=function(e,n){return e.stack=n+"\n"+e.stack,e},kr=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=St("acorn");try{return t.parse(e,r)}catch(n){throw Ir(n,"Acorn parsing error: "+e)}},Cr=function(e,n,r){return Fr(kr(e,n,r))},Dr=function(e){return jr(Cr(e))},Mr=function(e,n,r){return(n||r)&&(n||(n={}),r&&tr(n,r),n.ensureReturn&&(e=fr(e)),n.topLevelAwait&&(e=dr(e)),n.useTitan&&(e=Ar(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=Dr(e))),e},Pr=function(e){return a(e)?e:sn(e)},Rr=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},Lr=function(e,n,r,t,i){return P(e,n,r,t,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},qr=function(e,n){return Array.prototype.findIndex.call(e,n)},Br=function(e,n,r,t,i){var u=a(n);return u&&null==t&&!i?e.indexOf(n,r):Lr(e,e=>u?e.indexOf(n):q(n)?e.search(n):qr(e,n),r,t,i)},Gr=function(e,n,r,t,i){var u=Br(e,n,r,t,i);return-1===u?null:e.slice(u+1,t)},Wr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Kr=Nr,zr=function(e,n){return Qe(e,Kr(e.flags,n))},Ur=function(e){return zr(e,"g")},Vr=ze(function(e){return e.global?Ur(e):e},0),Yr=function(e,n,r){return(e=null!=r?Un(e,r,n):Vr(e)).exec(n)},Jr=function(e,n){var r=Yr(e,n);return r&&0===r.index?r:null},Qr=function(e,n){var r=Jr(n,e);return r?e.slice(r[0].length):e},Hr=function(e,n){if(a(n))return Wr(e,n);if(q(n))return Qr(e,n);throw On(n,1)},$r=Hr,Xr=function(e){var n=Gr(e,"=>").trim();return $r(ar(n,"}"),"{")},Zr=function(e){return Gr(e,"{").slice(0,-1)},et=function(e){var n=Pr(e);return Rr(n)?Xr(n):Zr(n)},nt=function(e){return null==e?"":a(e)?e:m(e)?et(e):String(e)},rt=function(e,n){var r=n?.basic?null:{topLevelAwait:!0,useTitan:!0},t=Mr(nt(e),n,r);return Dn("node",[n?.mode??"-p",t],n)},tt=function(e,n,r,t){var i="Required argument";return r&&(i+=' "'+r+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+bn(e)+")"),_n(i,null,ie(t,tt))},it=function(e,n,r){if(null==e)throw tt(e,n,r,{fromFn:it});return e},ut=function(e,n){return process.kill(e,it(n,0,"signalName"))},ot=function(e){return ut(e,"SIGINT")},at=function(){return ot(process.pid)},lt=at,st=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw wn(e,0,"char")},ct=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=rt(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(),_n("Prompt was cancelled via interrupt.");return console.log(n),st(n)},ft=function(e){return E(e)?e:a(e)?e.split("."):[e]},pt=function(e,n,r,t,i,u){var o=r;return De(e,n,t,i,u,(e,n,r)=>r(e,n,xe(o)))},dt=function(e,n){var r=n,t=globalThis.config;t||(t=globalThis.config={});var i,u=ft(e);return u.length>1?i=pt(t,u,r):(i=xe(r),t[u[0]]=i),i},vt=function(e,n){return dt("node.require.customDirs",r=>(r||(r=[]),!1!==n&&(e=Zn(e,"node_modules")),r.includes(e)||r.push(e),r)),e},ht=vt,mt=De,gt=function(e){var n=globalThis.config;if(n){var r=ft(e);return r.length>1?mt(n,r):n[r[0]]}},yt=function(e,n,r){if(null!=e)return e;var t=gt(n);return null!=t?t:r},bt=T("fs"),wt=function(e){return!!bt().lstatSync(String(e),{throwIfNoEntry:!1})},xt=function(e){var n=Sr(e,!1);return wt(n)||(n!==e&&xt(n),bt().mkdirSync(String(n))),e},Et=function(e){return xt(e),bt().mkdirSync(String(e)),e},Ot=function(e){return wt(e)?e:Et(e)},St=function(e,n){if(v(e))return require(e);if(h(e))return Bn(e);try{return require(e)}catch(e){}var r=__dirname,t=process.mainModule?.path;if(t!==r)try{return rr(t,e)}catch(e){}var i=process.cwd();if(i!==t&&i!==r)try{return rr(i,e)}catch(e){}var u=gt("node.require.customDirs");if(u)for(var o of u)try{return rr(o,e)}catch(e){}var a=yt(n?.autoInstall,"node.require.autoInstall"),l=yt(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=qn(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=ct('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=Ot(s),Pn(e,!1,{cwd:s});try{return ht(s),rr(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw _n('Module not found: "'+e+'"',{checked:{moduleDir:r,scriptDir:t,cwd:i}})},_t=function(e){return bt().readFileSync(String(e),"utf8")},At=_t,Nt=function(e){return JSON.parse(At(e))},Tt=function(e){return Qn(e,Hn)},jt=function(e,n){var r=Yn(e,n);return r?r.index:-1},Ft=function(e){var n=jt(Hn,e);return-1===n?null:e.slice(0,n+1)},It=function(e,n,r){if(Tt(e))return r?[e,null]:e;var t,i,u=Ft(e),o=n(xr(e),u,e);return r?[t,i]=o:t=o,null!=t&&(e=u?u+t:t),r?[e,i]:e},kt=function(e,n){var r=null==n?-1:n.index;if(-1===r)return[e];var t=lr(e,r);return t[1]=t[1].slice(n[0].length),t},Ct=function(e,n,r,t,i){return P(e,n,r,t,(n,r)=>null===n?null:(n.input=e,void 0!==r&&(n.index+=r),n),i)},Dt=function(e,n){return e.splice(e.length,0,...n),n},Mt=function(e,n){return Dt(e,n),e},Pt=Mt,Rt=class extends Array{constructor(e,n,r,t,i){if(-1===n)throw _n("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw _n("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,t&&Pt(this,t),this.index=n,this.input=r,i&&(this.groups=i)}fromParts(e){var n=e;return new Rt(n.match,n.index,n.input,n.captures,n.groups)}},Lt=function(e,n,r,t,i){return Ct(e,e=>{if(q(n))return Yn(n,e);if(a(n)){var r=e.lastIndexOf(n);return-1!==r?new Rt(n,r):null}throw On(n,1)},r,t,i)},qt=function(e,n,r,t,i){return kt(e,Lt(e,n,r,t,i))},Bt=function(e){return It(e,e=>qt(e,"."),!0)},Gt=function(e,n){var r=Bt(e)[1];return r?!1!==n?r.toLowerCase():r:null},Wt=function(){},Kt=function(e){if(e){var n=console.info;function r(){return n.apply(this,arguments)}return r.verbose=e,r.logv=r,r}return Wt},zt=Kt,Ut=/(['"])(.*?)\1/,Vt=$e(Ut),Yt=function(e){return e.replace(Vt,"")},Jt=Yt,Qt=function(e){return globalThis.structuredClone(e)},Ht=Qt,$t=ze,Xt=/\r?\n/,Zt=function(e){return null==e||void 0!==e.length&&0===e.length},ei=function(e,n){return jn(e,Zt)},ni=function(e,n){return e.splice(n,1),e},ri=function(e,n,r,t){[r,t]=he(e,r,t);for(var i=r;i<t;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ti=function(e,n,r){for(var t={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;r?(t[a]||(t[a]=[]),t[a].push(l)):t[a]=l}}return t},ii=function(e,n,r,t){return[n,r]=he(e,n,r,t),e.slice(n,r)},ui=function(e,n){return ge(n,e).join("")},oi=function(e){return e?e[0]:null},ai=function(e,n,r,t,i){return new Rt(e,n,r,t,i)},li=function(e,n,r,t,i){return-1===n||null==e?null:ai(e,n,r,t,i)},si=function(e,n,r,t,i){return Ct(e,e=>{if(a(n)){var r=e.indexOf(n);return li(n,r,e)}return Yr(n,e)},r,t,i)},ci=function(e,n,r,t,i){return kt(e,si(e,n,r,t,i))},fi=function(e){return isNaN(e)?null:e},pi=function(e){return null==e?null:fi(Number(e))},di=pi,vi=function(e){return di(e)??e},hi=function(e,n){null==n&&(n="=");var r={};return e.forEach(function(e){var[t,i]=ci(e,n);null!=i&&(i=vi(i.trim())),r[t.trim()]=i}),r},mi=te,gi=class extends Array{constructor(e){var n,r=e;null!=r&&(E(r)?n=r:a(r)&&(n=r.split(Xt))),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 ei(this)}removeComments(e){for(var n=0;n<this.length;n++){var r=this[n],t=r.indexOf(e);-1!==t&&(""===(r=r.slice(0,t)).trim()?(ni(this,n),n--):this[n]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ri(this,e)}join(){return super.join("\n")}toObj(e){return hi(this,e)}mapToObj(e,n){return ti(this,e,n)}between(e,n,r){return r=mi(r,"inclusiveEnd",!0),ii(this,e,n,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Kn(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=oi(Yr(/^\s*/,e));if(n){var r=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(r)})}}return this}deindent(e,n,r){throw ue()}indent(e,n){var r=ui(n??"\t",e??1);return this.apply(e=>r+e)}static is(e){return I(e,this)}static fromChunks(e){return e.map(e=>ar(e,Xt)).flatMap(e=>bi(e,!1))}},yi=function(e,n){var r=new gi(e);return n&&r.condense(),r},bi=function(e,n,r){var t=e.split(Xt);return n?yi(t,r):t},wi=function(e,n){return bi(At(e),!0,n)},xi=function(e,n){return Vr(e).test(n)},Ei=function(e,n){return q(n)?xi(n,e):e.includes(n)},Oi=function(e,n,r,t){null==e&&(e=""),null==n&&(n="");var i={},u=(r,t)=>i[e+r+n]=t;return t&&vn(t,u),r&&vn(r,u),i},Si=function(e,n){return vn(n,(n,r)=>e=tn(e,n,r)),e},_i=function(e,n,r,t){var i,u,o=t?.paramIdentifier??"$";if(o)if(a(o)){if(!Ei(e,o))return e;i=o}else{if(!E(o))throw On(o,1,"paramIdentifier");if([i,u]=o,!Ei(e,i)&&!Ei(e,u))return e}var l=Oi(i,u,n,r);return Si(e,l)},Ai=function(e){return a(e)?e:String(e)},Ni=globalThis.process?.env.windir,Ti=T("os"),ji=function(){return Ti().tmpdir()+Ln},Fi=function(e){if(e)throw ue();return Ti().homedir()+Ln},Ii=function(e){return Fi(e)+"Desktop/"},ki={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Ni,SYSTEM32:Ni&&Ni+"System32",TEMP:ji(),DESKTOP:Ii()},Ci=function(e,n){return _i(Ai(e),n,ki)},Di=e(function(){var e=process.env.TITAN_PATH;if(!e)throw _n("Environment variable TITAN_PATH is not set.");return $n(e)}),Mi=function(e){return e||(e="Newest"),Di()+"Compiled/"+e+"/"},Pi=function(e,n){return e?Ci(e,{TITAN:Di()}):Mi(n)+"SourceMap.txt"},Ri=function(e,n,r,t,i){var u=Br(e,n,r,t,i);return-1===u?null:e.slice(r,u)},Li=function(e){var n=e[0];return n===n.toUpperCase()},qi=function(e,n){var r=[],t=[];return e.forEach((i,u)=>(n(i,u,e)?r:t).push(i)),[r,t]},Bi=$t(function(e){var n=wi(Pi(e),!0),r={};return n.forEach(e=>{var n=Ri(e,"=").split(",").map(e=>e.trim()),[t,i]=qi(n,e=>!Li(e)),u=t[0];if(!u)throw _n('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{r[e]=u})}),r},0),Gi=e(function(e){var n=Object.keys(e);return en("\\b("+n.join("|")+")\\.(\\w+)","g")}),Wi=/\bt\.(\w+)\.(\w+)/g,Ki=function(e,n){n||(n={});var r={},t=r.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?Ht(n.additionalGlobals):{},r.globals=i;var u=Bi(),o=Gi(u),a=Vn(o,e).filter(n=>{var r=n[1],t=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[r];return!u||void 0===u[t]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,r])=>{var t=u[n];if(!t)throw _n("No short name found for global: "+n);return"t."+t+"."+r+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(Wi))t[p]||(t[p]={}),t[p][c]=!0;return r},zi=function(e,n){return e=Cr(e),e=Jt(e),Ki(e,n)},Ui=function(e,n){return Ki(e,n)},Vi=function(e,n){var r=n?.fileType;if(r){if("js"===(r=r.toLowerCase()))return zi(e,n);if("html"===r)return Ui(e,n)}return Ki(e,n)},Yi={},Ji=$t(function(e,n){e=Pi(e,n);var r=Sr(e),t=wi(e,"//"),i=Yi;for(var u of t){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map(e=>e.trim()).filter(e=>!Li(e));var l=u.slice(o+1).trim(),s=Xn(r,l).replaceAll("\\","/");for(var c of a)i[c]=s}return i}),Qi=function*(e,n){var r=0;for(var t of e)n(t,r++,e)&&(yield t)},Hi=function(e){return e.slice()},$i=function(e,n,r){for(var t=e.length-1;t>=n;t--)e[t+1]=e[t];return e[n]=r,e.length++,e},Xi=function(e,n){return $i(e,e.length,n)},Zi=Xi,eu=function(e,n){return e.call(this,...n,function n(){return Kn(arguments)!==n&&Zi(arguments,n),e.apply(this,arguments)})},nu=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var r=e.recurseIf;if(!r){var t=this.constructor;r=e=>I(e,t)||ln(e)||E(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return eu(function*(e,t,o,a){var l=n(e,t,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],d=Hi(t);d.push(f);var v=null,h={value:p,key:f,object:e,path:d,level:o,isLeaf:v,root:u},m=r(p,h);h.isLeaf=v=!m,i&&!v||(yield h),m&&(yield*a(p,d,o+1,a))}},[this,[],0])},ru=function(e,n){return nu.call(e,n)},tu=function(e,n){1===arguments.length&&(n=!0);var r={};for(var t of e)r[t]=n;return r},iu=function(e,n,r,t){var i=kr(e,n,t);St("acorn-walk").full(i,r)},uu=function(e,n,r,t){var i;if(a(r))i=e=>e.type===r;else if(E(r)){var u=tu(r);i=e=>u[e.type]}else i=r;var o=[];return iu(e,n,function(e){i.apply(this,arguments)&&o.push(e)},t),o},ou=Fr,au=function(e){var n,r,t,i=e,u=a(i)?kr(i).body[0]:i,o=u.type;if("VariableDeclaration"===o){n="variable";var l=u.declarations[0];r=l.id.name,t=l.init?l.init.raw??Fr(l.init):"undefined"}else"FunctionDeclaration"===o?n="function":"ClassDeclaration"===o&&(n="class"),r=u.id.name;var s={type:n,name:r};return t&&(s.value=t),s.text=ou(u),s.node=u,s},lu=function(e){return uu(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var r=au(n);return r.node=e,r}return{node:e}})},su=function(e,n){n||(n={});var r=n.enableGlobals,t=Ji(n.sourceMap,n.stability),i={},u=[];return function e(n,o){var a=Qi(ru(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=t[s];if(p){var d=hr(p)+c+".js";if(!wt(d)){var v='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(v+=' (called by "'+o+'")'),_n(v+=".")}var h=_t(d),m=lu(h)[0];f[c]=m;var g="t."+s+"."+c;e(Vi(h,{fileType:"js",enableGlobals:r}).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}},cu=function(e){return yi(e).normalize().join()},fu=cu,pu=function(e,n){var r=e,t=m(r)?et(r):r;return!1!==n&&(t=cu(t)),t},du=function(e,n){return n<e?n:e},vu=function(e,n){return du(e,n)},hu=function*(e,n){null==e&&(e=0),n=null==n?this.length:vu(n,this.length);for(var r=e;r<n;r++)yield this[r]},mu=function(e,n,r){return null==n&&null==r?e[Symbol.iterator].call(e):hu.call(e,n,r)},gu=function(e,n){return n?ri(dn(e,n),n=>[n,e[n]]):Object.entries(e)},yu=function(e){return mu(gu(this,e))},bu=function(e,n){var r=e[Symbol.iterator];return r?r.call(e):yu.call(e,n)},wu=function(e,n,r){dn(e,r).forEach(n)},xu=function(e,n,r){if(Object.hasOwn(e,n)){var t=e[n];return delete e[n],r?r(t,e,n):t}},Eu=function(e,n){vn(n,(n,r)=>xu(e,n,r))},Ou=Eu,Su=function(e,n,r){return null==(n=x(n,r)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Ou(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=B(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=Cr(e),St("terser").minify_sync(e,n).code},_u=function(e,n){n||(n={});var r=zt(n.verbose);r("packText");var t=n.minify??!1,i=n.debug??!1;r("stability",n.stability);var u=n.deps??Vi(e,n),{t:o,globals:a,order:l}=su(u,n),s="//Flat references:\n";for(var[c,f]of l){var p=o[c][f],d="t_"+c+"_"+f,v="variable"===p.type?p.value:"("+p.text+")";v=v.replaceAll(Wi,(e,n,r)=>"t_"+n+"_"+r),s+="var "+d+" = "+v+"\n"}for(var[c,h]of(i&&(s+="//Debug functions:\n",s+=fu('\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 ')),s+="//New tree items:\n",s+="var newItems = {",bu(o))){for(var f of(s+="\n\t"+c+": {",Object.keys(h))){var m="t_"+c+"_"+f;i&&(m="_withName("+m+", 't."+c+"."+f+"')"),s+="\n\t\t"+f+": "+m+","}s+="\n\t},"}if(s+="\n}\n",s+="//Add items to t:\n",s+=cu("\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&&a){s+="\n//Add weak global aliases:\n",s+=pu("\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 g=Bi();vn(a,(e,n)=>{s+='\n_ensureGlobal("'+e+'");',wu(n,n=>{var r=g[e];s+='\n_weakGlobalize("'+e+'", "'+r+'", "'+n+'");'})})}if(s+="\n//Export t:",s+="\nif(globalThis.exports) { exports.default = globalThis.t; }",t){var y=k(t)?t:null;s=Su(s,y,{mangleExcept:["t","_t"],mangleEval:!0})}return s},Au=function(e){var n=typeof e;return"number"===n||"bigint"===n},Nu=function(e){return e instanceof Buffer},Tu=function(e){return ArrayBuffer.isView(e)},ju=Tu,Fu=function(e){return Nu(e)||ju(e)||a(e)},Iu=function(e){return e.constructor===ArrayBuffer},ku=function(e){return Fu(e)?e:Iu(e)?Buffer.from(e):sn(e)},Cu=function(e){return Au(e)?String(e):ku(e)},Du=function(e,n){return xt(e),bt().writeFileSync(String(e),Cu(n)),e},Mu=function(e,n,r){r||(r={}),r.fileType||!n||r.deps||(r.fileType=Gt(n));var t=_u(e,r),i=r.packagePath||_r(n,r.repl);return Du(i,t),i},Pu={env:{parseArgs:p,args:r,setConfig:dt,getConfig:gt,resolveConfig:yt},node:{parseArgs:f,args:n,pause:function(e){null!=e&&(e=String(e)),St("press-any-key-sync")(e)},require:St,_basicRequire:d,is:A,display:F,util:j,_builtInModule:T,requireBuiltIn:N,child_process:In,requireLocal:Bn,path:Rn,_requireFromDir:rr,_requireDirCache:Wn,_createRequire:nr,module:er,promptYNSync:ct,run:rt,getScriptPath:yr,positionalArgs:gr,sigint:lt,interrupt:at,ensureRequireDir:ht,addRequireDir:vt,fs:bt,loadPackageJSON:function(e){var n=e??"./";return n.endsWith("package.json")||(n=Xn(n,"package.json")),wt(n)?Nt(n):{}},os:Ti},cli:{parseArgs:c,resolveArgs:s,splitArgs:l,positionalArgs:mr},f:{one:e,is:m,memoize:ze,MemoizedFunction:Ke,createClass:ve,ensureConstructor:Y,createConstructor:V,isArrowFn:z,isArrow:K,wrap:U,retThis:J,setName:oe,not:Tn,body:et,isArrowString:Rr,_getArrowFnBody:Xr,_getNormalFnBody:Zr,logv:zt,logVerbose:Kt,noop:Wt,cache:$t,recurse:eu},s:{is:a,isAny:o,isPrimitive:i,isObject:u,toLiteral:an,quote:on,escape:un,replaceAll:tn,apply:R,withIndices:P,chars:Ue,from:sn,endsWith:Qn,resolveIndex:zn,removeTrailing:ar,removeFromEnd:or,_removeStringFromEnd:ir,_removeRegexFromEnd:ur,splitAtIndex:lr,ensureStartsWith:cr,replace:vr,decapitalize:br,removeLineBreaks:jr,removeMulti:Tr,removeAll:Nr,resolve:nt,ensure:Pr,after:Gr,index:Br,_indexWithIndices:Lr,indexOfFn:qr,removeLeading:$r,removeFromStart:Hr,_removeStringFromStart:Wr,_removeRegexFromStart:Qr,remove:Kr,splitLast:qt,_splitByMatch:kt,matchLast:Lt,_matchWithIndices:Ct,removeQuotes:Yt,splitLines:bi,lines:yi,LinesArray:gi,repeat:ui,splitFirst:ci,match:si,replaceParams:_i,contains:Ei,_createParamsObj:Oi,_replaceByObj:Si,before:Ri,isCapitalized:Li,normalize:fu,normalizeMLS:cu,mls:pu},npm:{isBuiltIn:v,isFile:h,install:Pn,_runCommand:Mn},os:{run:Dn,_resolveStdio:Sn},opt:{resolve:x},o:{safeSetDefaults:w,safeEnsureMulti:b,ensureMulti:y,ensure:g,is:k,display:gn,toLiteral:mn,constructorMatches:L,isAny:H,setHidden:ne,addNonEnumerable:ee,defineProperty:Z,weakAssign:X,merge:$,safeEnsure:te,hideKey:de,makeNonEnumerable:pe,ensureCustom:Ee,get:be,set:we,createEmpty:Ie,remove:Le,isPure:ln,reduce:hn,each:vn,keys:dn,allKeys:pn,Cache:Gn,setDefaults:tr,resolveKeys:ft,diveGet:mt,deepCopy:Ht,fromLines:hi,safeDefault:mi,fromKeys:tu,iterate:bu,iterator:yu,entries:gu,eachKey:wu,consumeOptions:Ou,consumeMulti:Eu,consume:xu},a:{is:E,wrapIndices:M,wrapIndex:D,resolveIndex:C,ensure:B,pick:ye,create:ge,fill:me,resolveIndices:he,push:Te,add:Ne,splitLast:Ce,splitTail:ke,toLiteral:cn,display:yn,assert:An,removeNullish:Fn,removeByFilter:jn,replaceContents:Nn,last:Kn,pushMulti:Pt,addMulti:Mt,pushThroughMulti:Dt,removeEmpty:ei,removeIndex:ni,apply:ri,mapToObj:ti,slice:ii,filterSplit:qi,copy:Hi,iterate:mu,iterator:hu},err:{value:wn,ValueError:_,Error:S,Enhanced:O,nyi:ue,NYIError:re,defaultFromFn:ie,type:On,TypeError:xn,create:_n,prepend:Ir,req:tt},v:{display:bn,constructorMatches:I,toLiteral:fn,isPrimitive:Q,resolve:xe,type:En,req:it,isEmpty:Zt,nullIfNaN:fi},macro:{config:function(e){}},re:{is:q,ensureGlobal:Xe,global:$e,addFlag:He,copy:Qe,updateFlagString:Je,parseFlagString:Ve,createFlagString:Ye,createEscaped:rn,create:en,resolveFlags:Ze,escape:nn,matchEnd:Jn,matchLast:Yn,matchAll:Vn,setStartIndex:Un,slash:Hn,matchStart:Jr,match:Yr,ensureLocal:Vr,local:Ur,removeFlag:zr,lastIndex:jt,RegexResult:Rt,quotes:Vt,quote:Ut,newline:Xt,text:oi,safeCreateResult:li,createResult:ai,test:xi},class:{create:fe,setName:ae,addStatics:le,setDisplay:ce},p:{asyncJoint:W,is:G},sym:{display:se,value:Fe},map:{Cache:Ae,ensure:_e,get:Oe,set:Se,MultiCache:We,diveEnsure:Re,createEmpty:Pe,diveDelete:Ge,remove:Be},args:{ensureArray:je,push:Zi,append:Xi,insert:$i},tree:{ensure:Me,dive:De,remove:qe,setCustom:pt,copy:Qt,iterate:ru,iterator:nu},win:{is:kn},shell:{_handleError:Cn},path:{abs:qn,sep:Ln,ensureEndsWith:Zn,join:Xn,ensureTrailingSlash:$n,fws:hr,baseName:Er,_removeExtsFromFile:wr,file:xr,dir:Sr,ext:Gt,splitExt:Bt,ignoreDir:It,isDir:Tt,dirPart:Ft,resolveVars:Ci,string:Ai,_defaultParams:ki,windir:Ni,_getDefaultTempDir:ji,getDesktop:Ii,getUserDir:Fi},js:{enhance:Mr,ensureReturn:fr,splitLastExpression:sr,enableAwait:dr,_nodeEnableAwait:pr,useTitan:Ar,inline:Dr,removeComments:Cr,fromAST:Fr,parse:kr,removeQuotes:Jt,getExports:lu,getNodes:uu,eachNode:iu,parseDeclaration:au,fromASTNode:ou,minify:Su},titan:{getPackagePath:_r,getPackageName:Or,packFile:function(e,n){return Mu(_t(e),e,n)},packTextToFile:Mu,packText:_u,getDeps:Vi,getDepsFromJS:zi,_getDepsBasic:Ki,loadGlobalsMap:Bi,_resolveSourceMapPath:Pi,locate:Di,getCompiledDir:Mi,_getGlobalsRegex:Gi,depsRegex:Wi,getDepsFromHTML:Ui,_getAllDeps:su,loadSourceMap:Ji,sourceMap:Yi},proc:{interrupt:ot,signal:ut},bool:{fromYN:st},fs:{ensureDir:Ot,exists:wt,mkdir:Et,ensureParent:xt,loadJSON:Nt,loadText:At,load:_t,loadLines:wi,write:Du,formatRaw:Cu},n:{tryCoerce:vi,tryParse:di,ensure:pi,cap:vu,least:du,is:Au},gen:{filter:Qi},bin:{ensureByteSafe:ku,isByteSafe:Fu,isNodeBuffer:Nu,isTA:ju},ab:{isTA:Tu,is:Iu}};globalThis.t?Object.keys(Pu).forEach(function(e){if(t[e]){var n=Pu[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Pu[e]}):globalThis.t=Object.assign({},Pu),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(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=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},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(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):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__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},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,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),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,e.stability);console.log("SOURCEMAP",_);var 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,_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);
|
|
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=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},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(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):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__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},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,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),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,e.stability),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,_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,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)}},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),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},U=function(e){return e instanceof Set},Y=function(e){return U(e)?e:o(e)?new Set(e):new Set([e])},V=Y,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},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))},Ue=function(){return new Map},Ye=function(e,n,t){return ze(e,n,t,Ce,Ue,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),Ye(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?(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)},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 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 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=S(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Un=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=Un),new Hn(i,r)},Yn=function(e,n,t){if(!Wn(n))throw Un(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=>A(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 Un(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},it=function(e){if(!o(e))throw Un(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 Nn("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 Nn("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 Nn("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 A(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},At=function(e,n){if(u(n))return e.endsWith(n);if(Oe(n))return!!_t(n,e);throw Un(n,1,"matchThis")},Nt=/\/|\\/,jt=function(e){return At(e,Nt)?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 Un(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},Ut=hn,Yt=function(e,n){return""===e?e:(!1!==n&&(e=jt(e)),Ut(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("'+Yt(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))},Ar=function(e){return _r(e,"g")},Nr=en(function(e){return e.global?Ar(e):e},0),jr=function(e,n,t){return(e=null!=t?Tt(e,t,n):Nr(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 Un(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)+")"),Nn(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 An(e,0,"char")},Ur=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(),Nn("Prompt was cancelled via interrupt.");return console.log(n),zr(n)},Yr=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=Yr(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=Yr(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=Ur('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 Nn('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 Yn(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 Ni(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)},Ai=_i,Ni=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ai(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(),Ni(process,"uncaughtException",console.error),Ni(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 Nn("Environment variable TITAN_PATH is not set.");return jt(e)}),Mi=function(e){return e||(e="Newest"),Di()+"Compiled/"+e+"/"},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},Ui=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},Yi=function(e,n){return null==e?Ri():Ui(e,n)},Vi=function(e){return Yi(e,!0)},Qi=Vi,$i=function(e){var n=Mi(e)+"LastCompileTime.txt";return ti(n)?Qi(Pi(n)):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=Ui(e),n=Ui(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 Ae(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 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&&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)},Au=function(e,n,t,r,i){return yu(e,_u(e,n,t,r,i))},Nu=Wi,ju=function(e){return Nu(e)??e},Iu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=Au(e,n);null!=i&&(i=ju(i.trim())),t[r.trim()]=i}),t},Fu=N,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 Nr(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 Un(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},Uu=function(e){if(e)throw I();return Hu().homedir()+mt},Yu=function(e){return Uu(e)+"Desktop/"},Vu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Wu,SYSTEM32:Wu&&Wu+"System32",TEMP:zu(),DESKTOP:Yu()},Qu=function(e,n){return Gu(Ku(e),n,Vu)},$u=function(e,n){return e?Qu(e,{TITAN:Di()}):Mi(n)+"SourceMap.txt"},Ju=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Xu=function(e){var n=e[0];return n===n.toUpperCase()},Zu=su(function(e){var n=Mu($u(e),!0),t={};return n.forEach(e=>{var n=Ju(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Xu(e)),u=r[0];if(!u)throw Nn('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),eo=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),no=/\bt\.(\w+)\.(\w+)/g,to=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=Zu(),o=eo(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 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(no))r[p]||(r[p]={}),r[p][c]=!0;return t},ro=function(e,n){return e=dr(e),e=ou(e),to(e,n)},io=function(e,n){return n in e},uo=io,oo=function(e,n){for(var t of(Br(n,1),Object.keys(e))){if(!uo(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!oo(r,n[t]))return!1}return!0},ao=function(e,n){return!oo(n.t,e)||!(!n.globals||e._globals&&oo(n.globals,e._globals))},lo=function(e){return At(e,Nt)},so=function(e,n){var t=Ot(e,n);return t?t.index:-1},co=function(e){var n=so(Nt,e);return-1===n?null:e.slice(0,n+1)},fo=function(e,n,t){if(lo(e))return t?[e,null]:e;var r,i,u=co(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},po=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 Un(n,1)},t,r,i)},vo=function(e,n,t,r,i){return yu(e,po(e,n,t,r,i))},ho=function(e){return fo(e,e=>vo(e,"."),!0)},mo=function(e,n){var t=ho(e)[1];return t?!1!==n?t.toLowerCase():t:null},go=function(e,n){return to(e,n)},yo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return ro(e,n);if("html"===t)return go(e,n)}return to(e,n)},bo={},wo=su(function(e,n){e=$u(e,n);var t=or(e),r=Mu(e,"//"),i=bo;for(var u of r){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map(e=>e.trim()).filter(e=>!Xu(e));var l=u.slice(o+1).trim(),s=It(t,l).replaceAll("\\","/");for(var c of a)i[c]=s}return i}),Eo=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},xo=function(e){return e.slice()},To=function(e,n){return Oi(e,e.length,n)},So=To,Oo=function(e,n){return e.call(this,...n,function n(){return Et(arguments)!==n&&So(arguments,n),e.apply(this,arguments)})},_o=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 Oo(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=xo(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 _o.call(e,n)},No=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},jo=function(e,n,t,r){var i=hr(e,n,r);oi("acorn-walk").full(i,t)},Io=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=No(t);i=e=>a[e.type]}else i=t;var l=[];return jo(e,n,function(e){i.apply(this,arguments)&&l.push(e)},r),l},Fo=pr,ko=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=Fo(o),s.node=o,s},Co=function(e){return Io(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=ko(n);return t.node=e,t}return{node:e}})},Lo=function(e,n){n||(n={});var t=n.enableGlobals,r=wo(n.sourceMap,n.stability);console.log("SOURCEMAP",r);var i={},u=[];return function e(n,o){var a=Eo(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=Yt(p)+c+".js";if(!ti(v)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),Nn(h+=".")}var d=Pi(v),m=Co(d)[0];f[c]=m;var g="t."+s+"."+c;e(yo(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}},Do=function(e){return Cu(e).normalize().join()},Mo=Do,Po=function(e,n){var t=e,r=c(t)?Mr(t):t;return!1!==n&&(r=Do(r)),r},Ro=function(e,n,t){H(e,t).forEach(n)},qo=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Bo=function(e,n){En(n,(n,t)=>qo(e,n,t))},Go=Bo,Ko=function(e,n,t){return null==(n=tt(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Go(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},Wo=function(e,n){n||(n={});var t=n.minify??!1,r=n.debug??!1,i=n.deps??yo(e,n),{t:u,globals:o,order:a}=Lo(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(no,(e,n,t)=>"t_"+n+"_"+t),l+="var "+p+" = "+v+"\n"}for(var[s,h]of(r&&(l+="//Debug functions:\n",l+=Mo('\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+=Do("\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+=Po("\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=Zu();En(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',Ro(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=Ko(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},Ho=function(e){return e instanceof Buffer},zo=function(e){return ArrayBuffer.isView(e)},Uo=zo,Yo=function(e){return Ho(e)||Uo(e)||u(e)},Vo=function(e){return e.constructor===ArrayBuffer},Qo=function(e){return Yo(e)?e:Vo(e)?Buffer.from(e):yn(e)},$o=function(e){return zi(e)?String(e):Qo(e)},Jo=function(e,n){return ri(e),ni().writeFileSync(String(e),$o(n)),e},Xo=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=mo(n));var r=Wo(e,t),i=t.packagePath||ar(n,t.repl);return Jo(i,r),i},Zo={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=ro(o,i);require(a),ao(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,Xo(o,er(),i),Li(a)),n.apply(null,r)},getPackagePath:ar,getPackageName:ur,hasNewCompile:tu,getLastCompileTime:$i,getCompiledDir:Mi,locate:Di,getDepsFromJS:ro,_getDepsBasic:to,loadGlobalsMap:Zu,_resolveSourceMapPath:$u,_getGlobalsRegex:eo,depsRegex:no,hasNewDeps:ao,packTextToFile:Xo,packText:Wo,getDeps:yo,getDepsFromHTML:go,_getAllDeps:Lo,loadSourceMap:wo,sourceMap:bo},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:Ur,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:Ni,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: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:Sn,toLiteral:Tn,constructorMatches:Se,ensureCustom:ke,get:je,set:Ie,createEmpty:Ge,remove:Ve,reduce:xn,each:En,addInterface:Yn,safeSetDefaults:nt,safeEnsureMulti:et,ensureMulti:Zn,Cache:bt,setDefaults:Dt,resolveKeys:Yr,diveGet:Xr,safeSet:mi,touch:di,deepCopy:lu,fromLines:Iu,safeDefault:Fu,hasKey:uo,has:io,fromKeys:No,eachKey:Ro,consumeOptions:Go,consumeMulti:Bo,consume:qo},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:Oo},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:At,resolveIndex:xt,removeTrailing:qt,removeFromEnd:Rt,_removeStringFromEnd:Mt,_removeRegexFromEnd:Pt,splitAtIndex:Bt,ensureStartsWith:Kt,replace:Ut,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:Au,_splitByMatch:yu,match:_u,_matchWithIndices:bu,replaceParams:Gu,contains:Ru,_createParamsObj:qu,_replaceByObj:Bu,before:Ju,isCapitalized:Xu,splitLast:vo,matchLast:po,normalize:Mo,normalizeMLS:Do,mls:Po},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: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:xo},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:An,ValueError:de,create:Nn,type:Un,TypeError:Hn,prepend:vr,req:qr},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:V,ensure:Y,is:U},n:{cap:Z,least:X,fromString:Hi,ensure:Wi,is:zi,tryCoerce:ju,tryParse:Nu},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:Nt,matchStart:Ir,match:jr,ensureLocal:Nr,local:Ar,removeFlag:_r,quotes:iu,quote:ru,newline:cu,text:gu,safeCreateResult:Ou,createResult:Su,RegexResult:Tu,test:Pu,lastIndex:so},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ye,createEmpty:Ue,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ai,prepend:_i,insert:Oi,push:So,append:To},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Vr,copy:au,isSubsetOf:oo,iterate:Ao,iterator:_o},gen:{join:jn,filter:Eo},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:Yt,baseName:ir,_removeExtsFromFile:tr,file:rr,dir:or,resolveVars:Qu,string:Ku,_defaultParams:Vu,windir:Wu,_getDefaultTempDir:zu,getDesktop:Yu,getUserDir:Uu,ext:mo,splitExt:ho,ignoreDir:fo,isDir:lo,dirPart:co},js:{enhance:gr,ensureReturn:Wt,splitLastExpression:Gt,enableAwait:zt,_nodeEnableAwait:Ht,useTitan:lr,inline:mr,removeComments:dr,fromAST:pr,parse:hr,removeQuotes:ou,getExports:Co,getNodes:Io,eachNode:jo,parseDeclaration:ko,fromASTNode:Fo,minify:Ko},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:Jo,formatRaw:$o},d:{from:Qi,create:Vi,resolve:Yi,now:Ri,ensure:Ui,copy:qi,fromYear:Bi,_resolveNative:Gi,isBefore:nu},bin:{ensureByteSafe:Qo,isByteSafe:Yo,isNodeBuffer:Ho,isTA:Uo},ab:{isTA:zo,is:Vo}};globalThis.t?Object.keys(Zo).forEach(function(e){if(t[e]){var n=Zo[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Zo[e]}):globalThis.t=Object.assign({},Zo),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]},s=function(e){return e instanceof Promise},l=function(e,n){var t=e;return s(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 l(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)}},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,s){s||(s={}),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=s.bareFn;s.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 l(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?l(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),s.display&&P(w,s.display),s.implements&&a(s.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},V=function(e){return e instanceof Set},Y=function(e){return V(e)?e:o(e)?new Set(e):new Set([e])},U=Y,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=U(i),[a,s]=Q(u,e=>o.has(e));return[z(e,a,t),!0===t?e:z(e,s,!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)},se=function(e){return ae(e,!0)},le=function(e,n){return null!=e&&e.constructor===n},ce=function(e){return le(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=le,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},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),s=e,l=o.length,c=0;c<l;c++){var f=o[c],p=t(s,f);if(void 0===p){if(!r)return;p=ke(s,f,r,t,i)}s=p}if(u)return u(s,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))},Ve=function(){return new Map},Ye=function(e,n,t){return ze(e,n,t,Ce,Ve,Le)},Ue=function(e,n){return delete e[n],e},Qe=function(e,n,t,r){return He(e,n,t,!1,!1,r||Ue)},$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),Ye(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)},sn=function(e){return an(e,"g")},ln=en(function(e){return e.global?e:sn(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=ln(n)),e.replaceAll(n,t)):(n=u(n)?vn(n,"g"):ln(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)},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 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),se(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(se(this.stubs),se(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=S(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Vn=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=Vn),new Hn(i,r)},Yn=function(e,n,t){if(!Wn(n))throw Vn(n,1);return n.decorate(e),t&&t.call(e,e,n),n.assert(e),e},Un=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=>A(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 Vn(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},it=function(e){if(!o(e))throw Vn(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)))},st=function(e){return at(e,e=>null==e)},lt=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 Nn("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 Nn("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 s=t.showErr;if(o&&s)throw Nn("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":s??1?"inherit":"ignore"}t.encoding||(t.encoding="utf8"),n&&(it(n),st(n));try{var l=lt().execFileSync(e,n,t);null!=l&&t.trim&&(l=l.trim());var c=t.map??t.mapFn;return c&&(l=c(l)),l}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 A(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):ln(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},At=function(e,n){if(u(n))return e.endsWith(n);if(Oe(n))return!!_t(n,e);throw Vn(n,1,"matchThis")},Nt=/\/|\\/,jt=function(e){return At(e,Nt)?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 Vn(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},Vt=hn,Yt=function(e,n){return""===e?e:(!1!==n&&(e=jt(e)),Vt(e,"\\","/"))},Ut=L(function(){return process.argv.slice(2)}),Qt=Ut,$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)},sr=function(e){return'require("'+Yt(ar(),!1)+'");\n'+e},lr=function(e,n){return hn(e,n,"")},cr=function(e,n){return n.forEach(n=>e=lr(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=sr(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=lr,_r=function(e,n){return on(e,Or(e.flags,n))},Ar=function(e){return _r(e,"g")},Nr=en(function(e){return e.global?Ar(e):e},0),jr=function(e,n,t){return(e=null!=t?Tt(e,t,n):Nr(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 Vn(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)+")"),Nn(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 An(e,0,"char")},Vr=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(),Nn("Prompt was cancelled via interrupt.");return console.log(n),zr(n)},Yr=function(e){return o(e)?e:u(e)?e.split("."):[e]},Ur=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=Yr(e);return u.length>1?i=Ur(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=Yr(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"),s=ei(n?.promptInstall,"node.require.promptInstall",!0);if(a||s){var l=a||s;!0===l&&(l="./node_modules"),l=gt(l);var c=!1;if(a?(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),ht(e,!1,{cwd:l});try{return Jr(l),Lt(l,e)}catch(e){console.error("Failed to load from auto-install dir: ",l)}}}throw Nn('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}}),si=ai().EventTarget,li=function(e){var n=Qn,t=e[n];return void 0===t&&(t=new si,T(e,n,t)),t},ci=Un("EventInterface",{addEventListener(e,n,t){li(this).addEventListener(e,n,t)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){li(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return li(this).dispatchEvent(e)}}),fi=ci,pi=function(e){return Yn(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 Ni(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)},Ai=_i,Ni=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ai(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(),Ni(process,"uncaughtException",console.error),Ni(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 Nn("Environment variable TITAN_PATH is not set.");return jt(e)}),Mi=function(e){return e||(e="Newest"),Di()+"Compiled/"+e+"/"},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},Vi=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},Yi=function(e,n){return null==e?Ri():Vi(e,n)},Ui=function(e){return Yi(e,!0)},Qi=Ui,$i=function(e){var n=Mi(e)+"LastCompileTime.txt";return ti(n)?Qi(Pi(n)):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=Vi(e),n=Vi(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=sn(ru),uu=function(e){return e.replace(iu,"")},ou=uu,au=function(e){return globalThis.structuredClone(e)},su=au,lu=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,s]=o;t?(r[a]||(r[a]=[]),r[a].push(s)):r[a]=s}}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 Ae(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 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&&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)},Au=function(e,n,t,r,i){return yu(e,_u(e,n,t,r,i))},Nu=Wi,ju=function(e){return Nu(e)??e},Iu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=Au(e,n);null!=i&&(i=ju(i.trim())),t[r.trim()]=i}),t},Fu=N,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 le(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 Nr(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,s=r?.paramIdentifier??"$";if(s)if(u(s)){if(!Ru(e,s))return e;i=s}else{if(!o(s))throw Vn(s,1,"paramIdentifier");if([i,a]=s,!Ru(e,i)&&!Ru(e,a))return e}var l=qu(i,a,n,t);return Bu(e,l)},Ku=function(e){return u(e)?e:String(e)},Wu=globalThis.process?.env.windir,Hu=ge("os"),zu=function(){return Hu().tmpdir()+mt},Vu=function(e){if(e)throw I();return Hu().homedir()+mt},Yu=function(e){return Vu(e)+"Desktop/"},Uu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Wu,SYSTEM32:Wu&&Wu+"System32",TEMP:zu(),DESKTOP:Yu()},Qu=function(e,n){return Gu(Ku(e),n,Uu)},$u=function(e,n){return e?Qu(e,{TITAN:Di()}):Mi(n)+"SourceMap.txt"},Ju=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Xu=function(e){var n=e[0];return n===n.toUpperCase()},Zu=lu(function(e){var n=Mu($u(e),!0),t={};return n.forEach(e=>{var n=Ju(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Xu(e)),u=r[0];if(!u)throw Nn('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),eo=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),no=/\bt\.(\w+)\.(\w+)/g,to=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=Zu(),o=eo(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[s,l,c]of a)i[l]||(i[l]={}),i[l][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[s,p,c]of a=e.matchAll(no))r[p]||(r[p]={}),r[p][c]=!0;return t},ro=function(e,n){return e=dr(e),e=ou(e),to(e,n)},io=function(e,n){return n in e},uo=io,oo=function(e,n){for(var t of(Br(n,1),Object.keys(e))){if(!uo(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!oo(r,n[t]))return!1}return!0},ao=function(e,n){return!oo(n.t,e)||!(!n.globals||e._globals&&oo(n.globals,e._globals))},so=function(e){return At(e,Nt)},lo=function(e,n){var t=Ot(e,n);return t?t.index:-1},co=function(e){var n=lo(Nt,e);return-1===n?null:e.slice(0,n+1)},fo=function(e,n,t){if(so(e))return t?[e,null]:e;var r,i,u=co(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},po=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 Vn(n,1)},t,r,i)},vo=function(e,n,t,r,i){return yu(e,po(e,n,t,r,i))},ho=function(e){return fo(e,e=>vo(e,"."),!0)},mo=function(e,n){var t=ho(e)[1];return t?!1!==n?t.toLowerCase():t:null},go=function(e){if(e){var n=console.info;function t(){return n.apply(this,arguments)}return t.verbose=e,t.logv=t,t}return Fi},yo=go,bo=function(e,n){return to(e,n)},wo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return ro(e,n);if("html"===t)return bo(e,n)}return to(e,n)},Eo={},xo=lu(function(e,n){e=$u(e,n);var t=or(e),r=Mu(e,"//"),i=Eo;for(var u of r){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map(e=>e.trim()).filter(e=>!Xu(e));var s=u.slice(o+1).trim(),l=It(t,s).replaceAll("\\","/");for(var c of a)i[c]=l}return i}),To=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},So=function(e){return e.slice()},Oo=function(e,n){return Oi(e,e.length,n)},_o=Oo,Ao=function(e,n){return e.call(this,...n,function n(){return Et(arguments)!==n&&_o(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=>le(e,r)||fe(e)||o(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return Ao(function*(e,r,o,a){var s=n(e,r,o);if(s)for(var l=s.length,c=0;c<l;c++){var f=s[c],p=e[f],v=So(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])},jo=function(e,n){return No.call(e,n)},Io=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},Fo=function(e,n,t,r){var i=hr(e,n,r);oi("acorn-walk").full(i,t)},ko=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=Io(t);i=e=>a[e.type]}else i=t;var s=[];return Fo(e,n,function(e){i.apply(this,arguments)&&s.push(e)},r),s},Co=pr,Lo=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 s=o.declarations[0];t=s.id.name,r=s.init?s.init.raw??pr(s.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),t=o.id.name;var l={type:n,name:t};return r&&(l.value=r),l.text=Co(o),l.node=o,l},Do=function(e){return ko(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=Lo(n);return t.node=e,t}return{node:e}})},Mo=function(e,n){n||(n={});var t=n.enableGlobals,r=xo(n.sourceMap,n.stability),i={},u=[];return function e(n,o){var a=To(jo(n),e=>e.isLeaf);for(var s of a){var[l,c]=s.path,f=i[l];if(f||(f=i[l]={}),null==f[c]){var p=r[l];if(p){var v=Yt(p)+c+".js";if(!ti(v)){var h='Titan compiled value "t.'+l+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),Nn(h+=".")}var d=Pi(v),m=Do(d)[0];f[c]=m;var g="t."+l+"."+c;e(wo(d,{fileType:"js",enableGlobals:t}).t,g),u.push([l,c])}else console.log('Skipping unmapped module "'+l+'"'),f[c]=!1}}}(e.t),{t:i,globals:e.globals,order:u}},Po=function(e){return Cu(e).normalize().join()},Ro=Po,qo=function(e,n){var t=e,r=c(t)?Mr(t):t;return!1!==n&&(r=Po(r)),r},Bo=function(e,n,t){H(e,t).forEach(n)},Go=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Ko=function(e,n){En(n,(n,t)=>Go(e,n,t))},Wo=Ko,Ho=function(e,n,t){return null==(n=tt(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Wo(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},zo=function(e,n){n||(n={});var t=yo(n.verbose);t("packText");var r=n.minify??!1,i=n.debug??!1;t("stability",n.stability);var u=n.deps??wo(e,n),{t:o,globals:a,order:s}=Mo(u,n),l="//Flat references:\n";for(var[c,f]of s){var p=o[c][f],v="t_"+c+"_"+f,h="variable"===p.type?p.value:"("+p.text+")";h=h.replaceAll(no,(e,n,t)=>"t_"+n+"_"+t),l+="var "+v+" = "+h+"\n"}for(var[c,d]of(i&&(l+="//Debug functions:\n",l+=Ro('\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(o))){for(var f of(l+="\n\t"+c+": {",Object.keys(d))){var m="t_"+c+"_"+f;i&&(m="_withName("+m+", 't."+c+"."+f+"')"),l+="\n\t\t"+f+": "+m+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=Po("\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&&a){l+="\n//Add weak global aliases:\n",l+=qo("\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 g=Zu();En(a,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',Bo(n,n=>{var t=g[e];l+='\n_weakGlobalize("'+e+'", "'+t+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",r){var y=ce(r)?r:null;l=Ho(l,y,{mangleExcept:["t","_t"],mangleEval:!0})}return l},Vo=function(e){return e instanceof Buffer},Yo=function(e){return ArrayBuffer.isView(e)},Uo=Yo,Qo=function(e){return Vo(e)||Uo(e)||u(e)},$o=function(e){return e.constructor===ArrayBuffer},Jo=function(e){return Qo(e)?e:$o(e)?Buffer.from(e):yn(e)},Xo=function(e){return zi(e)?String(e):Jo(e)},Zo=function(e,n){return ri(e),ni().writeFileSync(String(e),Xo(n)),e},ea=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=mo(n));var r=zo(e,t),i=t.packagePath||ar(n,t.repl);return Zo(i,r),i},na={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 s=ro(o,i);require(a),ao(t,s)&&(u="New deps")}}else u="No package";return u&&(i.onPack&&i.onPack(u),null==o&&(o=i.text??Mr(n)),i.packagePath=a,ea(o,er(),i),Li(a)),n.apply(null,r)},getPackagePath:ar,getPackageName:ur,hasNewCompile:tu,getLastCompileTime:$i,getCompiledDir:Mi,locate:Di,getDepsFromJS:ro,_getDepsBasic:to,loadGlobalsMap:Zu,_resolveSourceMapPath:$u,_getGlobalsRegex:eo,depsRegex:no,hasNewDeps:ao,packTextToFile:ea,packText:zo,getDeps:wo,getDepsFromHTML:bo,_getAllDeps:Mo,loadSourceMap:xo,sourceMap:Eo},node:{keepAlive:Ci,is:D,display:be,util:ye,_builtInModule:ge,requireBuiltIn:me,require:oi,_basicRequire:$n,child_process:lt,requireLocal:yt,path:dt,_requireFromDir:Lt,_requireDirCache:wt,_createRequire:Ct,module:kt,promptYNSync:Vr,run:Rr,getScriptPath:er,positionalArgs:Zt,args:Ut,sigint:Hr,interrupt:Wr,ensureRequireDir:Jr,addRequireDir:$r,fs:ni,reloadRequireLocal:Li,os:Hu},ev:{multiHandle:Bn,on:Ni,resolveValue:Gn,enable:pi,EventInterface:fi,Interface:ci,_ensureHasTarget:li,targetSym:Qn,EventTarget:si,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:N,ensure:A,hideKey:B,makeNonEnumerable:q,filterSplit:J,keys:H,allKeys:W,split:$,pick:z,iterateAll:se,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:Ue,reduce:xn,each:En,addInterface:Yn,safeSetDefaults:nt,safeEnsureMulti:et,ensureMulti:Zn,Cache:bt,setDefaults:Dt,resolveKeys:Yr,diveGet:Xr,safeSet:mi,touch:di,deepCopy:su,fromLines:Iu,safeDefault:Fu,hasKey:uo,has:io,fromKeys:Io,eachKey:Bo,consumeOptions:Wo,consumeMulti:Ko,consume:Go},handle:{createMulti:Rn,MultiHandle:Mn,HandleInterface:Dn,Handle:Ei},class:{addInterface:e,create:R,setName:k,addStatics:C,setDisplay:P,isInterface:Wn,interface:Un},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:lu,logv:yo,logVerbose:go,recurse:Ao},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:At,resolveIndex:xt,removeTrailing:qt,removeFromEnd:Rt,_removeStringFromEnd:Mt,_removeRegexFromEnd:Pt,splitAtIndex:Bt,ensureStartsWith:Kt,replace:Vt,decapitalize:nr,removeLineBreaks:fr,removeMulti:cr,removeAll:lr,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:Au,_splitByMatch:yu,match:_u,_matchWithIndices:bu,replaceParams:Gu,contains:Ru,_createParamsObj:qu,_replaceByObj:Bu,before:Ju,isCapitalized:Xu,splitLast:vo,matchLast:po,normalize:Ro,normalizeMLS:Po,mls:qo},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:On,unboxArgs:Pn,assert:it,removeNullish:st,removeByFilter:at,replaceContents:ut,last:Et,removeEmpty:pu,removeIndex:vu,mapToObj:hu,slice:du,pushMulti:xu,addMulti:Eu,pushThroughMulti:wu,copy:So},p:{asyncJoint:l,is:s},v:{isPrimitive:g,constructorMatches:le,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:An,ValueError:de,create:Nn,type:Vn,TypeError:Hn,prepend:vr,req:qr},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:U,ensure:Y,is:V},n:{cap:Z,least:X,fromString:Hi,ensure:Wi,is:zi,tryCoerce:ju,tryParse:Nu},re:{is:Oe,ensureGlobal:ln,global:sn,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:Nt,matchStart:Ir,match:jr,ensureLocal:Nr,local:Ar,removeFlag:_r,quotes:iu,quote:ru,newline:cu,text:gu,safeCreateResult:Ou,createResult:Su,RegexResult:Tu,test:Pu,lastIndex:lo},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ye,createEmpty:Ve,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ai,prepend:_i,insert:Oi,push:_o,append:Oo},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Ur,copy:au,isSubsetOf:oo,iterate:jo,iterator:No},gen:{join:jn,filter:To},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:Yt,baseName:ir,_removeExtsFromFile:tr,file:rr,dir:or,resolveVars:Qu,string:Ku,_defaultParams:Uu,windir:Wu,_getDefaultTempDir:zu,getDesktop:Yu,getUserDir:Vu,ext:mo,splitExt:ho,ignoreDir:fo,isDir:so,dirPart:co},js:{enhance:gr,ensureReturn:Wt,splitLastExpression:Gt,enableAwait:zt,_nodeEnableAwait:Ht,useTitan:sr,inline:mr,removeComments:dr,fromAST:pr,parse:hr,removeQuotes:ou,getExports:Do,getNodes:ko,eachNode:Fo,parseDeclaration:Lo,fromASTNode:Co,minify:Ho},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:Zo,formatRaw:Xo},d:{from:Qi,create:Ui,resolve:Yi,now:Ri,ensure:Vi,copy:qi,fromYear:Bi,_resolveNative:Gi,isBefore:nu},bin:{ensureByteSafe:Jo,isByteSafe:Qo,isNodeBuffer:Vo,isTA:Uo},ab:{isTA:Yo,is:$o}};globalThis.t?Object.keys(na).forEach(function(e){if(t[e]){var n=na[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=na[e]}):globalThis.t=Object.assign({},na),globalThis.exports&&(exports.default=globalThis.t);
|
package/package.json
CHANGED
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(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=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},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(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):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__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},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,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),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,e.stability);console.log("SOURCEMAP",_);var 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,_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);
|
|
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=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},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(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):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__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},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,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),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,e.stability),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,_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);
|