termill 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORING.md +50 -1
- package/CHANGELOG.md +5 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/AUTHORING.md
CHANGED
|
@@ -36,6 +36,7 @@ Add a `termill` property to your `package.json`:
|
|
|
36
36
|
| `description` | Yes | Short description shown in search results |
|
|
37
37
|
| `launchCommand` | Yes | The command termill runs to launch the game (typically your `bin` key) |
|
|
38
38
|
| `category` | No | Category tag for discovery filtering (e.g. `puzzle`, `action`, `arcade`) |
|
|
39
|
+
| `creatorKey` | No | Your Ed25519 public key (64-char hex from `~/.termill/keys/id_ed25519.pub`). Enables feedback moderation — without it, you cannot flag or moderate feedback on your game. |
|
|
39
40
|
|
|
40
41
|
---
|
|
41
42
|
|
|
@@ -43,6 +44,7 @@ Add a `termill` property to your `package.json`:
|
|
|
43
44
|
|
|
44
45
|
- The `bin` field must point to a runnable Node.js script.
|
|
45
46
|
- The script must start with a `#!/usr/bin/env node` shebang on line 1.
|
|
47
|
+
- **Do not rely on npm lifecycle scripts** (`postinstall`, `preinstall`, etc.). termill installs packages with `--ignore-scripts` for security — lifecycle scripts will not run.
|
|
46
48
|
|
|
47
49
|
```js
|
|
48
50
|
#!/usr/bin/env node
|
|
@@ -128,13 +130,60 @@ Each check prints `✓`, `✗`, or `⚠` (warning). Exit code is 0 when all requ
|
|
|
128
130
|
"termill": {
|
|
129
131
|
"name": "My Termill Game",
|
|
130
132
|
"description": "A fun terminal puzzle game.",
|
|
131
|
-
"launchCommand": "my-termill-game"
|
|
133
|
+
"launchCommand": "my-termill-game",
|
|
134
|
+
"creatorKey": "your64charhexpublickeyhere..."
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
```
|
|
135
138
|
|
|
136
139
|
---
|
|
137
140
|
|
|
141
|
+
## Feedback system
|
|
142
|
+
|
|
143
|
+
termill includes a decentralized feedback system. Players can leave comments on any game, and creators can view and moderate feedback via the creator dashboard.
|
|
144
|
+
|
|
145
|
+
### How it works
|
|
146
|
+
|
|
147
|
+
- Feedback records are signed with the player's Ed25519 keypair and stored locally.
|
|
148
|
+
- Records are distributed via the P2P gossip network — no central server required.
|
|
149
|
+
- Records are append-only and immutable. Edits and retractions are new records that reference the original.
|
|
150
|
+
- Creators can publish moderation flags that propagate via gossip. Each peer decides whether to respect creator flags.
|
|
151
|
+
|
|
152
|
+
### Setting up as a creator
|
|
153
|
+
|
|
154
|
+
1. Run `termill` to generate your identity (if you haven't already).
|
|
155
|
+
2. Copy your public key from `~/.termill/keys/id_ed25519.pub`.
|
|
156
|
+
3. Add it as `creatorKey` in your game's `termill` metadata block.
|
|
157
|
+
4. Publish to npm.
|
|
158
|
+
|
|
159
|
+
Once your game is installed by players, you can view feedback in the **creator dashboard** (`[D]` from the home screen).
|
|
160
|
+
|
|
161
|
+
### Why creatorKey is safe to publish
|
|
162
|
+
|
|
163
|
+
`creatorKey` is your **public** key — it is meant to be visible. Publishing it in your `package.json` does not create a security risk because all moderation actions (flagging feedback, retracting flags) require a cryptographic signature from the matching **private** key, which never leaves your machine.
|
|
164
|
+
|
|
165
|
+
If someone copies your `creatorKey` into their own game's `package.json`, they still cannot moderate feedback on your games — signature verification will reject anything not signed by your private key. The only effect is that your creator dashboard would show their game alongside yours, which is a cosmetic annoyance at worst.
|
|
166
|
+
|
|
167
|
+
Conversely, there is no reason to use someone else's `creatorKey` — you would not be able to moderate feedback on that game, and your own games would disappear from your dashboard.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Identity portability
|
|
172
|
+
|
|
173
|
+
Your termill identity (Ed25519 keypair) lives at `~/.termill/keys/`. To use the same identity on another device:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Export (creates a password-encrypted file)
|
|
177
|
+
termill export-identity
|
|
178
|
+
|
|
179
|
+
# Transfer termill-identity.json to the other device, then:
|
|
180
|
+
termill import-identity termill-identity.json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The export file is encrypted with AES-256-GCM using a password-derived key (scrypt). Your private key is never stored in plaintext outside of `~/.termill/keys/`.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
138
187
|
## Questions and support
|
|
139
188
|
|
|
140
189
|
Open an issue on the [termill GitHub repository](https://github.com/example/termill) or search npm for other termill games for inspiration.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
# v0.
|
|
1
|
+
# v0.4.0 — App Updates
|
|
2
2
|
|
|
3
|
-
Released:
|
|
3
|
+
Released: [TBD]
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- [planned] Unified update system — check all installed apps and termill itself for newer versions on npm
|
|
6
|
+
- [planned] Startup notification banner when updates are available
|
|
7
|
+
- [planned] Dedicated update screen accessible from home — view outdated apps, update individually or all at once
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x396004=_0x24d8;(function(_0xc9e785,_0x47e230){const _0x179e8e=_0x24d8,_0x11e79a=_0xc9e785();while(!![]){try{const _0x38b6d1=-parseInt(_0x179e8e(0x1c8))/0x1+-parseInt(_0x179e8e(0x1d7))/0x2*(-parseInt(_0x179e8e(0x19a))/0x3)+parseInt(_0x179e8e(0x19f))/0x4+parseInt(_0x179e8e(0x1dd))/0x5+-parseInt(_0x179e8e(0x1b5))/0x6*(parseInt(_0x179e8e(0x204))/0x7)+-parseInt(_0x179e8e(0x1b3))/0x8*(-parseInt(_0x179e8e(0x1e4))/0x9)+-parseInt(_0x179e8e(0x211))/0xa*(parseInt(_0x179e8e(0x1eb))/0xb);if(_0x38b6d1===_0x47e230)break;else _0x11e79a['push'](_0x11e79a['shift']());}catch(_0x503642){_0x11e79a['push'](_0x11e79a['shift']());}}}(_0x5be1,0x87774));import{mkdirSync as _0x18ada5}from'node:fs';import{homedir as _0x556349}from'node:os';import{join as _0x16adfa}from'node:path';var w=_0x16adfa(_0x556349(),_0x396004(0x1df)),x=_0x16adfa(w,_0x396004(0x1e0)),k=_0x16adfa(w,_0x396004(0x224)),b=_0x16adfa(w,_0x396004(0x1f4)),O=[];import{generateKeyPairSync as _0x40d1e4,sign as _0x1f85c6,verify as _0x2730e9,createPublicKey as _0x5c17b2}from'node:crypto';import{readFileSync as _0x580350,writeFileSync as _0x3716a9,existsSync as _0x350367,mkdirSync as _0x16dc8b}from'node:fs';import{join as _0x3a0108}from'node:path';var z=_0x3a0108(x,_0x396004(0x1cc)),D=_0x3a0108(x,_0x396004(0x1c3));function Q(){const _0x1e8b89=_0x396004;_0x16dc8b(x,{'recursive':!0x0});let {privateKey:_0x155221,publicKey:_0x3c0607}=_0x40d1e4('ed25519',{'privateKeyEncoding':{'type':_0x1e8b89(0x251),'format':'pem'},'publicKeyEncoding':{'type':_0x1e8b89(0x1ab),'format':'der'}}),_0x44fb2f=_0x3c0607[_0x1e8b89(0x212)](-0x20)[_0x1e8b89(0x25e)]('hex');return _0x3716a9(z,_0x155221,{'encoding':'utf8','mode':0x180}),_0x3716a9(D,_0x44fb2f,{'encoding':'utf8','mode':0x1a4}),{'publicKey':_0x44fb2f};}function X(){return _0x350367(z)&&_0x350367(D);}function Z(){const _0x12170b=_0x396004;return _0x580350(D,_0x12170b(0x24c))[_0x12170b(0x196)]();}import{readFileSync as _0x301c2e,writeFileSync as _0x3ab2c9,existsSync as _0x23ae4c,mkdirSync as _0x1bf9a8}from'node:fs';import{dirname as _0x1ee6d8}from'node:path';function _0x5be1(){const _0xf680cc=['\x1b[B','Display\x20name\x20(e.g.\x20My\x20Termill\x20Game):\x20','bin\x20file\x20has\x20#!/usr/bin/env\x20node\x20shebang','check','repeat','termill.name:\x20\x22','columns','env','keywords','filter','node_modules\x0a','termill.description\x20is\x20missing\x20or\x20empty','exit','\x20is\x20up\x20to\x20date.\x20Launching…','name','objects','\x0aSearch:\x20','Missing\x20or\x20empty\x20\x22description\x22\x20field\x20in\x20package.json','.git','cwd','home','setEncoding','\x0aWelcome\x20back!','keywords\x20includes\x20\x22termill\x22','Author\x20(e.g.\x20Jane\x20Doe\x20<jane@example.com>):\x20','\x0aNo\x20identity\x20found.','description\x20is\x20non-empty','A\x20termill\x20game.','toISOString','//\x20','\x20\x20cd\x20','utf8','&size=20','//\x20TODO:\x20implement\x20your\x20game\x20here','Discovering\x20games…','termill\x20—\x20discover','pkcs8','function','games','termill\x20metadata\x20block\x20present','\x20version\x20--json','\x0atermill\x20init\x20—\x20scaffold\x20a\x20new\x20termill\x20game\x20project\x0a','termill.description:\x20\x22','linux','No\x20package.json\x20found\x20at\x20','backspace','!\x27);','floor','Your\x20identity:\x20','toString','termill','error','dependencies','xterm','trim','Missing\x20\x22bin\x22\x20field\x20in\x20package.json\x20—\x20add\x20a\x20bin\x20entry\x20pointing\x20to\x20your\x20entry\x20file','\x0aInstalling\x20','\x0a\x20\x20No\x20games\x20installed.\x20Press\x20H\x20to\x20discover\x20games.\x0a','801819FEolLB','log','console.log(\x27Welcome\x20to\x20','MIT','Searching…','1980828RwVNhS','process.exit()\x20call\x20found\x20in\x20source\x20files','bin\x20field\x20present','\x20\x20No\x20results.\x20Type\x20to\x20search\x20or\x20wait\x20for\x20peer\x20gossip.\x0a','npm\x20install\x20-g\x20','bin\x20file\x20found:\x20','bin\x20file\x20exists','pause','toLowerCase','termill\x20—\x20installing','[0m','\x0aError:\x20package\x20name\x20is\x20required.','spki','argv','termill.description\x20is\x20set','version','description','```bash','\x1b[2J\x1b[H','\x20\x20process.exit(0);','2160632quljvZ','.\x20Press\x20ENTER\x20to\x20continue.','132Smshib','packageName','\x0a✓\x20','parse','Add\x20\x22termill\x22\x20to\x20the\x20keywords\x20array\x20in\x20package.json\x20for\x20discoverability','message','npm\x20uninstall\x20-g\x20','description:\x20\x22','object','validate','\x20keywords:termill','\x0aError:\x20directory\x20\x22','\x20installed.\x20Press\x20ENTER\x20to\x20continue.','Could\x20not\x20fetch\x20package\x20info\x20for\x20\x22','id_ed25519.pub','json','\x1b[A','Init\x20failed:','https://registry.npmjs.org/-/v1/search','458997oYKJmm','?text=','bin\x20field\x20found:\x20','bin','id_ed25519','flat','[termill]\x20Fatal\x20error:','includes','#!/usr/bin/env\x20node','package','start','length','all','process.stdin.resume();','termill\x20—\x20identity','6kQogeK','?\x20[Y/N]','\x20—\x20entry\x20point','stringify','\x0aNext\x20steps:','\x0a✓\x20Project\x20scaffolded\x20at\x20./','148600SkkUDd','osascript','.termill','keys','##\x20License','max','startsWith','27SBJARN','termill\x20—\x20library','timeout','data','values','Checking\x20','unknown','1386yLVELq','stop','[2m','\x22\x20already\x20exists\x20in\x20the\x20current\x20folder.','inherit','find','removeListener','question','Category\x20(e.g.\x20puzzle,\x20action,\x20arcade)\x20[optional,\x20press\x20Enter\x20to\x20skip]:\x20','peers.json','left','min','process.stdin.once(\x27data\x27,\x20()\x20=>\x20{','title','catch','map','do\x20shell\x20script\x20\x22open\x20-a\x20Terminal\x20','\x0aIdentity\x20created.\x20Your\x20public\x20key:','push','library','/games','return','escape','once','package.json','106106OrHbUK','isArray','/peers','WARNING:\x20No\x20process.exit()\x20found.\x20termill\x20spawns\x20a\x20new\x20terminal\x20window\x20—\x20your\x20game\x20must\x20call\x20process.exit()\x20on\x20quit\x20to\x20close\x20it\x20cleanly','process.exit()\x20call\x20found\x20(warn\x20only)','termill.name\x20is\x20set','launchCommand','```','./index.js','write','down','string','node_modules','62670SmthPz','slice','cmd.exe','\x20uninstalled.\x20Press\x20ENTER\x20to\x20continue.','\x20\x20npm\x20link\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20link\x20globally\x20for\x20local\x20testing','warn\x20only','stdout','index.js','\x20is\x20missing\x20\x22#!/usr/bin/env\x20node\x22\x20on\x20line\x201','keywords:termill','win32','npm\x20list\x20-g\x20--json\x20','isTTY','package.json\x20readable','\x22\x20from\x20npm','isDirectory','Press\x20ENTER\x20to\x20continue.','npm\x20view\x20','README.md','library.json','resume','bin\x20file\x20not\x20found\x20at\x20path:\x20','ctrl+c','init','\x1b[C','darwin','setRawMode','\x0a✗\x20Install\x20failed:\x20'];_0x5be1=function(){return _0xf680cc;};return _0x5be1();}function N(){const _0x48b505=_0x396004;if(!_0x23ae4c(k))return[];try{return JSON[_0x48b505(0x1b8)](_0x301c2e(k,_0x48b505(0x24c)));}catch{return[];}}function q(_0x517a70){const _0x1e307f=_0x396004;_0x1bf9a8(_0x1ee6d8(k),{'recursive':!0x0}),_0x3ab2c9(k,JSON[_0x1e307f(0x1da)](_0x517a70,null,0x2),_0x1e307f(0x24c));}function ee(_0x415f0a){const _0x243cba=_0x396004;let _0x3f92d4=N()[_0x243cba(0x236)](_0x215025=>_0x215025[_0x243cba(0x1b6)]!==_0x415f0a[_0x243cba(0x1b6)]);_0x3f92d4[_0x243cba(0x1fd)](_0x415f0a),q(_0x3f92d4);}function te(_0x4e000e){const _0x437c0a=_0x396004;return N()[_0x437c0a(0x1f0)](_0x2c1e5b=>_0x2c1e5b[_0x437c0a(0x1b6)]===_0x4e000e)??null;}function ne(_0x4cfdaa){const _0x1d6c12=_0x396004;let _0x5bcdea=N()[_0x1d6c12(0x236)](_0xf711b9=>_0xf711b9[_0x1d6c12(0x1b6)]!==_0x4cfdaa);q(_0x5bcdea);}function re(){return N();}import{execSync as _0x221e0e}from'node:child_process';import{readFileSync as _0x44f2a7}from'node:fs';import{join as _0x520f8b}from'node:path';function Te(_0x4d3b9b){const _0x19fa7d=_0x396004;let _0x3071a9=_0x221e0e('npm\x20root\x20-g',{'encoding':_0x19fa7d(0x24c)})['trim'](),_0x3853c7=_0x520f8b(_0x3071a9,_0x4d3b9b,_0x19fa7d(0x203)),_0x5b8f9a=JSON[_0x19fa7d(0x1b8)](_0x44f2a7(_0x3853c7,'utf8'));if(!_0x5b8f9a['termill'])throw new Error('Package\x20\x22'+_0x4d3b9b+'\x22\x20is\x20missing\x20a\x20\x22termill\x22\x20property\x20in\x20its\x20package.json');return _0x5b8f9a['termill'];}function Re(_0x317013){const _0x1b56c6=_0x396004;try{let _0x26b46a=JSON[_0x1b56c6(0x1b8)](_0x221e0e(_0x1b56c6(0x222)+_0x317013+_0x1b56c6(0x255),{'encoding':_0x1b56c6(0x24c)}));return typeof _0x26b46a==_0x1b56c6(0x20f)?_0x26b46a:String(_0x26b46a);}catch{return _0x1b56c6(0x1ea);}}async function _(_0x1fb051){const _0x2fc392=_0x396004;let _0x4cdec5=te(_0x1fb051);if(_0x4cdec5){let _0x5c54be=Re(_0x1fb051);if(_0x5c54be!==_0x2fc392(0x1ea)&&_0x5c54be===_0x4cdec5[_0x2fc392(0x1ae)])return{'alreadyCurrent':!0x0};}_0x221e0e(_0x2fc392(0x1a3)+_0x1fb051,{'stdio':_0x2fc392(0x1ef)});let _0x70b099=Te(_0x1fb051),_0x4d021b=JSON[_0x2fc392(0x1b8)](_0x221e0e(_0x2fc392(0x21c)+_0x1fb051,{'encoding':_0x2fc392(0x24c)}))[_0x2fc392(0x261)]?.[_0x1fb051]?.[_0x2fc392(0x1ae)]??_0x2fc392(0x1ea);return ee({'packageName':_0x1fb051,'title':_0x70b099[_0x2fc392(0x1f8)]??_0x1fb051,'description':_0x70b099['description']??'','version':_0x4d021b,'launchCommand':_0x70b099[_0x2fc392(0x20a)],'installedAt':new Date()[_0x2fc392(0x249)]()}),_0x4cdec5?{'updated':!0x0}:{};}async function oe(_0x171a19){const _0x277e02=_0x396004;_0x221e0e(_0x277e02(0x1bb)+_0x171a19,{'stdio':_0x277e02(0x1ef)}),ne(_0x171a19);}import{spawn as _0x403c19}from'node:child_process';function Ae(){const _0x1483fd=_0x396004;let _0x1ae93f=process['platform'];return _0x1ae93f==='win32'||_0x1ae93f===_0x1483fd(0x22a)?_0x1ae93f:_0x1483fd(0x258);}function Le(_0x37b965,_0xa7c98f){const _0x255d15=_0x396004;switch(_0xa7c98f){case _0x255d15(0x21b):return{'cmd':_0x255d15(0x213),'args':['/c',_0x255d15(0x1d2),_0x255d15(0x213),'/k',_0x37b965],'options':{'detached':!0x0,'shell':!0x1}};case _0x255d15(0x22a):return{'cmd':_0x255d15(0x1de),'args':['-e',_0x255d15(0x1fb)+_0x37b965+'\x22'],'options':{'detached':!0x0}};case _0x255d15(0x258):default:return{'cmd':process[_0x255d15(0x234)]['TERM']??_0x255d15(0x262),'args':['-e',_0x37b965],'options':{'detached':!0x0}};}}function T(_0x4db261){let {cmd:_0x3f9983,args:_0x15c087,options:_0x1d6f34}=Le(_0x4db261,Ae());_0x403c19(_0x3f9983,_0x15c087,{..._0x1d6f34,'stdio':'ignore'})['unref']();}import{readFileSync as _0x12d8de,writeFileSync as _0x2d9afa,existsSync as _0x4d1270,mkdirSync as _0x4bba43}from'node:fs';import{dirname as _0x16709c}from'node:path';function Je(){const _0x3993e9=_0x396004;if(!_0x4d1270(b))return[...O];try{return JSON['parse'](_0x12d8de(b,_0x3993e9(0x24c)));}catch{return[...O];}}function Ge(_0x325869){const _0x2e6487=_0x396004;_0x4bba43(_0x16709c(b),{'recursive':!0x0}),_0x2d9afa(b,JSON['stringify'](_0x325869,null,0x2),_0x2e6487(0x24c));}async function He(_0x245132){const _0x58ba65=_0x396004;try{let _0x4fe654=await fetch(_0x245132+_0x58ba65(0x1ff),{'signal':AbortSignal[_0x58ba65(0x1e6)](0x1388)});return _0x4fe654['ok']?await _0x4fe654['json']():[];}catch{return[];}}async function Be(_0x343f8e){const _0x1f577c=_0x396004;try{let _0x3dc9fe=await fetch(_0x343f8e+_0x1f577c(0x206),{'signal':AbortSignal[_0x1f577c(0x1e6)](0x1388)});return _0x3dc9fe['ok']?await _0x3dc9fe[_0x1f577c(0x1c4)]():[];}catch{return[];}}async function se(){const _0x425bb1=_0x396004;let _0x4acc42=Je(),[_0x2a7ed9,_0x5164a8]=await Promise['all']([Promise[_0x425bb1(0x1d4)](_0x4acc42[_0x425bb1(0x1fa)](_0x57ecc1=>He(_0x57ecc1))),Promise[_0x425bb1(0x1d4)](_0x4acc42['map'](_0x3c9772=>Be(_0x3c9772)))]),_0x5bc3aa=_0x2a7ed9[_0x425bb1(0x1cd)](),_0x55fffb=_0x5164a8[_0x425bb1(0x1cd)](),_0x407eec=[...new Set([..._0x4acc42,..._0x55fffb])];return Ge(_0x407eec),{'games':_0x5bc3aa,'peers':_0x407eec};}var Ye=_0x396004(0x1c7);function Fe(_0x20c90c){const _0x5528f6=_0x396004;let _0x5b8d0f=_0x20c90c['termill']??{};return{'packageName':_0x20c90c['name'],'title':_0x5b8d0f[_0x5528f6(0x1f8)]??_0x20c90c[_0x5528f6(0x23b)],'description':_0x5b8d0f['description']??_0x20c90c['description']??'','version':_0x20c90c[_0x5528f6(0x1ae)]??_0x5528f6(0x1ea),'keywords':_0x20c90c[_0x5528f6(0x235)]??[]};}async function R(_0x43b526=''){const _0xd59327=_0x396004;let [_0x1236c5,_0x3e913c]=await Promise[_0xd59327(0x1d4)]([se()['catch'](()=>({'games':[]})),Ue(_0x43b526)]),_0x1544c1=_0x1236c5[_0xd59327(0x253)]??[],_0x520a49=new Set(_0x1544c1[_0xd59327(0x1fa)](_0x534d81=>_0x534d81[_0xd59327(0x1b6)])),_0xfb8140=_0x3e913c[_0xd59327(0x236)](_0x23e1d7=>!_0x520a49['has'](_0x23e1d7[_0xd59327(0x1b6)])),_0x4b684e=_0x43b526[_0xd59327(0x196)]()[_0xd59327(0x1a7)](),_0x3a2afd=_0x4c719f=>_0x4b684e?_0x4c719f[_0xd59327(0x1b6)][_0xd59327(0x1a7)]()['includes'](_0x4b684e)||(_0x4c719f[_0xd59327(0x1f8)]??'')['toLowerCase']()[_0xd59327(0x1cf)](_0x4b684e)||(_0x4c719f[_0xd59327(0x1af)]??'')[_0xd59327(0x1a7)]()[_0xd59327(0x1cf)](_0x4b684e):!0x0;return[..._0x1544c1[_0xd59327(0x236)](_0x3a2afd),..._0xfb8140[_0xd59327(0x236)](_0x3a2afd)];}async function Ue(_0x3b4979){const _0x351020=_0x396004;try{let _0x4fd052=_0x3b4979?encodeURIComponent(_0x3b4979+_0x351020(0x1bf)):_0x351020(0x21a),_0x7a2b5d=Ye+_0x351020(0x1c9)+_0x4fd052+_0x351020(0x24d),_0x2077df=await fetch(_0x7a2b5d,{'signal':AbortSignal[_0x351020(0x1e6)](0x1f40)});return _0x2077df['ok']?((await _0x2077df[_0x351020(0x1c4)]())[_0x351020(0x23c)]??[])['map'](_0x24f1ef=>Fe(_0x24f1ef[_0x351020(0x1d1)])):[];}catch{return[];}}import{stdout as _0x492c74}from'node:process';var j='\x1b',M=j+_0x396004(0x1a9),Ve=j+'[7m',ze=j+_0x396004(0x1ed),Qe=j+'[1m',ie=()=>_0x492c74[_0x396004(0x233)]??0x50;function m(_0x39cf1f){const _0x49ca87=_0x396004;let _0x5f3659=ie(),_0x1a9bef='\x20'+_0x39cf1f+'\x20',_0x40b5a9=Math[_0x49ca87(0x25c)]((_0x5f3659-_0x1a9bef[_0x49ca87(0x1d3)])/0x2),_0x41711c='─'[_0x49ca87(0x231)](Math[_0x49ca87(0x1e2)](0x0,_0x40b5a9))+_0x1a9bef+'─'['repeat'](Math[_0x49ca87(0x1e2)](0x0,_0x40b5a9));console[_0x49ca87(0x19b)](Qe+_0x41711c['slice'](0x0,_0x5f3659)+M);}function K(_0x15434f,_0x4887c9){_0x15434f['forEach']((_0x5e5bde,_0x27cc9e)=>{const _0x1e1efd=_0x24d8;let _0x1d464b=(_0x27cc9e===_0x4887c9?'>\x20':'\x20\x20')+_0x5e5bde;console[_0x1e1efd(0x19b)](_0x27cc9e===_0x4887c9?Ve+_0x1d464b['padEnd'](ie())+M:_0x1d464b);});}function J(_0x1f6f26){const _0x378a45=_0x396004;console[_0x378a45(0x19b)](ze+_0x1f6f26+M);}function _0x24d8(_0x1140d4,_0x8d741){_0x1140d4=_0x1140d4-0x196;const _0x5be1ed=_0x5be1();let _0x24d8fc=_0x5be1ed[_0x1140d4];return _0x24d8fc;}function h(_0x27d212){let _0x5db56b=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],_0x4f7baa=0x0,_0x5ebce1=null;return{'start'(){_0x5ebce1=setInterval(()=>{const _0x1c5092=_0x24d8;process[_0x1c5092(0x217)][_0x1c5092(0x20d)]('\x0d'+_0x5db56b[_0x4f7baa++%_0x5db56b['length']]+'\x20'+_0x27d212);},0x50);},'stop'(){const _0x1b939a=_0x24d8;_0x5ebce1&&(clearInterval(_0x5ebce1),_0x5ebce1=null,process[_0x1b939a(0x217)]['write']('\x0d'+'\x20'[_0x1b939a(0x231)](_0x27d212[_0x1b939a(0x1d3)]+0x4)+'\x0d'));}};}function f(){const _0x5577ad=_0x396004;process[_0x5577ad(0x217)][_0x5577ad(0x20d)](_0x5577ad(0x1b1));}function G(){return new Promise(_0x42434c=>{const _0x1cf10e=_0x24d8;let {stdin:_0x141174}=process,_0x4f80fc=_0x141174['isRaw'];_0x141174[_0x1cf10e(0x21d)]&&_0x141174[_0x1cf10e(0x22b)](!0x0),_0x141174[_0x1cf10e(0x225)](),_0x141174['setEncoding'](_0x1cf10e(0x24c));function _0x31e144(_0x548a5c){const _0x1a9a57=_0x1cf10e;_0x141174[_0x1a9a57(0x1f1)](_0x1a9a57(0x1e7),_0x31e144),_0x141174[_0x1a9a57(0x21d)]&&!_0x4f80fc&&_0x141174[_0x1a9a57(0x22b)](!0x1),_0x141174['pause']();let _0x3fa231=ae(_0x548a5c);_0x42434c({'name':_0x3fa231,'sequence':_0x548a5c,'ctrl':_0x548a5c<='\x1a'&&_0x548a5c!=='\x0d','shift':!0x1});}_0x141174[_0x1cf10e(0x202)](_0x1cf10e(0x1e7),_0x31e144);});}function H(_0x14e2bb){const _0x3d2222=_0x396004;let {stdin:_0x44abee}=process;_0x44abee['isTTY']&&_0x44abee['setRawMode'](!0x0),_0x44abee[_0x3d2222(0x225)](),_0x44abee[_0x3d2222(0x242)](_0x3d2222(0x24c));function _0x1b0d8d(_0x4a6a12){_0x14e2bb({'name':ae(_0x4a6a12),'sequence':_0x4a6a12});}return _0x44abee['on']('data',_0x1b0d8d),function(){const _0x48884a=_0x3d2222;_0x44abee[_0x48884a(0x1f1)](_0x48884a(0x1e7),_0x1b0d8d),_0x44abee[_0x48884a(0x21d)]&&_0x44abee[_0x48884a(0x22b)](!0x1),_0x44abee[_0x48884a(0x1a6)]();};}function ae(_0x212bd1){const _0x356b13=_0x396004;return _0x212bd1==='\x0d'||_0x212bd1==='\x0a'?_0x356b13(0x200):_0x212bd1==='\x1b'?_0x356b13(0x201):_0x212bd1===_0x356b13(0x1c5)?'up':_0x212bd1===_0x356b13(0x22d)?_0x356b13(0x20e):_0x212bd1===_0x356b13(0x229)?'right':_0x212bd1==='\x1b[D'?_0x356b13(0x1f5):_0x212bd1==='\x7f'||_0x212bd1==='\x08'?_0x356b13(0x25a):_0x212bd1==='\x03'?_0x356b13(0x227):_0x212bd1;}async function ce(){const _0x35dd5f=_0x396004;if(f(),m(_0x35dd5f(0x1d6)),X()){let _0x10fc6e=Z();console[_0x35dd5f(0x19b)](_0x35dd5f(0x243)),console['log'](_0x35dd5f(0x25d)+_0x10fc6e[_0x35dd5f(0x212)](0x0,0x10)+'…\x0a'),console[_0x35dd5f(0x19b)](_0x35dd5f(0x221)),await E();}else{console[_0x35dd5f(0x19b)](_0x35dd5f(0x246)),console[_0x35dd5f(0x19b)]('Press\x20ENTER\x20to\x20generate\x20a\x20new\x20keypair\x20and\x20create\x20your\x20identity.\x0a'),await E();let _0x568659=h('Generating\x20Ed25519\x20keypair…');_0x568659[_0x35dd5f(0x1d2)]();let {publicKey:_0x18f00a}=Q();_0x568659[_0x35dd5f(0x1ec)](),console[_0x35dd5f(0x19b)](_0x35dd5f(0x1fc)),console[_0x35dd5f(0x19b)]('\x20\x20'+_0x18f00a[_0x35dd5f(0x212)](0x0,0x10)+'…\x0a'),console[_0x35dd5f(0x19b)](_0x35dd5f(0x221)),await E();}}async function B(_0x5e5bec=R){const _0x1091a0=_0x396004;f(),m(_0x1091a0(0x250));let _0x3204af='',_0x5c84ab=[],_0x29aa96=0x0,_0x38058d=()=>{const _0x1de20d=_0x1091a0;f(),m('termill\x20—\x20discover'),console[_0x1de20d(0x19b)](_0x1de20d(0x23d)+_0x3204af+'_\x0a'),_0x5c84ab[_0x1de20d(0x1d3)]===0x0?console[_0x1de20d(0x19b)](_0x1de20d(0x1a2)):K(_0x5c84ab[_0x1de20d(0x1fa)](_0x170de1=>(_0x170de1['title']??_0x170de1[_0x1de20d(0x1b6)])+'\x20\x20'+(_0x170de1[_0x1de20d(0x1ae)]??'')+'\x20\x20'+(_0x170de1['description']??'')),_0x29aa96),J('[↑↓]\x20navigate\x20\x20[ENTER]\x20install\x20\x20[L]\x20library\x20\x20[CTRL+C]\x20quit');},_0x364eb5=h(_0x1091a0(0x24f));_0x364eb5[_0x1091a0(0x1d2)]();try{_0x5c84ab=await _0x5e5bec('');}catch{_0x5c84ab=[];}return _0x364eb5[_0x1091a0(0x1ec)](),_0x38058d(),new Promise(_0x99412e=>{let _0x4df0f=H(async({name:_0x3e5506,sequence:_0x10e985})=>{const _0x576d91=_0x24d8;if(_0x3e5506===_0x576d91(0x227)&&(_0x4df0f(),process[_0x576d91(0x239)](0x0)),_0x3e5506==='up'){_0x29aa96=Math[_0x576d91(0x1e2)](0x0,_0x29aa96-0x1),_0x38058d();return;}if(_0x3e5506===_0x576d91(0x20e)){_0x29aa96=Math['min'](_0x5c84ab[_0x576d91(0x1d3)]-0x1,_0x29aa96+0x1),_0x38058d();return;}if(_0x3e5506===_0x576d91(0x200)){if(_0x5c84ab[_0x576d91(0x1d3)]===0x0)return;let _0x1637eb=_0x5c84ab[_0x29aa96];_0x4df0f(),f(),m(_0x576d91(0x1a8)),console[_0x576d91(0x19b)](_0x576d91(0x198)+_0x1637eb['packageName']+'…\x0a');let _0x310038=h(_0x576d91(0x1a3)+_0x1637eb['packageName']);_0x310038[_0x576d91(0x1d2)]();try{await _(_0x1637eb[_0x576d91(0x1b6)]),_0x310038['stop'](),console['log'](_0x576d91(0x1b7)+_0x1637eb[_0x576d91(0x1b6)]+_0x576d91(0x1c1));}catch(_0x4f673c){_0x310038['stop'](),console[_0x576d91(0x19b)](_0x576d91(0x22c)+_0x4f673c['message']+_0x576d91(0x1b4));}await E(),_0x99412e(B(_0x5e5bec));return;}if(_0x3e5506['toLowerCase']()==='l'){_0x4df0f(),_0x99412e(_0x576d91(0x1fe));return;}if(_0x3e5506===_0x576d91(0x25a))_0x3204af=_0x3204af[_0x576d91(0x212)](0x0,-0x1);else{if(_0x10e985[_0x576d91(0x1d3)]===0x1&&_0x10e985>='\x20')_0x3204af+=_0x10e985;else return;}_0x29aa96=0x0;let _0xf83075=h(_0x576d91(0x19e));_0xf83075[_0x576d91(0x1d2)]();try{_0x5c84ab=await _0x5e5bec(_0x3204af);}catch{_0x5c84ab=[];}_0xf83075[_0x576d91(0x1ec)](),_0x38058d();});});}async function C(_0xc23dec=T){f(),m('termill\x20—\x20library');let _0x29f043=re(),_0x210b29=0x0,_0x44c5b1=()=>{const _0x396c45=_0x24d8;f(),m(_0x396c45(0x1e5)),_0x29f043[_0x396c45(0x1d3)]===0x0?console['log'](_0x396c45(0x199)):(console[_0x396c45(0x19b)](''),K(_0x29f043['map'](_0x7ec1c1=>(_0x7ec1c1[_0x396c45(0x1f8)]??_0x7ec1c1[_0x396c45(0x1b6)])+'\x20\x20v'+(_0x7ec1c1[_0x396c45(0x1ae)]??'?')),_0x210b29)),J('[↑↓]\x20navigate\x20\x20[ENTER]\x20launch\x20\x20[D]\x20uninstall\x20\x20[H/ESC]\x20home\x20\x20[CTRL+C]\x20quit');};return _0x44c5b1(),new Promise(_0x6f3893=>{let _0x24a78e=H(async({name:_0x2226bd})=>{const _0xdca66=_0x24d8;if(_0x2226bd===_0xdca66(0x227)&&(_0x24a78e(),process[_0xdca66(0x239)](0x0)),_0x2226bd==='up'){_0x210b29=Math['max'](0x0,_0x210b29-0x1),_0x44c5b1();return;}if(_0x2226bd===_0xdca66(0x20e)){_0x210b29=Math[_0xdca66(0x1f6)](_0x29f043[_0xdca66(0x1d3)]-0x1,_0x210b29+0x1),_0x44c5b1();return;}if(_0x2226bd===_0xdca66(0x200)&&_0x29f043[_0xdca66(0x1d3)]>0x0){let _0x439129=_0x29f043[_0x210b29];_0x24a78e(),f(),m(_0xdca66(0x1e5));let _0x1e5d66=h(_0xdca66(0x1e9)+_0x439129[_0xdca66(0x1b6)]+'\x20for\x20updates…');_0x1e5d66[_0xdca66(0x1d2)]();let _0x3642f5;try{_0x3642f5=await _(_0x439129[_0xdca66(0x1b6)]);}catch{_0x3642f5={'alreadyCurrent':!0x0};}_0x1e5d66['stop'](),_0x3642f5['updated']?console[_0xdca66(0x19b)]('\x0a✓\x20'+_0x439129[_0xdca66(0x1b6)]+'\x20updated\x20to\x20latest.\x20Launching…'):console[_0xdca66(0x19b)]('\x0a'+(_0x439129['title']??_0x439129[_0xdca66(0x1b6)])+_0xdca66(0x23a)),_0xc23dec(_0x439129[_0xdca66(0x20a)]),_0x6f3893(C(_0xc23dec));return;}if(_0x2226bd==='d'||_0x2226bd==='D'){if(_0x29f043[_0xdca66(0x1d3)]===0x0)return;let _0x19bdb8=_0x29f043[_0x210b29];if(_0x24a78e(),f(),m(_0xdca66(0x1e5)),console['log']('\x0aUninstall\x20'+(_0x19bdb8['title']??_0x19bdb8[_0xdca66(0x1b6)])+_0xdca66(0x1d8)),(await G())[_0xdca66(0x23b)][_0xdca66(0x1a7)]()==='y'){let _0x43a8fe=h('Uninstalling\x20'+_0x19bdb8[_0xdca66(0x1b6)]+'…');_0x43a8fe[_0xdca66(0x1d2)]();try{await oe(_0x19bdb8[_0xdca66(0x1b6)]),_0x43a8fe['stop'](),console[_0xdca66(0x19b)](_0xdca66(0x1b7)+_0x19bdb8[_0xdca66(0x1b6)]+_0xdca66(0x214));}catch(_0x405769){_0x43a8fe[_0xdca66(0x1ec)](),console['log']('\x0a✗\x20Uninstall\x20failed:\x20'+_0x405769[_0xdca66(0x1ba)]+_0xdca66(0x1b4));}await E();}_0x6f3893(C(_0xc23dec));return;}if(_0x2226bd==='h'||_0x2226bd==='H'||_0x2226bd===_0xdca66(0x201)){_0x24a78e(),_0x6f3893(_0xdca66(0x241));return;}});});}async function E(){const _0x50830a=_0x396004;let _0x17ca14;do _0x17ca14=await G();while(_0x17ca14[_0x50830a(0x23b)]!=='return');}import{readFileSync as _0x4c6a4f,existsSync as _0x13d220,readdirSync as _0x524eab,statSync as _0x1fec6a}from'node:fs';import{join as _0x378be0,resolve as _0x198d35,isAbsolute as _0x5374e0}from'node:path';import{execSync as _0x175acf}from'node:child_process';function tt(_0x50e98d){const _0x57f822=_0x396004;return _0x50e98d[_0x57f822(0x1e3)]('.')||_0x50e98d[_0x57f822(0x1e3)]('/')||_0x5374e0(_0x50e98d);}function nt(_0x136193){const _0x59c809=_0x396004;let _0x3b6d71=_0x378be0(_0x198d35(_0x136193),_0x59c809(0x203));if(!_0x13d220(_0x3b6d71))return null;try{return JSON['parse'](_0x4c6a4f(_0x3b6d71,_0x59c809(0x24c)));}catch{return null;}}function rt(_0x4130f5){const _0x1834e6=_0x396004;try{return JSON[_0x1834e6(0x1b8)](_0x175acf(_0x1834e6(0x222)+_0x4130f5+'\x20--json',{'encoding':_0x1834e6(0x24c)}));}catch{return null;}}function pe(_0x275118,_0xdfb5c6=[]){const _0x456e62=_0x396004;let _0x451b2b=[];try{for(let _0x34f84d of _0x524eab(_0x275118)){if(_0xdfb5c6['includes'](_0x34f84d))continue;let _0x559d33=_0x378be0(_0x275118,_0x34f84d),_0x73c849;try{_0x73c849=_0x1fec6a(_0x559d33);}catch{continue;}_0x73c849[_0x456e62(0x220)]()?_0x451b2b['push'](...pe(_0x559d33,_0xdfb5c6)):/\.(js|mjs|cjs)$/['test'](_0x34f84d)&&_0x451b2b[_0x456e62(0x1fd)](_0x559d33);}}catch{}return _0x451b2b;}function ue(_0x3e745a){const _0x173d9e=_0x396004;let _0x50dc8d=tt(_0x3e745a),_0x654a87=_0x50dc8d?nt(_0x3e745a):rt(_0x3e745a),_0x25eed6=[];if(!_0x654a87)return _0x25eed6['push']({'check':_0x173d9e(0x21e),'passed':!0x1,'message':_0x50dc8d?_0x173d9e(0x259)+_0x3e745a:_0x173d9e(0x1c2)+_0x3e745a+_0x173d9e(0x21f)}),_0x25eed6;let _0x2f1469=_0x654a87[_0x173d9e(0x1cb)],_0x2776be=typeof _0x2f1469==_0x173d9e(0x20f)?_0x2f1469:_0x2f1469&&typeof _0x2f1469==_0x173d9e(0x1bd)?Object[_0x173d9e(0x1e8)](_0x2f1469)[0x0]:null,_0x43feff=!!_0x2776be;_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x1a1),'passed':_0x43feff,'message':_0x43feff?_0x173d9e(0x1ca)+JSON[_0x173d9e(0x1da)](_0x2f1469):_0x173d9e(0x197)});let _0x3d311f=!0x1;if(_0x50dc8d&&_0x43feff&&(_0x3d311f=_0x13d220(_0x378be0(_0x198d35(_0x3e745a),_0x2776be)),_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x1a5),'passed':_0x3d311f,'message':_0x3d311f?_0x173d9e(0x1a4)+_0x2776be:_0x173d9e(0x226)+_0x2776be})),_0x50dc8d&&_0x43feff&&_0x3d311f){let _0x90777a=_0x378be0(_0x198d35(_0x3e745a),_0x2776be),_0xd0ed4c=!0x1;try{_0xd0ed4c=_0x4c6a4f(_0x90777a,_0x173d9e(0x24c))[_0x173d9e(0x1e3)](_0x173d9e(0x1d0));}catch{}_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x22f),'passed':_0xd0ed4c,'message':_0xd0ed4c?'Shebang\x20found':_0x2776be+_0x173d9e(0x219)});}let _0x5c9f14=(Array[_0x173d9e(0x205)](_0x654a87[_0x173d9e(0x235)])?_0x654a87[_0x173d9e(0x235)]:[])['includes'](_0x173d9e(0x25f));_0x25eed6['push']({'check':'keywords\x20includes\x20\x22termill\x22','passed':_0x5c9f14,'message':_0x5c9f14?_0x173d9e(0x244):_0x173d9e(0x1b9)});let _0x451bfc=typeof _0x654a87[_0x173d9e(0x1af)]=='string'&&_0x654a87[_0x173d9e(0x1af)][_0x173d9e(0x196)]()['length']>0x0;_0x25eed6['push']({'check':_0x173d9e(0x247),'passed':_0x451bfc,'message':_0x451bfc?_0x173d9e(0x1bc)+_0x654a87[_0x173d9e(0x1af)]+'\x22':_0x173d9e(0x23e)});let _0x509944=_0x654a87['termill'],_0x358f8f=!!_0x509944&&typeof _0x509944==_0x173d9e(0x1bd);if(_0x25eed6['push']({'check':_0x173d9e(0x254),'passed':_0x358f8f,'message':_0x358f8f?'termill\x20metadata\x20block\x20found':'Missing\x20\x22termill\x22\x20block\x20in\x20package.json\x20—\x20add\x20{\x20\x22termill\x22:\x20{\x20\x22name\x22:\x20\x22...\x22,\x20\x22description\x22:\x20\x22...\x22,\x20\x22launchCommand\x22:\x20\x22...\x22\x20}\x20}'}),_0x358f8f){let _0x457fbe=typeof _0x509944[_0x173d9e(0x23b)]==_0x173d9e(0x20f)&&_0x509944['name'][_0x173d9e(0x196)]()[_0x173d9e(0x1d3)]>0x0,_0xd53d6b=typeof _0x509944[_0x173d9e(0x1af)]==_0x173d9e(0x20f)&&_0x509944[_0x173d9e(0x1af)]['trim']()['length']>0x0;_0x25eed6['push']({'check':_0x173d9e(0x209),'passed':_0x457fbe,'message':_0x457fbe?_0x173d9e(0x232)+_0x509944['name']+'\x22':'termill.name\x20is\x20missing\x20or\x20empty'}),_0x25eed6['push']({'check':_0x173d9e(0x1ad),'passed':_0xd53d6b,'message':_0xd53d6b?_0x173d9e(0x257)+_0x509944['description']+'\x22':_0x173d9e(0x238)});}if(_0x50dc8d){let _0x2bc5e3=!0x1,_0x1cdfd8=pe(_0x198d35(_0x3e745a),[_0x173d9e(0x210),_0x173d9e(0x23f),'dist']);for(let _0x3502e4 of _0x1cdfd8)try{if(_0x4c6a4f(_0x3502e4,_0x173d9e(0x24c))['includes']('process.exit(')){_0x2bc5e3=!0x0;break;}}catch{}_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x208),'passed':_0x2bc5e3,'message':_0x2bc5e3?_0x173d9e(0x1a0):_0x173d9e(0x207)});}return _0x25eed6;}import{mkdirSync as _0x150f79,writeFileSync as _0x12a953,existsSync as _0xedd2}from'node:fs';import{join as _0xf6de19}from'node:path';import{createInterface as _0x2a1e2b}from'node:readline';function P(_0x35d812,_0x54a1fe){return new Promise(_0x1f2b0a=>{const _0x3924ca=_0x24d8;_0x35d812[_0x3924ca(0x1f2)](_0x54a1fe,_0x4d361a=>_0x1f2b0a(_0x4d361a[_0x3924ca(0x196)]()));});}async function me(){const _0x1edb41=_0x396004;let _0x211fa5=_0x2a1e2b({'input':process['stdin'],'output':process[_0x1edb41(0x217)]});console[_0x1edb41(0x19b)](_0x1edb41(0x256));let _0xf3b788=await P(_0x211fa5,'Package\x20name\x20(npm\x20package\x20name,\x20e.g.\x20my-termill-game):\x20'),_0x3790ce=await P(_0x211fa5,_0x1edb41(0x22e)),_0x4200c2=await P(_0x211fa5,'Short\x20description:\x20'),_0xecd799=await P(_0x211fa5,_0x1edb41(0x245)),_0x5022db=await P(_0x211fa5,_0x1edb41(0x1f3));_0x211fa5['close'](),_0xf3b788||(console[_0x1edb41(0x260)](_0x1edb41(0x1aa)),process[_0x1edb41(0x239)](0x1));let _0x4e3891=_0xf6de19(process[_0x1edb41(0x240)](),_0xf3b788);_0xedd2(_0x4e3891)&&(console[_0x1edb41(0x260)](_0x1edb41(0x1c0)+_0xf3b788+_0x1edb41(0x1ee)),process[_0x1edb41(0x239)](0x1)),_0x150f79(_0x4e3891,{'recursive':!0x0});let _0x593fd6={'name':_0xf3b788,'version':'1.0.0','description':_0x4200c2||'','main':_0x1edb41(0x218),'bin':{[_0xf3b788]:_0x1edb41(0x20c)},'keywords':[_0x1edb41(0x25f)],'author':_0xecd799||'','license':_0x1edb41(0x19d),'termill':{'name':_0x3790ce||_0xf3b788,'description':_0x4200c2||'','launchCommand':_0xf3b788,..._0x5022db?{'category':_0x5022db}:{}}};_0x12a953(_0xf6de19(_0x4e3891,'package.json'),JSON[_0x1edb41(0x1da)](_0x593fd6,null,0x2)+'\x0a','utf8');let _0x44f070=['#!/usr/bin/env\x20node','',_0x1edb41(0x24a)+(_0x3790ce||_0xf3b788)+_0x1edb41(0x1d9),_0x1edb41(0x24e),'',_0x1edb41(0x19c)+(_0x3790ce||_0xf3b788)+_0x1edb41(0x25b),'console.log(\x27Press\x20ENTER\x20to\x20quit.\x27);','',_0x1edb41(0x1d5),'process.stdin.setEncoding(\x27utf8\x27);',_0x1edb41(0x1f7),_0x1edb41(0x1b2),'});','']['join']('\x0a');_0x12a953(_0xf6de19(_0x4e3891,'index.js'),_0x44f070,_0x1edb41(0x24c)),_0x12a953(_0xf6de19(_0x4e3891,'.gitignore'),_0x1edb41(0x237),_0x1edb41(0x24c));let _0x326c7d=['#\x20'+(_0x3790ce||_0xf3b788),'',_0x4200c2||_0x1edb41(0x248),'','##\x20Play','',_0x1edb41(0x1b0),'npm\x20install\x20-g\x20'+_0xf3b788,_0x1edb41(0x25f),_0x1edb41(0x20b),'','Or\x20run\x20directly:','',_0x1edb41(0x1b0),_0xf3b788,'```','',_0x1edb41(0x1e1),'',_0x1edb41(0x19d),'']['join']('\x0a');_0x12a953(_0xf6de19(_0x4e3891,_0x1edb41(0x223)),_0x326c7d,_0x1edb41(0x24c)),console[_0x1edb41(0x19b)](_0x1edb41(0x1dc)+_0xf3b788+'/'),console[_0x1edb41(0x19b)](_0x1edb41(0x1db)),console[_0x1edb41(0x19b)](_0x1edb41(0x24b)+_0xf3b788),console[_0x1edb41(0x19b)](_0x1edb41(0x215)),console['log']('\x20\x20termill\x20validate\x20.\x20\x20\x20\x20#\x20check\x20compliance\x20before\x20publishing'),console[_0x1edb41(0x19b)]('\x20\x20npm\x20publish\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20publish\x20to\x20npm\x20when\x20ready'),console['log']('');}function at(){_0x18ada5(w,{'recursive':!0x0}),_0x18ada5(x,{'recursive':!0x0});}async function ct(){const _0x4ab7e9=_0x396004;at(),await ce();let _0x2af17c='home';for(;;)_0x2af17c===_0x4ab7e9(0x241)?_0x2af17c=await B(R):_0x2af17c===_0x4ab7e9(0x1fe)?_0x2af17c=await C(T):_0x2af17c&&typeof _0x2af17c['then']==_0x4ab7e9(0x252)?_0x2af17c=await _0x2af17c:_0x2af17c=_0x4ab7e9(0x241);}var de=process[_0x396004(0x1ac)][0x2];if(de===_0x396004(0x1be)){let e=process['argv'][0x3]??'.',t=ue(e),r=!0x0;for(let n of t)n['passed']?console['log']('✓\x20'+n[_0x396004(0x230)]):n[_0x396004(0x230)][_0x396004(0x1cf)](_0x396004(0x216))?console[_0x396004(0x19b)]('⚠\x20'+n['check']+':\x20'+n['message']):(console[_0x396004(0x19b)]('✗\x20'+n[_0x396004(0x230)]+':\x20'+n[_0x396004(0x1ba)]),r=!0x1);process[_0x396004(0x239)](r?0x0:0x1);}else de===_0x396004(0x228)?me()['catch'](_0xd5fc54=>{const _0x5f10f3=_0x396004;console['error'](_0x5f10f3(0x1c6),_0xd5fc54['message']??_0xd5fc54),process['exit'](0x1);}):ct()[_0x396004(0x1f9)](_0x382a5c=>{const _0x5a7ca6=_0x396004;console[_0x5a7ca6(0x260)](_0x5a7ca6(0x1ce),_0x382a5c['message']??_0x382a5c),process[_0x5a7ca6(0x239)](0x1);});
|
|
2
|
+
const _0x4fa3c4=_0x5908;(function(_0x52c428,_0x5a0bc5){const _0x54cf0e=_0x5908,_0x25fd45=_0x52c428();while(!![]){try{const _0x1e2cc6=-parseInt(_0x54cf0e(0x186))/0x1*(parseInt(_0x54cf0e(0x11b))/0x2)+-parseInt(_0x54cf0e(0x16d))/0x3*(parseInt(_0x54cf0e(0x1cf))/0x4)+-parseInt(_0x54cf0e(0x17b))/0x5+parseInt(_0x54cf0e(0xfb))/0x6*(-parseInt(_0x54cf0e(0x132))/0x7)+-parseInt(_0x54cf0e(0x1d6))/0x8+-parseInt(_0x54cf0e(0x175))/0x9*(parseInt(_0x54cf0e(0x150))/0xa)+parseInt(_0x54cf0e(0x1b9))/0xb*(parseInt(_0x54cf0e(0xb0))/0xc);if(_0x1e2cc6===_0x5a0bc5)break;else _0x25fd45['push'](_0x25fd45['shift']());}catch(_0x3e7d35){_0x25fd45['push'](_0x25fd45['shift']());}}}(_0x432d,0x8d30a));import{mkdirSync as _0x284898,readFileSync as _0x1cf8e7,writeFileSync as _0x1ed092}from'node:fs';import{createInterface as _0x3defc3}from'node:readline';import{homedir as _0x1fa255}from'node:os';import{join as _0x390d9d}from'node:path';var x=_0x390d9d(_0x1fa255(),_0x4fa3c4(0x149)),b=_0x390d9d(x,'keys'),C=_0x390d9d(x,_0x4fa3c4(0xe6)),j=_0x390d9d(x,_0x4fa3c4(0xdd)),S=_0x390d9d(x,_0x4fa3c4(0x17d)),F=_0x390d9d(x,'flags.json'),ce=[],le=_0x4fa3c4(0xc0);import{generateKeyPairSync as _0x5582bc,sign as _0x514f4e,verify as _0x3e1a11,createPublicKey as _0x2bd1fa,scryptSync as _0x1506e4,randomBytes as _0x4a2ed0,createCipheriv as _0x464207,createDecipheriv as _0x39794f}from'node:crypto';import{readFileSync as _0x15078e,writeFileSync as _0x3090d1,existsSync as _0x42aa0c,mkdirSync as _0x51e955}from'node:fs';import{join as _0x1f3c4f}from'node:path';var O=_0x1f3c4f(b,_0x4fa3c4(0x126)),D=_0x1f3c4f(b,'id_ed25519.pub');function Pe(){const _0x3c1eb1=_0x4fa3c4;_0x51e955(b,{'recursive':!0x0});let {privateKey:_0x36a868,publicKey:_0x56a174}=_0x5582bc(_0x3c1eb1(0x135),{'privateKeyEncoding':{'type':_0x3c1eb1(0xa3),'format':_0x3c1eb1(0x140)},'publicKeyEncoding':{'type':'spki','format':_0x3c1eb1(0xfe)}}),_0x4d90f4=_0x56a174['slice'](-0x20)[_0x3c1eb1(0x1d5)]('hex');return _0x3090d1(O,_0x36a868,{'encoding':_0x3c1eb1(0xe8),'mode':0x180}),_0x3090d1(D,_0x4d90f4,{'encoding':_0x3c1eb1(0xe8),'mode':0x1a4}),{'publicKey':_0x4d90f4};}function ve(){return _0x42aa0c(O)&&_0x42aa0c(D);}function E(){const _0x25c7c7=_0x4fa3c4;return _0x15078e(D,_0x25c7c7(0xe8))[_0x25c7c7(0xbe)]();}function U(_0x3749d7){const _0x2fa77f=_0x4fa3c4;let _0x5b37b1=_0x15078e(O,_0x2fa77f(0xe8));return _0x514f4e(null,Buffer[_0x2fa77f(0xcd)](_0x3749d7),_0x5b37b1)[_0x2fa77f(0x1d5)](_0x2fa77f(0x1a8));}function Y(_0x27a469,_0x5dece4,_0x1ba22a){const _0x4911be=_0x4fa3c4;let _0x420f1a=Buffer[_0x4911be(0xcd)](_0x1ba22a,_0x4911be(0x1a8)),_0x5d0710=Buffer[_0x4911be(0xcd)](_0x4911be(0x13e),'hex'),_0x1f9f15=Buffer['concat']([_0x5d0710,_0x420f1a]),_0x407069=_0x2bd1fa({'key':_0x1f9f15,'format':'der','type':_0x4911be(0x1d7)}),_0x3ca98b=Buffer[_0x4911be(0xcd)](_0x5dece4,_0x4911be(0x1a8));return _0x3e1a11(null,Buffer[_0x4911be(0xcd)](_0x27a469),_0x407069,_0x3ca98b);}function Re(_0x528e34){const _0x299536=_0x4fa3c4;let _0x258b5b=_0x15078e(O,_0x299536(0xe8)),_0x5d283d=_0x15078e(D,_0x299536(0xe8))['trim'](),_0x9a5d22=_0x4a2ed0(0x10),_0x4a9179=_0x1506e4(_0x528e34,_0x9a5d22,0x20),_0x30d889=_0x4a2ed0(0xc),_0x4f6174=_0x464207(_0x299536(0x197),_0x4a9179,_0x30d889),_0x15ceb9=_0x4f6174['update'](_0x258b5b,_0x299536(0xe8),_0x299536(0x1a8));_0x15ceb9+=_0x4f6174[_0x299536(0x160)]('hex');let _0x336f41=_0x4f6174['getAuthTag']();return JSON[_0x299536(0xc6)]({'encrypted':_0x15ceb9,'salt':_0x9a5d22[_0x299536(0x1d5)](_0x299536(0x1a8)),'iv':_0x30d889['toString']('hex'),'tag':_0x336f41['toString']('hex'),'publicKey':_0x5d283d});}function Te(_0x352d2c,_0x49e046){const _0x59b976=_0x4fa3c4;let _0x5478fa=JSON[_0x59b976(0x19d)](_0x352d2c),_0x4d9122=Buffer[_0x59b976(0xcd)](_0x5478fa[_0x59b976(0xaa)],_0x59b976(0x1a8)),_0xb30b0e=_0x1506e4(_0x49e046,_0x4d9122,0x20),_0x4ba098=Buffer['from'](_0x5478fa['iv'],'hex'),_0x1a833a=Buffer[_0x59b976(0xcd)](_0x5478fa[_0x59b976(0xec)],_0x59b976(0x1a8)),_0xea6545=_0x39794f(_0x59b976(0x197),_0xb30b0e,_0x4ba098);_0xea6545['setAuthTag'](_0x1a833a);let _0x4838cf;try{_0x4838cf=_0xea6545[_0x59b976(0xf0)](_0x5478fa[_0x59b976(0x1d8)],'hex',_0x59b976(0xe8)),_0x4838cf+=_0xea6545[_0x59b976(0x160)]('utf8');}catch{throw new Error(_0x59b976(0xed));}_0x51e955(b,{'recursive':!0x0}),_0x3090d1(O,_0x4838cf,{'encoding':_0x59b976(0xe8),'mode':0x180}),_0x3090d1(D,_0x5478fa['publicKey'],{'encoding':_0x59b976(0xe8),'mode':0x1a4});}import{readFileSync as _0x5db295,writeFileSync as _0x320e30,existsSync as _0x483b68,mkdirSync as _0x591bce}from'node:fs';import{dirname as _0x37b2d3}from'node:path';function V(){const _0x4d18f3=_0x4fa3c4;if(!_0x483b68(C))return[];try{return JSON[_0x4d18f3(0x19d)](_0x5db295(C,_0x4d18f3(0xe8)));}catch{return[];}}function Ie(_0x36cf63){const _0x1a890b=_0x4fa3c4;_0x591bce(_0x37b2d3(C),{'recursive':!0x0}),_0x320e30(C,JSON[_0x1a890b(0xc6)](_0x36cf63,null,0x2),_0x1a890b(0xe8));}function Ae(_0x120398){const _0x2ccef2=_0x4fa3c4;let _0x3d6225=V()[_0x2ccef2(0x1b1)](_0x262c08=>_0x262c08[_0x2ccef2(0x1b8)]!==_0x120398['packageName']);_0x3d6225[_0x2ccef2(0x103)](_0x120398),Ie(_0x3d6225);}function Ke(_0x1a56a9){const _0x360274=_0x4fa3c4;return V()[_0x360274(0x134)](_0x178bbb=>_0x178bbb[_0x360274(0x1b8)]===_0x1a56a9)??null;}function Ce(_0xe8e420){const _0xdb837e=_0x4fa3c4;let _0x15bcec=V()[_0xdb837e(0x1b1)](_0x3185b0=>_0x3185b0['packageName']!==_0xe8e420);Ie(_0x15bcec);}function R(){return V();}function _0x432d(){const _0x367abd=['\x0aNext\x20steps:','updated','startsWith','\x20→\x20','Category\x20(e.g.\x20puzzle,\x20action,\x20arcade)\x20[optional,\x20press\x20Enter\x20to\x20skip]:\x20','from','\x0a\x20\x20All\x20apps\x20are\x20up\x20to\x20date.\x0a','[↑↓]\x20navigate\x20\x20[R]\x20reply\x20\x20[M]\x20flag\x20\x20[ESC]\x20back','toLowerCase','\x0aNo\x20identity\x20found.','/flags','cmd.exe','setRawMode','\x0atermill\x20init\x20—\x20scaffold\x20a\x20new\x20termill\x20game\x20project\x0a','\x20installed.\x20Press\x20ENTER\x20to\x20continue.','json','ctrl+c','\x0aUninstall\x20','object','name','\x0a\x20\x20⚠\x20WARNING:\x20','peers.json','\x20\x20✗\x20','termill-identity.json','string','termill.description\x20is\x20set','\x20\x20(Could\x20not\x20fetch\x20package\x20metadata\x20from\x20npm)','termill\x20—\x20identity','termill.name:\x20\x22','\x20\x20termill\x20validate\x20.\x20\x20\x20\x20#\x20check\x20compliance\x20before\x20publishing','library.json','Password\x20is\x20required.','utf8','includeFeedback','MIT','entries','tag','Decryption\x20failed\x20—\x20wrong\x20password\x20or\x20corrupt\x20data','[↑↓]\x20navigate\x20\x20[ENTER]\x20install\x20\x20[L]\x20library\x20\x20[U]\x20updates\x20\x20[D]\x20dashboard\x20\x20[CTRL+C]\x20quit','../package.json','update','\x22\x20already\x20exists\x20in\x20the\x20current\x20folder.','description','termill\x20metadata\x20block\x20found','return','latestVersion','/feedback/','padEnd','argv','getFullYear','Author\x20(e.g.\x20Jane\x20Doe\x20<jane@example.com>):\x20','6CdDTbG','termill\x20—\x20creator\x20dashboard','linux','der','Display\x20name\x20(e.g.\x20My\x20Termill\x20Game):\x20','ignore','publishDate','osascript','push','\x20\x20process.exit(0);','\x20app(s)\x20outdated.\x20Press\x20[U]\x20on\x20home\x20to\x20update.\x0a','Press\x20ENTER\x20to\x20go\x20back.','win32','WARNING:\x20No\x20process.exit()\x20found.\x20termill\x20spawns\x20a\x20new\x20terminal\x20window\x20—\x20your\x20game\x20must\x20call\x20process.exit()\x20on\x20quit\x20to\x20close\x20it\x20cleanly','…\x20(','npm\x20install\x20-g\x20','description:\x20\x22','\x0a✓\x20Comment\x20saved.','Missing\x20\x22termill\x22\x20block\x20in\x20package.json\x20—\x20add\x20{\x20\x22termill\x22:\x20{\x20\x22name\x22:\x20\x22...\x22,\x20\x22description\x22:\x20\x22...\x22,\x20\x22launchCommand\x22:\x20\x22...\x22\x20}\x20}','termill\x20—\x20discover','?text=','\x0aUpdates\x20available:\x20','installedVersion','.\x20Press\x20ENTER\x20to\x20continue.','A\x20termill\x20game.','Press\x20ENTER\x20to\x20continue.','slice','Searching…','termill.creatorKey\x20is\x20set\x20(warn\x20only)','test','termill.creatorKey\x20is\x20valid\x20(warn\x20only)','warn\x20only','1203722WmVhBI','endsWith','Uninstalling\x20','keywords:termill','forEach','referencesId','Flag\x20reason:\x20','Press\x20ENTER\x20to\x20generate\x20a\x20new\x20keypair\x20and\x20create\x20your\x20identity.\x0a','\x20\x20✓\x20','stdin','?\x20[Y/N]','id_ed25519','termill\x20—\x20updates','README.md','Updating\x20','Your\x20identity:\x20','add','\x0aAll\x20updates\x20processed.\x20Press\x20ENTER\x20to\x20continue.','map','title','Export\x20failed:','\x0aWelcome\x20back!','\x0a\x20\x20Package:\x20\x20','5614966KIpAJS','[1m','find','ed25519','setEncoding','updates','author','process.stdin.once(\x27data\x27,\x20()\x20=>\x20{','console.log(\x27Welcome\x20to\x20','package.json','creatorKey','min','302a300506032b6570032100','import-identity','pem','content','package','\x0a\x20\x20No\x20feedback\x20received\x20yet.\x0a','passed','termill\x20—\x20dashboard\x20—\x20','description\x20is\x20non-empty','[termill]\x20Fatal\x20error:','):\x20','.termill','termill\x20metadata\x20block\x20present','Usage:\x20termill\x20import-identity\x20<file>','##\x20License','\x20\x20v','[0m','\x20version\x20--json','1573940TLnyzM','\x20is\x20up\x20to\x20date.\x20Launching…','\x0a\x20\x20No\x20feedback\x20yet.\x20Be\x20the\x20first\x20to\x20leave\x20a\x20comment!\x0a','sort','\x20\x20Author:\x20\x20\x20','stdout','\x1b[D','termill.description\x20is\x20missing\x20or\x20empty','\x1b[B','env','exit','then','catch','process.exit()\x20call\x20found\x20in\x20source\x20files','timestamp','\x20update(s)\x20available:\x0a','final','No\x20package.json\x20found\x20at\x20','termill\x20—\x20installing','cwd','Fetching\x20package\x20info…','\x0a✓\x20Reply\x20saved.','\x20\x20Latest\x20flag:\x20\x22','includes','authorKey','isArray','Your\x20reply:\x20','\x20community\x20flag(s)\x20on\x20this\x20package!','TERM','6xNxnUh','```bash','\x0aInstalling\x20','init','inherit','unref','npm\x20view\x20','#!/usr/bin/env\x20node','9scAkOE','dependencies','function','process.stdin.setEncoding(\x27utf8\x27);','termill\x20—\x20library','\x22\x20from\x20npm','888700SCpeqc','message','feedback','\x0aError:\x20directory\x20\x22','keywords','console.log(\x27Press\x20ENTER\x20to\x20quit.\x27);','Checking\x20','resume','\x20is\x20missing\x20\x22#!/usr/bin/env\x20node\x22\x20on\x20line\x201','```','has','1NeVAEM','bin\x20file\x20exists','error','npm\x20list\x20-g\x20--json\x20','termill.name\x20is\x20missing\x20or\x20empty','Short\x20description:\x20','[↑↓]\x20navigate\x20\x20[ENTER]\x20update\x20selected\x20\x20[A]\x20update\x20all\x20\x20[ESC]\x20home','Your\x20comment:\x20','✓\x20Identity\x20exported\x20to\x20termill-identity.json','close','floor','\x0a✓\x20Moderation\x20flag\x20saved.','[2m','\x0a\x20\x20Install\x20scripts\x20are\x20blocked\x20for\x20security\x20(--ignore-scripts).','reason','max','.git','aes-256-gcm','localeCompare','once','Missing\x20\x22bin\x22\x20field\x20in\x20package.json\x20—\x20add\x20a\x20bin\x20entry\x20pointing\x20to\x20your\x20entry\x20file','length','[↑↓]\x20navigate\x20\x20[ENTER]\x20view\x20feedback\x20\x20[ESC]\x20home','parse','type','\x20\x20✗\x20[retracted]\x20','});','Discovering\x20games…','termill.creatorKey\x20must\x20be\x20a\x2064-character\x20hex\x20string\x20(your\x20Ed25519\x20public\x20key)','launchCommand','all','termill\x20—\x20feedback\x20—\x20','timeout','Missing\x20or\x20empty\x20\x22description\x22\x20field\x20in\x20package.json','hex','Shebang\x20found','padStart','\x20\x20↳\x20','termill.creatorKey:\x20','\x1b[C','signature','removeListener','comment','filter','isTTY','Generating\x20Ed25519\x20keypair…','keywords\x20includes\x20\x22termill\x22','\x20updated\x20to\x20','process.stdin.resume();','data','packageName','1012CClkiX','\x0a\x20\x20No\x20comments\x20or\x20replies\x20to\x20display.\x0a','library','start','down','toISOString','!\x27);','darwin','Password:\x20','\x20\x20npm\x20publish\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20publish\x20to\x20npm\x20when\x20ready','columns','termill.description:\x20\x22','escape','\x0a\x20\x20No\x20games\x20found\x20with\x20your\x20creatorKey.\x20Set\x20creatorKey\x20in\x20your\x20game\x27s\x20package.json.\x0a','home','xterm','[C]\x20comment\x20\x20[ESC]\x20back\x20to\x20library','backspace','version','stop','do\x20shell\x20script\x20\x22open\x20-a\x20Terminal\x20','bin\x20file\x20found:\x20','2150536ZyLPtg','&size=20','node_modules','index.js','isDirectory','log','toString','9116584MGQJpD','spki','encrypted','process.exit()\x20call\x20found\x20(warn\x20only)','games','export-identity','\x0a\x20\x20','Or\x20run\x20directly:','.json','//\x20','isRaw','unknown','Password\x20for\x20export:\x20','flat','pkcs8','\x20failed:\x20','getMonth','\x20\x20Published:\x20','[7m','repeat','moderation-flag','salt','npm\x20install\x20-g\x20--ignore-scripts\x20','\x0aSearch:\x20','package.json\x20readable','.gitignore','##\x20Play','591168ztLLwi','\x0a✓\x20','\x20\x20No\x20results.\x20Type\x20to\x20search\x20or\x20wait\x20for\x20peer\x20gossip.\x0a','time','platform','write','check','✓\x20Identity\x20imported\x20successfully.','question','./index.js','/peers','reply','pause','termill.creatorKey\x20not\x20set\x20—\x20feedback\x20moderation\x20features\x20require\x20it.\x20Add\x20your\x20public\x20key\x20from\x20~/.termill/keys/id_ed25519.pub','trim','validate','termill','bin\x20file\x20has\x20#!/usr/bin/env\x20node\x20shebang','bin\x20field\x20found:\x20','\x20--json','\x20for\x20updates…','Package\x20name\x20(npm\x20package\x20name,\x20e.g.\x20my-termill-game):\x20','stringify','npm\x20uninstall\x20-g\x20'];_0x432d=function(){return _0x367abd;};return _0x432d();}import{execSync as _0xb26227}from'node:child_process';import{readFileSync as _0x9bb76a}from'node:fs';import{join as _0x3559ce}from'node:path';function ue(_0x171e63){const _0x5845d3=_0x4fa3c4;let _0x53dcd0=_0xb26227('npm\x20root\x20-g',{'encoding':_0x5845d3(0xe8)})['trim'](),_0x4d52d2=_0x3559ce(_0x53dcd0,_0x171e63,_0x5845d3(0x13b)),_0x3cceb1=JSON[_0x5845d3(0x19d)](_0x9bb76a(_0x4d52d2,_0x5845d3(0xe8)));if(!_0x3cceb1['termill'])throw new Error('Package\x20\x22'+_0x171e63+'\x22\x20is\x20missing\x20a\x20\x22termill\x22\x20property\x20in\x20its\x20package.json');return _0x3cceb1['termill'];}function pe(_0x4d8f4f){const _0x132d4d=_0x4fa3c4;try{let _0x2f78c5=JSON['parse'](_0xb26227(_0x132d4d(0x173)+_0x4d8f4f+_0x132d4d(0x14f),{'encoding':_0x132d4d(0xe8)}));return typeof _0x2f78c5==_0x132d4d(0xe0)?_0x2f78c5:String(_0x2f78c5);}catch{return _0x132d4d(0xa0);}}async function J(_0x550216){const _0x4bc6eb=_0x4fa3c4;let _0x549b70=Ke(_0x550216);if(_0x549b70){let _0xbeeba0=pe(_0x550216);if(_0xbeeba0!==_0x4bc6eb(0xa0)&&_0xbeeba0===_0x549b70[_0x4bc6eb(0x1cb)])return{'alreadyCurrent':!0x0};}_0xb26227(_0x4bc6eb(0xab)+_0x550216,{'stdio':_0x4bc6eb(0x171)});let _0x25fa2e=ue(_0x550216),_0xe946b8=JSON['parse'](_0xb26227(_0x4bc6eb(0x189)+_0x550216,{'encoding':_0x4bc6eb(0xe8)}))[_0x4bc6eb(0x176)]?.[_0x550216]?.['version']??_0x4bc6eb(0xa0);return Ae({'packageName':_0x550216,'title':_0x25fa2e[_0x4bc6eb(0x12e)]??_0x550216,'description':_0x25fa2e[_0x4bc6eb(0xf2)]??'','version':_0xe946b8,'launchCommand':_0x25fa2e[_0x4bc6eb(0x1a3)],'installedAt':new Date()['toISOString']()}),_0x549b70?{'updated':!0x0}:{};}function Fe(_0x4c2a68){const _0x3c5855=_0x4fa3c4;try{let _0x6321e=_0xb26227(_0x3c5855(0x173)+_0x4c2a68+_0x3c5855(0xc3),{'encoding':_0x3c5855(0xe8)}),_0x3dea13=JSON['parse'](_0x6321e);return{'name':_0x3dea13[_0x3c5855(0xdb)]??_0x4c2a68,'version':_0x3dea13[_0x3c5855(0x1cb)]??'unknown','author':typeof _0x3dea13[_0x3c5855(0x138)]==_0x3c5855(0xe0)?_0x3dea13[_0x3c5855(0x138)]:_0x3dea13[_0x3c5855(0x138)]?.[_0x3c5855(0xdb)]??_0x3c5855(0xa0),'description':_0x3dea13[_0x3c5855(0xf2)]??'','publishDate':_0x3dea13[_0x3c5855(0xb3)]?.[_0x3dea13[_0x3c5855(0x1cb)]]??'unknown'};}catch{return null;}}function W(_0x281128,_0x23bf61){const _0xa52129=_0x4fa3c4;let _0x1a70f2=[];for(let _0x960882 of _0x281128){let _0x2ffec3=pe(_0x960882['packageName']);_0x2ffec3!==_0xa52129(0xa0)&&_0x2ffec3!==_0x960882[_0xa52129(0x1cb)]&&_0x1a70f2[_0xa52129(0x103)]({'packageName':_0x960882[_0xa52129(0x1b8)],'title':_0x960882[_0xa52129(0x12e)]??_0x960882[_0xa52129(0x1b8)],'installedVersion':_0x960882[_0xa52129(0x1cb)],'latestVersion':_0x2ffec3});}let _0x32aed4=pe(le);return _0x32aed4!==_0xa52129(0xa0)&&_0x32aed4!==_0x23bf61&&_0x1a70f2[_0xa52129(0x103)]({'packageName':le,'title':_0xa52129(0xc0),'installedVersion':_0x23bf61,'latestVersion':_0x32aed4}),_0x1a70f2;}async function Oe(_0x4c03cd){const _0xed0021=_0x4fa3c4;_0xb26227(_0xed0021(0xc7)+_0x4c03cd,{'stdio':_0xed0021(0x171)}),Ce(_0x4c03cd);}import{spawn as _0x569969}from'node:child_process';function Et(){const _0xef6ae8=_0x4fa3c4;let _0x3ae378=process[_0xef6ae8(0xb4)];return _0x3ae378===_0xef6ae8(0x107)||_0x3ae378===_0xef6ae8(0x1c0)?_0x3ae378:_0xef6ae8(0xfd);}function $t(_0x48fb34,_0x168c32){const _0x1d4ebd=_0x4fa3c4;switch(_0x168c32){case _0x1d4ebd(0x107):return{'cmd':_0x1d4ebd(0xd3),'args':['/c',_0x1d4ebd(0x1bc),_0x1d4ebd(0xd3),'/k',_0x48fb34],'options':{'detached':!0x0,'shell':!0x1}};case _0x1d4ebd(0x1c0):return{'cmd':_0x1d4ebd(0x102),'args':['-e',_0x1d4ebd(0x1cd)+_0x48fb34+'\x22'],'options':{'detached':!0x0}};case _0x1d4ebd(0xfd):default:return{'cmd':process[_0x1d4ebd(0x159)][_0x1d4ebd(0x16c)]??_0x1d4ebd(0x1c8),'args':['-e',_0x48fb34],'options':{'detached':!0x0}};}}function z(_0x52b941){const _0x5ec509=_0x4fa3c4;let {cmd:_0x4e0a07,args:_0x4d1a41,options:_0x264dad}=$t(_0x52b941,Et());_0x569969(_0x4e0a07,_0x4d1a41,{..._0x264dad,'stdio':_0x5ec509(0x100)})[_0x5ec509(0x172)]();}import{readFileSync as _0x1678c7,writeFileSync as _0x153106,existsSync as _0xff6eed,mkdirSync as _0x385ce5}from'node:fs';import{dirname as _0x2195ca}from'node:path';import{randomUUID as _0x512cf9}from'node:crypto';import{readFileSync as _0xb5fd73,writeFileSync as _0x28a976,existsSync as _0x4ab193,mkdirSync as _0x1499c0,readdirSync as _0x114435}from'node:fs';import{join as _0x1ede18}from'node:path';function Q(_0x2fc89a){const _0xfde8b8=_0x4fa3c4;let _0x5ab599={'id':_0x2fc89a['id'],'type':_0x2fc89a[_0xfde8b8(0x19e)],'packageName':_0x2fc89a[_0xfde8b8(0x1b8)],'authorKey':_0x2fc89a[_0xfde8b8(0x168)],'content':_0x2fc89a[_0xfde8b8(0x141)]??'','timestamp':_0x2fc89a['timestamp']};return _0x2fc89a['referencesId']&&(_0x5ab599[_0xfde8b8(0x120)]=_0x2fc89a[_0xfde8b8(0x120)]),JSON[_0xfde8b8(0xc6)](_0x5ab599);}function It(_0x328bd2,_0x5945e3=new Date()){const _0x4b021c=_0x4fa3c4;let _0xdbec21=_0x5945e3[_0x4b021c(0xf9)]()+'-'+String(_0x5945e3[_0x4b021c(0xa5)]()+0x1)[_0x4b021c(0x1aa)](0x2,'0');return _0x1ede18(S,_0x328bd2,_0xdbec21+_0x4b021c(0x9d));}function de(_0x2e5c53){const _0x1f1ebc=_0x4fa3c4;if(!_0x4ab193(_0x2e5c53))return[];try{return JSON[_0x1f1ebc(0x19d)](_0xb5fd73(_0x2e5c53,'utf8'));}catch{return[];}}function De(_0x458954,_0x5d74e3){const _0x1fe168=_0x4fa3c4;let _0x3cbc57={'id':_0x512cf9(),'type':_0x1fe168(0x1b0),'packageName':_0x458954,'authorKey':E(),'content':_0x5d74e3,'timestamp':new Date()[_0x1fe168(0x1be)]()};return _0x3cbc57[_0x1fe168(0x1ae)]=U(Q(_0x3cbc57)),_0x3cbc57;}function Je(_0x1eeaaf,_0x3f5cdc,_0x35fead){const _0x350307=_0x4fa3c4;let _0x39aa81={'id':_0x512cf9(),'type':_0x350307(0xbb),'packageName':_0x1eeaaf,'authorKey':E(),'content':_0x35fead,'timestamp':new Date()[_0x350307(0x1be)](),'referencesId':_0x3f5cdc};return _0x39aa81['signature']=U(Q(_0x39aa81)),_0x39aa81;}function Me(_0x4d3fcf,_0x44bc1e,_0x1b4895){const _0x29ea22=_0x4fa3c4;let _0xec9049={'id':_0x512cf9(),'type':_0x29ea22(0xa9),'packageName':_0x4d3fcf,'authorKey':E(),'content':_0x1b4895,'timestamp':new Date()[_0x29ea22(0x1be)](),'referencesId':_0x44bc1e};return _0xec9049[_0x29ea22(0x1ae)]=U(Q(_0xec9049)),_0xec9049;}function M(_0x2d2f42,_0x138afa){const _0x4b5e84=_0x4fa3c4;let _0x4484c0=It(_0x2d2f42,new Date(_0x138afa[_0x4b5e84(0x15e)]));_0x1499c0(_0x1ede18(S,_0x2d2f42),{'recursive':!0x0});let _0x43e522=de(_0x4484c0);_0x43e522[_0x4b5e84(0x103)](_0x138afa),_0x28a976(_0x4484c0,JSON[_0x4b5e84(0xc6)](_0x43e522,null,0x2),'utf8');}function At(_0x487be5){const _0x172139=_0x4fa3c4;let _0x2a5769=_0x1ede18(S,_0x487be5);if(!_0x4ab193(_0x2a5769))return[];let _0x20041d=_0x114435(_0x2a5769)[_0x172139(0x1b1)](_0x8fa58d=>_0x8fa58d[_0x172139(0x11c)](_0x172139(0x9d)))[_0x172139(0x153)](),_0x20f72f=[];for(let _0x12c909 of _0x20041d)_0x20f72f['push'](...de(_0x1ede18(_0x2a5769,_0x12c909)));return _0x20f72f['sort']((_0x3a3b5e,_0x42b631)=>_0x3a3b5e[_0x172139(0x15e)][_0x172139(0x198)](_0x42b631['timestamp']));}function ge(_0x31176d,_0x9eadbb=0x3){const _0x2d0b94=_0x4fa3c4;let _0x51650c=_0x1ede18(S,_0x31176d);if(!_0x4ab193(_0x51650c))return[];let _0x148659=new Date(),_0x33e554=[];for(let _0xf79799=0x0;_0xf79799<_0x9eadbb;_0xf79799++){let _0x166355=new Date(_0x148659[_0x2d0b94(0xf9)](),_0x148659[_0x2d0b94(0xa5)]()-_0xf79799,0x1);_0x33e554[_0x2d0b94(0x103)](_0x166355[_0x2d0b94(0xf9)]()+'-'+String(_0x166355[_0x2d0b94(0xa5)]()+0x1)['padStart'](0x2,'0')+_0x2d0b94(0x9d));}let _0x10217c=[];for(let _0x1e12ce of _0x33e554){let _0x1c5930=_0x1ede18(_0x51650c,_0x1e12ce);_0x10217c['push'](...de(_0x1c5930));}return _0x10217c['sort']((_0xebd230,_0x519902)=>_0xebd230['timestamp'][_0x2d0b94(0x198)](_0x519902['timestamp']));}function Kt(_0x3f6372){const _0x375904=_0x4fa3c4;try{return Y(Q(_0x3f6372),_0x3f6372[_0x375904(0x1ae)],_0x3f6372[_0x375904(0x168)]);}catch{return!0x1;}}function Le(_0x25b89e,_0x3a553a){const _0x58563c=_0x4fa3c4;let _0x595379=At(_0x25b89e),_0x14d9cc=new Set(_0x595379[_0x58563c(0x12d)](_0x309de1=>_0x309de1['id'])),_0x85bb9d=0x0,_0x543222=0x0;for(let _0x3a0b8e of _0x3a553a)if(!_0x14d9cc[_0x58563c(0x185)](_0x3a0b8e['id'])){if(!Kt(_0x3a0b8e)){_0x543222++;continue;}M(_0x25b89e,_0x3a0b8e),_0x14d9cc['add'](_0x3a0b8e['id']),_0x85bb9d++;}return{'added':_0x85bb9d,'rejected':_0x543222};}function Ct(){const _0x228c47=_0x4fa3c4;if(!_0xff6eed(j))return[...ce];try{return JSON[_0x228c47(0x19d)](_0x1678c7(j,_0x228c47(0xe8)));}catch{return[...ce];}}function jt(_0x2ab833){const _0x367da5=_0x4fa3c4;_0x385ce5(_0x2195ca(j),{'recursive':!0x0}),_0x153106(j,JSON[_0x367da5(0xc6)](_0x2ab833,null,0x2),_0x367da5(0xe8));}function ye(){const _0x58aff6=_0x4fa3c4;if(!_0xff6eed(F))return[];try{return JSON[_0x58aff6(0x19d)](_0x1678c7(F,_0x58aff6(0xe8)));}catch{return[];}}function Ft(_0xf405c3){const _0x291686=_0x4fa3c4;_0x385ce5(_0x2195ca(F),{'recursive':!0x0}),_0x153106(F,JSON['stringify'](_0xf405c3,null,0x2),_0x291686(0xe8));}function Ot(_0x22f1db){const _0x2596b1=_0x4fa3c4;let _0x265f7f=ye(),_0x5db67e=new Set(_0x265f7f[_0x2596b1(0x12d)](_0x2ee187=>_0x2ee187['id'])),_0x356147=0x0,_0x4e3bfc=0x0;for(let _0x3b0c1f of _0x22f1db){if(_0x5db67e[_0x2596b1(0x185)](_0x3b0c1f['id']))continue;let _0x7778e6=JSON['stringify']({'id':_0x3b0c1f['id'],'packageName':_0x3b0c1f[_0x2596b1(0x1b8)],'authorKey':_0x3b0c1f['authorKey'],'reason':_0x3b0c1f[_0x2596b1(0x194)],'timestamp':_0x3b0c1f[_0x2596b1(0x15e)]});if(!Y(_0x7778e6,_0x3b0c1f[_0x2596b1(0x1ae)],_0x3b0c1f[_0x2596b1(0x168)])){_0x4e3bfc++;continue;}_0x265f7f[_0x2596b1(0x103)](_0x3b0c1f),_0x5db67e[_0x2596b1(0x12b)](_0x3b0c1f['id']),_0x356147++;}return _0x356147>0x0&&Ft(_0x265f7f),{'added':_0x356147,'rejected':_0x4e3bfc};}async function Dt(_0xff53c7,_0x518c3d){const _0x329b2e=_0x4fa3c4;let _0x18c2ca=_0x518c3d?_0x329b2e(0xf6)+encodeURIComponent(_0x518c3d):'/feedback';try{let _0x4a64d2=await fetch(''+_0xff53c7+_0x18c2ca,{'signal':AbortSignal[_0x329b2e(0x1a6)](0x1388)});return _0x4a64d2['ok']?await _0x4a64d2[_0x329b2e(0xd7)]():[];}catch{return[];}}async function Jt(_0x313b06){const _0x4882f3=_0x4fa3c4;try{let _0x6ecc93=await fetch(_0x313b06+_0x4882f3(0xd2),{'signal':AbortSignal[_0x4882f3(0x1a6)](0x1388)});return _0x6ecc93['ok']?await _0x6ecc93[_0x4882f3(0xd7)]():[];}catch{return[];}}async function Mt(_0x25e655){const _0x4ab599=_0x4fa3c4;try{let _0x4fa7e2=await fetch(_0x25e655+'/games',{'signal':AbortSignal[_0x4ab599(0x1a6)](0x1388)});return _0x4fa7e2['ok']?await _0x4fa7e2['json']():[];}catch{return[];}}async function Lt(_0x298ce1){const _0x48e807=_0x4fa3c4;try{let _0x53a991=await fetch(_0x298ce1+_0x48e807(0xba),{'signal':AbortSignal[_0x48e807(0x1a6)](0x1388)});return _0x53a991['ok']?await _0x53a991[_0x48e807(0xd7)]():[];}catch{return[];}}async function Ye(_0x140c89={}){const _0x3e3c0c=_0x4fa3c4;let _0x50eb49=Ct(),_0x292846=[Promise[_0x3e3c0c(0x1a4)](_0x50eb49[_0x3e3c0c(0x12d)](_0x11ee59=>Mt(_0x11ee59))),Promise['all'](_0x50eb49['map'](_0x3f90ef=>Lt(_0x3f90ef))),Promise[_0x3e3c0c(0x1a4)](_0x50eb49['map'](_0x4ed882=>Jt(_0x4ed882)))];_0x140c89[_0x3e3c0c(0xe9)]&&_0x292846['push'](Promise[_0x3e3c0c(0x1a4)](_0x50eb49['map'](_0x141a28=>Dt(_0x141a28))));let _0x5985e7=await Promise[_0x3e3c0c(0x1a4)](_0x292846),[_0x20c1b2,_0x37a836,_0x40e6a4]=_0x5985e7,_0x2bb3bc=_0x20c1b2[_0x3e3c0c(0xa2)](),_0x22668e=_0x37a836[_0x3e3c0c(0xa2)](),_0x13665f=[...new Set([..._0x50eb49,..._0x22668e])];jt(_0x13665f);let _0x592870=_0x40e6a4[_0x3e3c0c(0xa2)]();if(_0x592870[_0x3e3c0c(0x19b)]>0x0&&Ot(_0x592870),_0x140c89[_0x3e3c0c(0xe9)]&&_0x5985e7[0x3]){let _0x190361=_0x5985e7[0x3][_0x3e3c0c(0xa2)](),_0x4ecc33={};for(let _0x5a967f of _0x190361)_0x5a967f['packageName']&&(_0x4ecc33[_0x5a967f['packageName']]||(_0x4ecc33[_0x5a967f[_0x3e3c0c(0x1b8)]]=[]),_0x4ecc33[_0x5a967f[_0x3e3c0c(0x1b8)]][_0x3e3c0c(0x103)](_0x5a967f));for(let [_0x139199,_0x4fd06c]of Object[_0x3e3c0c(0xeb)](_0x4ecc33))Le(_0x139199,_0x4fd06c);}return{'games':_0x2bb3bc,'peers':_0x13665f};}var _t='https://registry.npmjs.org/-/v1/search';function Gt(_0x5e9b85){const _0x34ca44=_0x4fa3c4;let _0x2bb12b=_0x5e9b85[_0x34ca44(0xc0)]??{};return{'packageName':_0x5e9b85[_0x34ca44(0xdb)],'title':_0x2bb12b[_0x34ca44(0x12e)]??_0x5e9b85[_0x34ca44(0xdb)],'description':_0x2bb12b[_0x34ca44(0xf2)]??_0x5e9b85['description']??'','version':_0x5e9b85[_0x34ca44(0x1cb)]??_0x34ca44(0xa0),'keywords':_0x5e9b85[_0x34ca44(0x17f)]??[]};}function _0x5908(_0x1360e3,_0x8c54e0){_0x1360e3=_0x1360e3-0x9b;const _0x432d35=_0x432d();let _0x5908db=_0x432d35[_0x1360e3];return _0x5908db;}async function X(_0x22100c=''){const _0xc981c0=_0x4fa3c4;let [_0x1db621,_0x1004fa]=await Promise[_0xc981c0(0x1a4)]([Ye()['catch'](()=>({'games':[]})),Ht(_0x22100c)]),_0x93c14e=_0x1db621[_0xc981c0(0x1da)]??[],_0x42dbfe=new Set(_0x93c14e[_0xc981c0(0x12d)](_0x5b0fa3=>_0x5b0fa3[_0xc981c0(0x1b8)])),_0x154fcf=_0x1004fa[_0xc981c0(0x1b1)](_0x5f5b17=>!_0x42dbfe[_0xc981c0(0x185)](_0x5f5b17[_0xc981c0(0x1b8)])),_0x3f4212=_0x22100c[_0xc981c0(0xbe)]()[_0xc981c0(0xd0)](),_0x463f42=_0x2f54fc=>_0x3f4212?_0x2f54fc[_0xc981c0(0x1b8)]['toLowerCase']()[_0xc981c0(0x167)](_0x3f4212)||(_0x2f54fc['title']??'')[_0xc981c0(0xd0)]()[_0xc981c0(0x167)](_0x3f4212)||(_0x2f54fc[_0xc981c0(0xf2)]??'')[_0xc981c0(0xd0)]()[_0xc981c0(0x167)](_0x3f4212):!0x0;return[..._0x93c14e[_0xc981c0(0x1b1)](_0x463f42),..._0x154fcf['filter'](_0x463f42)];}async function Ht(_0x5eee40){const _0x4f2678=_0x4fa3c4;try{let _0x22d843=_0x5eee40?encodeURIComponent(_0x5eee40+'\x20keywords:termill'):_0x4f2678(0x11e),_0x1bf325=_t+_0x4f2678(0x10f)+_0x22d843+_0x4f2678(0x1d0),_0x58171e=await fetch(_0x1bf325,{'signal':AbortSignal[_0x4f2678(0x1a6)](0x1f40)});return _0x58171e['ok']?((await _0x58171e[_0x4f2678(0xd7)]())['objects']??[])[_0x4f2678(0x12d)](_0x140053=>Gt(_0x140053[_0x4f2678(0x142)])):[];}catch{return[];}}import{stdout as _0x2647fd}from'node:process';var Z='\x1b',he=Z+_0x4fa3c4(0x14e),Ut=Z+_0x4fa3c4(0xa7),Yt=Z+_0x4fa3c4(0x192),Vt=Z+_0x4fa3c4(0x133),Ve=()=>_0x2647fd[_0x4fa3c4(0x1c3)]??0x50;function m(_0x346fd1){const _0xbc5ed4=_0x4fa3c4;let _0x24b389=Ve(),_0x5b11d7='\x20'+_0x346fd1+'\x20',_0x2cabab=Math[_0xbc5ed4(0x190)]((_0x24b389-_0x5b11d7[_0xbc5ed4(0x19b)])/0x2),_0x3a41b8='─'[_0xbc5ed4(0xa8)](Math[_0xbc5ed4(0x195)](0x0,_0x2cabab))+_0x5b11d7+'─'[_0xbc5ed4(0xa8)](Math['max'](0x0,_0x2cabab));console[_0xbc5ed4(0x1d4)](Vt+_0x3a41b8[_0xbc5ed4(0x115)](0x0,_0x24b389)+he);}function A(_0x47626e,_0x376cb4){const _0x4398d3=_0x4fa3c4;_0x47626e[_0x4398d3(0x11f)]((_0x2487e6,_0x114414)=>{const _0x58a344=_0x4398d3;let _0x214c5c=(_0x114414===_0x376cb4?'>\x20':'\x20\x20')+_0x2487e6;console[_0x58a344(0x1d4)](_0x114414===_0x376cb4?Ut+_0x214c5c[_0x58a344(0xf7)](Ve())+he:_0x214c5c);});}function $(_0x35d048){const _0x1ad0ec=_0x4fa3c4;console[_0x1ad0ec(0x1d4)](Yt+_0x35d048+he);}function k(_0x3eb3dc){let _0x22abd=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],_0x1fd3f0=0x0,_0x578a16=null;return{'start'(){_0x578a16=setInterval(()=>{const _0x40b58d=_0x5908;process[_0x40b58d(0x155)][_0x40b58d(0xb5)]('\x0d'+_0x22abd[_0x1fd3f0++%_0x22abd[_0x40b58d(0x19b)]]+'\x20'+_0x3eb3dc);},0x50);},'stop'(){const _0x58ccf3=_0x5908;_0x578a16&&(clearInterval(_0x578a16),_0x578a16=null,process[_0x58ccf3(0x155)]['write']('\x0d'+'\x20'[_0x58ccf3(0xa8)](_0x3eb3dc[_0x58ccf3(0x19b)]+0x4)+'\x0d'));}};}function d(){const _0x36c788=_0x4fa3c4;process['stdout'][_0x36c788(0xb5)]('\x1b[2J\x1b[H');}import{createInterface as _0x19d4f9}from'node:readline';function q(){return new Promise(_0x5ac15a=>{const _0xe2691f=_0x5908;let {stdin:_0x2ade9f}=process,_0x46bd48=_0x2ade9f[_0xe2691f(0x9f)];_0x2ade9f['isTTY']&&_0x2ade9f[_0xe2691f(0xd4)](!0x0),_0x2ade9f[_0xe2691f(0x182)](),_0x2ade9f[_0xe2691f(0x136)]('utf8');function _0x24d17f(_0x2ee5c3){const _0x4c1290=_0xe2691f;_0x2ade9f['removeListener']('data',_0x24d17f),_0x2ade9f[_0x4c1290(0x1b2)]&&!_0x46bd48&&_0x2ade9f['setRawMode'](!0x1),_0x2ade9f[_0x4c1290(0xbc)]();let _0x11289d=We(_0x2ee5c3);_0x5ac15a({'name':_0x11289d,'sequence':_0x2ee5c3,'ctrl':_0x2ee5c3<='\x1a'&&_0x2ee5c3!=='\x0d','shift':!0x1});}_0x2ade9f[_0xe2691f(0x199)](_0xe2691f(0x1b7),_0x24d17f);});}function ee(_0x1f2a70){return new Promise(_0x2b0cff=>{const _0x334a38=_0x5908;let _0x41eb1f=_0x19d4f9({'input':process[_0x334a38(0x124)],'output':process[_0x334a38(0x155)]});_0x41eb1f[_0x334a38(0xb8)](_0x1f2a70,_0x6ee375=>{const _0x36e0f0=_0x334a38;_0x41eb1f[_0x36e0f0(0x18f)](),_0x2b0cff(_0x6ee375);});});}function N(_0x58aa83){const _0x4e577b=_0x4fa3c4;let {stdin:_0xd2f888}=process;_0xd2f888[_0x4e577b(0x1b2)]&&_0xd2f888[_0x4e577b(0xd4)](!0x0),_0xd2f888['resume'](),_0xd2f888[_0x4e577b(0x136)](_0x4e577b(0xe8));function _0x4fb01c(_0x1a849b){_0x58aa83({'name':We(_0x1a849b),'sequence':_0x1a849b});}return _0xd2f888['on'](_0x4e577b(0x1b7),_0x4fb01c),function(){const _0x2c3ef0=_0x4e577b;_0xd2f888[_0x2c3ef0(0x1af)](_0x2c3ef0(0x1b7),_0x4fb01c),_0xd2f888[_0x2c3ef0(0x1b2)]&&_0xd2f888[_0x2c3ef0(0xd4)](!0x1),_0xd2f888[_0x2c3ef0(0xbc)]();};}function We(_0x52db10){const _0x4a5b30=_0x4fa3c4;return _0x52db10==='\x0d'||_0x52db10==='\x0a'?_0x4a5b30(0xf4):_0x52db10==='\x1b'?_0x4a5b30(0x1c5):_0x52db10==='\x1b[A'?'up':_0x52db10===_0x4a5b30(0x158)?_0x4a5b30(0x1bd):_0x52db10===_0x4a5b30(0x1ad)?'right':_0x52db10===_0x4a5b30(0x156)?'left':_0x52db10==='\x7f'||_0x52db10==='\x08'?'backspace':_0x52db10==='\x03'?_0x4a5b30(0xd8):_0x52db10;}async function ze(){const _0x1a5bce=_0x4fa3c4;if(d(),m(_0x1a5bce(0xe3)),ve()){let _0x3490d2=E();console[_0x1a5bce(0x1d4)](_0x1a5bce(0x130)),console['log'](_0x1a5bce(0x12a)+_0x3490d2[_0x1a5bce(0x115)](0x0,0x10)+'…\x0a'),console[_0x1a5bce(0x1d4)](_0x1a5bce(0x114)),await g();}else{console[_0x1a5bce(0x1d4)](_0x1a5bce(0xd1)),console[_0x1a5bce(0x1d4)](_0x1a5bce(0x122)),await g();let _0xc69ec1=k(_0x1a5bce(0x1b3));_0xc69ec1[_0x1a5bce(0x1bc)]();let {publicKey:_0x2155e}=Pe();_0xc69ec1[_0x1a5bce(0x1cc)](),console['log']('\x0aIdentity\x20created.\x20Your\x20public\x20key:'),console[_0x1a5bce(0x1d4)]('\x20\x20'+_0x2155e[_0x1a5bce(0x115)](0x0,0x10)+'…\x0a'),console[_0x1a5bce(0x1d4)](_0x1a5bce(0x114)),await g();}}async function L(_0x4333a3=X){const _0x1ace42=_0x4fa3c4;d(),m(_0x1ace42(0x10e));let _0x2b2b7b='',_0x40f09f=[],_0x51e284=0x0,_0x2c06bb=()=>{const _0x1b98a7=_0x1ace42;d(),m(_0x1b98a7(0x10e)),console['log'](_0x1b98a7(0xac)+_0x2b2b7b+'_\x0a'),_0x40f09f['length']===0x0?console[_0x1b98a7(0x1d4)](_0x1b98a7(0xb2)):A(_0x40f09f[_0x1b98a7(0x12d)](_0xac382b=>(_0xac382b[_0x1b98a7(0x12e)]??_0xac382b[_0x1b98a7(0x1b8)])+'\x20\x20'+(_0xac382b[_0x1b98a7(0x1cb)]??'')+'\x20\x20'+(_0xac382b['description']??'')),_0x51e284),$(_0x1b98a7(0xee));},_0x2fc107=k(_0x1ace42(0x1a1));_0x2fc107[_0x1ace42(0x1bc)]();try{_0x40f09f=await _0x4333a3('');}catch{_0x40f09f=[];}return _0x2fc107[_0x1ace42(0x1cc)](),_0x2c06bb(),new Promise(_0x3a5887=>{let _0x2834b6=N(async({name:_0x3aa71d,sequence:_0x9733f6})=>{const _0x475c41=_0x5908;if(_0x3aa71d===_0x475c41(0xd8)&&(_0x2834b6(),process['exit'](0x0)),_0x3aa71d==='up'){_0x51e284=Math[_0x475c41(0x195)](0x0,_0x51e284-0x1),_0x2c06bb();return;}if(_0x3aa71d===_0x475c41(0x1bd)){_0x51e284=Math['min'](_0x40f09f[_0x475c41(0x19b)]-0x1,_0x51e284+0x1),_0x2c06bb();return;}if(_0x3aa71d===_0x475c41(0xf4)){if(_0x40f09f[_0x475c41(0x19b)]===0x0)return;let _0x152142=_0x40f09f[_0x51e284];_0x2834b6(),d(),m('termill\x20—\x20install\x20confirmation');let _0x39ea1c=k(_0x475c41(0x164));_0x39ea1c['start']();let _0x572a52=Fe(_0x152142[_0x475c41(0x1b8)]);_0x39ea1c[_0x475c41(0x1cc)](),console[_0x475c41(0x1d4)](_0x475c41(0x131)+_0x152142[_0x475c41(0x1b8)]),_0x572a52?(console['log']('\x20\x20Version:\x20\x20'+_0x572a52[_0x475c41(0x1cb)]),console[_0x475c41(0x1d4)](_0x475c41(0x154)+_0x572a52[_0x475c41(0x138)]),console[_0x475c41(0x1d4)](_0x475c41(0xa6)+_0x572a52[_0x475c41(0x101)])):console[_0x475c41(0x1d4)](_0x475c41(0xe2));let _0x3f2cf2=ye()[_0x475c41(0x1b1)](_0x1b6f16=>_0x1b6f16[_0x475c41(0x1b8)]===_0x152142[_0x475c41(0x1b8)]);if(_0x3f2cf2[_0x475c41(0x19b)]>0x0){console['log'](_0x475c41(0xdc)+_0x3f2cf2[_0x475c41(0x19b)]+_0x475c41(0x16b));let _0x2e71b5=_0x3f2cf2[_0x475c41(0x153)]((_0xc3eba3,_0x4f6aab)=>_0x4f6aab[_0x475c41(0x15e)][_0x475c41(0x198)](_0xc3eba3[_0x475c41(0x15e)]))[0x0];console['log'](_0x475c41(0x166)+_0x2e71b5[_0x475c41(0x194)]+'\x22\x20('+_0x2e71b5[_0x475c41(0x15e)]['slice'](0x0,0xa)+')');}if(console[_0x475c41(0x1d4)](_0x475c41(0x193)),console[_0x475c41(0x1d4)]('\x0a\x20\x20Install\x20this\x20package?\x20[Y/N]'),(await q())[_0x475c41(0xdb)][_0x475c41(0xd0)]()!=='y'){_0x3a5887(L(_0x4333a3));return;}d(),m(_0x475c41(0x162)),console[_0x475c41(0x1d4)](_0x475c41(0x16f)+_0x152142[_0x475c41(0x1b8)]+'…\x0a');let _0x2976f4=k(_0x475c41(0xab)+_0x152142[_0x475c41(0x1b8)]);_0x2976f4['start']();try{await J(_0x152142['packageName']),_0x2976f4[_0x475c41(0x1cc)](),console[_0x475c41(0x1d4)](_0x475c41(0xb1)+_0x152142[_0x475c41(0x1b8)]+_0x475c41(0xd6));}catch(_0x20807e){_0x2976f4['stop'](),console[_0x475c41(0x1d4)]('\x0a✗\x20Install\x20failed:\x20'+_0x20807e[_0x475c41(0x17c)]+_0x475c41(0x112));}await g(),_0x3a5887(L(_0x4333a3));return;}if(_0x3aa71d[_0x475c41(0xd0)]()==='l'){_0x2834b6(),_0x3a5887('library');return;}if(_0x3aa71d[_0x475c41(0xd0)]()==='u'){_0x2834b6(),_0x3a5887(_0x475c41(0x137));return;}if(_0x3aa71d[_0x475c41(0xd0)]()==='d'){_0x2834b6();let _0x5c9431=await Xe();_0x3a5887(_0x5c9431===_0x475c41(0x1c7)?L(_0x4333a3):_0x5c9431);return;}if(_0x3aa71d===_0x475c41(0x1ca))_0x2b2b7b=_0x2b2b7b[_0x475c41(0x115)](0x0,-0x1);else{if(_0x9733f6[_0x475c41(0x19b)]===0x1&&_0x9733f6>='\x20')_0x2b2b7b+=_0x9733f6;else return;}_0x51e284=0x0;let _0x56d54e=k(_0x475c41(0x116));_0x56d54e[_0x475c41(0x1bc)]();try{_0x40f09f=await _0x4333a3(_0x2b2b7b);}catch{_0x40f09f=[];}_0x56d54e[_0x475c41(0x1cc)](),_0x2c06bb();});});}async function _(_0x334127=z){const _0xd0081e=_0x4fa3c4;d(),m(_0xd0081e(0x179));let _0xbdc471=R(),_0x45f8a3=0x0,_0x525eb8=()=>{const _0x2421d2=_0xd0081e;d(),m(_0x2421d2(0x179)),_0xbdc471[_0x2421d2(0x19b)]===0x0?console[_0x2421d2(0x1d4)]('\x0a\x20\x20No\x20games\x20installed.\x20Press\x20H\x20to\x20discover\x20games.\x0a'):(console[_0x2421d2(0x1d4)](''),A(_0xbdc471[_0x2421d2(0x12d)](_0x10dde5=>(_0x10dde5[_0x2421d2(0x12e)]??_0x10dde5[_0x2421d2(0x1b8)])+'\x20\x20v'+(_0x10dde5[_0x2421d2(0x1cb)]??'?')),_0x45f8a3)),$('[↑↓]\x20navigate\x20\x20[ENTER]\x20launch\x20\x20[F]\x20feedback\x20\x20[D]\x20uninstall\x20\x20[H/ESC]\x20home\x20\x20[CTRL+C]\x20quit');};return _0x525eb8(),new Promise(_0x14e2d1=>{let _0xe59a60=N(async({name:_0x2f3c87})=>{const _0x3e695b=_0x5908;if(_0x2f3c87==='ctrl+c'&&(_0xe59a60(),process[_0x3e695b(0x15a)](0x0)),_0x2f3c87==='up'){_0x45f8a3=Math[_0x3e695b(0x195)](0x0,_0x45f8a3-0x1),_0x525eb8();return;}if(_0x2f3c87===_0x3e695b(0x1bd)){_0x45f8a3=Math[_0x3e695b(0x13d)](_0xbdc471[_0x3e695b(0x19b)]-0x1,_0x45f8a3+0x1),_0x525eb8();return;}if(_0x2f3c87===_0x3e695b(0xf4)&&_0xbdc471[_0x3e695b(0x19b)]>0x0){let _0xf9a251=_0xbdc471[_0x45f8a3];_0xe59a60(),d(),m(_0x3e695b(0x179));let _0x2ff545=k(_0x3e695b(0x181)+_0xf9a251[_0x3e695b(0x1b8)]+_0x3e695b(0xc4));_0x2ff545['start']();let _0x4b9a3e;try{_0x4b9a3e=await J(_0xf9a251['packageName']);}catch{_0x4b9a3e={'alreadyCurrent':!0x0};}_0x2ff545[_0x3e695b(0x1cc)](),_0x4b9a3e[_0x3e695b(0xc9)]?console[_0x3e695b(0x1d4)](_0x3e695b(0xb1)+_0xf9a251[_0x3e695b(0x1b8)]+'\x20updated\x20to\x20latest.\x20Launching…'):console[_0x3e695b(0x1d4)]('\x0a'+(_0xf9a251['title']??_0xf9a251[_0x3e695b(0x1b8)])+_0x3e695b(0x151)),_0x334127(_0xf9a251[_0x3e695b(0x1a3)]),_0x14e2d1(_(_0x334127));return;}if((_0x2f3c87==='f'||_0x2f3c87==='F')&&_0xbdc471[_0x3e695b(0x19b)]>0x0){let _0x84bfee=_0xbdc471[_0x45f8a3];_0xe59a60();let _0x4b7ef6=await Qe(_0x84bfee[_0x3e695b(0x1b8)]);_0x14e2d1(_0x4b7ef6==='library'?_(_0x334127):_0x4b7ef6);return;}if(_0x2f3c87==='d'||_0x2f3c87==='D'){if(_0xbdc471[_0x3e695b(0x19b)]===0x0)return;let _0x45b196=_0xbdc471[_0x45f8a3];if(_0xe59a60(),d(),m('termill\x20—\x20library'),console[_0x3e695b(0x1d4)](_0x3e695b(0xd9)+(_0x45b196[_0x3e695b(0x12e)]??_0x45b196[_0x3e695b(0x1b8)])+_0x3e695b(0x125)),(await q())['name'][_0x3e695b(0xd0)]()==='y'){let _0x121527=k(_0x3e695b(0x11d)+_0x45b196[_0x3e695b(0x1b8)]+'…');_0x121527[_0x3e695b(0x1bc)]();try{await Oe(_0x45b196['packageName']),_0x121527[_0x3e695b(0x1cc)](),console['log'](_0x3e695b(0xb1)+_0x45b196[_0x3e695b(0x1b8)]+'\x20uninstalled.\x20Press\x20ENTER\x20to\x20continue.');}catch(_0x255738){_0x121527['stop'](),console[_0x3e695b(0x1d4)]('\x0a✗\x20Uninstall\x20failed:\x20'+_0x255738[_0x3e695b(0x17c)]+'.\x20Press\x20ENTER\x20to\x20continue.');}await g();}_0x14e2d1(_(_0x334127));return;}if(_0x2f3c87==='h'||_0x2f3c87==='H'||_0x2f3c87===_0x3e695b(0x1c5)){_0xe59a60(),_0x14e2d1('home');return;}});});}async function Qe(_0x5a491c){return((()=>{const _0x5ae0f3=_0x5908;d(),m(_0x5ae0f3(0x1a5)+_0x5a491c);let _0x445410=ge(_0x5a491c,0x6);if(_0x445410[_0x5ae0f3(0x19b)]===0x0)console[_0x5ae0f3(0x1d4)](_0x5ae0f3(0x152));else{console['log']('');for(let _0xed8726 of _0x445410){let _0x8662db=_0xed8726[_0x5ae0f3(0x168)][_0x5ae0f3(0x115)](0x0,0x8),_0x3980d6=_0xed8726[_0x5ae0f3(0x15e)][_0x5ae0f3(0x115)](0x0,0xa),_0x2aa588=_0xed8726[_0x5ae0f3(0x19e)]===_0x5ae0f3(0xbb)?_0x5ae0f3(0x1ab):_0xed8726[_0x5ae0f3(0x19e)]==='retraction'?_0x5ae0f3(0x19f):_0xed8726[_0x5ae0f3(0x19e)]===_0x5ae0f3(0xa9)?'\x20\x20⚑\x20[flagged]\x20':'';console[_0x5ae0f3(0x1d4)](''+_0x2aa588+_0x8662db+'…\x20('+_0x3980d6+_0x5ae0f3(0x148)+_0xed8726[_0x5ae0f3(0x141)]);}console[_0x5ae0f3(0x1d4)]('');}$(_0x5ae0f3(0x1c9));})()),new Promise(_0x1cb9e6=>{let _0x10a9d2=N(async({name:_0x639097})=>{const _0x467ef0=_0x5908;if(_0x639097===_0x467ef0(0xd8)&&(_0x10a9d2(),process[_0x467ef0(0x15a)](0x0)),_0x639097===_0x467ef0(0x1c5)){_0x10a9d2(),_0x1cb9e6(_0x467ef0(0x1bb));return;}if(_0x639097==='c'||_0x639097==='C'){_0x10a9d2(),console[_0x467ef0(0x1d4)]('');let _0x58d242=await ee(_0x467ef0(0x18d));if(_0x58d242[_0x467ef0(0xbe)]()){let _0x6ac33e=De(_0x5a491c,_0x58d242[_0x467ef0(0xbe)]());M(_0x5a491c,_0x6ac33e),console['log'](_0x467ef0(0x10c)),await g();}_0x1cb9e6(Qe(_0x5a491c));return;}});});}async function Xe(){const _0x5823d4=_0x4fa3c4;d(),m(_0x5823d4(0xfc));let _0x5d1871=E(),_0x438bb7=R()[_0x5823d4(0x1b1)](_0x212bc1=>{const _0x5c1112=_0x5823d4;try{return ue(_0x212bc1[_0x5c1112(0x1b8)])[_0x5c1112(0x13c)]===_0x5d1871;}catch{return!0x1;}});if(_0x438bb7[_0x5823d4(0x19b)]===0x0)return console[_0x5823d4(0x1d4)](_0x5823d4(0x1c6)),console['log'](_0x5823d4(0x106)),await g(),_0x5823d4(0x1c7);let _0x515877=0x0,_0x47be2b=()=>{const _0x2c201c=_0x5823d4;d(),m(_0x2c201c(0xfc)),console[_0x2c201c(0x1d4)](''),A(_0x438bb7[_0x2c201c(0x12d)](_0xc49f76=>(_0xc49f76[_0x2c201c(0x12e)]??_0xc49f76[_0x2c201c(0x1b8)])+_0x2c201c(0x14d)+(_0xc49f76[_0x2c201c(0x1cb)]??'?')),_0x515877),$(_0x2c201c(0x19c));};return _0x47be2b(),new Promise(_0x5edfd6=>{let _0x53a76e=N(async({name:_0x111f7d})=>{const _0x3d7129=_0x5908;if(_0x111f7d===_0x3d7129(0xd8)&&(_0x53a76e(),process[_0x3d7129(0x15a)](0x0)),_0x111f7d==='up'){_0x515877=Math[_0x3d7129(0x195)](0x0,_0x515877-0x1),_0x47be2b();return;}if(_0x111f7d===_0x3d7129(0x1bd)){_0x515877=Math['min'](_0x438bb7[_0x3d7129(0x19b)]-0x1,_0x515877+0x1),_0x47be2b();return;}if(_0x111f7d==='return'&&_0x438bb7['length']>0x0){_0x53a76e();let _0x277068=_0x438bb7[_0x515877];await zt(_0x277068[_0x3d7129(0x1b8)]),_0x5edfd6(Xe());return;}if(_0x111f7d===_0x3d7129(0x1c5)||_0x111f7d==='h'||_0x111f7d==='H'){_0x53a76e(),_0x5edfd6(_0x3d7129(0x1c7));return;}});});}async function zt(_0x5defac){const _0x3340c2=_0x4fa3c4;let _0x2e6d7a=ge(_0x5defac,0xc);if(d(),m(_0x3340c2(0x145)+_0x5defac),_0x2e6d7a[_0x3340c2(0x19b)]===0x0){console[_0x3340c2(0x1d4)](_0x3340c2(0x143)),console[_0x3340c2(0x1d4)](_0x3340c2(0x106)),await g();return;}let _0xca4f33=0x0,_0x4ed5df=_0x2e6d7a['filter'](_0x1ad0d8=>_0x1ad0d8[_0x3340c2(0x19e)]===_0x3340c2(0x1b0)||_0x1ad0d8[_0x3340c2(0x19e)]===_0x3340c2(0xbb));if(_0x4ed5df[_0x3340c2(0x19b)]===0x0){console[_0x3340c2(0x1d4)](_0x3340c2(0x1ba)),console[_0x3340c2(0x1d4)](_0x3340c2(0x106)),await g();return;}let _0x4ff678=()=>{const _0x18dcd8=_0x3340c2;d(),m(_0x18dcd8(0x145)+_0x5defac),console[_0x18dcd8(0x1d4)](''),A(_0x4ed5df['map'](_0x3a8995=>{const _0x299298=_0x18dcd8;let _0x17a892=_0x3a8995[_0x299298(0x168)][_0x299298(0x115)](0x0,0x8),_0x228f9b=_0x3a8995[_0x299298(0x15e)][_0x299298(0x115)](0x0,0xa);return''+(_0x3a8995[_0x299298(0x19e)]===_0x299298(0xbb)?'↳\x20':'')+_0x17a892+_0x299298(0x109)+_0x228f9b+_0x299298(0x148)+_0x3a8995[_0x299298(0x141)];}),_0xca4f33),$(_0x18dcd8(0xcf));};return _0x4ff678(),new Promise(_0x513107=>{let _0x4040b6=N(async({name:_0x54698c})=>{const _0x5e6204=_0x5908;if(_0x54698c===_0x5e6204(0xd8)&&(_0x4040b6(),process['exit'](0x0)),_0x54698c==='up'){_0xca4f33=Math[_0x5e6204(0x195)](0x0,_0xca4f33-0x1),_0x4ff678();return;}if(_0x54698c==='down'){_0xca4f33=Math[_0x5e6204(0x13d)](_0x4ed5df[_0x5e6204(0x19b)]-0x1,_0xca4f33+0x1),_0x4ff678();return;}if(_0x54698c==='r'||_0x54698c==='R'){_0x4040b6();let _0x1f7160=_0x4ed5df[_0xca4f33];console['log']('');let _0x18a71e=await ee(_0x5e6204(0x16a));if(_0x18a71e[_0x5e6204(0xbe)]()){let _0x39a723=Je(_0x5defac,_0x1f7160['id'],_0x18a71e[_0x5e6204(0xbe)]());M(_0x5defac,_0x39a723),console[_0x5e6204(0x1d4)](_0x5e6204(0x165)),await g();}_0x513107();return;}if(_0x54698c==='m'||_0x54698c==='M'){_0x4040b6();let _0x5c8922=_0x4ed5df[_0xca4f33];console[_0x5e6204(0x1d4)]('');let _0x164347=await ee(_0x5e6204(0x121));if(_0x164347[_0x5e6204(0xbe)]()){let _0x28b3a8=Me(_0x5defac,_0x5c8922['id'],_0x164347[_0x5e6204(0xbe)]());M(_0x5defac,_0x28b3a8),console['log'](_0x5e6204(0x191)),await g();}_0x513107();return;}if(_0x54698c==='escape'){_0x4040b6(),_0x513107();return;}});});}async function te(_0x36eafa){const _0x3cf1e4=_0x4fa3c4;d(),m(_0x3cf1e4(0x127));let _0x2da952=k('Checking\x20for\x20updates…');_0x2da952[_0x3cf1e4(0x1bc)]();let _0x308e6b=R(),_0x1272e5;try{_0x1272e5=W(_0x308e6b,_0x36eafa);}catch{_0x1272e5=[];}if(_0x2da952['stop'](),_0x1272e5[_0x3cf1e4(0x19b)]===0x0)return console[_0x3cf1e4(0x1d4)](_0x3cf1e4(0xce)),console[_0x3cf1e4(0x1d4)](_0x3cf1e4(0x106)),await g(),'home';let _0x198e3d=0x0,_0x40b8d=()=>{const _0x3fbf23=_0x3cf1e4;d(),m(_0x3fbf23(0x127)),console[_0x3fbf23(0x1d4)](_0x3fbf23(0x9b)+_0x1272e5[_0x3fbf23(0x19b)]+_0x3fbf23(0x15f)),A(_0x1272e5['map'](_0x3886a8=>_0x3886a8[_0x3fbf23(0x12e)]+'\x20\x20'+_0x3886a8[_0x3fbf23(0x111)]+_0x3fbf23(0xcb)+_0x3886a8[_0x3fbf23(0xf5)]),_0x198e3d),$(_0x3fbf23(0x18c));};return _0x40b8d(),new Promise(_0x6d15ad=>{let _0x3fb15a=N(async({name:_0x2c7c09})=>{const _0x44ef73=_0x5908;if(_0x2c7c09===_0x44ef73(0xd8)&&(_0x3fb15a(),process[_0x44ef73(0x15a)](0x0)),_0x2c7c09==='up'){_0x198e3d=Math['max'](0x0,_0x198e3d-0x1),_0x40b8d();return;}if(_0x2c7c09===_0x44ef73(0x1bd)){_0x198e3d=Math['min'](_0x1272e5[_0x44ef73(0x19b)]-0x1,_0x198e3d+0x1),_0x40b8d();return;}if(_0x2c7c09===_0x44ef73(0xf4)&&_0x1272e5[_0x44ef73(0x19b)]>0x0){let _0x28fc5a=_0x1272e5[_0x198e3d];_0x3fb15a(),d(),m('termill\x20—\x20updates');let _0x8ddfaa=k('Updating\x20'+_0x28fc5a['title']+'…');_0x8ddfaa[_0x44ef73(0x1bc)]();try{await J(_0x28fc5a['packageName']),_0x8ddfaa[_0x44ef73(0x1cc)](),console['log']('\x0a✓\x20'+_0x28fc5a[_0x44ef73(0x12e)]+_0x44ef73(0x1b5)+_0x28fc5a[_0x44ef73(0xf5)]+'.\x20Press\x20ENTER\x20to\x20continue.');}catch(_0x5888b3){_0x8ddfaa[_0x44ef73(0x1cc)](),console[_0x44ef73(0x1d4)]('\x0a✗\x20Update\x20failed:\x20'+_0x5888b3[_0x44ef73(0x17c)]+_0x44ef73(0x112));}await g(),_0x6d15ad(te(_0x36eafa));return;}if(_0x2c7c09==='a'||_0x2c7c09==='A'){_0x3fb15a(),d(),m('termill\x20—\x20updates'),console[_0x44ef73(0x1d4)]('');for(let _0x5f16e1 of _0x1272e5){let _0x1dc65d=k(_0x44ef73(0x129)+_0x5f16e1[_0x44ef73(0x12e)]+'…');_0x1dc65d[_0x44ef73(0x1bc)]();try{await J(_0x5f16e1[_0x44ef73(0x1b8)]),_0x1dc65d[_0x44ef73(0x1cc)](),console['log'](_0x44ef73(0x123)+_0x5f16e1[_0x44ef73(0x12e)]+_0x44ef73(0x1b5)+_0x5f16e1[_0x44ef73(0xf5)]);}catch(_0x1df5ce){_0x1dc65d['stop'](),console[_0x44ef73(0x1d4)](_0x44ef73(0xde)+_0x5f16e1[_0x44ef73(0x12e)]+_0x44ef73(0xa4)+_0x1df5ce[_0x44ef73(0x17c)]);}}console[_0x44ef73(0x1d4)](_0x44ef73(0x12c)),await g(),_0x6d15ad(te(_0x36eafa));return;}if(_0x2c7c09===_0x44ef73(0x1c5)){_0x3fb15a(),_0x6d15ad(_0x44ef73(0x1c7));return;}});});}async function g(){const _0x3c6f73=_0x4fa3c4;let _0xa69a36;do _0xa69a36=await q();while(_0xa69a36[_0x3c6f73(0xdb)]!==_0x3c6f73(0xf4));}import{readFileSync as _0x489da3,existsSync as _0x1c92ac,readdirSync as _0x4ad313,statSync as _0x2e03f6}from'node:fs';import{join as _0x5294d5,resolve as _0x24d284,isAbsolute as _0x4cd2a0}from'node:path';import{execSync as _0x2fe4d5}from'node:child_process';function en(_0x4bc760){const _0x25dfbb=_0x4fa3c4;return _0x4bc760[_0x25dfbb(0xca)]('.')||_0x4bc760[_0x25dfbb(0xca)]('/')||_0x4cd2a0(_0x4bc760);}function tn(_0x19e4b2){const _0x1d32ba=_0x4fa3c4;let _0x4c4a4e=_0x5294d5(_0x24d284(_0x19e4b2),_0x1d32ba(0x13b));if(!_0x1c92ac(_0x4c4a4e))return null;try{return JSON[_0x1d32ba(0x19d)](_0x489da3(_0x4c4a4e,'utf8'));}catch{return null;}}function nn(_0x4d5cd6){const _0x2c0dce=_0x4fa3c4;try{return JSON[_0x2c0dce(0x19d)](_0x2fe4d5(_0x2c0dce(0x173)+_0x4d5cd6+_0x2c0dce(0xc3),{'encoding':'utf8'}));}catch{return null;}}function qe(_0x271b4b,_0x5d61fb=[]){const _0x3feb53=_0x4fa3c4;let _0x4fe26e=[];try{for(let _0x48ff00 of _0x4ad313(_0x271b4b)){if(_0x5d61fb[_0x3feb53(0x167)](_0x48ff00))continue;let _0x460550=_0x5294d5(_0x271b4b,_0x48ff00),_0x3d337c;try{_0x3d337c=_0x2e03f6(_0x460550);}catch{continue;}_0x3d337c[_0x3feb53(0x1d3)]()?_0x4fe26e[_0x3feb53(0x103)](...qe(_0x460550,_0x5d61fb)):/\.(js|mjs|cjs)$/['test'](_0x48ff00)&&_0x4fe26e[_0x3feb53(0x103)](_0x460550);}}catch{}return _0x4fe26e;}function et(_0x511976){const _0x111427=_0x4fa3c4;let _0x410571=en(_0x511976),_0x18afe1=_0x410571?tn(_0x511976):nn(_0x511976),_0x37878b=[];if(!_0x18afe1)return _0x37878b['push']({'check':_0x111427(0xad),'passed':!0x1,'message':_0x410571?_0x111427(0x161)+_0x511976:'Could\x20not\x20fetch\x20package\x20info\x20for\x20\x22'+_0x511976+_0x111427(0x17a)}),_0x37878b;let _0xbe0b88=_0x18afe1['bin'],_0x3d218e=typeof _0xbe0b88==_0x111427(0xe0)?_0xbe0b88:_0xbe0b88&&typeof _0xbe0b88==_0x111427(0xda)?Object['values'](_0xbe0b88)[0x0]:null,_0x52bea6=!!_0x3d218e;_0x37878b[_0x111427(0x103)]({'check':'bin\x20field\x20present','passed':_0x52bea6,'message':_0x52bea6?_0x111427(0xc2)+JSON[_0x111427(0xc6)](_0xbe0b88):_0x111427(0x19a)});let _0x1e8fbc=!0x1;if(_0x410571&&_0x52bea6&&(_0x1e8fbc=_0x1c92ac(_0x5294d5(_0x24d284(_0x511976),_0x3d218e)),_0x37878b['push']({'check':_0x111427(0x187),'passed':_0x1e8fbc,'message':_0x1e8fbc?_0x111427(0x1ce)+_0x3d218e:'bin\x20file\x20not\x20found\x20at\x20path:\x20'+_0x3d218e})),_0x410571&&_0x52bea6&&_0x1e8fbc){let _0x3c1a6e=_0x5294d5(_0x24d284(_0x511976),_0x3d218e),_0x53cdb2=!0x1;try{_0x53cdb2=_0x489da3(_0x3c1a6e,'utf8')[_0x111427(0xca)]('#!/usr/bin/env\x20node');}catch{}_0x37878b[_0x111427(0x103)]({'check':_0x111427(0xc1),'passed':_0x53cdb2,'message':_0x53cdb2?_0x111427(0x1a9):_0x3d218e+_0x111427(0x183)});}let _0xc3efc5=(Array[_0x111427(0x169)](_0x18afe1[_0x111427(0x17f)])?_0x18afe1[_0x111427(0x17f)]:[])[_0x111427(0x167)]('termill');_0x37878b['push']({'check':_0x111427(0x1b4),'passed':_0xc3efc5,'message':_0xc3efc5?'keywords\x20includes\x20\x22termill\x22':'Add\x20\x22termill\x22\x20to\x20the\x20keywords\x20array\x20in\x20package.json\x20for\x20discoverability'});let _0x700186=typeof _0x18afe1[_0x111427(0xf2)]==_0x111427(0xe0)&&_0x18afe1[_0x111427(0xf2)][_0x111427(0xbe)]()[_0x111427(0x19b)]>0x0;_0x37878b[_0x111427(0x103)]({'check':_0x111427(0x146),'passed':_0x700186,'message':_0x700186?_0x111427(0x10b)+_0x18afe1['description']+'\x22':_0x111427(0x1a7)});let _0x245d90=_0x18afe1['termill'],_0x427670=!!_0x245d90&&typeof _0x245d90=='object';if(_0x37878b[_0x111427(0x103)]({'check':_0x111427(0x14a),'passed':_0x427670,'message':_0x427670?_0x111427(0xf3):_0x111427(0x10d)}),_0x427670){let _0x3131e9=typeof _0x245d90[_0x111427(0xdb)]=='string'&&_0x245d90[_0x111427(0xdb)][_0x111427(0xbe)]()[_0x111427(0x19b)]>0x0,_0xf54cbe=typeof _0x245d90[_0x111427(0xf2)]==_0x111427(0xe0)&&_0x245d90[_0x111427(0xf2)][_0x111427(0xbe)]()[_0x111427(0x19b)]>0x0;_0x37878b['push']({'check':'termill.name\x20is\x20set','passed':_0x3131e9,'message':_0x3131e9?_0x111427(0xe4)+_0x245d90['name']+'\x22':_0x111427(0x18a)}),_0x37878b[_0x111427(0x103)]({'check':_0x111427(0xe1),'passed':_0xf54cbe,'message':_0xf54cbe?_0x111427(0x1c4)+_0x245d90[_0x111427(0xf2)]+'\x22':_0x111427(0x157)});let _0x568fb9=_0x245d90[_0x111427(0x13c)];if(_0x568fb9){let _0x105969=typeof _0x568fb9=='string'&&_0x568fb9[_0x111427(0x19b)]===0x40&&/^[0-9a-f]+$/[_0x111427(0x118)](_0x568fb9);_0x37878b['push']({'check':_0x111427(0x119),'passed':_0x105969,'message':_0x105969?_0x111427(0x1ac)+_0x568fb9[_0x111427(0x115)](0x0,0x10)+'…':_0x111427(0x1a2)});}else _0x37878b[_0x111427(0x103)]({'check':_0x111427(0x117),'passed':!0x0,'message':_0x111427(0xbd)});}if(_0x410571){let _0x363df8=!0x1,_0xc2c18a=qe(_0x24d284(_0x511976),[_0x111427(0x1d1),_0x111427(0x196),'dist']);for(let _0xa1e97e of _0xc2c18a)try{if(_0x489da3(_0xa1e97e,'utf8')['includes']('process.exit(')){_0x363df8=!0x0;break;}}catch{}_0x37878b[_0x111427(0x103)]({'check':_0x111427(0x1d9),'passed':_0x363df8,'message':_0x363df8?_0x111427(0x15d):_0x111427(0x108)});}return _0x37878b;}import{mkdirSync as _0x5493ad,writeFileSync as _0x23ff30,existsSync as _0x5c5c15}from'node:fs';import{join as _0x4f1724}from'node:path';import{createInterface as _0x5a0394}from'node:readline';function K(_0x21a683,_0x32748c){return new Promise(_0x1bc495=>{const _0x4dea7b=_0x5908;_0x21a683[_0x4dea7b(0xb8)](_0x32748c,_0x5ecac3=>_0x1bc495(_0x5ecac3[_0x4dea7b(0xbe)]()));});}async function tt(){const _0x30fbd7=_0x4fa3c4;let _0x3da82b=_0x5a0394({'input':process[_0x30fbd7(0x124)],'output':process[_0x30fbd7(0x155)]});console['log'](_0x30fbd7(0xd5));let _0x4d383d=await K(_0x3da82b,_0x30fbd7(0xc5)),_0x5631f0=await K(_0x3da82b,_0x30fbd7(0xff)),_0x3487fa=await K(_0x3da82b,_0x30fbd7(0x18b)),_0x29fa89=await K(_0x3da82b,_0x30fbd7(0xfa)),_0x4512ea=await K(_0x3da82b,_0x30fbd7(0xcc)),_0x21f4fa=await K(_0x3da82b,'Your\x20termill\x20public\x20key\x20(from\x20~/.termill/keys/id_ed25519.pub)\x20[optional]:\x20');_0x3da82b['close'](),_0x4d383d||(console[_0x30fbd7(0x188)]('\x0aError:\x20package\x20name\x20is\x20required.'),process[_0x30fbd7(0x15a)](0x1));let _0x369257=_0x4f1724(process[_0x30fbd7(0x163)](),_0x4d383d);_0x5c5c15(_0x369257)&&(console[_0x30fbd7(0x188)](_0x30fbd7(0x17e)+_0x4d383d+_0x30fbd7(0xf1)),process['exit'](0x1)),_0x5493ad(_0x369257,{'recursive':!0x0});let _0x16a146={'name':_0x4d383d,'version':'1.0.0','description':_0x3487fa||'','main':_0x30fbd7(0x1d2),'bin':{[_0x4d383d]:_0x30fbd7(0xb9)},'keywords':[_0x30fbd7(0xc0)],'author':_0x29fa89||'','license':_0x30fbd7(0xea),'termill':{'name':_0x5631f0||_0x4d383d,'description':_0x3487fa||'','launchCommand':_0x4d383d,..._0x4512ea?{'category':_0x4512ea}:{},..._0x21f4fa?{'creatorKey':_0x21f4fa}:{}}};_0x23ff30(_0x4f1724(_0x369257,_0x30fbd7(0x13b)),JSON['stringify'](_0x16a146,null,0x2)+'\x0a',_0x30fbd7(0xe8));let _0x94eade=[_0x30fbd7(0x174),'',_0x30fbd7(0x9e)+(_0x5631f0||_0x4d383d)+'\x20—\x20entry\x20point','//\x20TODO:\x20implement\x20your\x20game\x20here','',_0x30fbd7(0x13a)+(_0x5631f0||_0x4d383d)+_0x30fbd7(0x1bf),_0x30fbd7(0x180),'',_0x30fbd7(0x1b6),_0x30fbd7(0x178),_0x30fbd7(0x139),_0x30fbd7(0x104),_0x30fbd7(0x1a0),'']['join']('\x0a');_0x23ff30(_0x4f1724(_0x369257,_0x30fbd7(0x1d2)),_0x94eade,_0x30fbd7(0xe8)),_0x23ff30(_0x4f1724(_0x369257,_0x30fbd7(0xae)),'node_modules\x0a',_0x30fbd7(0xe8));let _0x282565=['#\x20'+(_0x5631f0||_0x4d383d),'',_0x3487fa||_0x30fbd7(0x113),'',_0x30fbd7(0xaf),'',_0x30fbd7(0x16e),_0x30fbd7(0x10a)+_0x4d383d,'termill','```','',_0x30fbd7(0x9c),'',_0x30fbd7(0x16e),_0x4d383d,_0x30fbd7(0x184),'',_0x30fbd7(0x14c),'',_0x30fbd7(0xea),'']['join']('\x0a');_0x23ff30(_0x4f1724(_0x369257,_0x30fbd7(0x128)),_0x282565,_0x30fbd7(0xe8)),console[_0x30fbd7(0x1d4)]('\x0a✓\x20Project\x20scaffolded\x20at\x20./'+_0x4d383d+'/'),console[_0x30fbd7(0x1d4)](_0x30fbd7(0xc8)),console[_0x30fbd7(0x1d4)]('\x20\x20cd\x20'+_0x4d383d),console[_0x30fbd7(0x1d4)]('\x20\x20npm\x20link\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20link\x20globally\x20for\x20local\x20testing'),console[_0x30fbd7(0x1d4)](_0x30fbd7(0xe5)),console[_0x30fbd7(0x1d4)](_0x30fbd7(0x1c2)),console[_0x30fbd7(0x1d4)]('');}function xe(){_0x284898(x,{'recursive':!0x0}),_0x284898(b,{'recursive':!0x0}),_0x284898(S,{'recursive':!0x0});}function nt(_0x5d2378){const _0xd65518=_0x4fa3c4;let _0x181133=_0x3defc3({'input':process[_0xd65518(0x124)],'output':process['stdout']});return new Promise(_0x4551a0=>{const _0x32595f=_0xd65518;_0x181133[_0x32595f(0xb8)](_0x5d2378,_0x3565f7=>{const _0x3d1764=_0x32595f;_0x181133[_0x3d1764(0x18f)](),_0x4551a0(_0x3565f7);});});}async function ln(){const _0x40205a=_0x4fa3c4;xe(),await ze();let _0x43e8b6=JSON['parse'](_0x1cf8e7(new URL(_0x40205a(0xef),import.meta.url),_0x40205a(0xe8)))[_0x40205a(0x1cb)];try{let _0x3bedb7=W(R(),_0x43e8b6);_0x3bedb7['length']>0x0&&console[_0x40205a(0x1d4)](_0x40205a(0x110)+_0x3bedb7[_0x40205a(0x19b)]+_0x40205a(0x105));}catch{}let _0x278557='home';for(;;)_0x278557==='home'?_0x278557=await L(X):_0x278557==='library'?_0x278557=await _(z):_0x278557==='updates'?_0x278557=await te(_0x43e8b6):_0x278557&&typeof _0x278557[_0x40205a(0x15b)]==_0x40205a(0x177)?_0x278557=await _0x278557:_0x278557=_0x40205a(0x1c7);}var se=process[_0x4fa3c4(0xf8)][0x2];if(se===_0x4fa3c4(0xbf)){let e=process['argv'][0x3]??'.',t=et(e),n=!0x0;for(let o of t)o[_0x4fa3c4(0x144)]?console['log']('✓\x20'+o[_0x4fa3c4(0xb6)]):o['check']['includes'](_0x4fa3c4(0x11a))?console['log']('⚠\x20'+o[_0x4fa3c4(0xb6)]+':\x20'+o[_0x4fa3c4(0x17c)]):(console[_0x4fa3c4(0x1d4)]('✗\x20'+o[_0x4fa3c4(0xb6)]+':\x20'+o[_0x4fa3c4(0x17c)]),n=!0x1);process['exit'](n?0x0:0x1);}else{if(se===_0x4fa3c4(0x1db))xe(),(async()=>{const _0x35ea4d=_0x4fa3c4;let _0x5b4e77=await nt(_0x35ea4d(0xa1));_0x5b4e77||(console[_0x35ea4d(0x188)](_0x35ea4d(0xe7)),process[_0x35ea4d(0x15a)](0x1));let _0x526149=Re(_0x5b4e77);_0x1ed092(_0x35ea4d(0xdf),_0x526149,_0x35ea4d(0xe8)),console[_0x35ea4d(0x1d4)](_0x35ea4d(0x18e));})()[_0x4fa3c4(0x15c)](_0x573ee5=>{const _0x2b6a3d=_0x4fa3c4;console['error'](_0x2b6a3d(0x12f),_0x573ee5[_0x2b6a3d(0x17c)]??_0x573ee5),process['exit'](0x1);});else{if(se===_0x4fa3c4(0x13f)){xe();let e=process['argv'][0x3];e||(console[_0x4fa3c4(0x188)](_0x4fa3c4(0x14b)),process['exit'](0x1)),(async()=>{const _0x3bee20=_0x4fa3c4;let _0x5c5cb1=_0x1cf8e7(e,_0x3bee20(0xe8)),_0x5b004f=await nt(_0x3bee20(0x1c1));Te(_0x5c5cb1,_0x5b004f),console[_0x3bee20(0x1d4)](_0x3bee20(0xb7));})()[_0x4fa3c4(0x15c)](_0x3f1962=>{const _0x55ad22=_0x4fa3c4;console[_0x55ad22(0x188)]('Import\x20failed:',_0x3f1962[_0x55ad22(0x17c)]??_0x3f1962),process[_0x55ad22(0x15a)](0x1);});}else se===_0x4fa3c4(0x170)?tt()[_0x4fa3c4(0x15c)](_0x34748c=>{const _0xcd3873=_0x4fa3c4;console[_0xcd3873(0x188)]('Init\x20failed:',_0x34748c[_0xcd3873(0x17c)]??_0x34748c),process[_0xcd3873(0x15a)](0x1);}):ln()[_0x4fa3c4(0x15c)](_0x1a10fc=>{const _0x3482b4=_0x4fa3c4;console['error'](_0x3482b4(0x147),_0x1a10fc[_0x3482b4(0x17c)]??_0x1a10fc),process[_0x3482b4(0x15a)](0x1);});}}
|