shaders 3.2.469 → 3.2.471

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/cli.js +189 -93
  2. package/dist/config.d.ts +12 -0
  3. package/dist/config.js +6 -0
  4. package/dist/core/{Aurora-C0J5do9Y.js → Aurora-FgWLcSkh.js} +1 -1
  5. package/dist/core/{Boids-C3r8YaQb.js → Boids-DEHsYo46.js} +1 -1
  6. package/dist/core/{BrushedMetal-De_VRtOm.js → BrushedMetal-CQsu_96R.js} +2 -2
  7. package/dist/core/{CarbonFiber-CGl2FK3J.js → CarbonFiber-D0vgwlrV.js} +2 -2
  8. package/dist/core/{Chrome-BFQsMQii.js → Chrome-DPAmErfN.js} +2 -2
  9. package/dist/core/{Crystal-DsO60tef.js → Crystal-DQJd5oAd.js} +2 -2
  10. package/dist/core/{Emboss-iwNwt1-u.js → Emboss-BjOlYydL.js} +2 -2
  11. package/dist/core/{FloatingParticles-BVRlM_zv.js → FloatingParticles-BfFlt06Y.js} +1 -1
  12. package/dist/core/{FlowingGradient-BEu60rLu.js → FlowingGradient-D3BG2FW9.js} +1 -1
  13. package/dist/core/{Form3D-C03PdKOa.js → Form3D-D-eUD4_k.js} +1 -1
  14. package/dist/core/{Frost-D4aH-OM_.js → Frost-B1s1W_Qm.js} +2 -2
  15. package/dist/core/{Glass-tS9J3fue.js → Glass-O5o5OxlN.js} +2 -2
  16. package/dist/core/{Goo-C7n1aFSC.js → Goo-BL_ifIPI.js} +2 -2
  17. package/dist/core/{Heatmap-Wy_0SxOF.js → Heatmap-e-lF_uZu.js} +2 -2
  18. package/dist/core/{Hologram-C3sww1q_.js → Hologram-BA_LJPm0.js} +2 -2
  19. package/dist/core/{Holographic-B9PvU6cz.js → Holographic-CX8OG-Wa.js} +2 -2
  20. package/dist/core/{Irradiance-CQ12Hyf9.js → Irradiance-B36wYze9.js} +2 -2
  21. package/dist/core/{LightEdge-DGkuJl9I.js → LightEdge-AFfkNhDP.js} +2 -2
  22. package/dist/core/{LiquidMetal-BPvuHdsf.js → LiquidMetal-B2Cz80Ka.js} +2 -2
  23. package/dist/core/{MagneticFilings-DPNRCKVe.js → MagneticFilings-BOgYrPhz.js} +1 -1
  24. package/dist/core/{Marble-DyGenjAa.js → Marble-c2QGDXxB.js} +1 -1
  25. package/dist/core/{MeshGradient-CEVDVK8_.js → MeshGradient-DMsza5tg.js} +1 -1
  26. package/dist/core/{Nebula-Bn7VT1xx.js → Nebula-3a9pYBDC.js} +2 -2
  27. package/dist/core/{Neon-CXuFhmfD.js → Neon-Cf95sJ7W.js} +2 -2
  28. package/dist/core/{Obsidian-Dph7T7YI.js → Obsidian-BL_0ordp.js} +2 -2
  29. package/dist/core/{ParticleField-BaG_4DLj.js → ParticleField-gk7JuNx4.js} +1 -1
  30. package/dist/core/{ParticleFlow-Aocbr_mH.js → ParticleFlow-BzWOl7Hm.js} +1 -1
  31. package/dist/core/{Particles-CGFjT2p5.js → Particles-DYAtR6jZ.js} +2 -2
  32. package/dist/core/{Plastic-C-N31O7u.js → Plastic-Bom1oFFR.js} +2 -2
  33. package/dist/core/{SmokeFill-C4yVAkT9.js → SmokeFill-C8gSZ22X.js} +1 -1
  34. package/dist/core/{ThinFilm--MFVM9D5.js → ThinFilm-CTQeVw7E.js} +2 -2
  35. package/dist/core/{Voxels-CIfWtuUp.js → Voxels-Ca-6rRrz.js} +2 -2
  36. package/dist/core/{Water-CnzSPBJI.js → Water-BsBnXYYB.js} +2 -2
  37. package/dist/core/{agents-B0ZiK3le.js → agents-CBSp2UK_.js} +1 -1
  38. package/dist/core/gpu/index.d.ts.map +1 -1
  39. package/dist/core/index.js +53 -37
  40. package/dist/core/{materials-9wjBrzQO.js → materials-4Oqvm_9m.js} +1 -1
  41. package/dist/core/presetRenderer.d.ts.map +1 -1
  42. package/dist/core/registry.js +37 -37
  43. package/dist/core/{sdf3d-sya0j8F2.js → sdf3d-2AWC_wdn.js} +4 -1
  44. package/dist/core/{shaderRegistry-DG3mjxb3.js → shaderRegistry-BUvL8ZZS.js} +33 -33
  45. package/dist/core/shaders/Aurora/index.js +3 -3
  46. package/dist/core/shaders/Boids/index.js +3 -3
  47. package/dist/core/shaders/BrushedMetal/index.js +3 -3
  48. package/dist/core/shaders/CarbonFiber/index.js +3 -3
  49. package/dist/core/shaders/Chrome/index.js +3 -3
  50. package/dist/core/shaders/Crystal/index.js +3 -3
  51. package/dist/core/shaders/Emboss/index.js +3 -3
  52. package/dist/core/shaders/FloatingParticles/index.js +3 -3
  53. package/dist/core/shaders/FlowingGradient/index.js +3 -3
  54. package/dist/core/shaders/Form3D/index.js +2 -2
  55. package/dist/core/shaders/Frost/index.js +3 -3
  56. package/dist/core/shaders/Glass/index.js +3 -3
  57. package/dist/core/shaders/Goo/index.js +3 -3
  58. package/dist/core/shaders/Heatmap/index.js +3 -3
  59. package/dist/core/shaders/Hologram/index.js +3 -3
  60. package/dist/core/shaders/Holographic/index.js +3 -3
  61. package/dist/core/shaders/Irradiance/index.js +3 -3
  62. package/dist/core/shaders/LightEdge/index.js +3 -3
  63. package/dist/core/shaders/LiquidMetal/index.js +3 -3
  64. package/dist/core/shaders/MagneticFilings/index.js +3 -3
  65. package/dist/core/shaders/Marble/index.js +3 -3
  66. package/dist/core/shaders/MeshGradient/index.js +3 -3
  67. package/dist/core/shaders/Nebula/index.js +3 -3
  68. package/dist/core/shaders/Neon/index.js +3 -3
  69. package/dist/core/shaders/Obsidian/index.js +3 -3
  70. package/dist/core/shaders/ParticleField/index.js +3 -3
  71. package/dist/core/shaders/ParticleFlow/index.js +3 -3
  72. package/dist/core/shaders/Particles/index.js +3 -3
  73. package/dist/core/shaders/Plastic/index.js +3 -3
  74. package/dist/core/shaders/SmokeFill/index.js +2 -2
  75. package/dist/core/shaders/ThinFilm/index.js +3 -3
  76. package/dist/core/shaders/Voxels/index.js +3 -3
  77. package/dist/core/shaders/Water/index.js +3 -3
  78. package/dist/core/utilities/sdfBounds.d.ts +2 -0
  79. package/dist/core/utilities/sdfBounds.d.ts.map +1 -1
  80. package/dist/js/bundle.js +88 -88
  81. package/dist/js/createShader.js +1 -1
  82. package/dist/react/Shader.js +1 -1
  83. package/dist/react/bundle.js +75 -75
  84. package/dist/solid/engine/Shader.js +1 -1
  85. package/dist/svelte/index.js +1 -1
  86. package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/package.json +12 -2
package/dist/cli.js CHANGED
@@ -1,114 +1,210 @@
1
1
  #!/usr/bin/env node
2
- /* shaders@3.2.469 CLI — npx shaders install-mcp. https://shaders.com */
2
+ /* shaders@3.2.471 CLI — npx shaders init | install-mcp. https://shaders.com */
3
3
  import { createRequire as __cliCreateRequire } from "module";
4
4
  const require = __cliCreateRequire(import.meta.url);
5
- var Vi=Object.create;var sr=Object.defineProperty;var Yi=Object.getOwnPropertyDescriptor;var Gi=Object.getOwnPropertyNames;var Ki=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty;var Ji=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,i)=>(typeof require<"u"?require:t)[i]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var $=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zi=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Gi(t))!qi.call(e,u)&&u!==i&&sr(e,u,{get:()=>t[u],enumerable:!(r=Yi(t,u))||r.enumerable});return e};var Se=(e,t,i)=>(i=e!=null?Vi(Ki(e)):{},zi(t||!e||!e.__esModule?sr(i,"default",{value:e,enumerable:!0}):i,e));var Dt=$((ka,or)=>{"use strict";var ht={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let i="";return e<0?i+=`\x1B[${-e}D`:e>0&&(i+=`\x1B[${e}C`),t<0?i+=`\x1B[${-t}A`:t>0&&(i+=`\x1B[${t}B`),i},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Qi={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Zi={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let i=0;i<e;i++)t+=this.line+(i<e-1?ht.up():"");return e&&(t+=ht.left),t}};or.exports={cursor:ht,scroll:Qi,erase:Zi,beep:"\x07"}});var cr=$(($a,ft)=>{var Oe=process||{},lr=Oe.argv||[],Be=Oe.env||{},Xi=!(Be.NO_COLOR||lr.includes("--no-color"))&&(!!Be.FORCE_COLOR||lr.includes("--color")||Oe.platform==="win32"||(Oe.stdout||{}).isTTY&&Be.TERM!=="dumb"||!!Be.CI),eu=(e,t,i=e)=>r=>{let u=""+r,s=u.indexOf(t,e.length);return~s?e+tu(u,t,i,s)+t:e+u+t},tu=(e,t,i,r)=>{let u="",s=0;do u+=e.substring(s,r)+i,s=r+t.length,r=e.indexOf(t,s);while(~r);return u+e.substring(s)},ar=(e=Xi)=>{let t=e?eu:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};ft.exports=ar();ft.exports.createColors=ar});var Wn=$((vc,Un)=>{"use strict";var re=class e extends Error{constructor(t,i,r){super("[ParserError] "+t,i,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},Ge=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ve=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new Ge(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let i;for(;i===!1||this.nextChar();)i=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new re("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,i){i&&this.next(i),this.stack.push(this.state),this.state=new Ge(t)}callNow(t,i){return this.call(t,i),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new re("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new re("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new re("Must declare a parseStart method")}};ve.END=1114112;ve.Error=re;Un.exports=ve});var Yn=$((wc,Vn)=>{"use strict";Vn.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Ke=$((_c,Gn)=>{"use strict";Gn.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var qn=$((Tc,Kn)=>{"use strict";var De=Ke(),jt=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${De(2,this.getUTCMonth()+1)}-${De(2,this.getUTCDate())}`,i=`${De(2,this.getUTCHours())}:${De(2,this.getUTCMinutes())}:${De(2,this.getUTCSeconds())}.${De(3,this.getUTCMilliseconds())}`;return`${t}T${i}`}};Kn.exports=e=>{let t=new jt(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Qn=$((Sc,zn)=>{"use strict";var Jn=Ke(),cl=global.Date,Ut=class extends cl{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Jn(2,this.getUTCMonth()+1)}-${Jn(2,this.getUTCDate())}`}};zn.exports=e=>{let t=new Ut(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Xn=$((Bc,Zn)=>{"use strict";var qe=Ke(),Wt=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${qe(2,this.getUTCHours())}:${qe(2,this.getUTCMinutes())}:${qe(2,this.getUTCSeconds())}.${qe(3,this.getUTCMilliseconds())}`}};Zn.exports=e=>{let t=new Wt(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Je=$((exports,module)=>{"use strict";module.exports=makeParserClass(Wn());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=Yn(),createDateTimeFloat=qn(),createDate=Qn(),createTime=Xn(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
6
- `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let u=this.ctx,s=r.key.pop();for(let n of r.key){if(hasKey(u,n)&&(!isTable(u[n])||u[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));u=u[n]=u[n]||Table()}if(hasKey(u,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?u[s]=r.value.valueOf():u[s]=r.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(r){return this.state.resultTable?this.state.resultTable.push(r):this.state.resultTable=[r],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(r){return this.returnNow({key:this.state.resultTable,value:r})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)&&(!isTable(this.ctx[r])||this.ctx[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[r]=this.ctx[r]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)||(this.ctx[r]=List()),isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[r])){let u=Table();this.ctx[r].push(u),this.ctx=u}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else{if(isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(r){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(r){return this.returnNow(r)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let r="\\u00";return this.char<16&&(r+="0"),r+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${r} instead`))}recordMultiEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(r){try{let u=parseInt(r,16);if(u>=SURROGATE_FIRST&&u<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(u))}catch(u){throw this.error(TomlError.wrap(u))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(r){if(this.state.resultArr){let u=this.state.resultArr[_contentType],s=tomlType(r);if(u!==s)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${u} and ${s}`))}else this.state.resultArr=InlineList(tomlType(r));return isFloat(r)||isInteger(r)?this.state.resultArr.push(r.valueOf()):this.state.resultArr.push(r),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(r){let u=this.state.resultTable,s=r.key.pop();for(let n of r.key){if(hasKey(u,n)&&(!isTable(u[n])||u[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));u=u[n]=u[n]||Table()}if(hasKey(u,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?u[s]=r.value.valueOf():u[s]=r.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var ze=$((Oc,ei)=>{"use strict";ei.exports=hl;function hl(e,t){if(e.pos==null||e.line==null)return e;let i=e.message;if(i+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
7
- `,t&&t.split){let r=t.split(/\n/),u=String(Math.min(r.length,e.line+3)).length,s=" ";for(;s.length<u;)s+=" ";for(let n=Math.max(0,e.line-1);n<Math.min(r.length,e.line+2);++n){let o=String(n+1);if(o.length<u&&(o=" "+o),e.line===n){i+=o+"> "+r[n]+`
8
- `,i+=s+" ";for(let l=0;l<e.col;++l)i+=" ";i+=`^
9
- `}else i+=o+": "+r[n]+`
10
- `}}return e.message=i+`
11
- `,e}});var ri=$((Rc,ti)=>{"use strict";ti.exports=pl;var Dl=Je(),fl=ze();function pl(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new Dl;try{return t.parse(e),t.finish()}catch(i){throw fl(i,e)}}});var ui=$((Ic,ii)=>{"use strict";ii.exports=ml;var dl=Je(),ni=ze();function ml(e,t){t||(t={});let i=0,r=t.blocksize||40960,u=new dl;return new Promise((n,o)=>{setImmediate(s,i,r,n,o)});function s(n,o,l,a){if(n>=e.length)try{return l(u.finish())}catch(h){return a(ni(h,e))}try{u.parse(e.slice(n,n+o)),setImmediate(s,n+o,o,l,a)}catch(h){a(ni(h,e))}}}});var li=$((Lc,oi)=>{"use strict";oi.exports=Cl;var gl=Ji("stream"),si=Je();function Cl(e){return e?Fl(e):El(e)}function Fl(e){let t=new si;return e.setEncoding("utf8"),new Promise((i,r)=>{let u,s=!1,n=!1;function o(){if(s=!0,!u)try{i(t.finish())}catch(h){r(h)}}function l(h){n=!0,r(h)}e.once("end",o),e.once("error",l),a();function a(){u=!0;let h;for(;(h=e.read())!==null;)try{t.parse(h)}catch(c){return l(c)}if(u=!1,s)return o();n||e.once("readable",a)}})}function El(){let e=new si;return new gl.Transform({objectMode:!0,transform(t,i,r){try{e.parse(t.toString(i))}catch(u){this.emit("error",u)}r()},flush(t){try{this.push(e.finish())}catch(i){this.emit("error",i)}t()}})}});var ai=$((Nc,we)=>{"use strict";we.exports=ri();we.exports.async=ui();we.exports.stream=li();we.exports.prettyError=ze()});var gi=$((kc,Gt)=>{"use strict";Gt.exports=Al;Gt.exports.value=Yt;function Al(e){if(e===null)throw ne("null");if(e===void 0)throw ne("undefined");if(typeof e!="object")throw ne(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=j(e);if(t!=="table")throw ne(t);return Vt("","",e)}function ne(e){return new Error("Can only stringify objects, not "+e)}function yl(){return new Error("Array values can't have mixed types")}function ci(e){return Object.keys(e).filter(t=>hi(e[t]))}function bl(e){return Object.keys(e).filter(t=>!hi(e[t]))}function Qe(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let i of Object.keys(e))e[i]&&typeof e[i].toJSON=="function"&&!("toISOString"in e[i])?t[i]=e[i].toJSON():t[i]=e[i];return t}function Vt(e,t,i){i=Qe(i);var r,u;r=ci(i),u=bl(i);var s=[],n=t||"";r.forEach(l=>{var a=j(i[l]);a!=="undefined"&&a!=="null"&&s.push(n+Ze(l)+" = "+pi(i[l],!0))}),s.length>0&&s.push("");var o=e&&r.length>0?t+" ":"";return u.forEach(l=>{s.push(Ll(e,o,l,i[l]))}),s.join(`
12
- `)}function hi(e){switch(j(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||j(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function j(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function Ze(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:Di(t)}function Di(e){return'"'+fi(e).replace(/"/g,'\\"')+'"'}function xl(e){return"'"+e+"'"}function vl(e,t){for(;t.length<e;)t="0"+t;return t}function fi(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+vl(4,t.codePointAt(0).toString(16)))}function wl(e){let t=e.split(/\n/).map(i=>fi(i).replace(/"(?="")/g,'\\"')).join(`
5
+ var RD=Object.create;var yr=Object.defineProperty;var ID=Object.getOwnPropertyDescriptor;var LD=Object.getOwnPropertyNames;var ND=Object.getPrototypeOf,PD=Object.prototype.hasOwnProperty;var jD=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,u)=>(typeof require<"u"?require:t)[u]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var cn=(e,t)=>()=>(e&&(t=e(e=0)),t);var Y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),MD=(e,t)=>{for(var u in t)yr(e,u,{get:t[u],enumerable:!0})},HD=(e,t,u,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of LD(t))!PD.call(e,i)&&i!==u&&yr(e,i,{get:()=>t[i],enumerable:!(n=ID(t,i))||n.enumerable});return e};var gt=(e,t,u)=>(u=e!=null?RD(ND(e)):{},HD(t||!e||!e.__esModule?yr(u,"default",{value:e,enumerable:!0}):u,e));var Un={};MD(Un,{kCancel:()=>Mn,prompt:()=>Hn});import re,{stdin as oa,stdout as Da}from"node:process";import An from"node:readline";import{WriteStream as aa}from"node:tty";function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ca(){if(yn)return Sr;yn=1;let e="\x1B",t=`${e}[`,u="\x07",n={to(r,o){return o?`${t}${o+1};${r+1}H`:`${t}${r+1}G`},move(r,o){let D="";return r<0?D+=`${t}${-r}D`:r>0&&(D+=`${t}${r}C`),o<0?D+=`${t}${-o}A`:o>0&&(D+=`${t}${o}B`),D},up:(r=1)=>`${t}${r}A`,down:(r=1)=>`${t}${r}B`,forward:(r=1)=>`${t}${r}C`,backward:(r=1)=>`${t}${r}D`,nextLine:(r=1)=>`${t}E`.repeat(r),prevLine:(r=1)=>`${t}F`.repeat(r),left:`${t}G`,hide:`${t}?25l`,show:`${t}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(r=1)=>`${t}S`.repeat(r),down:(r=1)=>`${t}T`.repeat(r)},s={screen:`${t}2J`,up:(r=1)=>`${t}1J`.repeat(r),down:(r=1)=>`${t}J`.repeat(r),line:`${t}2K`,lineEnd:`${t}K`,lineStart:`${t}1K`,lines(r){let o="";for(let D=0;D<r;D++)o+=this.line+(D<r-1?n.up():"");return r&&(o+=n.left),o}};return Sr={cursor:n,scroll:i,erase:s,beep:u},Sr}function ha(){if(bn)return Et.exports;bn=1;let e=process||{},t=e.argv||[],u=e.env||{},n=!(u.NO_COLOR||t.includes("--no-color"))&&(!!u.FORCE_COLOR||t.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&u.TERM!=="dumb"||!!u.CI),i=(o,D,l=o)=>c=>{let a=""+c,h=a.indexOf(D,o.length);return~h?o+s(a,D,l,h)+D:o+a+D},s=(o,D,l,c)=>{let a="",h=0;do a+=o.substring(h,c)+l,h=c+D.length,c=o.indexOf(D,h);while(~c);return a+o.substring(h)},r=(o=n)=>{let D=o?i:()=>String;return{isColorSupported:o,reset:D("\x1B[0m","\x1B[0m"),bold:D("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:D("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:D("\x1B[3m","\x1B[23m"),underline:D("\x1B[4m","\x1B[24m"),inverse:D("\x1B[7m","\x1B[27m"),hidden:D("\x1B[8m","\x1B[28m"),strikethrough:D("\x1B[9m","\x1B[29m"),black:D("\x1B[30m","\x1B[39m"),red:D("\x1B[31m","\x1B[39m"),green:D("\x1B[32m","\x1B[39m"),yellow:D("\x1B[33m","\x1B[39m"),blue:D("\x1B[34m","\x1B[39m"),magenta:D("\x1B[35m","\x1B[39m"),cyan:D("\x1B[36m","\x1B[39m"),white:D("\x1B[37m","\x1B[39m"),gray:D("\x1B[90m","\x1B[39m"),bgBlack:D("\x1B[40m","\x1B[49m"),bgRed:D("\x1B[41m","\x1B[49m"),bgGreen:D("\x1B[42m","\x1B[49m"),bgYellow:D("\x1B[43m","\x1B[49m"),bgBlue:D("\x1B[44m","\x1B[49m"),bgMagenta:D("\x1B[45m","\x1B[49m"),bgCyan:D("\x1B[46m","\x1B[49m"),bgWhite:D("\x1B[47m","\x1B[49m"),blackBright:D("\x1B[90m","\x1B[39m"),redBright:D("\x1B[91m","\x1B[39m"),greenBright:D("\x1B[92m","\x1B[39m"),yellowBright:D("\x1B[93m","\x1B[39m"),blueBright:D("\x1B[94m","\x1B[39m"),magentaBright:D("\x1B[95m","\x1B[39m"),cyanBright:D("\x1B[96m","\x1B[39m"),whiteBright:D("\x1B[97m","\x1B[39m"),bgBlackBright:D("\x1B[100m","\x1B[49m"),bgRedBright:D("\x1B[101m","\x1B[49m"),bgGreenBright:D("\x1B[102m","\x1B[49m"),bgYellowBright:D("\x1B[103m","\x1B[49m"),bgBlueBright:D("\x1B[104m","\x1B[49m"),bgMagentaBright:D("\x1B[105m","\x1B[49m"),bgCyanBright:D("\x1B[106m","\x1B[49m"),bgWhiteBright:D("\x1B[107m","\x1B[49m")}};return Et.exports=r(),Et.exports.createColors=r,Et.exports}function pa({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}function Rn(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Fa,"")}function In(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qe(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Rn(e),e.length===0))return 0;e=e.replace(Ca()," ");let u=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(ma.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=u;break;default:n+=1}}return n}function ya(){let e=new Map;for(let[t,u]of Object.entries($)){for(let[n,i]of Object.entries(u))$[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},u[n]=$[n],e.set(i[0],i[1]);Object.defineProperty($,t,{value:u,enumerable:!1})}return Object.defineProperty($,"codes",{value:e,enumerable:!1}),$.color.close="\x1B[39m",$.bgColor.close="\x1B[49m",$.color.ansi=wn(),$.color.ansi256=xn(),$.color.ansi16m=Bn(),$.bgColor.ansi=wn($r),$.bgColor.ansi256=xn($r),$.bgColor.ansi16m=Bn($r),Object.defineProperties($,{rgbToAnsi256:{value:(t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>$.rgbToAnsi256(...$.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,i;if(t>=232)u=((t-232)*10+8)/255,n=u,i=u;else{t-=16;let o=t%36;u=Math.floor(t/36)/5,n=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(u,n,i)*2;if(s===0)return 30;let r=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(u));return s===2&&(r+=60),r},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>$.ansi256ToAnsi($.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>$.ansi256ToAnsi($.hexToAnsi256(t)),enumerable:!1}}),$}function Tn(e,t,u){return String(e).normalize().replace(/\r\n/g,`
6
+ `).split(`
7
+ `).map(n=>_a(n,t,u)).join(`
8
+ `)}function jn(e,t){if(typeof e=="string")return yt.aliases.get(e)===t;for(let u of e)if(u!==void 0&&jn(u,t))return!0;return!1}function Sa(e,t){if(e===t)return;let u=e.split(`
9
+ `),n=t.split(`
10
+ `),i=[];for(let s=0;s<Math.max(u.length,n.length);s++)u[s]!==n[s]&&i.push(s);return i}function At(e,t){let u=e;u.isTTY&&u.setRawMode(t)}function Pa(){return re.platform!=="win32"?re.env.TERM!=="linux":!!re.env.CI||!!re.env.WT_SESSION||!!re.env.TERMINUS_SUBLIME||re.env.ConEmuTask==="{cmd::Cmder}"||re.env.TERM_PROGRAM==="Terminus-Sublime"||re.env.TERM_PROGRAM==="vscode"||re.env.TERM==="xterm-256color"||re.env.TERM==="alacritty"||re.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}async function Hn(e,t={}){let u=n=>{if(typeof n!="symbol"||n.toString()!=="Symbol(clack:cancel)")return n;switch(t.cancel){case"reject":{let i=new Error("Prompt cancelled.");throw i.name="ConsolaPromptCancelledError",Error.captureStackTrace&&Error.captureStackTrace(i,Hn),i}case"undefined":return;case"null":return null;case"symbol":return Mn;default:case"default":return t.default??t.initial}};if(!t.type||t.type==="text")return await Ya({message:e,defaultValue:t.default,placeholder:t.placeholder,initialValue:t.initial}).then(u);if(t.type==="confirm")return await za({message:e,initialValue:t.initial}).then(u);if(t.type==="select")return await Ka({message:e,options:t.options.map(n=>typeof n=="string"?{value:n,label:n}:n),initialValue:t.initial}).then(u);if(t.type==="multiselect")return await qa({message:e,options:t.options.map(n=>typeof n=="string"?{value:n,label:n}:n),required:t.required,initialValues:t.initial}).then(u);throw new Error(`Unknown prompt type: ${t.type}`)}var Sr,yn,ue,Et,bn,fa,F,Fa,Ln,da,ma,ga,Ca,$r,wn,xn,Bn,$,Ea,Aa,ba,bt,wa,jr,Nn,xa,Pn,Mr,vn,_n,Ba,kr,va,_a,Ta,yt,Sn,$a,ka,Q,Ie,Or,Oa,Ra,$n,Ia,La,Na,kn,Rr,Ir,ja,ne,Ma,Ha,Ua,Wa,T,Le,Lr,Nr,Va,On,Ga,wt,Pr,Ya,za,Ka,qa,Mn,Wn=cn(()=>{ue=ca(),Et={exports:{}};fa=ha(),F=la(fa);Fa=pa();Ln={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,r=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,r=i<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=u(n),s=0,r=0;r<i.length;r++)s=s+this.characterLength(i[r]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var r="",o=0,D=u(n),l=0;l<D.length;l++){var c=D[l],a=t.length(c);if(o>=i-(a==2?1:0))if(o+a<=s)r+=c;else break;o+=a}return r}})(Ln);da=Ln.exports,ma=In(da),ga=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ca=In(ga);$r=10,wn=(e=0)=>t=>`\x1B[${t+e}m`,xn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Bn=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,$={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys($.modifier);Ea=Object.keys($.color),Aa=Object.keys($.bgColor);[...Ea,...Aa];ba=ya(),bt=new Set(["\x1B","\x9B"]),wa=39,jr="\x07",Nn="[",xa="]",Pn="m",Mr=`${xa}8;;`,vn=e=>`${bt.values().next().value}${Nn}${e}${Pn}`,_n=e=>`${bt.values().next().value}${Mr}${e}${jr}`,Ba=e=>e.split(" ").map(t=>qe(t)),kr=(e,t,u)=>{let n=[...t],i=!1,s=!1,r=qe(Rn(e[e.length-1]));for(let[o,D]of n.entries()){let l=qe(D);if(r+l<=u?e[e.length-1]+=D:(e.push(D),r=0),bt.has(D)&&(i=!0,s=n.slice(o+1).join("").startsWith(Mr)),i){s?D===jr&&(i=!1,s=!1):D===Pn&&(i=!1);continue}r+=l,r===u&&o<n.length-1&&(e.push(""),r=0)}!r&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},va=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(qe(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},_a=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",i,s,r=Ba(e),o=[""];for(let[l,c]of e.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let a=qe(o[o.length-1]);if(l!==0&&(a>=t&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),a=0),(a>0||u.trim===!1)&&(o[o.length-1]+=" ",a++)),u.hard&&r[l]>t){let h=t-a,f=1+Math.floor((r[l]-h-1)/t);Math.floor((r[l]-1)/t)<f&&o.push(""),kr(o,c,t);continue}if(a+r[l]>t&&a>0&&r[l]>0){if(u.wordWrap===!1&&a<t){kr(o,c,t);continue}o.push("")}if(a+r[l]>t&&u.wordWrap===!1){kr(o,c,t);continue}o[o.length-1]+=c}u.trim!==!1&&(o=o.map(l=>va(l)));let D=[...o.join(`
11
+ `)];for(let[l,c]of D.entries()){if(n+=c,bt.has(c)){let{groups:h}=new RegExp(`(?:\\${Nn}(?<code>\\d+)m|\\${Mr}(?<uri>.*)${jr})`).exec(D.slice(l).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===wa?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let a=ba.codes.get(Number(i));D[l+1]===`
12
+ `?(s&&(n+=_n("")),i&&a&&(n+=vn(a))):c===`
13
+ `&&(i&&a&&(n+=vn(i)),s&&(n+=_n(s)))}return n};Ta=["up","down","left","right","space","enter","cancel"],yt={actions:new Set(Ta),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};globalThis.process.platform.startsWith("win");Sn=Symbol("clack:cancel");$a=Object.defineProperty,ka=(e,t,u)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,Q=(e,t,u)=>(ka(e,typeof t!="symbol"?t+"":t,u),u),Ie=class{constructor(t,u=!0){Q(this,"input"),Q(this,"output"),Q(this,"_abortSignal"),Q(this,"rl"),Q(this,"opts"),Q(this,"_render"),Q(this,"_track",!1),Q(this,"_prevFrame",""),Q(this,"_subscribers",new Map),Q(this,"_cursor",0),Q(this,"state","initial"),Q(this,"error",""),Q(this,"value");let{input:n=oa,output:i=Da,render:s,signal:r,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=u,this._abortSignal=r,this.input=n,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,u){let n=this._subscribers.get(t)??[];n.push(u),this._subscribers.set(t,n)}on(t,u){this.setSubscriber(t,{cb:u})}once(t,u){this.setSubscriber(t,{cb:u,once:!0})}emit(t,...u){let n=this._subscribers.get(t)??[],i=[];for(let s of n)s.cb(...u),s.once&&i.push(()=>n.splice(n.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,u)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(Sn);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new aa(0);n._write=(i,s,r)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),r()},this.input.pipe(n),this.rl=An.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50}),An.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),At(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(ue.cursor.show),this.output.off("resize",this.render),At(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(ue.cursor.show),this.output.off("resize",this.render),At(this.input,!1),t(Sn)})})}onKeypress(t,u){if(this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&yt.aliases.has(u.name)&&this.emit("cursor",yt.aliases.get(u.name)),yt.actions.has(u.name)&&this.emit("cursor",u.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),u?.name==="return"){if(this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}jn([t,u?.name,u?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
14
+ `),At(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=Tn(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
15
+ `).length-1;this.output.write(ue.cursor.move(-999,t*-1))}render(){let t=Tn(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(ue.cursor.hide);else{let u=Sa(this._prevFrame,t);if(this.restoreCursor(),u&&u?.length===1){let n=u[0];this.output.write(ue.cursor.move(0,n)),this.output.write(ue.erase.lines(1));let i=t.split(`
16
+ `);this.output.write(i[n]),this._prevFrame=t,this.output.write(ue.cursor.move(0,i.length-n-1));return}if(u&&u?.length>1){let n=u[0];this.output.write(ue.cursor.move(0,n)),this.output.write(ue.erase.down());let i=t.split(`
17
+ `).slice(n);this.output.write(i.join(`
18
+ `)),this._prevFrame=t;return}this.output.write(ue.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},Or=class extends Ie{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",u=>{this.output.write(ue.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}},Oa=Object.defineProperty,Ra=(e,t,u)=>t in e?Oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,$n=(e,t,u)=>(Ra(e,typeof t!="symbol"?t+"":t,u),u),Ia=class extends Ie{constructor(e){super(e,!1),$n(this,"options"),$n(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",t=>{t==="a"&&this.toggleAll()}),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}},La=Object.defineProperty,Na=(e,t,u)=>t in e?La(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,kn=(e,t,u)=>(Na(e,typeof t!="symbol"?t+"":t,u),u),Rr=class extends Ie{constructor(t){super(t,!1),kn(this,"options"),kn(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:u})=>u===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",u=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}},Ir=class extends Ie{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let t=this.value.slice(0,this.cursor),[u,...n]=this.value.slice(this.cursor);return`${t}${F.inverse(u)}${n.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}};ja=Pa(),ne=(e,t)=>ja?e:t,Ma=ne("\u276F",">"),Ha=ne("\u25A0","x"),Ua=ne("\u25B2","x"),Wa=ne("\u2714","\u221A"),T=ne(""),Le=ne(""),Lr=ne("\u25CF",">"),Nr=ne("\u25CB"," "),Va=ne("\u25FB","[\u2022]"),On=ne("\u25FC","[+]"),Ga=ne("\u25FB","[ ]"),wt=e=>{switch(e){case"initial":case"active":return F.cyan(Ma);case"cancel":return F.red(Ha);case"error":return F.yellow(Ua);case"submit":return F.green(Wa)}},Pr=e=>{let{cursor:t,options:u,style:n}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),r=Math.min(s,Math.max(i,5)),o=0;t>=o+r-3?o=Math.max(Math.min(t-r+3,u.length-r),0):t<o+2&&(o=Math.max(t-2,0));let D=r<u.length&&o>0,l=r<u.length&&o+r<u.length;return u.slice(o,o+r).map((c,a,h)=>{let f=a===0&&D,p=a===h.length-1&&l;return f||p?F.dim("..."):n(c,a+o===t)})},Ya=e=>new Ir({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${F.gray(T)}
19
+ ${wt(this.state)} ${e.message}
20
+ `,u=e.placeholder?F.inverse(e.placeholder[0])+F.dim(e.placeholder.slice(1)):F.inverse(F.hidden("_")),n=this.value?this.valueWithCursor:u;switch(this.state){case"error":return`${t.trim()}
21
+ ${F.yellow(T)} ${n}
22
+ ${F.yellow(Le)} ${F.yellow(this.error)}
23
+ `;case"submit":return`${t}${F.gray(T)} ${F.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${F.gray(T)} ${F.strikethrough(F.dim(this.value??""))}${this.value?.trim()?`
24
+ ${F.gray(T)}`:""}`;default:return`${t}${F.cyan(T)} ${n}
25
+ ${F.cyan(Le)}
26
+ `}}}).prompt(),za=e=>{let t=e.active??"Yes",u=e.inactive??"No";return new Or({active:t,inactive:u,initialValue:e.initialValue??!0,render(){let n=`${F.gray(T)}
27
+ ${wt(this.state)} ${e.message}
28
+ `,i=this.value?t:u;switch(this.state){case"submit":return`${n}${F.gray(T)} ${F.dim(i)}`;case"cancel":return`${n}${F.gray(T)} ${F.strikethrough(F.dim(i))}
29
+ ${F.gray(T)}`;default:return`${n}${F.cyan(T)} ${this.value?`${F.green(Lr)} ${t}`:`${F.dim(Nr)} ${F.dim(t)}`} ${F.dim("/")} ${this.value?`${F.dim(Nr)} ${F.dim(u)}`:`${F.green(Lr)} ${u}`}
30
+ ${F.cyan(Le)}
31
+ `}}}).prompt()},Ka=e=>{let t=(u,n)=>{let i=u.label??String(u.value);switch(n){case"selected":return`${F.dim(i)}`;case"active":return`${F.green(Lr)} ${i} ${u.hint?F.dim(`(${u.hint})`):""}`;case"cancelled":return`${F.strikethrough(F.dim(i))}`;default:return`${F.dim(Nr)} ${F.dim(i)}`}};return new Rr({options:e.options,initialValue:e.initialValue,render(){let u=`${F.gray(T)}
32
+ ${wt(this.state)} ${e.message}
33
+ `;switch(this.state){case"submit":return`${u}${F.gray(T)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${u}${F.gray(T)} ${t(this.options[this.cursor],"cancelled")}
34
+ ${F.gray(T)}`;default:return`${u}${F.cyan(T)} ${Pr({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(n,i)=>t(n,i?"active":"inactive")}).join(`
35
+ ${F.cyan(T)} `)}
36
+ ${F.cyan(Le)}
37
+ `}}}).prompt()},qa=e=>{let t=(u,n)=>{let i=u.label??String(u.value);return n==="active"?`${F.cyan(Va)} ${i} ${u.hint?F.dim(`(${u.hint})`):""}`:n==="selected"?`${F.green(On)} ${F.dim(i)}`:n==="cancelled"?`${F.strikethrough(F.dim(i))}`:n==="active-selected"?`${F.green(On)} ${i} ${u.hint?F.dim(`(${u.hint})`):""}`:n==="submitted"?`${F.dim(i)}`:`${F.dim(Ga)} ${F.dim(i)}`};return new Ia({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(u){if(this.required&&u.length===0)return`Please select at least one option.
38
+ ${F.reset(F.dim(`Press ${F.gray(F.bgWhite(F.inverse(" space ")))} to select, ${F.gray(F.bgWhite(F.inverse(" enter ")))} to submit`))}`},render(){let u=`${F.gray(T)}
39
+ ${wt(this.state)} ${e.message}
40
+ `,n=(i,s)=>{let r=this.value.includes(i.value);return s&&r?t(i,"active-selected"):r?t(i,"selected"):t(i,s?"active":"inactive")};switch(this.state){case"submit":return`${u}${F.gray(T)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>t(i,"submitted")).join(F.dim(", "))||F.dim("none")}`;case"cancel":{let i=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(F.dim(", "));return`${u}${F.gray(T)} ${i.trim()?`${i}
41
+ ${F.gray(T)}`:""}`}case"error":{let i=this.error.split(`
42
+ `).map((s,r)=>r===0?`${F.yellow(Le)} ${F.yellow(s)}`:` ${s}`).join(`
43
+ `);return`${u+F.yellow(T)} ${Pr({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:n}).join(`
44
+ ${F.yellow(T)} `)}
45
+ ${i}
46
+ `}default:return`${u}${F.cyan(T)} ${Pr({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:n}).join(`
47
+ ${F.cyan(T)} `)}
48
+ ${F.cyan(Le)}
49
+ `}}}).prompt()};`${F.gray(T)}`;Mn=Symbol.for("cancel")});function Qe(e){return e.charCodeAt(0)===65279?e.slice(1):e}function Wc(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&Qe(e).slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:Hc.exec(e)?.[0]||"",end:Uc.exec(e)?.[0]||""}}}function kt(e,t,u){!t||typeof t!="object"||Object.defineProperty(t,Mc,{enumerable:!1,configurable:!0,writable:!0,value:Wc(e,u)})}var Mc,Hc,Uc,Zr=cn(()=>{Mc=Symbol.for("__confbox_fmt__"),Hc=/^(\s+)/,Uc=/(\s+)$/});var pu=Y((Bm,Ji)=>{"use strict";var fu={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let u="";return e<0?u+=`\x1B[${-e}D`:e>0&&(u+=`\x1B[${e}C`),t<0?u+=`\x1B[${-t}A`:t>0&&(u+=`\x1B[${t}B`),u},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},nf={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},sf={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let u=0;u<e;u++)t+=this.line+(u<e-1?fu.up():"");return e&&(t+=fu.left),t}};Ji.exports={cursor:fu,scroll:nf,erase:sf,beep:"\x07"}});var Xi=Y((vm,Fu)=>{var Ut=process||{},Zi=Ut.argv||[],Ht=Ut.env||{},of=!(Ht.NO_COLOR||Zi.includes("--no-color"))&&(!!Ht.FORCE_COLOR||Zi.includes("--color")||Ut.platform==="win32"||(Ut.stdout||{}).isTTY&&Ht.TERM!=="dumb"||!!Ht.CI),Df=(e,t,u=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+af(i,t,u,s)+t:e+i+t},af=(e,t,u,n)=>{let i="",s=0;do i+=e.substring(s,n)+u,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},Qi=(e=of)=>{let t=e?Df:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Fu.exports=Qi();Fu.exports.createColors=Qi});var ko=Y((Fg,$o)=>{"use strict";var Oe=class e extends Error{constructor(t,u,n){super("[ParserError] "+t,u,n),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},ur=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ft=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new ur(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let u;for(;u===!1||this.nextChar();)u=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new Oe("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,u){u&&this.next(u),this.stack.push(this.state),this.state=new ur(t)}callNow(t,u){return this.call(t,u),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new Oe("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Oe("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new Oe("Must declare a parseStart method")}};ft.END=1114112;ft.Error=Oe;$o.exports=ft});var Ro=Y((dg,Oo)=>{"use strict";Oo.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var nr=Y((mg,Io)=>{"use strict";Io.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var No=Y((gg,Lo)=>{"use strict";var Ge=nr(),Wu=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${Ge(2,this.getUTCMonth()+1)}-${Ge(2,this.getUTCDate())}`,u=`${Ge(2,this.getUTCHours())}:${Ge(2,this.getUTCMinutes())}:${Ge(2,this.getUTCSeconds())}.${Ge(3,this.getUTCMilliseconds())}`;return`${t}T${u}`}};Lo.exports=e=>{let t=new Wu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Mo=Y((Cg,jo)=>{"use strict";var Po=nr(),mF=global.Date,Vu=class extends mF{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Po(2,this.getUTCMonth()+1)}-${Po(2,this.getUTCDate())}`}};jo.exports=e=>{let t=new Vu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var Uo=Y((Eg,Ho)=>{"use strict";var ir=nr(),Gu=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${ir(2,this.getUTCHours())}:${ir(2,this.getUTCMinutes())}:${ir(2,this.getUTCSeconds())}.${ir(3,this.getUTCMilliseconds())}`}};Ho.exports=e=>{let t=new Gu(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var sr=Y((exports,module)=>{"use strict";module.exports=makeParserClass(ko());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=Ro(),createDateTimeFloat=No(),createDate=Mo(),createTime=Uo(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
50
+ `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(n){let i=this.ctx,s=n.key.pop();for(let r of n.key){if(hasKey(i,r)&&(!isTable(i[r])||i[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[r]=i[r]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[s]=n.value.valueOf():i[s]=n.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(n){return this.state.resultTable?this.state.resultTable.push(n):this.state.resultTable=[n],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(n){return this.returnNow({key:this.state.resultTable,value:n})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)&&(!isTable(this.ctx[n])||this.ctx[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[n]=this.ctx[n]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(n){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,n)||(this.ctx[n]=List()),isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[n])){let i=Table();this.ctx[n].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,n))this.ctx=this.ctx[n]=Table();else{if(isInlineList(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[n]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[n]))this.ctx=this.ctx[n][this.ctx[n].length-1];else if(isTable(this.ctx[n]))this.ctx=this.ctx[n];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(n){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(n){return this.returnNow(n)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let n="\\u00";return this.char<16&&(n+="0"),n+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${n} instead`))}recordMultiEscapeReplacement(n){return this.state.buf+=n,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(n){try{let i=parseInt(n,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let n=Integer(this.state.buf);if(n.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(n)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(n){if(this.state.resultArr){let i=this.state.resultArr[_contentType],s=tomlType(n);if(i!==s)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${s}`))}else this.state.resultArr=InlineList(tomlType(n));return isFloat(n)||isInteger(n)?this.state.resultArr.push(n.valueOf()):this.state.resultArr.push(n),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(n){let i=this.state.resultTable,s=n.key.pop();for(let r of n.key){if(hasKey(i,r)&&(!isTable(i[r])||i[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[r]=i[r]||Table()}if(hasKey(i,s))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(n.value)||isFloat(n.value)?i[s]=n.value.valueOf():i[s]=n.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var or=Y((Ag,Wo)=>{"use strict";Wo.exports=gF;function gF(e,t){if(e.pos==null||e.line==null)return e;let u=e.message;if(u+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
51
+ `,t&&t.split){let n=t.split(/\n/),i=String(Math.min(n.length,e.line+3)).length,s=" ";for(;s.length<i;)s+=" ";for(let r=Math.max(0,e.line-1);r<Math.min(n.length,e.line+2);++r){let o=String(r+1);if(o.length<i&&(o=" "+o),e.line===r){u+=o+"> "+n[r]+`
52
+ `,u+=s+" ";for(let D=0;D<e.col;++D)u+=" ";u+=`^
53
+ `}else u+=o+": "+n[r]+`
54
+ `}}return e.message=u+`
55
+ `,e}});var Go=Y((yg,Vo)=>{"use strict";Vo.exports=AF;var CF=sr(),EF=or();function AF(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new CF;try{return t.parse(e),t.finish()}catch(u){throw EF(u,e)}}});var Ko=Y((bg,zo)=>{"use strict";zo.exports=bF;var yF=sr(),Yo=or();function bF(e,t){t||(t={});let u=0,n=t.blocksize||40960,i=new yF;return new Promise((r,o)=>{setImmediate(s,u,n,r,o)});function s(r,o,D,l){if(r>=e.length)try{return D(i.finish())}catch(c){return l(Yo(c,e))}try{i.parse(e.slice(r,r+o)),setImmediate(s,r+o,o,D,l)}catch(c){l(Yo(c,e))}}}});var Zo=Y((wg,Jo)=>{"use strict";Jo.exports=xF;var wF=jD("stream"),qo=sr();function xF(e){return e?BF(e):vF(e)}function BF(e){let t=new qo;return e.setEncoding("utf8"),new Promise((u,n)=>{let i,s=!1,r=!1;function o(){if(s=!0,!i)try{u(t.finish())}catch(c){n(c)}}function D(c){r=!0,n(c)}e.once("end",o),e.once("error",D),l();function l(){i=!0;let c;for(;(c=e.read())!==null;)try{t.parse(c)}catch(a){return D(a)}if(i=!1,s)return o();r||e.once("readable",l)}})}function vF(){let e=new qo;return new wF.Transform({objectMode:!0,transform(t,u,n){try{e.parse(t.toString(u))}catch(i){this.emit("error",i)}n()},flush(t){try{this.push(e.finish())}catch(u){this.emit("error",u)}t()}})}});var Qo=Y((xg,pt)=>{"use strict";pt.exports=Go();pt.exports.async=Ko();pt.exports.stream=Zo();pt.exports.prettyError=or()});var sD=Y((Bg,Ku)=>{"use strict";Ku.exports=_F;Ku.exports.value=zu;function _F(e){if(e===null)throw Re("null");if(e===void 0)throw Re("undefined");if(typeof e!="object")throw Re(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=Z(e);if(t!=="table")throw Re(t);return Yu("","",e)}function Re(e){return new Error("Can only stringify objects, not "+e)}function TF(){return new Error("Array values can't have mixed types")}function Xo(e){return Object.keys(e).filter(t=>eD(e[t]))}function SF(e){return Object.keys(e).filter(t=>!eD(e[t]))}function Dr(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let u of Object.keys(e))e[u]&&typeof e[u].toJSON=="function"&&!("toISOString"in e[u])?t[u]=e[u].toJSON():t[u]=e[u];return t}function Yu(e,t,u){u=Dr(u);var n,i;n=Xo(u),i=SF(u);var s=[],r=t||"";n.forEach(D=>{var l=Z(u[D]);l!=="undefined"&&l!=="null"&&s.push(r+ar(D)+" = "+uD(u[D],!0))}),s.length>0&&s.push("");var o=e&&n.length>0?t+" ":"";return i.forEach(D=>{s.push(HF(e,o,D,u[D]))}),s.join(`
56
+ `)}function eD(e){switch(Z(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||Z(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function Z(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function ar(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:tD(t)}function tD(e){return'"'+rD(e).replace(/"/g,'\\"')+'"'}function $F(e){return"'"+e+"'"}function kF(e,t){for(;t.length<e;)t="0"+t;return t}function rD(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+kF(4,t.codePointAt(0).toString(16)))}function OF(e){let t=e.split(/\n/).map(u=>rD(u).replace(/"(?="")/g,'\\"')).join(`
13
57
  `);return t.slice(-1)==='"'&&(t+=`\\
14
58
  `),`"""
15
- `+t+'"""'}function pi(e,t){let i=j(e);return i==="string"&&(t&&/\n/.test(e)?i="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(i="string-literal")),Yt(e,i)}function Yt(e,t){switch(t||(t=j(e)),t){case"string-multiline":return wl(e);case"string":return Di(e);case"string-literal":return xl(e);case"integer":return di(e);case"float":return _l(e);case"boolean":return Tl(e);case"datetime":return Sl(e);case"array":return Rl(e.filter(i=>j(i)!=="null"&&j(i)!=="undefined"&&j(i)!=="nan"));case"table":return Il(e);default:throw ne(t)}}function di(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function _l(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),i=t[0],r=t[1]||0;return di(i)+"."+r}function Tl(e){return String(e)}function Sl(e){return e.toISOString()}function Bl(e){return e==="float"||e==="integer"}function Ol(e){var t=j(e[0]);return e.every(i=>j(i)===t)?t:e.every(i=>Bl(j(i)))?"float":"mixed"}function mi(e){let t=Ol(e);if(t==="mixed")throw yl();return t}function Rl(e){e=Qe(e);let t=mi(e);var i="[",r=e.map(u=>Yt(u,t));return r.join(", ").length>60||/\n/.test(r)?i+=`
16
- `+r.join(`,
59
+ `+t+'"""'}function uD(e,t){let u=Z(e);return u==="string"&&(t&&/\n/.test(e)?u="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(u="string-literal")),zu(e,u)}function zu(e,t){switch(t||(t=Z(e)),t){case"string-multiline":return OF(e);case"string":return tD(e);case"string-literal":return $F(e);case"integer":return nD(e);case"float":return RF(e);case"boolean":return IF(e);case"datetime":return LF(e);case"array":return jF(e.filter(u=>Z(u)!=="null"&&Z(u)!=="undefined"&&Z(u)!=="nan"));case"table":return MF(e);default:throw Re(t)}}function nD(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function RF(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),u=t[0],n=t[1]||0;return nD(u)+"."+n}function IF(e){return String(e)}function LF(e){return e.toISOString()}function NF(e){return e==="float"||e==="integer"}function PF(e){var t=Z(e[0]);return e.every(u=>Z(u)===t)?t:e.every(u=>NF(Z(u)))?"float":"mixed"}function iD(e){let t=PF(e);if(t==="mixed")throw TF();return t}function jF(e){e=Dr(e);let t=iD(e);var u="[",n=e.map(i=>zu(i,t));return n.join(", ").length>60||/\n/.test(n)?u+=`
60
+ `+n.join(`,
17
61
  `)+`
18
- `:i+=" "+r.join(", ")+(r.length>0?" ":""),i+"]"}function Il(e){e=Qe(e);var t=[];return Object.keys(e).forEach(i=>{t.push(Ze(i)+" = "+pi(e[i],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function Ll(e,t,i,r){var u=j(r);if(u==="array")return Nl(e,t,i,r);if(u==="table")return kl(e,t,i,r);throw ne(u)}function Nl(e,t,i,r){r=Qe(r),mi(r);var u=j(r[0]);if(u!=="table")throw ne(u);var s=e+Ze(i),n="";return r.forEach(o=>{n.length>0&&(n+=`
19
- `),n+=t+"[["+s+`]]
20
- `,n+=Vt(s+".",t,o)}),n}function kl(e,t,i,r){var u=e+Ze(i),s="";return ci(r).length>0&&(s+=t+"["+u+`]
21
- `),s+Vt(u+".",t,r)}});var Ci=$(Kt=>{"use strict";Kt.parse=ai();Kt.stringify=gi()});var V=Se(Dt(),1);import{stdin as ru,stdout as nu}from"node:process";import hr from"node:readline";import{WriteStream as iu}from"node:tty";function uu({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var su=uu();function Fr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(su,"")}function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ar={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(r){var u=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,n=u;return 55296<=u&&u<=56319&&56320<=s&&s<=57343&&(u&=1023,s&=1023,n=u<<10|s,n+=65536),n==12288||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":n==8361||65377<=n&&n<=65470||65474<=n&&n<=65479||65482<=n&&n<=65487||65490<=n&&n<=65495||65498<=n&&n<=65500||65512<=n&&n<=65518?"H":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":32<=n&&n<=126||162<=n&&n<=163||165<=n&&n<=166||n==172||n==175||10214<=n&&n<=10221||10629<=n&&n<=10630?"Na":n==161||n==164||167<=n&&n<=168||n==170||173<=n&&n<=174||176<=n&&n<=180||182<=n&&n<=186||188<=n&&n<=191||n==198||n==208||215<=n&&n<=216||222<=n&&n<=225||n==230||232<=n&&n<=234||236<=n&&n<=237||n==240||242<=n&&n<=243||247<=n&&n<=250||n==252||n==254||n==257||n==273||n==275||n==283||294<=n&&n<=295||n==299||305<=n&&n<=307||n==312||319<=n&&n<=322||n==324||328<=n&&n<=331||n==333||338<=n&&n<=339||358<=n&&n<=359||n==363||n==462||n==464||n==466||n==468||n==470||n==472||n==474||n==476||n==593||n==609||n==708||n==711||713<=n&&n<=715||n==717||n==720||728<=n&&n<=731||n==733||n==735||768<=n&&n<=879||913<=n&&n<=929||931<=n&&n<=937||945<=n&&n<=961||963<=n&&n<=969||n==1025||1040<=n&&n<=1103||n==1105||n==8208||8211<=n&&n<=8214||8216<=n&&n<=8217||8220<=n&&n<=8221||8224<=n&&n<=8226||8228<=n&&n<=8231||n==8240||8242<=n&&n<=8243||n==8245||n==8251||n==8254||n==8308||n==8319||8321<=n&&n<=8324||n==8364||n==8451||n==8453||n==8457||n==8467||n==8470||8481<=n&&n<=8482||n==8486||n==8491||8531<=n&&n<=8532||8539<=n&&n<=8542||8544<=n&&n<=8555||8560<=n&&n<=8569||n==8585||8592<=n&&n<=8601||8632<=n&&n<=8633||n==8658||n==8660||n==8679||n==8704||8706<=n&&n<=8707||8711<=n&&n<=8712||n==8715||n==8719||n==8721||n==8725||n==8730||8733<=n&&n<=8736||n==8739||n==8741||8743<=n&&n<=8748||n==8750||8756<=n&&n<=8759||8764<=n&&n<=8765||n==8776||n==8780||n==8786||8800<=n&&n<=8801||8804<=n&&n<=8807||8810<=n&&n<=8811||8814<=n&&n<=8815||8834<=n&&n<=8835||8838<=n&&n<=8839||n==8853||n==8857||n==8869||n==8895||n==8978||9312<=n&&n<=9449||9451<=n&&n<=9547||9552<=n&&n<=9587||9600<=n&&n<=9615||9618<=n&&n<=9621||9632<=n&&n<=9633||9635<=n&&n<=9641||9650<=n&&n<=9651||9654<=n&&n<=9655||9660<=n&&n<=9661||9664<=n&&n<=9665||9670<=n&&n<=9672||n==9675||9678<=n&&n<=9681||9698<=n&&n<=9701||n==9711||9733<=n&&n<=9734||n==9737||9742<=n&&n<=9743||9748<=n&&n<=9749||n==9756||n==9758||n==9792||n==9794||9824<=n&&n<=9825||9827<=n&&n<=9829||9831<=n&&n<=9834||9836<=n&&n<=9837||n==9839||9886<=n&&n<=9887||9918<=n&&n<=9919||9924<=n&&n<=9933||9935<=n&&n<=9953||n==9955||9960<=n&&n<=9983||n==10045||n==10071||10102<=n&&n<=10111||11093<=n&&n<=11097||12872<=n&&n<=12879||57344<=n&&n<=63743||65024<=n&&n<=65039||n==65533||127232<=n&&n<=127242||127248<=n&&n<=127277||127280<=n&&n<=127337||127344<=n&&n<=127386||917760<=n&&n<=917999||983040<=n&&n<=1048573||1048576<=n&&n<=1114109?"A":"N"},t.characterLength=function(r){var u=this.eastAsianWidth(r);return u=="F"||u=="W"||u=="A"?2:1};function i(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(r){for(var u=i(r),s=0,n=0;n<u.length;n++)s=s+this.characterLength(u[n]);return s},t.slice=function(r,u,s){textLen=t.length(r),u=u||0,s=s||1,u<0&&(u=textLen+u),s<0&&(s=textLen+s);for(var n="",o=0,l=i(r),a=0;a<l.length;a++){var h=l[a],c=t.length(h);if(o>=u-(c==2?1:0))if(o+c<=s)n+=h;else break;o+=c}return n}})(Ar);var ou=Ar.exports,lu=Er(ou),au=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},cu=Er(au);function pe(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Fr(e),e.length===0))return 0;e=e.replace(cu()," ");let i=t.ambiguousIsNarrow?1:2,r=0;for(let u of e){let s=u.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(lu.eastAsianWidth(u)){case"F":case"W":r+=2;break;case"A":r+=i;break;default:r+=1}}return r}var pt=10,Dr=(e=0)=>t=>`\x1B[${t+e}m`,fr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,pr=(e=0)=>(t,i,r)=>`\x1B[${38+e};2;${t};${i};${r}m`,_={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(_.modifier);var hu=Object.keys(_.color),Du=Object.keys(_.bgColor);[...hu,...Du];function fu(){let e=new Map;for(let[t,i]of Object.entries(_)){for(let[r,u]of Object.entries(i))_[r]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},i[r]=_[r],e.set(u[0],u[1]);Object.defineProperty(_,t,{value:i,enumerable:!1})}return Object.defineProperty(_,"codes",{value:e,enumerable:!1}),_.color.close="\x1B[39m",_.bgColor.close="\x1B[49m",_.color.ansi=Dr(),_.color.ansi256=fr(),_.color.ansi16m=pr(),_.bgColor.ansi=Dr(pt),_.bgColor.ansi256=fr(pt),_.bgColor.ansi16m=pr(pt),Object.defineProperties(_,{rgbToAnsi256:{value:(t,i,r)=>t===i&&i===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(i/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let i=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!i)return[0,0,0];let[r]=i;r.length===3&&(r=[...r].map(s=>s+s).join(""));let u=Number.parseInt(r,16);return[u>>16&255,u>>8&255,u&255]},enumerable:!1},hexToAnsi256:{value:t=>_.rgbToAnsi256(..._.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let i,r,u;if(t>=232)i=((t-232)*10+8)/255,r=i,u=i;else{t-=16;let o=t%36;i=Math.floor(t/36)/5,r=Math.floor(o/6)/5,u=o%6/5}let s=Math.max(i,r,u)*2;if(s===0)return 30;let n=30+(Math.round(u)<<2|Math.round(r)<<1|Math.round(i));return s===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,i,r)=>_.ansi256ToAnsi(_.rgbToAnsi256(t,i,r)),enumerable:!1},hexToAnsi:{value:t=>_.ansi256ToAnsi(_.hexToAnsi256(t)),enumerable:!1}}),_}var pu=fu(),Le=new Set(["\x1B","\x9B"]),du=39,Ct="\x07",yr="[",mu="]",br="m",Ft=`${mu}8;;`,dr=e=>`${Le.values().next().value}${yr}${e}${br}`,mr=e=>`${Le.values().next().value}${Ft}${e}${Ct}`,gu=e=>e.split(" ").map(t=>pe(t)),dt=(e,t,i)=>{let r=[...t],u=!1,s=!1,n=pe(Fr(e[e.length-1]));for(let[o,l]of r.entries()){let a=pe(l);if(n+a<=i?e[e.length-1]+=l:(e.push(l),n=0),Le.has(l)&&(u=!0,s=r.slice(o+1).join("").startsWith(Ft)),u){s?l===Ct&&(u=!1,s=!1):l===br&&(u=!1);continue}n+=a,n===i&&o<r.length-1&&(e.push(""),n=0)}!n&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Cu=e=>{let t=e.split(" "),i=t.length;for(;i>0&&!(pe(t[i-1])>0);)i--;return i===t.length?e:t.slice(0,i).join(" ")+t.slice(i).join("")},Fu=(e,t,i={})=>{if(i.trim!==!1&&e.trim()==="")return"";let r="",u,s,n=gu(e),o=[""];for(let[a,h]of e.split(" ").entries()){i.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let c=pe(o[o.length-1]);if(a!==0&&(c>=t&&(i.wordWrap===!1||i.trim===!1)&&(o.push(""),c=0),(c>0||i.trim===!1)&&(o[o.length-1]+=" ",c++)),i.hard&&n[a]>t){let D=t-c,f=1+Math.floor((n[a]-D-1)/t);Math.floor((n[a]-1)/t)<f&&o.push(""),dt(o,h,t);continue}if(c+n[a]>t&&c>0&&n[a]>0){if(i.wordWrap===!1&&c<t){dt(o,h,t);continue}o.push("")}if(c+n[a]>t&&i.wordWrap===!1){dt(o,h,t);continue}o[o.length-1]+=h}i.trim!==!1&&(o=o.map(a=>Cu(a)));let l=[...o.join(`
22
- `)];for(let[a,h]of l.entries()){if(r+=h,Le.has(h)){let{groups:D}=new RegExp(`(?:\\${yr}(?<code>\\d+)m|\\${Ft}(?<uri>.*)${Ct})`).exec(l.slice(a).join(""))||{groups:{}};if(D.code!==void 0){let f=Number.parseFloat(D.code);u=f===du?void 0:f}else D.uri!==void 0&&(s=D.uri.length===0?void 0:D.uri)}let c=pu.codes.get(Number(u));l[a+1]===`
23
- `?(s&&(r+=mr("")),u&&c&&(r+=dr(c))):h===`
24
- `&&(u&&c&&(r+=dr(u)),s&&(r+=mr(s)))}return r};function gr(e,t,i){return String(e).normalize().replace(/\r\n/g,`
62
+ `:u+=" "+n.join(", ")+(n.length>0?" ":""),u+"]"}function MF(e){e=Dr(e);var t=[];return Object.keys(e).forEach(u=>{t.push(ar(u)+" = "+uD(e[u],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function HF(e,t,u,n){var i=Z(n);if(i==="array")return UF(e,t,u,n);if(i==="table")return WF(e,t,u,n);throw Re(i)}function UF(e,t,u,n){n=Dr(n),iD(n);var i=Z(n[0]);if(i!=="table")throw Re(i);var s=e+ar(u),r="";return n.forEach(o=>{r.length>0&&(r+=`
63
+ `),r+=t+"[["+s+`]]
64
+ `,r+=Yu(s+".",t,o)}),r}function WF(e,t,u,n){var i=e+ar(u),s="";return Xo(n).length>0&&(s+=t+"["+i+`]
65
+ `),s+Yu(i+".",t,n)}});var oD=Y(qu=>{"use strict";qu.parse=Qo();qu.stringify=sD()});var V={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},Br={silent:{level:-1},fatal:{level:V.fatal},error:{level:V.error},warn:{level:V.warn},log:{level:V.log},info:{level:V.info},success:{level:V.success},fail:{level:V.fail},ready:{level:V.info},start:{level:V.info},box:{level:V.info},debug:{level:V.debug},trace:{level:V.trace},verbose:{level:V.verbose}};function br(e){if(e===null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function vr(e,t,u=".",n){if(!br(t))return vr(e,{},u,n);let i=Object.assign({},t);for(let s in e){if(s==="__proto__"||s==="constructor")continue;let r=e[s];r!=null&&(n&&n(i,s,r,u)||(Array.isArray(r)&&Array.isArray(i[s])?i[s]=[...r,...i[s]]:br(r)&&br(i[s])?i[s]=vr(r,i[s],(u?`${u}.`:"")+s.toString(),n):i[s]=r))}return i}function UD(e){return(...t)=>t.reduce((u,n)=>vr(u,n,"",e),{})}var WD=UD();function VD(e){return Object.prototype.toString.call(e)==="[object Object]"}function GD(e){return!(!VD(e)||!e.message&&!e.args||e.stack)}var wr=!1,hn=[],U=class e{options;_lastLog;_mockFn;constructor(t={}){let u=t.types||Br;this.options=WD({...t,defaults:{...t.defaults},level:xr(t.level,u),reporters:[...t.reporters||[]]},{types:Br,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let n in u){let i={type:n,...this.options.defaults,...u[n]};this[n]=this._wrapLogFn(i),this[n].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=xr(t,this.options.types,this.options.level)}prompt(t,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,u)}create(t){let u=new e({...this.options,...t});return this._mockFn&&u.mockTypes(this._mockFn),u}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){let u=this.options.reporters.indexOf(t);if(u!==-1)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(let t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,u){t&&(t.__write||(t.__write=t.write),t.write=n=>{this[u].raw(String(n).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){wr=!0}resumeLogs(){wr=!1;let t=hn.splice(0);for(let u of t)u[0]._logFn(u[1],u[2])}mockTypes(t){let u=t||this.options.mockFn;if(this._mockFn=u,typeof u=="function")for(let n in this.options.types)this[n]=u(n,this.options.types[n])||this[n],this[n].raw=this[n]}_wrapLogFn(t,u){return(...n)=>{if(wr){hn.push([this,t,n,u]);return}return this._logFn(t,n,u)}}_logFn(t,u,n){if((t.level||0)>this.level)return!1;let i={date:new Date,args:[],...t,level:xr(t.level,this.options.types)};!n&&u.length===1&&GD(u[0])?Object.assign(i,u[0]):i.args=[...u],i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split(`
66
+ `)),i.args.push(`
67
+ `+i.additional.join(`
68
+ `)),delete i.additional),i.type=typeof i.type=="string"?i.type.toLowerCase():"log",i.tag=typeof i.tag=="string"?i.tag:"";let s=(o=!1)=>{let D=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&D>0){let l=[...this._lastLog.object.args];D>1&&l.push(`(repeated ${D} times)`),this._log({...this._lastLog.object,args:l}),this._lastLog.count=1}o&&(this._lastLog.object=i,this._log(i))};clearTimeout(this._lastLog.timeout);let r=this._lastLog.time&&i.date?i.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=i.date,r<this.options.throttle)try{let o=JSON.stringify([i.type,i.tag,i.args]),D=this._lastLog.serialized===o;if(this._lastLog.serialized=o,D&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}catch{}s(!0)}_log(t){for(let u of this.options.reporters)u.log(t,{options:this.options})}};function xr(e,t={},u=3){return e===void 0?u:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:u}U.prototype.add=U.prototype.addReporter;U.prototype.remove=U.prototype.removeReporter;U.prototype.clear=U.prototype.removeReporter;U.prototype.withScope=U.prototype.withTag;U.prototype.mock=U.prototype.mockTypes;U.prototype.pause=U.prototype.pauseLogs;U.prototype.resume=U.prototype.resumeLogs;function fn(e={}){return new U(e)}import{formatWithOptions as pn}from"node:util";import{sep as YD}from"node:path";function Tr(e,t){let u=process.cwd()+YD;return e.split(`
69
+ `).splice(t.split(`
70
+ `).length).map(i=>i.trim().replace("file://","").replace(u,""))}function zD(e,t){return(t.__write||t.write).call(t,e)}var _r=e=>e?`[${e}]`:"",Ke=class{formatStack(t,u,n){let i=" ".repeat((n?.errorLevel||0)+1);return i+Tr(t,u).join(`
71
+ ${i}`)}formatError(t,u){let n=t.message??pn(u,t),i=t.stack?this.formatStack(t.stack,n,u):"",s=u?.errorLevel||0,r=s>0?`${" ".repeat(s)}[cause]: `:"",o=t.cause?`
72
+
73
+ `+this.formatError(t.cause,{...u,errorLevel:s+1}):"";return r+n+`
74
+ `+i+o}formatArgs(t,u){let n=t.map(i=>i&&typeof i.stack=="string"?this.formatError(i,u):i);return pn(u,...n)}formatDate(t,u){return u.date?t.toLocaleTimeString():""}filterAndJoin(t){return t.filter(Boolean).join(" ")}formatLogObj(t,u){let n=this.formatArgs(t.args,u);return t.type==="box"?`
75
+ `+[_r(t.tag),t.title&&t.title,...n.split(`
76
+ `)].filter(Boolean).map(i=>" > "+i).join(`
77
+ `)+`
78
+ `:this.filterAndJoin([_r(t.type),_r(t.tag),n])}log(t,u){let n=this.formatLogObj(t,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return zD(n+`
79
+ `,t.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}};import Vn from"node:process";import*as Ct from"node:tty";var{env:me={},argv:mn=[],platform:KD=""}=typeof process>"u"?{}:process,qD="NO_COLOR"in me||mn.includes("--no-color"),JD="FORCE_COLOR"in me||mn.includes("--color"),ZD=KD==="win32",gn=me.TERM==="dumb",QD=Ct&&Ct.isatty&&Ct.isatty(1)&&me.TERM&&!gn,XD="CI"in me&&("GITHUB_ACTIONS"in me||"GITLAB_CI"in me||"CIRCLECI"in me),ea=!qD&&(JD||ZD&&!gn||QD||XD);function Cn(e,t,u,n,i=t.slice(0,Math.max(0,e))+n,s=t.slice(Math.max(0,e+u.length)),r=s.indexOf(u)){return i+(r<0?s:Cn(r,s,u,n))}function ta(e,t,u,n,i){return e<0?u+t+n:u+Cn(e,t,n,i)+n}function ra(e,t,u=e,n=e.length+1){return i=>i||!(i===""||i===void 0)?ta((""+i).indexOf(t,n),i,e,t,u):""}function y(e,t,u){return ra(`\x1B[${e}m`,`\x1B[${t}m`,u)}var Fn={reset:y(0,0),bold:y(1,22,"\x1B[22m\x1B[1m"),dim:y(2,22,"\x1B[22m\x1B[2m"),italic:y(3,23),underline:y(4,24),inverse:y(7,27),hidden:y(8,28),strikethrough:y(9,29),black:y(30,39),red:y(31,39),green:y(32,39),yellow:y(33,39),blue:y(34,39),magenta:y(35,39),cyan:y(36,39),white:y(37,39),gray:y(90,39),bgBlack:y(40,49),bgRed:y(41,49),bgGreen:y(42,49),bgYellow:y(43,49),bgBlue:y(44,49),bgMagenta:y(45,49),bgCyan:y(46,49),bgWhite:y(47,49),blackBright:y(90,39),redBright:y(91,39),greenBright:y(92,39),yellowBright:y(93,39),blueBright:y(94,39),magentaBright:y(95,39),cyanBright:y(96,39),whiteBright:y(97,39),bgBlackBright:y(100,49),bgRedBright:y(101,49),bgGreenBright:y(102,49),bgYellowBright:y(103,49),bgBlueBright:y(104,49),bgMagentaBright:y(105,49),bgCyanBright:y(106,49),bgWhiteBright:y(107,49)};function ua(e=ea){return e?Fn:Object.fromEntries(Object.keys(Fn).map(t=>[t,String]))}var K=ua();function na(e,t="reset"){return K[e]||K[t]}var ia=[String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`,String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");function de(e){return e.replace(new RegExp(ia,"g"),"")}var dn={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},sa={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1};function En(e,t={}){let u={...t,style:{...sa,...t.style}},n=e.split(`
80
+ `),i=[],s=na(u.style.borderColor),r={...typeof u.style.borderStyle=="string"?dn[u.style.borderStyle]||dn.solid:u.style.borderStyle};if(s)for(let f in r)r[f]=s(r[f]);let o=u.style.padding%2===0?u.style.padding:u.style.padding+1,D=n.length+o,l=Math.max(...n.map(f=>de(f).length),u.title?de(u.title).length:0)+o,c=l+o,a=u.style.marginLeft>0?" ".repeat(u.style.marginLeft):"";if(u.style.marginTop>0&&i.push("".repeat(u.style.marginTop)),u.title){let f=s?s(u.title):u.title,p=r.h.repeat(Math.floor((l-de(u.title).length)/2)),E=r.h.repeat(l-de(u.title).length-de(p).length+o);i.push(`${a}${r.tl}${p}${f}${E}${r.tr}`)}else i.push(`${a}${r.tl}${r.h.repeat(c)}${r.tr}`);let h=u.style.valign==="center"?Math.floor((D-n.length)/2):u.style.valign==="top"?D-n.length-o:D-n.length;for(let f=0;f<D;f++)if(f<h||f>=h+n.length)i.push(`${a}${r.v}${" ".repeat(c)}${r.v}`);else{let p=n[f-h],E=" ".repeat(o),C=" ".repeat(l-de(p).length);i.push(`${a}${r.v}${E}${p}${C}${r.v}`)}return i.push(`${a}${r.bl}${r.h.repeat(c)}${r.br}`),u.style.marginBottom>0&&i.push("".repeat(u.style.marginBottom)),i.join(`
81
+ `)}var Bt=Object.create(null),Je=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Bt:globalThis),ge=new Proxy(Bt,{get(e,t){return Je()[t]??Bt[t]},has(e,t){let u=Je();return t in u||t in Bt},set(e,t,u){let n=Je(!0);return n[t]=u,!0},deleteProperty(e,t){if(!t)return!1;let u=Je(!0);return delete u[t],!0},ownKeys(){let e=Je(!0);return Object.keys(e)}}),Ja=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",Za=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function Qa(){if(globalThis.process?.env)for(let e of Za){let t=e[1]||e[0];if(globalThis.process?.env[t])return{name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var Kn=Qa();Kn.name;function we(e){return e?e!=="false":!1}var Xa=globalThis.process?.platform||"",Ur=we(ge.CI)||Kn.ci!==!1,qn=we(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),el=we(ge.DEBUG),Wr=Ja==="test"||we(ge.TEST);we(ge.MINIMAL);var tl=/^win/i.test(Xa);!we(ge.NO_COLOR)&&(we(ge.FORCE_COLOR)||(qn||tl)&&ge.TERM);var rl=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(rl?.split(".")[0]);var ul=globalThis.process||Object.create(null),Gn={versions:{}};new Proxy(ul,{get(e,t){if(t==="env")return ge;if(t in e)return e[t];if(t in Gn)return Gn[t]}});var nl=globalThis.process?.release?.name==="node",il=!!globalThis.Bun||!!globalThis.process?.versions?.bun,sl=!!globalThis.Deno,ol=!!globalThis.fastly,Dl=!!globalThis.Netlify,al=!!globalThis.EdgeRuntime,ll=globalThis.navigator?.userAgent==="Cloudflare-Workers",cl=[[Dl,"netlify"],[al,"edge-light"],[ll,"workerd"],[ol,"fastly"],[sl,"deno"],[il,"bun"],[nl,"node"]];function hl(){let e=cl.find(t=>t[0]);if(e)return{name:e[1]}}var fl=hl();fl?.name;function pl({onlyFirst:e=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(u,e?void 0:"g")}var Fl=pl();function dl(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Fl,"")}function ml(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function gl(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Cl(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function El(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Al(e,{ambiguousAsWide:t=!1}={}){return El(e),gl(e)||Cl(e)||t&&ml(e)?2:1}var yl=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,bl=globalThis.Intl?.Segmenter?new Intl.Segmenter:{segment:e=>e.split("")},wl=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function xl(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:u=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=dl(e)),e.length===0)return 0;let i=0,s={ambiguousAsWide:!u};for(let{segment:r}of bl.segment(e)){let o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159)&&!(o>=8203&&o<=8207||o===65279)&&!(o>=768&&o<=879||o>=6832&&o<=6911||o>=7616&&o<=7679||o>=8400&&o<=8447||o>=65056&&o<=65071)&&!(o>=55296&&o<=57343)&&!(o>=65024&&o<=65039)&&!wl.test(r)){if(yl().test(r)){i+=2;continue}i+=Al(o,s)}}return i}function Bl(){let{env:e}=Vn,{TERM:t,TERM_PROGRAM:u}=e;return Vn.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||u==="Terminus-Sublime"||u==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var vl={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},_l={0:"red",1:"yellow"},Tl=Bl(),oe=(e,t)=>Tl?e:t,Yn={error:oe("\u2716","\xD7"),fatal:oe("\u2716","\xD7"),ready:oe("\u2714","\u221A"),warn:oe("\u26A0","\u203C"),info:oe("\u2139","i"),success:oe("\u2714","\u221A"),debug:oe("\u2699","D"),trace:oe("\u2192","\u2192"),fail:oe("\u2716","\xD7"),start:oe("\u25D0","o"),log:""};function zn(e){return!(typeof Intl=="object")||!Intl.Segmenter?de(e).length:xl(e)}var Hr=class extends Ke{formatStack(t,u,n){let i=" ".repeat((n?.errorLevel||0)+1);return`
82
+ ${i}`+Tr(t,u).map(s=>" "+s.replace(/^at +/,r=>K.gray(r)).replace(/\((.+)\)/,(r,o)=>`(${K.cyan(o)})`)).join(`
83
+ ${i}`)}formatType(t,u,n){let i=vl[t.type]||_l[t.level]||"gray";if(u)return $l(i)(K.black(` ${t.type.toUpperCase()} `));let s=typeof Yn[t.type]=="string"?Yn[t.type]:t.icon||t.type;return s?Sl(i)(s):""}formatLogObj(t,u){let[n,...i]=this.formatArgs(t.args,u).split(`
84
+ `);if(t.type==="box")return En(xt(n+(i.length>0?`
85
+ `+i.join(`
86
+ `):"")),{title:t.title?xt(t.title):void 0,style:t.style});let s=this.formatDate(t.date,u),r=s&&K.gray(s),o=t.badge??t.level<2,D=this.formatType(t,o,u),l=t.tag?K.gray(t.tag):"",c,a=this.filterAndJoin([D,xt(n)]),h=this.filterAndJoin(u.columns?[l,r]:[l]),f=(u.columns||0)-zn(a)-zn(h)-2;if(c=f>0&&(u.columns||0)>=80?a+" ".repeat(f)+h:(h?`${K.gray(`[${h}]`)} `:"")+a,c+=xt(i.length>0?`
87
+ `+i.join(`
88
+ `):""),t.type==="trace"){let p=new Error("Trace: "+t.message);c+=this.formatStack(p.stack||"",p.message)}return o?`
89
+ `+c+`
90
+ `:c}};function xt(e){return e.replace(/`([^`]+)`/gm,(t,u)=>K.cyan(u)).replace(/\s+_([^_]+)_\s+/gm,(t,u)=>` ${K.underline(u)} `)}function Sl(e="white"){return K[e]||K.white}function $l(e="bgWhite"){return K[`bg${e[0].toUpperCase()}${e.slice(1)}`]||K.bgWhite}function kl(e={}){let t=Ol();return process.env.CONSOLA_LEVEL&&(t=Number.parseInt(process.env.CONSOLA_LEVEL)??t),fn({level:t,defaults:{level:t},stdout:process.stdout,stderr:process.stderr,prompt:(...n)=>Promise.resolve().then(()=>(Wn(),Un)).then(i=>i.prompt(...n)),reporters:e.reporters||[e.fancy??!(Ur||Wr)?new Hr:new Ke],...e})}function Ol(){return el?V.debug:Wr?V.warn:V.info}var k=kl();var Rl="https://shaders.com";function fe(){return(process.env.SHADERS_API_URL||Rl).replace(/\/+$/,"")}var Ce=class extends Error{constructor(u,n){super(n);this.status=u;this.name="ApiError"}status};async function pe(e,t={}){let u=new URL(e,fe()+"/");for(let[o,D]of Object.entries(t.query??{}))u.searchParams.set(o,D);let n={Accept:"application/json"};t.token&&(n.Authorization=`Bearer ${t.token}`),t.body!==void 0&&(n["Content-Type"]="application/json");let i;try{i=await fetch(u,{method:t.method??"GET",headers:n,body:t.body===void 0?void 0:JSON.stringify(t.body)})}catch(o){throw new Ce(0,`Could not reach ${u.host} (${o instanceof Error?o.message:String(o)})`)}let s=await i.text(),r=null;if(s)try{r=JSON.parse(s)}catch{r=null}if(!i.ok){let o=r&&typeof r=="object"&&typeof r.message=="string"?r.message:`${i.status} ${i.statusText}`;throw new Ce(i.status,o)}return r}import{spawn as Il}from"node:child_process";import{chmod as Ll,mkdir as Nl,readFile as Pl,rm as jl,writeFile as Ml}from"node:fs/promises";import{homedir as Hl}from"node:os";import Zn from"node:path";var Ul=2e3,Wl=10*6e4,Vl=6e4;function Qn(){return process.env.SHADERS_HOME||Zn.join(Hl(),".shaders")}function vt(){return Zn.join(Qn(),"credentials.json")}async function Xn(){try{let e=JSON.parse(await Pl(vt(),"utf8"));return typeof e.accessToken!="string"||e.host!==fe()?null:e}catch{return null}}async function ei(e){await Nl(Qn(),{recursive:!0,mode:448}),await Ml(vt(),JSON.stringify(e,null,2)+`
91
+ `,{mode:384}),await Ll(vt(),384).catch(()=>{})}async function ti(){let e=await Xn();return await jl(vt(),{force:!0}),e!==null}function ri(e){return{host:fe(),accessToken:e.access_token,refreshToken:e.refresh_token,expiresAt:e.expires_in?Date.now()+e.expires_in*1e3:void 0}}function Gl(e){let[t,u]=process.platform==="darwin"?["open",[e]]:process.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];try{let n=Il(t,u,{stdio:"ignore",detached:!0});n.on("error",()=>{}),n.unref()}catch{}}var Yl=e=>new Promise(t=>setTimeout(t,e));async function zl(){let{url:e,readKey:t}=await pe("/api/plugin-auth/authorize",{method:"POST"});k.info(`Opening your browser to sign in to Shaders\u2026
92
+ If it doesn't open, visit:
93
+ ${e}`),Gl(e),k.start("Waiting for you to finish signing in");let u=Date.now()+Wl;for(;Date.now()<u;){await Yl(Ul);let n;try{n=await pe("/api/plugin-auth/poll",{method:"POST",query:{readKey:t}})}catch(i){if(i instanceof Ce&&(i.status===404||i.status===410))throw new Error("The sign-in session expired. Run the command again to start over.");continue}if(n&&typeof n.access_token=="string"){let i=ri(n);return await ei(i),i}}throw new Error("Timed out waiting for sign-in. Run the command again to start over.")}async function Jn(e){if(!e.refreshToken)return null;try{let t=await pe("/api/plugin-auth/refresh",{method:"POST",body:{refresh_token:e.refreshToken}}),u=ri({...t,refresh_token:t.refresh_token??e.refreshToken});return await ei(u),u}catch{return null}}async function Vr(e){return pe("/api/plugin/me",{token:e.accessToken})}async function _t(){let e=await Xn();if(e&&(e.expiresAt&&e.expiresAt-Vl<Date.now()&&(e=await Jn(e)),e))try{return{credentials:e,me:await Vr(e)}}catch(u){if(!(u instanceof Ce)||u.status!==401)throw u;let n=await Jn(e);if(n)try{return{credentials:n,me:await Vr(n)}}catch(i){if(!(i instanceof Ce)||i.status!==401)throw i}}let t=await zl();return{credentials:t,me:await Vr(t)}}function De(e){console.error(`\u2717 ${e}`),process.exit(1)}import Mt from"node:path";import{createRequire as vc}from"node:module";import{existsSync as Ze}from"node:fs";import{readFile as zr}from"node:fs/promises";var Kl=/^[A-Za-z]:\//;function ui(e=""){return e&&e.replace(/\\/g,"/").replace(Kl,t=>t.toUpperCase())}var ql=/^[/\\]{2}/,Jl=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Zl=/^[A-Za-z]:$/;var Be=function(e){if(e.length===0)return".";e=ui(e);let t=e.match(ql),u=xe(e),n=e[e.length-1]==="/";return e=Gr(e,!u),e.length===0?u?"/":n?"./":".":(n&&(e+="/"),Zl.test(e)&&(e+="/"),t?u?`//${e}`:`//./${e}`:u&&!xe(e)?`/${e}`:e)},ve=function(...e){let t="";for(let u of e)if(u)if(t.length>0){let n=t[t.length-1]==="/",i=u[0]==="/";n&&i?t+=u.slice(1):t+=n||i?u:`/${u}`}else t+=u;return Be(t)};function Ql(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var _e=function(...e){e=e.map(n=>ui(n));let t="",u=!1;for(let n=e.length-1;n>=-1&&!u;n--){let i=n>=0?e[n]:Ql();!i||i.length===0||(t=`${i}/${t}`,u=xe(i))}return t=Gr(t,!u),u&&!xe(t)?`/${t}`:t.length>0?t:"."};function Gr(e,t){let u="",n=0,i=-1,s=0,r=null;for(let o=0;o<=e.length;++o){if(o<e.length)r=e[o];else{if(r==="/")break;r="/"}if(r==="/"){if(!(i===o-1||s===1))if(s===2){if(u.length<2||n!==2||u[u.length-1]!=="."||u[u.length-2]!=="."){if(u.length>2){let D=u.lastIndexOf("/");D===-1?(u="",n=0):(u=u.slice(0,D),n=u.length-1-u.lastIndexOf("/")),i=o,s=0;continue}else if(u.length>0){u="",n=0,i=o,s=0;continue}}t&&(u+=u.length>0?"/..":"..",n=2)}else u.length>0?u+=`/${e.slice(i+1,o)}`:u=e.slice(i+1,o),n=o-i-1;i=o,s=0}else r==="."&&s!==-1?++s:s=-1}return u}var xe=function(e){return Jl.test(e)};import{spawn as ec,spawnSync as x2}from"node:child_process";import{cwd as ai}from"node:process";import{basename as tc,delimiter as Tt,dirname as ni,normalize as rc,resolve as li}from"node:path";import{fileURLToPath as uc}from"node:url";import{pipeline as nc}from"node:stream/promises";import{PassThrough as ic}from"node:stream";import sc from"node:readline";import{closeSync as oc,openSync as Dc,readSync as ac,statSync as lc}from"node:fs";var cc=/^path$/i,ii={key:"PATH",value:""};function ci(e){for(let t in e){if(!Object.prototype.hasOwnProperty.call(e,t)||!cc.test(t))continue;let u=e[t];return u?{key:t,value:u}:ii}return ii}function hc(e,t){let u=t.value.split(Tt),n=[],i=typeof e=="string"?e:uc(e,{windows:!1}),s;do n.push(li(i,"node_modules",".bin")),s=i,i=ni(i);while(i!==s);n.push(ni(process.execPath));let r=n.concat(u).join(Tt);return{key:t.key,value:r}}function fc(e,t,u=!0){let n={...process.env,...t};if(!u)return n;let i=hc(e,ci(n));return n[i.key]=i.value,n}var pc=e=>{let t=e.length,u=new ic,n=()=>{--t===0&&u.end()};for(let i of e)nc(i,u,{end:!1}).then(n).catch(n);return u},Yr=/([()\][%!^"`<>&|;, *?])/g,Fc=/^#!\s*(.+)/,dc=/\.(?:com|exe)$/i,mc=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,gc=process.platform==="win32",Cc=[".EXE",".CMD",".BAT",".COM"],Ec=[""];function Ac(e,t=[],u={}){if(u.shell===!0||!gc)return{command:e,args:t,options:u};let n=si(e,u),i=null;if(n!==null){let r=Buffer.alloc(150),o=null;try{o=Dc(n,"r"),ac(o,r,0,150,0)}catch{}finally{o!==null&&oc(o)}let D=r.toString().match(Fc);if(D!==null){let l=D[1].trim(),c=l.indexOf(" "),a=c!==-1?l.slice(0,c):l,h=c!==-1?l.slice(c+1):"",f=tc(a);i=f==="env"?h||null:f}}if(i!==null&&n!==null&&(t=[n,...t],e=i,n=si(e,u)),n===null||!dc.test(n)){let s=n!==null&&mc.test(n);e=rc(e),e=e.replace(Yr,"^$1"),t=t.map(r=>(r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(Yr,"^$1"),s&&(r=r.replace(Yr,"^$1")),r)),t=["/d","/s","/c",`"${[e,...t].join(" ")}"`],e=u.env?.comspec??"cmd.exe",u={...u,windowsVerbatimArguments:!0}}return{command:e,args:t,options:u}}function si(e,t){let u=(t.cwd??ai()).toString(),n=t.env??process.env,i=ci(n).value,s=e.includes("/")||e.includes("\\")?[""]:[u,...i.split(Tt)],r=n.PATHEXT?n.PATHEXT.split(Tt):Cc;e.includes(".")&&r[0]!==""&&(r=["",...r]);for(let o of[r,Ec])for(let D of s){let l=D.startsWith('"')&&D.endsWith('"')&&D.length>1?D.slice(1,-1):D,c=li(u,l,e);for(let a of o){let h=c+a;try{if(lc(h).isFile())return h}catch{}}}return null}var oi=class extends Error{result;output;exitCode;get signalCode(){return this.result.signalCode}constructor(e,t,u,n){let i="The process";u&&(i=`The command \`${n?.length?`${u} ${n.map(r=>/[ "'`()]/.test(r)?JSON.stringify(r):r).join(" ")}`:u}\``);let s=e.exitCode??1;super(e.signalCode!==null?`${i} was killed by the signal ${e.signalCode}`:`${i} exited with a non-zero status (${s})`),this.result=e,this.output=t,this.exitCode=s,Object.defineProperty(this,"result",{enumerable:!1,writable:!1,configurable:!1})}};var yc={timeout:void 0,persist:!1};var bc={windowsHide:!0};function wc(e){let t=new AbortController;for(let u of e){if(u.aborted)return t.abort(),u;let n=()=>{t.abort(u.reason)};u.addEventListener("abort",n,{signal:t.signal})}return t.signal}async function Di(e){let t="";try{for await(let u of e)t+=u.toString()}catch{}return t}var xc=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}get signalCode(){return this._process?.signalCode??null}constructor(e,t,u){this._options={...yc,...u},this._command=e,this._args=t??[],this._processClosed=new Promise(n=>{this._resolveClose=n})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,u){return Bc(e,t,{...u,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let u=pc(t),n=sc.createInterface({input:u});for await(let i of n)yield i.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new oi(this,void 0,this._command,this._args)}async _waitForOutput(){let e=this._process;if(!e)throw new Error("No process was started");let[t,u]=await Promise.all([this._streamOut?Di(this._streamOut):"",this._streamErr?Di(this._streamErr):""]);await this._processClosed;let{stdin:n}=this._options;if(n&&typeof n!="string"&&await n,e.removeAllListeners(),this._thrownError)throw this._thrownError;let i={stderr:u,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&(this.exitCode!==0&&this.exitCode!==void 0||this.signalCode!==null))throw new oi(this,i,this._command,this._args);return i}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=this._options,t={...bc,...e.nodeOptions},u=t?.cwd??ai(),n=[];this._resetState(),e.timeout!==void 0&&n.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&n.push(e.signal),e.persist===!0&&(t.detached=!0),n.length>0&&(t.signal=wc(n)),t.env=fc(u,t.env,e.nodePath);let i=Ac(this._command,this._args,t),s=ec(i.command,i.args,i.options);if(s.stderr&&(this._streamErr=s.stderr),s.stdout&&(this._streamOut=s.stdout),this._process=s,s.once("error",this._onError),s.once("close",this._onClose),s.stdin){let{stdin:r}=e;typeof r=="string"?s.stdin.end(r):r?.process?.stdout?.pipe(s.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};var St=(e,t,u)=>{let n=new xc(e,t,u);return n.spawn(),n},Bc=St;import{join as Kr}from"node:path";async function qr(e,t,u={}){let n=Be(e).split("/");for(;n.length>0;){let i=await t(n.join("/")||"/");if(i||!u.includeParentDirs)return i;n.pop()}}async function fi(e,t={}){return qr(e,u=>{let n=Kr(u,"package.json");if(Ze(n))return zr(n,"utf8").then(i=>JSON.parse(i))},t)}async function _c(e,t){let u=await qr(t,n=>{let i=Kr(n,"node_modules",e,"package.json");if(Ze(i))return i},{includeParentDirs:!0});if(!u)return null;try{return JSON.parse(await zr(u,"utf8"))}catch{return null}}async function Tc(e,t){let u;try{u=e.resolve(t)}catch{return null}return fi(u,{includeParentDirs:!0})}function Sc(e){let t;return()=>(t===void 0&&(t=e().then(u=>(t=u,t))),t)}var $c=Sc(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:e}=await St("corepack",["--version"]);return e===0}catch{return!1}});async function kc(e,t,u={}){let n=e!=="npm"&&e!=="bun"&&e!=="deno"&&e!=="aube"&&e!=="nub"&&u.corepack!==!1&&await $c()?["corepack",[e,...t]]:[e,t],i=process.stdin.isTTY?"inherit":"ignore",s=u.silent?[i,"pipe","pipe"]:[i,"inherit","inherit"],{exitCode:r,stdout:o,stderr:D}=await St(n[0],n[1],{nodeOptions:{cwd:_e(u.cwd||process.cwd()),env:u.env,stdio:s}});if(r!==0)throw new Error(`\`${n.flat().join(" ")}\` failed.${u.silent?["",o,D].join(`
94
+ `):""}`)}var Oc="No package manager auto-detected.";async function Rc(e={}){let t=e.cwd||process.cwd(),u={...process.env,...e.env},n=(typeof e.packageManager=="string"?Ee.find(i=>i.name===e.packageManager):e.packageManager)||await Jr(e.cwd||process.cwd());if(!n)throw new Error(Oc);return{cwd:t,env:u,silent:e.silent??!1,packageManager:n,dev:e.dev??!1,workspace:e.workspace,global:e.global??!1,dry:e.dry??!1,corepack:e.corepack??!0}}function hi(e){if(!e.workspace)return[];let t=typeof e.workspace=="string"&&e.workspace!==""?e.workspace:void 0;return e.packageManager.name==="pnpm"||e.packageManager.name==="aube"||e.packageManager.name==="nub"?t?["--filter",t]:["--workspace-root"]:e.packageManager.name==="npm"?t?["-w",t]:["--workspaces"]:e.packageManager.name==="yarn"?!e.packageManager.majorVersion||e.packageManager.majorVersion==="1"?t?["--cwd",t]:["-W"]:t?["workspace",t]:[]:[]}var pi=/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;function Ic(e){let[t,u]=(e||"").split("@"),[n,i]=u?.split("+")||[];if(t&&t!=="-"&&pi.test(t))return{name:t,version:n,buildMeta:i};let s=(t||"").replace(/\W+/g,"");return{name:s,version:n,buildMeta:i,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${t}\` to \`${s}\``]}}function Lc(e){let t=e?.packageManager,u=Array.isArray(t)?t[0]:t,n=typeof u?.name=="string"?u.name:void 0,i=typeof u?.version=="string"?u.version:void 0;if(!n)return{};if(!pi.test(n)){let s=n.replace(/\W+/g,"");return{name:s,version:i,warnings:[`Abnormal characters found in \`devEngines.packageManager\` field, sanitizing from \`${n}\` to \`${s}\``]}}return{name:n,version:i}}var Ee=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"aube",command:"aube",lockFile:"aube-lock.yaml"},{name:"nub",command:"nub",lockFile:"nub.lock"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function Jr(e,t={}){let u=await qr(_e(e||"."),async n=>{if(!t.ignorePackageJSON){let i=ve(n,"package.json");if(Ze(i)){let r=JSON.parse(await zr(i,"utf8"));if(r?.packageManager){let{name:D,version:l="0.0.0",buildMeta:c,warnings:a}=Ic(r.packageManager);if(D){let h=l.split(".")[0],f=Ee.find(p=>p.name===D&&p.majorVersion===h)||Ee.find(p=>p.name===D);return{name:D,command:D,version:l,majorVersion:h,buildMeta:c,warnings:a,files:f?.files,lockFile:f?.lockFile}}}let o=Lc(r?.devEngines);if(o.name){let{name:D,version:l,warnings:c}=o,a=l?.match(/\d+/)?.[0],h=Ee.find(f=>f.name===D&&f.majorVersion===a)||Ee.find(f=>f.name===D);return{name:D,command:D,version:l,majorVersion:a,warnings:c,files:h?.files,lockFile:h?.lockFile}}}let s=ve(n,"deno.json");if(Ze(s))return Ee.find(r=>r.name==="deno")}if(!t.ignoreLockFile){for(let i of Ee)if([i.lockFile,i.files].flat().filter(Boolean).some(s=>Ze(_e(n,s))))return{...i}}},{includeParentDirs:t.includeParentDirs??!0});if(!u&&!t.ignoreArgv){let n=process.argv[1];if(n){for(let i of Ee)if(new RegExp(`[/\\\\]\\.?${i.command}`).test(n))return i}}return u}async function $t(e,t={}){let u=await Rc(t),n=Array.isArray(e)?e:[e];if(u.packageManager.name==="deno")for(let s=0;s<n.length;s++)/^(npm|jsr|file):.+$/.test(n[s]||"")||(n[s]=`npm:${n[s]}`);if(n.length===0)return{};let i=(u.packageManager.name==="yarn"?[...hi(u),u.global&&u.packageManager.majorVersion==="1"?"global":"","add",u.dev?"-D":"",...n]:[u.packageManager.name==="npm"?"install":"add",...hi(u),u.dev?"-D":"",u.global?"-g":"",...n]).filter(Boolean);if(u.dry||await kc(u.packageManager.command,i,{cwd:u.cwd,silent:u.silent,corepack:u.corepack}),!u.dry&&t.installPeerDependencies){let s=await fi(u.cwd),r=[],o=[],D=vc(Kr(u.cwd,"/_.js"));for(let l of n){let c=l.match(/^(.[^@]+)/)?.[0];if(!c)continue;let a=await Tc(D,c);if(a?.name!==c&&(a=await _c(c,u.cwd)),!!a?.peerDependencies)for(let[h,f]of Object.entries(a.peerDependencies))a.peerDependenciesMeta?.[h]?.optional||s?.dependencies?.[h]||s?.devDependencies?.[h]||(a.peerDependenciesMeta?.[h]?.dev?o:r).push(`${h}@${f}`)}r.length>0&&await $t(r,{...u}),o.length>0&&await Nc(o,{...u})}return{exec:{command:u.packageManager.command,args:i}}}async function Nc(e,t={}){return await $t(e,{...t,dev:!0})}import{readFile as Fi,writeFile as di}from"node:fs/promises";import mi from"node:path";var Pc=["shaders.config.ts","shaders.config.mts","shaders.config.js","shaders.config.mjs"];async function gi(e){for(let t of Pc){let u=mi.join(e,t);try{return await Fi(u),u}catch{}}return null}function jc(e,t){let u=["import { defineConfig } from 'shaders/config'","","export default defineConfig({",` // Components are imported from 'shaders/${e}'`,` framework: '${e}',`];return t&&u.push(" // shaders.com project this codebase is connected to",` project: '${t}',`),u.push("})",""),u.join(`
95
+ `)}async function Ci(e,t,u,n){let i=mi.join(e,n?"shaders.config.ts":"shaders.config.js");return await di(i,jc(t,u)),i}async function Ei(e,t){let u=await Fi(e,"utf8"),n=/(\bproject\s*:\s*)(['"`])[^'"`]*\2/,i;if(n.test(u))i=u.replace(n,`$1'${t}'`);else{let s=/^([ \t]*)framework\s*:\s*['"`][^'"`]*['"`],?[ \t]*$/m,r=s.exec(u);if(!r)return!1;let o=r[1],D=r[0].trimEnd().endsWith(",")?r[0]:r[0].trimEnd()+",";i=u.replace(s,`${D}
96
+ ${o}// shaders.com project this codebase is connected to
97
+ ${o}project: '${t}',`)}return await di(e,i),!0}import{promises as Vh,statSync as Gh}from"node:fs";Zr();var Ot=Symbol("singleComment"),Ai=Symbol("multiComment"),Vc=()=>"",Gc=(e,t,u)=>e.slice(t,u).replace(/[^ \t\r\n]/g," "),Yc=(e,t)=>{let u=t-1,n=0;for(;e[u]==="\\";)--u,n+=1;return!!(n%2)};function yi(e,{whitespace:t=!0,trailingCommas:u=!1}={}){if(typeof e!="string")throw TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let n=t?Gc:Vc,i=!1,s=!1,r=0,o="",D="",l=-1;for(let a=0;a<e.length;a++){let h=e[a],f=e[a+1];if(!s&&h==='"'&&(Yc(e,a)||(i=!i)),!i)if(!s&&h+f==="//")o+=e.slice(r,a),r=a,s=Ot,a++;else if(s===Ot&&h+f===`\r
98
+ `){a++,s=!1,o+=n(e,r,a),r=a;continue}else if(s===Ot&&h===`
99
+ `)s=!1,o+=n(e,r,a),r=a;else if(!s&&h+f==="/*"){o+=e.slice(r,a),r=a,s=Ai,a++;continue}else if(s===Ai&&h+f==="*/"){a++,s=!1,o+=n(e,r,a+1),r=a+1;continue}else u&&!s&&(l===-1?h===","&&(D+=o+e.slice(r,a),o="",r=a,l=a):h==="}"||h==="]"?(o+=e.slice(r,a),D+=n(o,0,1)+o.slice(1),o="",r=a,l=-1):h!==" "&&h!==" "&&h!=="\r"&&h!==`
100
+ `&&(o+=e.slice(r,a),r=a,l=-1))}let c=s===Ot?n(e,r):e.slice(r);return D+o+c}Zr();function bi(e,t){let u=JSON.parse(Qe(e),t?.reviver);return kt(e,u,t),u}function wi(e,t){let u=JSON.parse(yi(Qe(e),{trailingCommas:t?.allowTrailingComma}));return kt(e,u,t),u}import zc,{lstatSync as Kc,realpathSync as Ii,statSync as uu}from"node:fs";import{URL as M,fileURLToPath as B,pathToFileURL as ae}from"node:url";import nu,{isAbsolute as qc}from"node:path";import le from"node:assert";import Te from"node:process";import{format as Li,inspect as ru}from"node:util";var iu=["_http_agent","_http_client","_http_common","_http_incoming","_http_outgoing","_http_server","_stream_duplex","_stream_passthrough","_stream_readable","_stream_transform","_stream_wrap","_stream_writable","_tls_common","_tls_wrap","assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","sys","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"],Jc=/^([A-Z][a-z\d]*)+$/,Zc=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),su=new Map;function Qr(e,t="and"){switch(e.length){case 0:return"";case 1:return`${e[0]}`;case 2:return`${e[0]} ${t} ${e[1]}`;case 3:return`${e[0]}, ${e[1]}, ${t} ${e[2]}`;default:return`${e.slice(0,-1).join(", ")}, ${t} ${e.at(-1)}`}}function Ni(e){let t=0,u=/%[dfijoOs]/g;for(;u.exec(e)!==null;)t++;return t}function ie(e,t,u){return su.set(e,t),Qc(u,e)}var Xr=Symbol("kIsNodeError");function Qc(e,t){let u=su.get(t),n=typeof u=="string"?Ni(u):-1;switch(n){case 0:{class i extends e{code=t;constructor(...r){le.ok(r.length===0,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),super(u)}get["constructor"](){return e}get[Xr](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}case-1:{class i extends e{code=t;constructor(...r){super(),Object.defineProperty(this,"message",{value:Xc(t,r,this),enumerable:!1,writable:!0,configurable:!0})}get["constructor"](){return e}get[Xr](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}default:{class i extends e{code=t;constructor(...r){le.ok(r.length===n,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.unshift(u),super(Reflect.apply(Li,null,r))}get["constructor"](){return e}get[Xr](){return!0}toString(){return`${this.name} [${t}]: ${this.message}`}}return i}}}function Xc(e,t,u){let n=su.get(e);if(le.ok(n!==void 0,"expected `message` to be found"),typeof n=="function")return le.ok(n.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${n.length}).`),Reflect.apply(n,u,t);let i=Ni(n);return le.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?n:(t.unshift(n),Reflect.apply(Li,null,t))}function eh(e){if(e===null)return"null";if(e===void 0)return"undefined";let t=typeof e;switch(t){case"bigint":return`type bigint (${e}n)`;case"number":return e===0?1/e===Number.NEGATIVE_INFINITY?"type number (-0)":"type number (0)":Number.isNaN(e)?"type number (NaN)":e===Number.POSITIVE_INFINITY?"type number (Infinity)":e===Number.NEGATIVE_INFINITY?"type number (-Infinity)":`type number (${e})`;case"boolean":return e?"type boolean (true)":"type boolean (false)";case"symbol":return`type symbol (${String(e)})`;case"function":return`function ${e.name}`;case"object":return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${ru(e,{depth:-1})}`;case"string":{let u=e;return u.length>28&&(u=`${u.slice(0,25)}...`),u.includes("'")?`type string (${JSON.stringify(u)})`:`type string ('${u}')`}default:{let u=ru(e,{colors:!1});return u.length>28&&(u=`${u.slice(0,25)}...`),`type ${t} (${u})`}}}ie("ERR_INVALID_ARG_TYPE",(e,t,u)=>{le.ok(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{let o=e.includes(".")?"property":"argument";n+=`"${e}" ${o} `}n+="must be ";let i=[],s=[],r=[];for(let o of t)le.ok(typeof o=="string","All expected entries have to be of type string"),Zc.has(o)?i.push(o.toLowerCase()):Jc.exec(o)===null?(le.ok(o!=="object",'The value "object" should be written as "Object"'),r.push(o)):s.push(o);if(s.length>0){let o=i.indexOf("object");o!==-1&&(i.splice(o,1),s.push("Object"))}return i.length>0&&(n+=`${i.length>1?"one of type":"of type"} ${Qr(i,"or")}`,(s.length>0||r.length>0)&&(n+=" or ")),s.length>0&&(n+=`an instance of ${Qr(s,"or")}`,r.length>0&&(n+=" or ")),r.length>0&&(r.length>1?n+=`one of ${Qr(r,"or")}`:(r[0]?.toLowerCase()!==r[0]&&(n+="an "),n+=`${r[0]}`)),n+=`. Received ${eh(u)}`,n},TypeError);var Nt=ie("ERR_INVALID_MODULE_SPECIFIER",(e,t,u)=>`Invalid module "${e}" ${t}${u?` imported from ${u}`:""}`,TypeError),ou=ie("ERR_INVALID_PACKAGE_CONFIG",(e,t,u)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${u?`. ${u}`:""}`,Error),th=ie("ERR_INVALID_PACKAGE_TARGET",(e,t,u,n=!1,i)=>{let s=typeof u=="string"&&!n&&u.length>0&&!u.startsWith("./");return t==="."?(le.ok(n===!1),`Invalid "exports" main target ${JSON.stringify(u)} defined in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`):`Invalid "${n?"imports":"exports"}" target ${JSON.stringify(u)} defined for '${t}' in the package config ${e}package.json${i?` imported from ${i}`:""}${s?'; targets must start with "./"':""}`},Error),Du=ie("ERR_MODULE_NOT_FOUND",function(e,t,u=!1){return u&&typeof u=="string"&&(this.url=`${u}`),`Cannot find ${u?"module":"package"} '${e}' imported from ${t}`},Error),rh=ie("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,u)=>`Package import specifier "${e}" is not defined${t?` in package ${t||""}package.json`:""} imported from ${u}`,TypeError),uh=ie("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,u)=>t==="."?`No "exports" main defined in ${e}package.json${u?` imported from ${u}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${u?` imported from ${u}`:""}`,Error),nh=ie("ERR_UNSUPPORTED_DIR_IMPORT",function(e,t,u=void 0){return this.url=u,`Directory import '${e}' is not supported resolving ES modules imported from ${t}`},Error),xi=ie("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),ih=ie("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);ie("ERR_INVALID_ARG_VALUE",(e,t,u="is invalid")=>{let n=ru(t);return n.length>128&&(n=`${n.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${u}. Received ${n}`},TypeError);var Xe={}.hasOwnProperty,Bi=new Map;function Pi(e,{base:t,specifier:u}){let n=Bi.get(e);if(n)return n;let i;try{i=zc.readFileSync(nu.toNamespacedPath(e),"utf8")}catch(r){let o=r;if(o.code!=="ENOENT")throw o}let s={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(i!==void 0){let r;try{r=JSON.parse(i)}catch(o){let D=new ou(e,(t?`"${u}" from `:"")+B(t||u),o.message);throw D.cause=o,D}s.exists=!0,Xe.call(r,"name")&&typeof r.name=="string"&&(s.name=r.name),Xe.call(r,"main")&&typeof r.main=="string"&&(s.main=r.main),Xe.call(r,"exports")&&(s.exports=r.exports),Xe.call(r,"imports")&&(s.imports=r.imports),Xe.call(r,"type")&&(r.type==="commonjs"||r.type==="module")&&(s.type=r.type)}return Bi.set(e,s),s}function Lt(e){let t=new URL("package.json",e);for(;!t.pathname.endsWith("node_modules/package.json");){let u=Pi(B(t),{specifier:e});if(u.exists)return u;let n=t;if(t=new URL("../package.json",t),t.pathname===n.pathname)break}return{pjsonPath:B(t),exists:!1,type:"none"}}var sh={}.hasOwnProperty,oh={__proto__:null,".json":"json",".cjs":"commonjs",".cts":"commonjs",".js":"module",".ts":"module",".mts":"module",".mjs":"module"},vi={__proto__:null,"data:":ah,"file:":hh,"node:":()=>"builtin"};function Dh(e){return e&&/^\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?$/i.test(e)?"module":e==="application/json"?"json":null}function ah(e){let{1:t}=/^([^/]+\/[^;,]+)(?:[^,]*?)(;base64)?,/.exec(e.pathname)||[null,null,null];return Dh(t)}var lh=46,_i=47;function ch(e){let t=e.pathname;for(let u=t.length-1;u>0;u--)switch(t.charCodeAt(u)){case _i:return"";case lh:return t.charCodeAt(u-1)===_i?"":t.slice(u)}return""}function hh(e,t,u){let n=ch(e);if(n===".js"){let{type:s}=Lt(e);return s!=="none"?s:"commonjs"}if(n===""){let{type:s}=Lt(e);return s==="module"?"module":s!=="none"?s:"commonjs"}let i=oh[n];if(i)return i;if(!u)throw new ih(n,B(e))}function fh(e,t){let u=e.protocol;return sh.call(vi,u)&&vi[u](e,t,!0)||null}var Rt=RegExp.prototype[Symbol.replace],ji={}.hasOwnProperty,Ti=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,Si=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,ph=/^\.|%|\\/,It=/\*/g,Fh=/%2f|%5c/i,$i=new Set,dh=/[/\\]{2}/;function ki(e,t,u,n,i,s,r){if(Te.noDeprecation)return;let o=B(n),D=dh.exec(r?e:t)!==null;Te.emitWarning(`Use of deprecated ${D?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${t}" ${t===u?"":`matched to "${u}" `}in the "${i?"imports":"exports"}" field module resolution of the package at ${o}${s?` imported from ${B(s)}`:""}.`,"DeprecationWarning","DEP0166")}function Oi(e,t,u,n){if(Te.noDeprecation||fh(e,{parentURL:u.href})!=="module")return;let i=B(e.href),s=B(new M(".",t)),r=B(u);n?nu.resolve(s,n)!==i&&Te.emitWarning(`Package ${s} has a "main" field set to "${n}", excluding the full filename and extension to the resolved file at "${i.slice(s.length)}", imported from ${r}.
101
+ Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):Te.emitWarning(`No "main" or "exports" field defined in the package.json for ${s} resolving the main entry point "${i.slice(s.length)}", imported from ${r}.
102
+ Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function Mi(e){try{return uu(e)}catch{}}function eu(e){let t=uu(e,{throwIfNoEntry:!1}),u=t?t.isFile():void 0;return u??!1}function mh(e,t,u){let n;if(t.main!==void 0){if(n=new M(t.main,e),eu(n))return n;let r=[`./${t.main}.js`,`./${t.main}.json`,`./${t.main}.node`,`./${t.main}/index.js`,`./${t.main}/index.json`,`./${t.main}/index.node`],o=-1;for(;++o<r.length&&(n=new M(r[o],e),!eu(n));)n=void 0;if(n)return Oi(n,e,u,t.main),n}let i=["./index.js","./index.json","./index.node"],s=-1;for(;++s<i.length&&(n=new M(i[s],e),!eu(n));)n=void 0;if(n)return Oi(n,e,u,t.main),n;throw new Du(B(new M(".",e)),B(u))}function gh(e,t,u){if(Fh.exec(e.pathname)!==null)throw new Nt(e.pathname,String.raw`must not include encoded "/" or "\" characters`,B(t));let n;try{n=B(e)}catch(s){throw Object.defineProperty(s,"input",{value:String(e)}),Object.defineProperty(s,"module",{value:String(t)}),s}let i=Mi(n.endsWith("/")?n.slice(-1):n);if(i&&i.isDirectory()){let s=new nh(n,B(t));throw s.url=String(e),s}if(!i||!i.isFile()){let s=new Du(n||e.pathname,t&&B(t),!0);throw s.url=String(e),s}if(!u){let s=Ii(n),{search:r,hash:o}=e;e=ae(s+(n.endsWith(nu.sep)?"/":"")),e.search=r,e.hash=o}return e}function Ch(e,t,u){return new rh(e,t&&B(new M(".",t)),B(u))}function tu(e,t,u){return new uh(B(new M(".",t)),e,u&&B(u))}function Eh(e,t,u,n,i){throw new Nt(e,`request is not a valid match in pattern "${t}" for the "${n?"imports":"exports"}" resolution of ${B(u)}`,i&&B(i))}function et(e,t,u,n,i){return t=typeof t=="object"&&t!==null?JSON.stringify(t,null,""):`${t}`,new th(B(new M(".",u)),e,t,n,i&&B(i))}function Ah(e,t,u,n,i,s,r,o,D){if(t!==""&&!s&&e.at(-1)!=="/")throw et(u,e,n,r,i);if(!e.startsWith("./")){if(r&&!e.startsWith("../")&&!e.startsWith("/")){let h=!1;try{new M(e),h=!0}catch{}if(!h)return Ui(s?Rt.call(It,e,()=>t):e+t,n,D)}throw et(u,e,n,r,i)}if(Ti.exec(e.slice(2))!==null)if(Si.exec(e.slice(2))===null){if(!o){let h=s?u.replace("*",()=>t):u+t;ki(s?Rt.call(It,e,()=>t):e,h,u,n,r,i,!0)}}else throw et(u,e,n,r,i);let l=new M(e,n),c=l.pathname,a=new M(".",n).pathname;if(!c.startsWith(a))throw et(u,e,n,r,i);if(t==="")return l;if(Ti.exec(t)!==null){let h=s?u.replace("*",()=>t):u+t;Si.exec(t)===null?o||ki(s?Rt.call(It,e,()=>t):e,h,u,n,r,i,!1):Eh(h,u,n,r,i)}return s?new M(Rt.call(It,l.href,()=>t)):new M(t,l)}function yh(e){let t=Number(e);return`${t}`!==e?!1:t>=0&&t<4294967295}function Ne(e,t,u,n,i,s,r,o,D){if(typeof t=="string")return Ah(t,u,n,e,i,s,r,o,D);if(Array.isArray(t)){let l=t;if(l.length===0)return null;let c,a=-1;for(;++a<l.length;){let h=l[a],f;try{f=Ne(e,h,u,n,i,s,r,o,D)}catch(p){let E=p;if(c=E,E.code==="ERR_INVALID_PACKAGE_TARGET")continue;throw p}if(f!==void 0){if(f===null){c=null;continue}return f}}if(c==null)return c;throw c}if(typeof t=="object"&&t!==null){let l=Object.getOwnPropertyNames(t),c=-1;for(;++c<l.length;){let a=l[c];if(yh(a))throw new ou(B(e),B(i),'"exports" cannot contain numeric property keys.')}for(c=-1;++c<l.length;){let a=l[c];if(a==="default"||D&&D.has(a)){let h=t[a],f=Ne(e,h,u,n,i,s,r,o,D);if(f===void 0)continue;return f}}return}if(t===null)return null;throw et(n,t,e,r,i)}function bh(e,t,u){if(typeof e=="string"||Array.isArray(e))return!0;if(typeof e!="object"||e===null)return!1;let n=Object.getOwnPropertyNames(e),i=!1,s=0,r=-1;for(;++r<n.length;){let o=n[r],D=o===""||o[0]!==".";if(s++===0)i=D;else if(i!==D)throw new ou(B(t),B(u),`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`)}return i}function wh(e,t,u){if(Te.noDeprecation)return;let n=B(t);$i.has(n+"|"+e)||($i.add(n+"|"+e),Te.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${n}${u?` imported from ${B(u)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}function Ri(e,t,u,n,i){let s=u.exports;if(bh(s,e,n)&&(s={".":s}),ji.call(s,t)&&!t.includes("*")&&!t.endsWith("/")){let c=s[t],a=Ne(e,c,"",t,n,!1,!1,!1,i);if(a==null)throw tu(t,e,n);return a}let r="",o="",D=Object.getOwnPropertyNames(s),l=-1;for(;++l<D.length;){let c=D[l],a=c.indexOf("*");if(a!==-1&&t.startsWith(c.slice(0,a))){t.endsWith("/")&&wh(t,e,n);let h=c.slice(a+1);t.length>=c.length&&t.endsWith(h)&&Hi(r,c)===1&&c.lastIndexOf("*")===a&&(r=c,o=t.slice(a,t.length-h.length))}}if(r){let c=s[r],a=Ne(e,c,o,r,n,!0,!1,t.endsWith("/"),i);if(a==null)throw tu(t,e,n);return a}throw tu(t,e,n)}function Hi(e,t){let u=e.indexOf("*"),n=t.indexOf("*"),i=u===-1?e.length:u+1,s=n===-1?t.length:n+1;return i>s?-1:s>i||u===-1?1:n===-1||e.length>t.length?-1:t.length>e.length?1:0}function xh(e,t,u){if(e==="#"||e.endsWith("/"))throw new Nt(e,"is not a valid internal imports specifier name",B(t));let n,i=Lt(t);if(i.exists){n=ae(i.pjsonPath);let s=i.imports;if(s)if(ji.call(s,e)&&!e.includes("*")){let r=Ne(n,s[e],"",e,t,!1,!0,!1,u);if(r!=null)return r}else{let r="",o="",D=Object.getOwnPropertyNames(s),l=-1;for(;++l<D.length;){let c=D[l],a=c.indexOf("*");if(a!==-1&&e.startsWith(c.slice(0,a))){let h=c.slice(a+1);e.length>=c.length&&e.endsWith(h)&&Hi(r,c)===1&&c.lastIndexOf("*")===a&&(r=c,o=e.slice(a,e.length-h.length))}}if(r){let c=s[r],a=Ne(n,c,o,r,t,!0,!0,!1,u);if(a!=null)return a}}}throw Ch(e,n,t)}function Bh(e,t){let u=e.indexOf("/"),n=!0,i=!1;e[0]==="@"&&(i=!0,u===-1||e.length===0?n=!1:u=e.indexOf("/",u+1));let s=u===-1?e:e.slice(0,u);if(ph.exec(s)!==null&&(n=!1),!n)throw new Nt(e,"is not a valid package name",B(t));return{packageName:s,packageSubpath:"."+(u===-1?"":e.slice(u)),isScoped:i}}function Ui(e,t,u){if(iu.includes(e))return new M("node:"+e);let{packageName:n,packageSubpath:i,isScoped:s}=Bh(e,t),r=Lt(t);if(r.exists&&r.name===n&&r.exports!==void 0&&r.exports!==null)return Ri(ae(r.pjsonPath),i,r,t,u);let o=new M("./node_modules/"+n+"/package.json",t),D=B(o),l;do{let c=Mi(D.slice(0,-13));if(!c||!c.isDirectory()){l=D,o=new M((s?"../../../../node_modules/":"../../../node_modules/")+n+"/package.json",o),D=B(o);continue}let a=Pi(D,{base:t,specifier:e});return a.exports!==void 0&&a.exports!==null?Ri(o,i,a,t,u):i==="."?mh(o,a,t):new M(i,o)}while(D.length!==l.length);throw new Du(n,B(t),!1)}function vh(e){return e[0]==="."&&(e.length===1||e[1]==="/"||e[1]==="."&&(e.length===2||e[2]==="/"))}function _h(e){return e===""?!1:e[0]==="/"?!0:vh(e)}function Th(e,t,u,n){let i=t.protocol,s=i==="data:",r;if(_h(e))try{r=new M(e,t)}catch(o){let D=new xi(e,t);throw D.cause=o,D}else if(i==="file:"&&e[0]==="#")r=xh(e,t,u);else try{r=new M(e)}catch(o){if(s&&!iu.includes(e)){let D=new xi(e,t);throw D.cause=o,D}r=Ui(e,t,u)}return le.ok(r!==void 0,"expected to be defined"),r.protocol!=="file:"?r:gh(r,t,n)}var Sh=new Set(["node","import"]),$h="2:6:import4:node",kh=process.platform==="win32",Oh=globalThis.__EXSOLVE_CACHE__||=new Map;function Rh(e,t){let u=Wh(e);if("external"in u)return u.external;let n=u.specifier,i=u.url,s=u.absolutePath,r,o;if(t?.cache!==!1&&(r=jh(s||n,t),o=t?.cache&&typeof t?.cache=="object"?t.cache:Oh),o){let p=o.get(r);if(typeof p=="string")return p;if(p instanceof Error){if(t?.try)return;throw p}}if(s)try{let p=Kc(s);if(p.isSymbolicLink()&&(s=Ii(s),i=ae(s)),p.isFile())return o&&o.set(r,i.href),i.href}catch(p){if(p?.code!=="ENOENT")throw o&&o.set(r,p),p}let D=t?.conditions?new Set(t.conditions):Sh,l=n||i.href,c=Lh(t?.from),a=t?.suffixes||[""],h=t?.extensions?["",...t.extensions]:[""],f;for(let p of c){for(let E of a){let C=Hh(l,E);C==="."&&(C+="/.");for(let R of h)if(f=Ih(C+R,p,D),f)break;if(f)break}if(f)break}if(!f){let p=new Error(`Cannot resolve module "${e}" (from: ${c.map(E=>Ph(E)).join(", ")})`);if(p.code="ERR_MODULE_NOT_FOUND",o&&o.set(r,p),t?.try)return;throw p}return o&&o.set(r,f.href),f.href}function Wi(e,t){let u=Rh(e,t);if(!u||!u.startsWith("file://")&&t?.try)return;let n=B(u);return kh?Uh(n):n}function Ih(e,t,u){try{return Th(e,t,u)}catch{}}function Lh(e){let t=(Array.isArray(e)?e:[e]).flatMap(u=>Nh(u));return t.length===0?[ae("./")]:t}function Nh(e){if(!e)return[];if(Vi(e))return[e];if(typeof e!="string")return[];if(/^(?:node|data|http|https|file):/.test(e))return new URL(e);try{return e.endsWith("/")||uu(e).isDirectory()?ae(e+"/"):ae(e)}catch{return[ae(e+"/"),ae(e)]}}function Ph(e){try{return B(e)}catch{return e}}function jh(e,t){let u;return Array.isArray(t?.from)?u=t.from:t?.from&&(u=[t.from]),tt([e])+Mh(t?.conditions)+tt(t?.extensions)+tt(u)+tt(t?.suffixes)}function Mh(e){return e?tt([...new Set(e)].sort()):$h}function tt(e){if(!e)return"-";let t=`${e.length}:`;for(let u of e){let n=String(u);t+=`${n.length}:${n}`}return t}function Hh(e,t){return!e||!t||t==="/"?e:(e.endsWith("/")?e:e+"/")+(t.startsWith("/")?t.slice(1):t)}function Uh(e){return e.replace(/\\/g,"/").replace(/^[a-z]:\//,t=>t.toUpperCase())}function Vi(e){return e instanceof URL||e?.constructor?.name==="URL"}function Wh(e){if(typeof e=="string"){if(e.startsWith("file:")){let t=new URL(e);return{url:t,absolutePath:B(t)}}return qc(e)?{url:ae(e),absolutePath:e}:/^(?:node|data|http|https):/.test(e)?{external:e}:iu.includes(e)&&!e.includes(":")?{external:`node:${e}`}:{specifier:e}}if(Vi(e))return e.protocol==="file:"?{url:e,absolutePath:B(e)}:{external:e.href};throw new TypeError("id must be a `string` or `URL`")}import{fileURLToPath as Yh}from"node:url";var zh={startingFrom:".",rootPattern:/^node_modules$/,reverse:!1,test:e=>{try{if(Gh(e).isFile())return!0}catch{}}};async function Kh(e,t={}){let u=Array.isArray(e)?e:[e],n={...zh,...t},i=_e(n.startingFrom),s=i[0]==="/",r=i.split("/").filter(Boolean);if(u.includes(r.at(-1))&&await n.test(i))return i;s&&(r[0]="/"+r[0]);let o=r.findIndex(D=>D.match(n.rootPattern));if(o===-1&&(o=0),n.reverse)for(let D=o+1;D<=r.length;D++)for(let l of u){let c=ve(...r.slice(0,D),l);if(await n.test(c))return c}else for(let D=r.length;D>o;D--)for(let l of u){let c=ve(...r.slice(0,D),l);if(await n.test(c))return c}throw new Error(`Cannot find matching ${e} in ${n.startingFrom} or parent directories`)}function qh(e,t={}){return Kh(e,t)}function Jh(e,t={}){return e instanceof URL||e.startsWith("file://")?Be(Yh(e)):xe(e)?Be(e):Wi(e,{...t,from:t.from||t.parent||t.url})}var Zh=new Map;async function Gi(e,t={}){let u=await au(e,t),n=t.cache&&typeof t.cache!="boolean"?t.cache:Zh;if(t.cache&&n.has(u))return n.get(u);let i=await Vh.readFile(u,"utf8"),s;try{s=bi(i)}catch{s=wi(i)}return n.set(u,s),s}async function au(e=process.cwd(),t={}){return qh("package.json",{...t,startingFrom:Jh(e,t)})}var Pt={react:"React",vue:"Vue",svelte:"Svelte",solid:"Solid"},Qh=[{dep:"next",name:"Next.js",library:"react"},{dep:"nuxt",name:"Nuxt",library:"vue"},{dep:"@sveltejs/kit",name:"SvelteKit",library:"svelte"},{dep:"@solidjs/start",name:"SolidStart",library:"solid"},{dep:"solid-start",name:"SolidStart",library:"solid"},{dep:"@tanstack/react-start",name:"TanStack Start",library:"react"},{dep:"@remix-run/react",name:"Remix",library:"react"},{dep:"@react-router/dev",name:"React Router",library:"react"},{dep:"gatsby",name:"Gatsby",library:"react"},{dep:"expo",name:"Expo",library:"react"},{dep:"astro",name:"Astro",library:null},{dep:"vite",name:"Vite",library:null}],Xh=[{dep:"react",library:"react"},{dep:"vue",library:"vue"},{dep:"svelte",library:"svelte"},{dep:"solid-js",library:"solid"}];function ef(e){return{...e.dependencies??{},...e.devDependencies??{},...e.peerDependencies??{}}}async function Yi(e){let t;try{t=await au(e)}catch{return null}let u=await Gi(t),n=ef(u),i=t.replace(/[\\/]package\.json$/,""),s=Qh.find(o=>o.dep in n)??null,r=s?.library??Xh.find(o=>o.dep in n)?.library??null;return{dir:i,pkg:u,framework:s?.name??null,library:r,usesTypeScript:"typescript"in n,shadersVersion:n.shaders??null}}function zi(e,t){let u=Pt[t];return!e||e===u?u:`${e} + ${u}`}var cu=Symbol.for("cancel"),jt=Object.keys(Pt);function Ki(e){return!e.yes&&!!process.stdout.isTTY&&!!process.stdin.isTTY}function hu(){k.log("Cancelled."),process.exit(0)}async function tf(e,t){if(t.framework){if(!jt.includes(t.framework))throw new Error(`Unknown framework "${t.framework}". Use one of: ${jt.join(", ")}`);return t.framework}if(e.library)return e.library;if(!Ki(t))throw new Error(`Couldn't detect a UI framework in ${Mt.join(e.dir,"package.json")}. Pass one with --framework <${jt.join("|")}>`);let u=await k.prompt("Which framework does this project use?",{type:"select",options:jt.map(n=>({value:n,label:Pt[n]})),cancel:"symbol"});return u===cu&&hu(),u}async function rf(e,t){if(e.shadersVersion){k.success(`shaders already installed (${e.shadersVersion})`);return}if(!t.install){k.info("Skipped installing shaders (--no-install)");return}let u=(await Jr(e.dir))?.name??"npm";k.start(`Installing shaders with ${u}\u2026`);try{await $t("shaders",{cwd:e.dir,silent:!0,packageManager:u})}catch(n){throw new Error(`Failed to install shaders: ${n instanceof Error?n.message:String(n)}
103
+ Install it manually, then re-run npx shaders init`)}k.success("Installed shaders")}function lu(e,t){return Mt.relative(e,t)||Mt.basename(t)}async function uf(e,t,u){if(u.project){let{projects:c}=await pe("/api/plugin/projects",{token:e.accessToken,query:{id:u.project,limit:"1"}}),a=c.find(h=>h.id===u.project);if(!a)throw new Error(`Project ${u.project} not found in your account`);return a}if(!Ki(u))return k.info("Skipped connecting a project \u2014 pass --project <id> to connect non-interactively"),null;let{projects:n}=await pe("/api/plugin/projects",{token:e.accessToken,query:{limit:"100"}}),i="__new__",s=[{value:i,label:n.length?"Create a new project":"Create a new project (you have none yet)"},...n.map(c=>({value:c.id,label:c.title||"Untitled Project",hint:`${c.shader_count} shader${c.shader_count===1?"":"s"}`}))],r=await k.prompt("Which shaders.com project should this codebase connect to?",{type:"select",options:s,cancel:"symbol"});if(r===cu&&hu(),r!==i)return n.find(c=>c.id===r)??null;let o=typeof t.pkg.name=="string"&&t.pkg.name?t.pkg.name.replace(/^@[^/]+\//,""):Mt.basename(t.dir),D=await k.prompt("Project name",{type:"text",default:o,placeholder:o,cancel:"symbol"});D===cu&&hu();let l=await pe("/api/plugin/projects",{method:"POST",token:e.accessToken,body:{title:D||o}});return{id:l.id,title:l.title,updated_at:new Date().toISOString(),shader_count:0}}async function qi(e){let t=process.cwd(),u=await Yi(t);if(!u)throw new Error(`No package.json found in ${t} or its parents. Run npx shaders init from inside your project.`);let n=await tf(u,e);k.log(`Detected: ${zi(u.framework,n)}`),await rf(u,e);let i=await gi(u.dir);i&&k.success(`Found ${lu(u.dir,i)}`);let s=null,r=null;if(e.auth){let{credentials:o,me:D}=await _t();k.success(`Signed in${D.email?` as ${D.email}`:""}`);let l=await uf(o,u,e);l&&(s=l.id,r=l.title)}else k.info("Skipped sign-in (--no-auth)");i?s&&(await Ei(i,s)||k.warn(`Couldn't update ${lu(u.dir,i)} automatically \u2014 add project: '${s}' to it`)):(i=await Ci(u.dir,n,s,u.usesTypeScript),k.success(`Created ${lu(u.dir,i)}`)),s&&k.success(`Connected project to Shaders${r?` (${r})`:""}
104
+ ${fe()}/design-editor/${s}`),k.log(`
105
+ Next: import { Shader } from 'shaders/${n}' \u2014 docs at ${fe()}/docs`)}var te=gt(pu(),1);import{stdin as lf,stdout as cf}from"node:process";import es from"node:readline";import{WriteStream as hf}from"node:tty";function ff({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var pf=ff();function Ds(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(pf,"")}function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ls={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var i=n.charCodeAt(0),s=n.length==2?n.charCodeAt(1):0,r=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,r=i<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"},t.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var i=u(n),s=0,r=0;r<i.length;r++)s=s+this.characterLength(i[r]);return s},t.slice=function(n,i,s){textLen=t.length(n),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var r="",o=0,D=u(n),l=0;l<D.length;l++){var c=D[l],a=t.length(c);if(o>=i-(a==2?1:0))if(o+a<=s)r+=c;else break;o+=a}return r}})(ls);var Ff=ls.exports,df=as(Ff),mf=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},gf=as(mf);function rt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Ds(e),e.length===0))return 0;e=e.replace(gf()," ");let u=t.ambiguousIsNarrow?1:2,n=0;for(let i of e){let s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(df.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=u;break;default:n+=1}}return n}var du=10,ts=(e=0)=>t=>`\x1B[${t+e}m`,rs=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,us=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,O={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(O.modifier);var Cf=Object.keys(O.color),Ef=Object.keys(O.bgColor);[...Cf,...Ef];function Af(){let e=new Map;for(let[t,u]of Object.entries(O)){for(let[n,i]of Object.entries(u))O[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},u[n]=O[n],e.set(i[0],i[1]);Object.defineProperty(O,t,{value:u,enumerable:!1})}return Object.defineProperty(O,"codes",{value:e,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=ts(),O.color.ansi256=rs(),O.color.ansi16m=us(),O.bgColor.ansi=ts(du),O.bgColor.ansi256=rs(du),O.bgColor.ansi16m=us(du),Object.defineProperties(O,{rgbToAnsi256:{value:(t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(s=>s+s).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>O.rgbToAnsi256(...O.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,i;if(t>=232)u=((t-232)*10+8)/255,n=u,i=u;else{t-=16;let o=t%36;u=Math.floor(t/36)/5,n=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(u,n,i)*2;if(s===0)return 30;let r=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(u));return s===2&&(r+=60),r},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>O.ansi256ToAnsi(O.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>O.ansi256ToAnsi(O.hexToAnsi256(t)),enumerable:!1}}),O}var yf=Af(),Gt=new Set(["\x1B","\x9B"]),bf=39,Eu="\x07",cs="[",wf="]",hs="m",Au=`${wf}8;;`,ns=e=>`${Gt.values().next().value}${cs}${e}${hs}`,is=e=>`${Gt.values().next().value}${Au}${e}${Eu}`,xf=e=>e.split(" ").map(t=>rt(t)),mu=(e,t,u)=>{let n=[...t],i=!1,s=!1,r=rt(Ds(e[e.length-1]));for(let[o,D]of n.entries()){let l=rt(D);if(r+l<=u?e[e.length-1]+=D:(e.push(D),r=0),Gt.has(D)&&(i=!0,s=n.slice(o+1).join("").startsWith(Au)),i){s?D===Eu&&(i=!1,s=!1):D===hs&&(i=!1);continue}r+=l,r===u&&o<n.length-1&&(e.push(""),r=0)}!r&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Bf=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(rt(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},vf=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",i,s,r=xf(e),o=[""];for(let[l,c]of e.split(" ").entries()){u.trim!==!1&&(o[o.length-1]=o[o.length-1].trimStart());let a=rt(o[o.length-1]);if(l!==0&&(a>=t&&(u.wordWrap===!1||u.trim===!1)&&(o.push(""),a=0),(a>0||u.trim===!1)&&(o[o.length-1]+=" ",a++)),u.hard&&r[l]>t){let h=t-a,f=1+Math.floor((r[l]-h-1)/t);Math.floor((r[l]-1)/t)<f&&o.push(""),mu(o,c,t);continue}if(a+r[l]>t&&a>0&&r[l]>0){if(u.wordWrap===!1&&a<t){mu(o,c,t);continue}o.push("")}if(a+r[l]>t&&u.wordWrap===!1){mu(o,c,t);continue}o[o.length-1]+=c}u.trim!==!1&&(o=o.map(l=>Bf(l)));let D=[...o.join(`
106
+ `)];for(let[l,c]of D.entries()){if(n+=c,Gt.has(c)){let{groups:h}=new RegExp(`(?:\\${cs}(?<code>\\d+)m|\\${Au}(?<uri>.*)${Eu})`).exec(D.slice(l).join(""))||{groups:{}};if(h.code!==void 0){let f=Number.parseFloat(h.code);i=f===bf?void 0:f}else h.uri!==void 0&&(s=h.uri.length===0?void 0:h.uri)}let a=yf.codes.get(Number(i));D[l+1]===`
107
+ `?(s&&(n+=is("")),i&&a&&(n+=ns(a))):c===`
108
+ `&&(i&&a&&(n+=ns(i)),s&&(n+=is(s)))}return n};function ss(e,t,u){return String(e).normalize().replace(/\r\n/g,`
25
109
  `).split(`
26
- `).map(r=>Fu(r,t,i)).join(`
27
- `)}var Eu=["up","down","left","right","space","enter","cancel"],Ie={actions:new Set(Eu),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function xr(e,t){if(typeof e=="string")return Ie.aliases.get(e)===t;for(let i of e)if(i!==void 0&&xr(i,t))return!0;return!1}function Au(e,t){if(e===t)return;let i=e.split(`
28
- `),r=t.split(`
29
- `),u=[];for(let s=0;s<Math.max(i.length,r.length);s++)i[s]!==r[s]&&u.push(s);return u}var ja=globalThis.process.platform.startsWith("win"),mt=Symbol("clack:cancel");function de(e){return e===mt}function Re(e,t){let i=e;i.isTTY&&i.setRawMode(t)}var yu=Object.defineProperty,bu=(e,t,i)=>t in e?yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,U=(e,t,i)=>(bu(e,typeof t!="symbol"?t+"":t,i),i),gt=class{constructor(t,i=!0){U(this,"input"),U(this,"output"),U(this,"_abortSignal"),U(this,"rl"),U(this,"opts"),U(this,"_render"),U(this,"_track",!1),U(this,"_prevFrame",""),U(this,"_subscribers",new Map),U(this,"_cursor",0),U(this,"state","initial"),U(this,"error",""),U(this,"value");let{input:r=ru,output:u=nu,render:s,signal:n,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=i,this._abortSignal=n,this.input=r,this.output=u}unsubscribe(){this._subscribers.clear()}setSubscriber(t,i){let r=this._subscribers.get(t)??[];r.push(i),this._subscribers.set(t,r)}on(t,i){this.setSubscriber(t,{cb:i})}once(t,i){this.setSubscriber(t,{cb:i,once:!0})}emit(t,...i){let r=this._subscribers.get(t)??[],u=[];for(let s of r)s.cb(...i),s.once&&u.push(()=>r.splice(r.indexOf(s),1));for(let s of u)s()}prompt(){return new Promise((t,i)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(mt);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let r=new iu(0);r._write=(u,s,n)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),n()},this.input.pipe(r),this.rl=hr.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50}),hr.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Re(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(V.cursor.show),this.output.off("resize",this.render),Re(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(V.cursor.show),this.output.off("resize",this.render),Re(this.input,!1),t(mt)})})}onKeypress(t,i){if(this.state==="error"&&(this.state="active"),i?.name&&(!this._track&&Ie.aliases.has(i.name)&&this.emit("cursor",Ie.aliases.get(i.name)),Ie.actions.has(i.name)&&this.emit("cursor",i.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),i?.name==="return"){if(this.opts.validate){let r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}xr([t,i?.name,i?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
30
- `),Re(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=gr(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
31
- `).length-1;this.output.write(V.cursor.move(-999,t*-1))}render(){let t=gr(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(V.cursor.hide);else{let i=Au(this._prevFrame,t);if(this.restoreCursor(),i&&i?.length===1){let r=i[0];this.output.write(V.cursor.move(0,r)),this.output.write(V.erase.lines(1));let u=t.split(`
32
- `);this.output.write(u[r]),this._prevFrame=t,this.output.write(V.cursor.move(0,u.length-r-1));return}if(i&&i?.length>1){let r=i[0];this.output.write(V.cursor.move(0,r)),this.output.write(V.erase.down());let u=t.split(`
33
- `).slice(r);this.output.write(u.join(`
34
- `)),this._prevFrame=t;return}this.output.write(V.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var xu=Object.defineProperty,vu=(e,t,i)=>t in e?xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Cr=(e,t,i)=>(vu(e,typeof t!="symbol"?t+"":t,i),i),vr=class extends gt{constructor(e){super(e,!1),Cr(this,"options"),Cr(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",t=>{t==="a"&&this.toggleAll()}),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}};var y=Se(cr(),1),Sr=Se(Dt(),1);import Y from"node:process";function wu(){return Y.platform!=="win32"?Y.env.TERM!=="linux":!!Y.env.CI||!!Y.env.WT_SESSION||!!Y.env.TERMINUS_SUBLIME||Y.env.ConEmuTask==="{cmd::Cmder}"||Y.env.TERM_PROGRAM==="Terminus-Sublime"||Y.env.TERM_PROGRAM==="vscode"||Y.env.TERM==="xterm-256color"||Y.env.TERM==="alacritty"||Y.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var _u=wu(),B=(e,t)=>_u?e:t,Tu=B("\u25C6","*"),Su=B("\u25A0","x"),Bu=B("\u25B2","x"),Ou=B("\u25C7","o"),ec=B("\u250C","T"),J=B("\u2502","|"),wr=B("\u2514","\u2014"),tc=B("\u25CF",">"),rc=B("\u25CB"," "),Ru=B("\u25FB","[\u2022]"),_r=B("\u25FC","[+]"),Iu=B("\u25FB","[ ]"),nc=B("\u25AA","\u2022"),ic=B("\u2500","-"),uc=B("\u256E","+"),sc=B("\u251C","+"),oc=B("\u256F","+"),lc=B("\u25CF","\u2022"),ac=B("\u25C6","*"),cc=B("\u25B2","!"),hc=B("\u25A0","x"),Lu=e=>{switch(e){case"initial":case"active":return y.default.cyan(Tu);case"cancel":return y.default.red(Su);case"error":return y.default.yellow(Bu);case"submit":return y.default.green(Ou)}},Tr=e=>{let{cursor:t,options:i,style:r}=e,u=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),n=Math.min(s,Math.max(u,5)),o=0;t>=o+n-3?o=Math.max(Math.min(t-n+3,i.length-n),0):t<o+2&&(o=Math.max(t-2,0));let l=n<i.length&&o>0,a=n<i.length&&o+n<i.length;return i.slice(o,o+n).map((h,c,D)=>{let f=c===0&&l,g=c===D.length-1&&a;return f||g?y.default.dim("..."):r(h,c+o===t)})};var Et=e=>{let t=(i,r)=>{let u=i.label??String(i.value);return r==="active"?`${y.default.cyan(Ru)} ${u} ${i.hint?y.default.dim(`(${i.hint})`):""}`:r==="selected"?`${y.default.green(_r)} ${y.default.dim(u)}`:r==="cancelled"?`${y.default.strikethrough(y.default.dim(u))}`:r==="active-selected"?`${y.default.green(_r)} ${u} ${i.hint?y.default.dim(`(${i.hint})`):""}`:r==="submitted"?`${y.default.dim(u)}`:`${y.default.dim(Iu)} ${y.default.dim(u)}`};return new vr({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(i){if(this.required&&i.length===0)return`Please select at least one option.
35
- ${y.default.reset(y.default.dim(`Press ${y.default.gray(y.default.bgWhite(y.default.inverse(" space ")))} to select, ${y.default.gray(y.default.bgWhite(y.default.inverse(" enter ")))} to submit`))}`},render(){let i=`${y.default.gray(J)}
36
- ${Lu(this.state)} ${e.message}
37
- `,r=(u,s)=>{let n=this.value.includes(u.value);return s&&n?t(u,"active-selected"):n?t(u,"selected"):t(u,s?"active":"inactive")};switch(this.state){case"submit":return`${i}${y.default.gray(J)} ${this.options.filter(({value:u})=>this.value.includes(u)).map(u=>t(u,"submitted")).join(y.default.dim(", "))||y.default.dim("none")}`;case"cancel":{let u=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(y.default.dim(", "));return`${i}${y.default.gray(J)} ${u.trim()?`${u}
38
- ${y.default.gray(J)}`:""}`}case"error":{let u=this.error.split(`
39
- `).map((s,n)=>n===0?`${y.default.yellow(wr)} ${y.default.yellow(s)}`:` ${s}`).join(`
40
- `);return`${i+y.default.yellow(J)} ${Tr({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:r}).join(`
41
- ${y.default.yellow(J)} `)}
42
- ${u}
43
- `}default:return`${i}${y.default.cyan(J)} ${Tr({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:r}).join(`
44
- ${y.default.cyan(J)} `)}
45
- ${y.default.cyan(wr)}
46
- `}}}).prompt()};import{homedir as $l}from"os";import{dirname as et,join as E}from"path";import{existsSync as N}from"fs";import{readFileSync as Xt,writeFileSync as tt,existsSync as rt,mkdirSync as Jl}from"fs";import{dirname as zl}from"path";function ge(e,t=!1){let i=e.length,r=0,u="",s=0,n=16,o=0,l=0,a=0,h=0,c=0;function D(m,w){let A=0,C=0;for(;A<m||!w;){let p=e.charCodeAt(r);if(p>=48&&p<=57)C=C*16+p-48;else if(p>=65&&p<=70)C=C*16+p-65+10;else if(p>=97&&p<=102)C=C*16+p-97+10;else break;r++,A++}return A<m&&(C=-1),C}function f(m){r=m,u="",s=0,n=16,c=0}function g(){let m=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&ue(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&ue(e.charCodeAt(r)))for(r++;r<e.length&&ue(e.charCodeAt(r));)r++;else return c=3,e.substring(m,r);let w=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&ue(e.charCodeAt(r))){for(r++;r<e.length&&ue(e.charCodeAt(r));)r++;w=r}else c=3;return e.substring(m,w)}function b(){let m="",w=r;for(;;){if(r>=i){m+=e.substring(w,r),c=2;break}let A=e.charCodeAt(r);if(A===34){m+=e.substring(w,r),r++;break}if(A===92){if(m+=e.substring(w,r),r++,r>=i){c=2;break}switch(e.charCodeAt(r++)){case 34:m+='"';break;case 92:m+="\\";break;case 47:m+="/";break;case 98:m+="\b";break;case 102:m+="\f";break;case 110:m+=`
47
- `;break;case 114:m+="\r";break;case 116:m+=" ";break;case 117:let p=D(4,!0);p>=0?m+=String.fromCharCode(p):c=4;break;default:c=5}w=r;continue}if(A>=0&&A<=31)if(me(A)){m+=e.substring(w,r),c=2;break}else c=6;r++}return m}function F(){if(u="",c=0,s=r,l=o,h=a,r>=i)return s=i,n=17;let m=e.charCodeAt(r);if(At(m)){do r++,u+=String.fromCharCode(m),m=e.charCodeAt(r);while(At(m));return n=15}if(me(m))return r++,u+=String.fromCharCode(m),m===13&&e.charCodeAt(r)===10&&(r++,u+=`
48
- `),o++,a=r,n=14;switch(m){case 123:return r++,n=1;case 125:return r++,n=2;case 91:return r++,n=3;case 93:return r++,n=4;case 58:return r++,n=6;case 44:return r++,n=5;case 34:return r++,u=b(),n=10;case 47:let w=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<i&&!me(e.charCodeAt(r));)r++;return u=e.substring(w,r),n=12}if(e.charCodeAt(r+1)===42){r+=2;let A=i-1,C=!1;for(;r<A;){let p=e.charCodeAt(r);if(p===42&&e.charCodeAt(r+1)===47){r+=2,C=!0;break}r++,me(p)&&(p===13&&e.charCodeAt(r)===10&&r++,o++,a=r)}return C||(r++,c=1),u=e.substring(w,r),n=13}return u+=String.fromCharCode(m),r++,n=16;case 45:if(u+=String.fromCharCode(m),r++,r===i||!ue(e.charCodeAt(r)))return n=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return u+=g(),n=11;default:for(;r<i&&S(m);)r++,m=e.charCodeAt(r);if(s!==r){switch(u=e.substring(s,r),u){case"true":return n=8;case"false":return n=9;case"null":return n=7}return n=16}return u+=String.fromCharCode(m),r++,n=16}}function S(m){if(At(m)||me(m))return!1;switch(m){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function x(){let m;do m=F();while(m>=12&&m<=15);return m}return{setPosition:f,getPosition:()=>r,scan:t?x:F,getToken:()=>n,getTokenValue:()=>u,getTokenOffset:()=>s,getTokenLength:()=>r-s,getTokenStartLine:()=>l,getTokenStartCharacter:()=>s-h,getTokenError:()=>c}}function At(e){return e===32||e===9}function me(e){return e===10||e===13}function ue(e){return e>=48&&e<=57}var Or;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Or||(Or={}));var W=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),se=200,yt={" ":{"\n":new Array(se).fill(0).map((e,t)=>`
49
- `+" ".repeat(t)),"\r":new Array(se).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(se).fill(0).map((e,t)=>`\r
50
- `+" ".repeat(t))}," ":{"\n":new Array(se).fill(0).map((e,t)=>`
51
- `+" ".repeat(t)),"\r":new Array(se).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(se).fill(0).map((e,t)=>`\r
52
- `+" ".repeat(t))}},Rr=[`
110
+ `).map(n=>vf(n,t,u)).join(`
111
+ `)}var _f=["up","down","left","right","space","enter","cancel"],Vt={actions:new Set(_f),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function fs(e,t){if(typeof e=="string")return Vt.aliases.get(e)===t;for(let u of e)if(u!==void 0&&fs(u,t))return!0;return!1}function Tf(e,t){if(e===t)return;let u=e.split(`
112
+ `),n=t.split(`
113
+ `),i=[];for(let s=0;s<Math.max(u.length,n.length);s++)u[s]!==n[s]&&i.push(s);return i}var $m=globalThis.process.platform.startsWith("win"),gu=Symbol("clack:cancel");function ut(e){return e===gu}function Wt(e,t){let u=e;u.isTTY&&u.setRawMode(t)}var Sf=Object.defineProperty,$f=(e,t,u)=>t in e?Sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,X=(e,t,u)=>($f(e,typeof t!="symbol"?t+"":t,u),u),Cu=class{constructor(t,u=!0){X(this,"input"),X(this,"output"),X(this,"_abortSignal"),X(this,"rl"),X(this,"opts"),X(this,"_render"),X(this,"_track",!1),X(this,"_prevFrame",""),X(this,"_subscribers",new Map),X(this,"_cursor",0),X(this,"state","initial"),X(this,"error",""),X(this,"value");let{input:n=lf,output:i=cf,render:s,signal:r,...o}=t;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=u,this._abortSignal=r,this.input=n,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(t,u){let n=this._subscribers.get(t)??[];n.push(u),this._subscribers.set(t,n)}on(t,u){this.setSubscriber(t,{cb:u})}once(t,u){this.setSubscriber(t,{cb:u,once:!0})}emit(t,...u){let n=this._subscribers.get(t)??[],i=[];for(let s of n)s.cb(...u),s.once&&i.push(()=>n.splice(n.indexOf(s),1));for(let s of i)s()}prompt(){return new Promise((t,u)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(gu);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new hf(0);n._write=(i,s,r)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),r()},this.input.pipe(n),this.rl=es.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50}),es.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),Wt(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(te.cursor.show),this.output.off("resize",this.render),Wt(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(te.cursor.show),this.output.off("resize",this.render),Wt(this.input,!1),t(gu)})})}onKeypress(t,u){if(this.state==="error"&&(this.state="active"),u?.name&&(!this._track&&Vt.aliases.has(u.name)&&this.emit("cursor",Vt.aliases.get(u.name)),Vt.actions.has(u.name)&&this.emit("cursor",u.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),u?.name==="return"){if(this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}fs([t,u?.name,u?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
114
+ `),Wt(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=ss(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
115
+ `).length-1;this.output.write(te.cursor.move(-999,t*-1))}render(){let t=ss(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(te.cursor.hide);else{let u=Tf(this._prevFrame,t);if(this.restoreCursor(),u&&u?.length===1){let n=u[0];this.output.write(te.cursor.move(0,n)),this.output.write(te.erase.lines(1));let i=t.split(`
116
+ `);this.output.write(i[n]),this._prevFrame=t,this.output.write(te.cursor.move(0,i.length-n-1));return}if(u&&u?.length>1){let n=u[0];this.output.write(te.cursor.move(0,n)),this.output.write(te.erase.down());let i=t.split(`
117
+ `).slice(n);this.output.write(i.join(`
118
+ `)),this._prevFrame=t;return}this.output.write(te.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};var kf=Object.defineProperty,Of=(e,t,u)=>t in e?kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,os=(e,t,u)=>(Of(e,typeof t!="symbol"?t+"":t,u),u),ps=class extends Cu{constructor(e){super(e,!1),os(this,"options"),os(this,"cursor",0),this.options=e.options,this.value=[...e.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0),this.on("key",t=>{t==="a"&&this.toggleAll()}),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let e=this.value.length===this.options.length;this.value=e?[]:this.options.map(t=>t.value)}toggleValue(){let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}};var x=gt(Xi(),1),gs=gt(pu(),1);import se from"node:process";function Rf(){return se.platform!=="win32"?se.env.TERM!=="linux":!!se.env.CI||!!se.env.WT_SESSION||!!se.env.TERMINUS_SUBLIME||se.env.ConEmuTask==="{cmd::Cmder}"||se.env.TERM_PROGRAM==="Terminus-Sublime"||se.env.TERM_PROGRAM==="vscode"||se.env.TERM==="xterm-256color"||se.env.TERM==="alacritty"||se.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var If=Rf(),N=(e,t)=>If?e:t,Lf=N("\u25C6","*"),Nf=N("\u25A0","x"),Pf=N("\u25B2","x"),jf=N("\u25C7","o"),Vm=N("\u250C","T"),Ae=N("\u2502","|"),Fs=N("\u2514","\u2014"),Gm=N("\u25CF",">"),Ym=N("\u25CB"," "),Mf=N("\u25FB","[\u2022]"),ds=N("\u25FC","[+]"),Hf=N("\u25FB","[ ]"),zm=N("\u25AA","\u2022"),Km=N("\u2500","-"),qm=N("\u256E","+"),Jm=N("\u251C","+"),Zm=N("\u256F","+"),Qm=N("\u25CF","\u2022"),Xm=N("\u25C6","*"),eg=N("\u25B2","!"),tg=N("\u25A0","x"),Uf=e=>{switch(e){case"initial":case"active":return x.default.cyan(Lf);case"cancel":return x.default.red(Nf);case"error":return x.default.yellow(Pf);case"submit":return x.default.green(jf)}},ms=e=>{let{cursor:t,options:u,style:n}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),r=Math.min(s,Math.max(i,5)),o=0;t>=o+r-3?o=Math.max(Math.min(t-r+3,u.length-r),0):t<o+2&&(o=Math.max(t-2,0));let D=r<u.length&&o>0,l=r<u.length&&o+r<u.length;return u.slice(o,o+r).map((c,a,h)=>{let f=a===0&&D,p=a===h.length-1&&l;return f||p?x.default.dim("..."):n(c,a+o===t)})};var yu=e=>{let t=(u,n)=>{let i=u.label??String(u.value);return n==="active"?`${x.default.cyan(Mf)} ${i} ${u.hint?x.default.dim(`(${u.hint})`):""}`:n==="selected"?`${x.default.green(ds)} ${x.default.dim(i)}`:n==="cancelled"?`${x.default.strikethrough(x.default.dim(i))}`:n==="active-selected"?`${x.default.green(ds)} ${i} ${u.hint?x.default.dim(`(${u.hint})`):""}`:n==="submitted"?`${x.default.dim(i)}`:`${x.default.dim(Hf)} ${x.default.dim(i)}`};return new ps({options:e.options,initialValues:e.initialValues,required:e.required??!0,cursorAt:e.cursorAt,validate(u){if(this.required&&u.length===0)return`Please select at least one option.
119
+ ${x.default.reset(x.default.dim(`Press ${x.default.gray(x.default.bgWhite(x.default.inverse(" space ")))} to select, ${x.default.gray(x.default.bgWhite(x.default.inverse(" enter ")))} to submit`))}`},render(){let u=`${x.default.gray(Ae)}
120
+ ${Uf(this.state)} ${e.message}
121
+ `,n=(i,s)=>{let r=this.value.includes(i.value);return s&&r?t(i,"active-selected"):r?t(i,"selected"):t(i,s?"active":"inactive")};switch(this.state){case"submit":return`${u}${x.default.gray(Ae)} ${this.options.filter(({value:i})=>this.value.includes(i)).map(i=>t(i,"submitted")).join(x.default.dim(", "))||x.default.dim("none")}`;case"cancel":{let i=this.options.filter(({value:s})=>this.value.includes(s)).map(s=>t(s,"cancelled")).join(x.default.dim(", "));return`${u}${x.default.gray(Ae)} ${i.trim()?`${i}
122
+ ${x.default.gray(Ae)}`:""}`}case"error":{let i=this.error.split(`
123
+ `).map((s,r)=>r===0?`${x.default.yellow(Fs)} ${x.default.yellow(s)}`:` ${s}`).join(`
124
+ `);return`${u+x.default.yellow(Ae)} ${ms({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:n}).join(`
125
+ ${x.default.yellow(Ae)} `)}
126
+ ${i}
127
+ `}default:return`${u}${x.default.cyan(Ae)} ${ms({options:this.options,cursor:this.cursor,maxItems:e.maxItems,style:n}).join(`
128
+ ${x.default.cyan(Ae)} `)}
129
+ ${x.default.cyan(Fs)}
130
+ `}}}).prompt()};import{homedir as VF}from"os";import{dirname as cr,join as b}from"path";import{existsSync as W}from"fs";import{readFileSync as tn,writeFileSync as hr,existsSync as fr,mkdirSync as rd}from"fs";import{dirname as ud}from"path";function it(e,t=!1){let u=e.length,n=0,i="",s=0,r=16,o=0,D=0,l=0,c=0,a=0;function h(g,S){let w=0,A=0;for(;w<g||!S;){let d=e.charCodeAt(n);if(d>=48&&d<=57)A=A*16+d-48;else if(d>=65&&d<=70)A=A*16+d-65+10;else if(d>=97&&d<=102)A=A*16+d-97+10;else break;n++,w++}return w<g&&(A=-1),A}function f(g){n=g,i="",s=0,r=16,a=0}function p(){let g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Pe(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Pe(e.charCodeAt(n)))for(n++;n<e.length&&Pe(e.charCodeAt(n));)n++;else return a=3,e.substring(g,n);let S=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Pe(e.charCodeAt(n))){for(n++;n<e.length&&Pe(e.charCodeAt(n));)n++;S=n}else a=3;return e.substring(g,S)}function E(){let g="",S=n;for(;;){if(n>=u){g+=e.substring(S,n),a=2;break}let w=e.charCodeAt(n);if(w===34){g+=e.substring(S,n),n++;break}if(w===92){if(g+=e.substring(S,n),n++,n>=u){a=2;break}switch(e.charCodeAt(n++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
131
+ `;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:let d=h(4,!0);d>=0?g+=String.fromCharCode(d):a=4;break;default:a=5}S=n;continue}if(w>=0&&w<=31)if(nt(w)){g+=e.substring(S,n),a=2;break}else a=6;n++}return g}function C(){if(i="",a=0,s=n,D=o,c=l,n>=u)return s=u,r=17;let g=e.charCodeAt(n);if(bu(g)){do n++,i+=String.fromCharCode(g),g=e.charCodeAt(n);while(bu(g));return r=15}if(nt(g))return n++,i+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,i+=`
132
+ `),o++,l=n,r=14;switch(g){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,i=E(),r=10;case 47:let S=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<u&&!nt(e.charCodeAt(n));)n++;return i=e.substring(S,n),r=12}if(e.charCodeAt(n+1)===42){n+=2;let w=u-1,A=!1;for(;n<w;){let d=e.charCodeAt(n);if(d===42&&e.charCodeAt(n+1)===47){n+=2,A=!0;break}n++,nt(d)&&(d===13&&e.charCodeAt(n)===10&&n++,o++,l=n)}return A||(n++,a=1),i=e.substring(S,n),r=13}return i+=String.fromCharCode(g),n++,r=16;case 45:if(i+=String.fromCharCode(g),n++,n===u||!Pe(e.charCodeAt(n)))return r=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),r=11;default:for(;n<u&&R(g);)n++,g=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return r=8;case"false":return r=9;case"null":return r=7}return r=16}return i+=String.fromCharCode(g),n++,r=16}}function R(g){if(bu(g)||nt(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let g;do g=C();while(g>=12&&g<=15);return g}return{setPosition:f,getPosition:()=>n,scan:t?v:C,getToken:()=>r,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>D,getTokenStartCharacter:()=>s-c,getTokenError:()=>a}}function bu(e){return e===32||e===9}function nt(e){return e===10||e===13}function Pe(e){return e>=48&&e<=57}var Es;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Es||(Es={}));var ee=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),je=200,wu={" ":{"\n":new Array(je).fill(0).map((e,t)=>`
133
+ `+" ".repeat(t)),"\r":new Array(je).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(je).fill(0).map((e,t)=>`\r
134
+ `+" ".repeat(t))}," ":{"\n":new Array(je).fill(0).map((e,t)=>`
135
+ `+" ".repeat(t)),"\r":new Array(je).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(je).fill(0).map((e,t)=>`\r
136
+ `+" ".repeat(t))}},As=[`
53
137
  `,"\r",`\r
54
- `];function bt(e,t,i){let r,u,s,n,o;if(t){for(n=t.offset,o=n+t.length,s=n;s>0&&!Ce(e,s-1);)s--;let A=o;for(;A<e.length&&!Ce(e,A);)A++;u=e.substring(s,A),r=ku(u,i)}else u=e,r=0,s=0,n=0,o=e.length;let l=$u(i,e),a=Rr.includes(l),h=0,c=0,D;i.insertSpaces?D=W[i.tabSize||4]??oe(W[1],i.tabSize||4):D=" ";let f=D===" "?" ":" ",g=ge(u,!1),b=!1;function F(){if(h>1)return oe(l,h)+oe(D,r+c);let A=D.length*(r+c);return!a||A>yt[f][l].length?l+oe(D,r+c):A<=0?l:yt[f][l][A]}function S(){let A=g.scan();for(h=0;A===15||A===14;)A===14&&i.keepLines?h+=1:A===14&&(h=1),A=g.scan();return b=A===16||g.getTokenError()!==0,A}let x=[];function m(A,C,p){!b&&(!t||C<o&&p>n)&&e.substring(C,p)!==A&&x.push({offset:C,length:p-C,content:A})}let w=S();if(i.keepLines&&h>0&&m(oe(l,h),0,0),w!==17){let A=g.getTokenOffset()+s,C=D.length*r<20&&i.insertSpaces?W[D.length*r]:oe(D,r);m(C,s,A)}for(;w!==17;){let A=g.getTokenOffset()+g.getTokenLength()+s,C=S(),p="",K=!1;for(;h===0&&(C===12||C===13);){let at=g.getTokenOffset()+s;m(W[1],A,at),A=g.getTokenOffset()+g.getTokenLength()+s,K=C===12,p=K?F():"",C=S()}if(C===2)w!==1&&c--,i.keepLines&&h>0||!i.keepLines&&w!==1?p=F():i.keepLines&&(p=W[1]);else if(C===4)w!==3&&c--,i.keepLines&&h>0||!i.keepLines&&w!==3?p=F():i.keepLines&&(p=W[1]);else{switch(w){case 3:case 1:c++,i.keepLines&&h>0||!i.keepLines?p=F():p=W[1];break;case 5:i.keepLines&&h>0||!i.keepLines?p=F():p=W[1];break;case 12:p=F();break;case 13:h>0?p=F():K||(p=W[1]);break;case 6:i.keepLines&&h>0?p=F():K||(p=W[1]);break;case 10:i.keepLines&&h>0?p=F():C===6&&!K&&(p="");break;case 7:case 8:case 9:case 11:case 2:case 4:i.keepLines&&h>0?p=F():(C===12||C===13)&&!K?p=W[1]:C!==5&&C!==17&&(b=!0);break;case 16:b=!0;break}h>0&&(C===12||C===13)&&(p=F())}C===17&&(i.keepLines&&h>0?p=F():p=i.insertFinalNewline?l:"");let lt=g.getTokenOffset()+s;m(p,A,lt),w=C}return x}function oe(e,t){let i="";for(let r=0;r<t;r++)i+=e;return i}function ku(e,t){let i=0,r=0,u=t.tabSize||4;for(;i<e.length;){let s=e.charAt(i);if(s===W[1])r++;else if(s===" ")r+=u;else break;i++}return Math.floor(r/u)}function $u(e,t){for(let i=0;i<t.length;i++){let r=t.charAt(i);if(r==="\r")return i+1<t.length&&t.charAt(i+1)===`
138
+ `];function xu(e,t,u){let n,i,s,r,o;if(t){for(r=t.offset,o=r+t.length,s=r;s>0&&!st(e,s-1);)s--;let w=o;for(;w<e.length&&!st(e,w);)w++;i=e.substring(s,w),n=Vf(i,u)}else i=e,n=0,s=0,r=0,o=e.length;let D=Gf(u,e),l=As.includes(D),c=0,a=0,h;u.insertSpaces?h=ee[u.tabSize||4]??Me(ee[1],u.tabSize||4):h=" ";let f=h===" "?" ":" ",p=it(i,!1),E=!1;function C(){if(c>1)return Me(D,c)+Me(h,n+a);let w=h.length*(n+a);return!l||w>wu[f][D].length?D+Me(h,n+a):w<=0?D:wu[f][D][w]}function R(){let w=p.scan();for(c=0;w===15||w===14;)w===14&&u.keepLines?c+=1:w===14&&(c=1),w=p.scan();return E=w===16||p.getTokenError()!==0,w}let v=[];function g(w,A,d){!E&&(!t||A<o&&d>r)&&e.substring(A,d)!==w&&v.push({offset:A,length:d-A,content:w})}let S=R();if(u.keepLines&&c>0&&g(Me(D,c),0,0),S!==17){let w=p.getTokenOffset()+s,A=h.length*n<20&&u.insertSpaces?ee[h.length*n]:Me(h,n);g(A,s,w)}for(;S!==17;){let w=p.getTokenOffset()+p.getTokenLength()+s,A=R(),d="",he=!1;for(;c===0&&(A===12||A===13);){let Er=p.getTokenOffset()+s;g(ee[1],w,Er),w=p.getTokenOffset()+p.getTokenLength()+s,he=A===12,d=he?C():"",A=R()}if(A===2)S!==1&&a--,u.keepLines&&c>0||!u.keepLines&&S!==1?d=C():u.keepLines&&(d=ee[1]);else if(A===4)S!==3&&a--,u.keepLines&&c>0||!u.keepLines&&S!==3?d=C():u.keepLines&&(d=ee[1]);else{switch(S){case 3:case 1:a++,u.keepLines&&c>0||!u.keepLines?d=C():d=ee[1];break;case 5:u.keepLines&&c>0||!u.keepLines?d=C():d=ee[1];break;case 12:d=C();break;case 13:c>0?d=C():he||(d=ee[1]);break;case 6:u.keepLines&&c>0?d=C():he||(d=ee[1]);break;case 10:u.keepLines&&c>0?d=C():A===6&&!he&&(d="");break;case 7:case 8:case 9:case 11:case 2:case 4:u.keepLines&&c>0?d=C():(A===12||A===13)&&!he?d=ee[1]:A!==5&&A!==17&&(E=!0);break;case 16:E=!0;break}c>0&&(A===12||A===13)&&(d=C())}A===17&&(u.keepLines&&c>0?d=C():d=u.insertFinalNewline?D:"");let Cr=p.getTokenOffset()+s;g(d,w,Cr),S=A}return v}function Me(e,t){let u="";for(let n=0;n<t;n++)u+=e;return u}function Vf(e,t){let u=0,n=0,i=t.tabSize||4;for(;u<e.length;){let s=e.charAt(u);if(s===ee[1])n++;else if(s===" ")n+=i;else break;u++}return Math.floor(n/i)}function Gf(e,t){for(let u=0;u<t.length;u++){let n=t.charAt(u);if(n==="\r")return u+1<t.length&&t.charAt(u+1)===`
55
139
  `?`\r
56
- `:"\r";if(r===`
140
+ `:"\r";if(n===`
57
141
  `)return`
58
142
  `}return e&&e.eol||`
59
- `}function Ce(e,t){return`\r
60
- `.indexOf(e.charAt(t))!==-1}var Fe;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Fe||(Fe={}));function Ir(e,t=[],i=Fe.DEFAULT){let r=null,u=[],s=[];function n(l){Array.isArray(u)?u.push(l):r!==null&&(u[r]=l)}return ke(e,{onObjectBegin:()=>{let l={};n(l),s.push(u),u=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{u=s.pop()},onArrayBegin:()=>{let l=[];n(l),s.push(u),u=l,r=null},onArrayEnd:()=>{u=s.pop()},onLiteralValue:n,onError:(l,a,h)=>{t.push({error:l,offset:a,length:h})}},i),u[0]}function xt(e,t=[],i=Fe.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function u(l){r.type==="property"&&(r.length=l-r.offset,r=r.parent)}function s(l){return r.children.push(l),l}ke(e,{onObjectBegin:l=>{r=s({type:"object",offset:l,length:-1,parent:r,children:[]})},onObjectProperty:(l,a,h)=>{r=s({type:"property",offset:a,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:l,offset:a,length:h,parent:r})},onObjectEnd:(l,a)=>{u(l+a),r.length=l+a-r.offset,r=r.parent,u(l+a)},onArrayBegin:(l,a)=>{r=s({type:"array",offset:l,length:-1,parent:r,children:[]})},onArrayEnd:(l,a)=>{r.length=l+a-r.offset,r=r.parent,u(l+a)},onLiteralValue:(l,a,h)=>{s({type:Pu(l),offset:a,length:h,parent:r,value:l}),u(a+h)},onSeparator:(l,a,h)=>{r.type==="property"&&(l===":"?r.colonOffset=a:l===","&&u(a))},onError:(l,a,h)=>{t.push({error:l,offset:a,length:h})}},i);let o=r.children[0];return o&&delete o.parent,o}function Ne(e,t){if(!e)return;let i=e;for(let r of t)if(typeof r=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;let u=!1;for(let s of i.children)if(Array.isArray(s.children)&&s.children[0].value===r&&s.children.length===2){i=s.children[1],u=!0;break}if(!u)return}else{let u=r;if(i.type!=="array"||u<0||!Array.isArray(i.children)||u>=i.children.length)return;i=i.children[u]}return i}function ke(e,t,i=Fe.DEFAULT){let r=ge(e,!1),u=[],s=0;function n(v){return v?()=>s===0&&v(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function o(v){return v?I=>s===0&&v(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(v){return v?I=>s===0&&v(I,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>u.slice()):()=>!0}function a(v){return v?()=>{s>0?s++:v(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>u.slice())===!1&&(s=1)}:()=>!0}function h(v){return v?()=>{s>0&&s--,s===0&&v(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let c=a(t.onObjectBegin),D=l(t.onObjectProperty),f=h(t.onObjectEnd),g=a(t.onArrayBegin),b=h(t.onArrayEnd),F=l(t.onLiteralValue),S=o(t.onSeparator),x=n(t.onComment),m=o(t.onError),w=i&&i.disallowComments,A=i&&i.allowTrailingComma;function C(){for(;;){let v=r.scan();switch(r.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:w||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(v){case 12:case 13:w?p(10):x();break;case 16:p(1);break;case 15:case 14:break;default:return v}}}function p(v,I=[],ur=[]){if(m(v),I.length+ur.length>0){let Te=r.getToken();for(;Te!==17;){if(I.indexOf(Te)!==-1){C();break}else if(ur.indexOf(Te)!==-1)break;Te=C()}}}function K(v){let I=r.getTokenValue();return v?F(I):(D(I),u.push(I)),C(),!0}function lt(){switch(r.getToken()){case 11:let v=r.getTokenValue(),I=Number(v);isNaN(I)&&(p(2),I=0),F(I);break;case 7:F(null);break;case 8:F(!0);break;case 9:F(!1);break;default:return!1}return C(),!0}function at(){return r.getToken()!==10?(p(3,[],[2,5]),!1):(K(!1),r.getToken()===6?(S(":"),C(),ct()||p(4,[],[2,5])):p(5,[],[2,5]),u.pop(),!0)}function Ui(){c(),C();let v=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(v||p(4,[],[]),S(","),C(),r.getToken()===2&&A)break}else v&&p(6,[],[]);at()||p(4,[],[2,5]),v=!0}return f(),r.getToken()!==2?p(7,[2],[]):C(),!0}function Wi(){g(),C();let v=!0,I=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(I||p(4,[],[]),S(","),C(),r.getToken()===4&&A)break}else I&&p(6,[],[]);v?(u.push(0),v=!1):u[u.length-1]++,ct()||p(4,[],[4,5]),I=!0}return b(),v||u.pop(),r.getToken()!==4?p(8,[4],[]):C(),!0}function ct(){switch(r.getToken()){case 3:return Wi();case 1:return Ui();case 10:return K(!0);default:return lt()}}return C(),r.getToken()===17?i.allowEmptyContent?!0:(p(4,[],[]),!1):ct()?(r.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}function Pu(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function Lr(e,t,i,r){let u=t.slice(),n=xt(e,[]),o,l;for(;u.length>0&&(l=u.pop(),o=Ne(n,u),o===void 0&&i!==void 0);)typeof l=="string"?i={[l]:i}:i=[i];if(o)if(o.type==="object"&&typeof l=="string"&&Array.isArray(o.children)){let a=Ne(o,[l]);if(a!==void 0)if(i===void 0){if(!a.parent)throw new Error("Malformed AST");let h=o.children.indexOf(a.parent),c,D=a.parent.offset+a.parent.length;if(h>0){let f=o.children[h-1];c=f.offset+f.length}else c=o.offset+1,o.children.length>1&&(D=o.children[1].offset);return X(e,{offset:c,length:D-c,content:""},r)}else return X(e,{offset:a.offset,length:a.length,content:JSON.stringify(i)},r);else{if(i===void 0)return[];let h=`${JSON.stringify(l)}: ${JSON.stringify(i)}`,c=r.getInsertionIndex?r.getInsertionIndex(o.children.map(f=>f.children[0].value)):o.children.length,D;if(c>0){let f=o.children[c-1];D={offset:f.offset+f.length,length:0,content:","+h}}else o.children.length===0?D={offset:o.offset+1,length:0,content:h}:D={offset:o.offset+1,length:0,content:h+","};return X(e,D,r)}}else if(o.type==="array"&&typeof l=="number"&&Array.isArray(o.children)){let a=l;if(a===-1){let h=`${JSON.stringify(i)}`,c;if(o.children.length===0)c={offset:o.offset+1,length:0,content:h};else{let D=o.children[o.children.length-1];c={offset:D.offset+D.length,length:0,content:","+h}}return X(e,c,r)}else if(i===void 0&&o.children.length>=0){let h=l,c=o.children[h],D;if(o.children.length===1)D={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===h){let f=o.children[h-1],g=f.offset+f.length,b=o.offset+o.length;D={offset:g,length:b-2-g,content:""}}else D={offset:c.offset,length:o.children[h+1].offset-c.offset,content:""};return X(e,D,r)}else if(i!==void 0){let h,c=`${JSON.stringify(i)}`;if(!r.isArrayInsertion&&o.children.length>l){let D=o.children[l];h={offset:D.offset,length:D.length,content:c}}else if(o.children.length===0||l===0)h={offset:o.offset+1,length:0,content:o.children.length===0?c:c+","};else{let D=l>o.children.length?o.children.length:l,f=o.children[D-1];h={offset:f.offset+f.length,length:0,content:","+c}}return X(e,h,r)}else throw new Error(`Can not ${i===void 0?"remove":r.isArrayInsertion?"insert":"modify"} Array index ${a} as length is not sufficient`)}else throw new Error(`Can not add ${typeof l!="number"?"index":"property"} to parent of type ${o.type}`);else{if(i===void 0)throw new Error("Can not delete in empty document");return X(e,{offset:n?n.offset:0,length:n?n.length:0,content:JSON.stringify(i)},r)}}function X(e,t,i){if(!i.formattingOptions)return[t];let r=$e(e,t),u=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;u>0&&!Ce(r,u-1);)u--;for(;s<r.length&&!Ce(r,s);)s++}let n=bt(r,{offset:u,length:s-u},{...i.formattingOptions,keepLines:!1});for(let l=n.length-1;l>=0;l--){let a=n[l];r=$e(r,a),u=Math.min(u,a.offset),s=Math.max(s,a.offset+a.length),s+=a.content.length-a.length}let o=e.length-(r.length-s)-u;return[{offset:u,length:o,content:r.substring(u,s)}]}function $e(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var Nr;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Nr||(Nr={}));var kr;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(kr||(kr={}));var He=Ir;var Hr=ke;var $r;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})($r||($r={}));function vt(e,t,i,r){return Lr(e,t,i,r)}function wt(e,t){let i=t.slice(0).sort((u,s)=>{let n=u.offset-s.offset;return n===0?u.length-s.length:n}),r=e.length;for(let u=i.length-1;u>=0;u--){let s=i[u];if(s.offset+s.length<=r)e=$e(e,s);else throw new Error("Overlapping edit");r=s.offset}return e}import{readFileSync as ta,writeFileSync as Ti,existsSync as nt,mkdirSync as ra}from"fs";import{dirname as na}from"path";function en(e){return typeof e>"u"||e===null}function Wu(e){return typeof e=="object"&&e!==null}function Vu(e){return Array.isArray(e)?e:en(e)?[]:[e]}function Yu(e,t){var i,r,u,s;if(t)for(s=Object.keys(t),i=0,r=s.length;i<r;i+=1)u=s[i],e[u]=t[u];return e}function Gu(e,t){var i="",r;for(r=0;r<t;r+=1)i+=e;return i}function Ku(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var qu=en,Ju=Wu,zu=Vu,Qu=Gu,Zu=Ku,Xu=Yu,L={isNothing:qu,isObject:Ju,toArray:zu,repeat:Qu,isNegativeZero:Zu,extend:Xu};function tn(e,t){var i="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(i+=`
143
+ `}function st(e,t){return`\r
144
+ `.indexOf(e.charAt(t))!==-1}var ot;(function(e){e.DEFAULT={allowTrailingComma:!1}})(ot||(ot={}));function ys(e,t=[],u=ot.DEFAULT){let n=null,i=[],s=[];function r(D){Array.isArray(i)?i.push(D):n!==null&&(i[n]=D)}return zt(e,{onObjectBegin:()=>{let D={};r(D),s.push(i),i=D,n=null},onObjectProperty:D=>{n=D},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let D=[];r(D),s.push(i),i=D,n=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:r,onError:(D,l,c)=>{t.push({error:D,offset:l,length:c})}},u),i[0]}function Bu(e,t=[],u=ot.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(D){n.type==="property"&&(n.length=D-n.offset,n=n.parent)}function s(D){return n.children.push(D),D}zt(e,{onObjectBegin:D=>{n=s({type:"object",offset:D,length:-1,parent:n,children:[]})},onObjectProperty:(D,l,c)=>{n=s({type:"property",offset:l,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:D,offset:l,length:c,parent:n})},onObjectEnd:(D,l)=>{i(D+l),n.length=D+l-n.offset,n=n.parent,i(D+l)},onArrayBegin:(D,l)=>{n=s({type:"array",offset:D,length:-1,parent:n,children:[]})},onArrayEnd:(D,l)=>{n.length=D+l-n.offset,n=n.parent,i(D+l)},onLiteralValue:(D,l,c)=>{s({type:zf(D),offset:l,length:c,parent:n,value:D}),i(l+c)},onSeparator:(D,l,c)=>{n.type==="property"&&(D===":"?n.colonOffset=l:D===","&&i(l))},onError:(D,l,c)=>{t.push({error:D,offset:l,length:c})}},u);let o=n.children[0];return o&&delete o.parent,o}function Yt(e,t){if(!e)return;let u=e;for(let n of t)if(typeof n=="string"){if(u.type!=="object"||!Array.isArray(u.children))return;let i=!1;for(let s of u.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){u=s.children[1],i=!0;break}if(!i)return}else{let i=n;if(u.type!=="array"||i<0||!Array.isArray(u.children)||i>=u.children.length)return;u=u.children[i]}return u}function zt(e,t,u=ot.DEFAULT){let n=it(e,!1),i=[],s=0;function r(_){return _?()=>s===0&&_(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function o(_){return _?j=>s===0&&_(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function D(_){return _?j=>s===0&&_(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(_){return _?()=>{s>0?s++:_(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function c(_){return _?()=>{s>0&&s--,s===0&&_(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let a=l(t.onObjectBegin),h=D(t.onObjectProperty),f=c(t.onObjectEnd),p=l(t.onArrayBegin),E=c(t.onArrayEnd),C=D(t.onLiteralValue),R=o(t.onSeparator),v=r(t.onComment),g=o(t.onError),S=u&&u.disallowComments,w=u&&u.allowTrailingComma;function A(){for(;;){let _=n.scan();switch(n.getTokenError()){case 4:d(14);break;case 5:d(15);break;case 3:d(13);break;case 1:S||d(11);break;case 2:d(12);break;case 6:d(16);break}switch(_){case 12:case 13:S?d(10):v();break;case 16:d(1);break;case 15:case 14:break;default:return _}}}function d(_,j=[],ln=[]){if(g(_),j.length+ln.length>0){let mt=n.getToken();for(;mt!==17;){if(j.indexOf(mt)!==-1){A();break}else if(ln.indexOf(mt)!==-1)break;mt=A()}}}function he(_){let j=n.getTokenValue();return _?C(j):(h(j),i.push(j)),A(),!0}function Cr(){switch(n.getToken()){case 11:let _=n.getTokenValue(),j=Number(_);isNaN(j)&&(d(2),j=0),C(j);break;case 7:C(null);break;case 8:C(!0);break;case 9:C(!1);break;default:return!1}return A(),!0}function Er(){return n.getToken()!==10?(d(3,[],[2,5]),!1):(he(!1),n.getToken()===6?(R(":"),A(),Ar()||d(4,[],[2,5])):d(5,[],[2,5]),i.pop(),!0)}function kD(){a(),A();let _=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(_||d(4,[],[]),R(","),A(),n.getToken()===2&&w)break}else _&&d(6,[],[]);Er()||d(4,[],[2,5]),_=!0}return f(),n.getToken()!==2?d(7,[2],[]):A(),!0}function OD(){p(),A();let _=!0,j=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(j||d(4,[],[]),R(","),A(),n.getToken()===4&&w)break}else j&&d(6,[],[]);_?(i.push(0),_=!1):i[i.length-1]++,Ar()||d(4,[],[4,5]),j=!0}return E(),_||i.pop(),n.getToken()!==4?d(8,[4],[]):A(),!0}function Ar(){switch(n.getToken()){case 3:return OD();case 1:return kD();case 10:return he(!0);default:return Cr()}}return A(),n.getToken()===17?u.allowEmptyContent?!0:(d(4,[],[]),!1):Ar()?(n.getToken()!==17&&d(9,[],[]),!0):(d(4,[],[]),!1)}function zf(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function bs(e,t,u,n){let i=t.slice(),r=Bu(e,[]),o,D;for(;i.length>0&&(D=i.pop(),o=Yt(r,i),o===void 0&&u!==void 0);)typeof D=="string"?u={[D]:u}:u=[u];if(o)if(o.type==="object"&&typeof D=="string"&&Array.isArray(o.children)){let l=Yt(o,[D]);if(l!==void 0)if(u===void 0){if(!l.parent)throw new Error("Malformed AST");let c=o.children.indexOf(l.parent),a,h=l.parent.offset+l.parent.length;if(c>0){let f=o.children[c-1];a=f.offset+f.length}else a=o.offset+1,o.children.length>1&&(h=o.children[1].offset);return Se(e,{offset:a,length:h-a,content:""},n)}else return Se(e,{offset:l.offset,length:l.length,content:JSON.stringify(u)},n);else{if(u===void 0)return[];let c=`${JSON.stringify(D)}: ${JSON.stringify(u)}`,a=n.getInsertionIndex?n.getInsertionIndex(o.children.map(f=>f.children[0].value)):o.children.length,h;if(a>0){let f=o.children[a-1];h={offset:f.offset+f.length,length:0,content:","+c}}else o.children.length===0?h={offset:o.offset+1,length:0,content:c}:h={offset:o.offset+1,length:0,content:c+","};return Se(e,h,n)}}else if(o.type==="array"&&typeof D=="number"&&Array.isArray(o.children)){let l=D;if(l===-1){let c=`${JSON.stringify(u)}`,a;if(o.children.length===0)a={offset:o.offset+1,length:0,content:c};else{let h=o.children[o.children.length-1];a={offset:h.offset+h.length,length:0,content:","+c}}return Se(e,a,n)}else if(u===void 0&&o.children.length>=0){let c=D,a=o.children[c],h;if(o.children.length===1)h={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===c){let f=o.children[c-1],p=f.offset+f.length,E=o.offset+o.length;h={offset:p,length:E-2-p,content:""}}else h={offset:a.offset,length:o.children[c+1].offset-a.offset,content:""};return Se(e,h,n)}else if(u!==void 0){let c,a=`${JSON.stringify(u)}`;if(!n.isArrayInsertion&&o.children.length>D){let h=o.children[D];c={offset:h.offset,length:h.length,content:a}}else if(o.children.length===0||D===0)c={offset:o.offset+1,length:0,content:o.children.length===0?a:a+","};else{let h=D>o.children.length?o.children.length:D,f=o.children[h-1];c={offset:f.offset+f.length,length:0,content:","+a}}return Se(e,c,n)}else throw new Error(`Can not ${u===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof D!="number"?"index":"property"} to parent of type ${o.type}`);else{if(u===void 0)throw new Error("Can not delete in empty document");return Se(e,{offset:r?r.offset:0,length:r?r.length:0,content:JSON.stringify(u)},n)}}function Se(e,t,u){if(!u.formattingOptions)return[t];let n=Kt(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!st(n,i-1);)i--;for(;s<n.length&&!st(n,s);)s++}let r=xu(n,{offset:i,length:s-i},{...u.formattingOptions,keepLines:!1});for(let D=r.length-1;D>=0;D--){let l=r[D];n=Kt(n,l),i=Math.min(i,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=e.length-(n.length-s)-i;return[{offset:i,length:o,content:n.substring(i,s)}]}function Kt(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var ws;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ws||(ws={}));var xs;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(xs||(xs={}));var qt=ys;var vs=zt;var Bs;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Bs||(Bs={}));function vu(e,t,u,n){return bs(e,t,u,n)}function _u(e,t){let u=t.slice(0).sort((i,s)=>{let r=i.offset-s.offset;return r===0?i.length-s.length:r}),n=e.length;for(let i=u.length-1;i>=0;i--){let s=u[i];if(s.offset+s.length<=n)e=Kt(e,s);else throw new Error("Overlapping edit");n=s.offset}return e}import{readFileSync as Dd,writeFileSync as mD,existsSync as pr,mkdirSync as ad}from"fs";import{dirname as ld}from"path";function Ws(e){return typeof e>"u"||e===null}function Zf(e){return typeof e=="object"&&e!==null}function Qf(e){return Array.isArray(e)?e:Ws(e)?[]:[e]}function Xf(e,t){var u,n,i,s;if(t)for(s=Object.keys(t),u=0,n=s.length;u<n;u+=1)i=s[u],e[i]=t[i];return e}function e0(e,t){var u="",n;for(n=0;n<t;n+=1)u+=e;return u}function t0(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var r0=Ws,u0=Zf,n0=Qf,i0=e0,s0=t0,o0=Xf,H={isNothing:r0,isObject:u0,toArray:n0,repeat:i0,isNegativeZero:s0,extend:o0};function Vs(e,t){var u="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(u+='in "'+e.mark.name+'" '),u+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(u+=`
61
145
 
62
- `+e.mark.snippet),r+" "+i):r}function Ae(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=tn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ae.prototype=Object.create(Error.prototype);Ae.prototype.constructor=Ae;Ae.prototype.toString=function(t){return this.name+": "+tn(this,t)};var P=Ae;function _t(e,t,i,r,u){var s="",n="",o=Math.floor(u/2)-1;return r-t>o&&(s=" ... ",t=r-o+s.length),i-r>o&&(n=" ...",i=r+o-n.length),{str:s+e.slice(t,i).replace(/\t/g,"\u2192")+n,pos:r-t+s.length}}function Tt(e,t){return L.repeat(" ",t-e.length)+e}function es(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var i=/\r?\n|\r|\0/g,r=[0],u=[],s,n=-1;s=i.exec(e.buffer);)u.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&n<0&&(n=r.length-2);n<0&&(n=r.length-1);var o="",l,a,h=Math.min(e.line+t.linesAfter,u.length).toString().length,c=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(n-l<0);l++)a=_t(e.buffer,r[n-l],u[n-l],e.position-(r[n]-r[n-l]),c),o=L.repeat(" ",t.indent)+Tt((e.line-l+1).toString(),h)+" | "+a.str+`
63
- `+o;for(a=_t(e.buffer,r[n],u[n],e.position,c),o+=L.repeat(" ",t.indent)+Tt((e.line+1).toString(),h)+" | "+a.str+`
64
- `,o+=L.repeat("-",t.indent+h+3+a.pos)+`^
65
- `,l=1;l<=t.linesAfter&&!(n+l>=u.length);l++)a=_t(e.buffer,r[n+l],u[n+l],e.position-(r[n]-r[n+l]),c),o+=L.repeat(" ",t.indent)+Tt((e.line+l+1).toString(),h)+" | "+a.str+`
66
- `;return o.replace(/\n$/,"")}var ts=es,rs=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ns=["scalar","sequence","mapping"];function is(e){var t={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(r){t[String(r)]=i})}),t}function us(e,t){if(t=t||{},Object.keys(t).forEach(function(i){if(rs.indexOf(i)===-1)throw new P('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(i){return i},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=is(t.styleAliases||null),ns.indexOf(this.kind)===-1)throw new P('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var k=us;function Pr(e,t){var i=[];return e[t].forEach(function(r){var u=i.length;i.forEach(function(s,n){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(u=n)}),i[u]=r}),i}function ss(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,i;function r(u){u.multi?(e.multi[u.kind].push(u),e.multi.fallback.push(u)):e[u.kind][u.tag]=e.fallback[u.tag]=u}for(t=0,i=arguments.length;t<i;t+=1)arguments[t].forEach(r);return e}function Bt(e){return this.extend(e)}Bt.prototype.extend=function(t){var i=[],r=[];if(t instanceof k)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(i=i.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new P("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(s){if(!(s instanceof k))throw new P("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new P("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new P("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof k))throw new P("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var u=Object.create(Bt.prototype);return u.implicit=(this.implicit||[]).concat(i),u.explicit=(this.explicit||[]).concat(r),u.compiledImplicit=Pr(u,"implicit"),u.compiledExplicit=Pr(u,"explicit"),u.compiledTypeMap=ss(u.compiledImplicit,u.compiledExplicit),u};var rn=Bt,nn=new k("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),un=new k("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),sn=new k("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),on=new rn({explicit:[nn,un,sn]});function os(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function ls(){return null}function as(e){return e===null}var ln=new k("tag:yaml.org,2002:null",{kind:"scalar",resolve:os,construct:ls,predicate:as,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function cs(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function hs(e){return e==="true"||e==="True"||e==="TRUE"}function Ds(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var an=new k("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cs,construct:hs,predicate:Ds,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function fs(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ps(e){return 48<=e&&e<=55}function ds(e){return 48<=e&&e<=57}function ms(e){if(e===null)return!1;var t=e.length,i=0,r=!1,u;if(!t)return!1;if(u=e[i],(u==="-"||u==="+")&&(u=e[++i]),u==="0"){if(i+1===t)return!0;if(u=e[++i],u==="b"){for(i++;i<t;i++)if(u=e[i],u!=="_"){if(u!=="0"&&u!=="1")return!1;r=!0}return r&&u!=="_"}if(u==="x"){for(i++;i<t;i++)if(u=e[i],u!=="_"){if(!fs(e.charCodeAt(i)))return!1;r=!0}return r&&u!=="_"}if(u==="o"){for(i++;i<t;i++)if(u=e[i],u!=="_"){if(!ps(e.charCodeAt(i)))return!1;r=!0}return r&&u!=="_"}}if(u==="_")return!1;for(;i<t;i++)if(u=e[i],u!=="_"){if(!ds(e.charCodeAt(i)))return!1;r=!0}return!(!r||u==="_")}function gs(e){var t=e,i=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return i*parseInt(t.slice(2),2);if(t[1]==="x")return i*parseInt(t.slice(2),16);if(t[1]==="o")return i*parseInt(t.slice(2),8)}return i*parseInt(t,10)}function Cs(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!L.isNegativeZero(e)}var cn=new k("tag:yaml.org,2002:int",{kind:"scalar",resolve:ms,construct:gs,predicate:Cs,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Fs=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Es(e){return!(e===null||!Fs.test(e)||e[e.length-1]==="_")}function As(e){var t,i;return t=e.replace(/_/g,"").toLowerCase(),i=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:i*parseFloat(t,10)}var ys=/^[-+]?[0-9]+e/;function bs(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(L.isNegativeZero(e))return"-0.0";return i=e.toString(10),ys.test(i)?i.replace("e",".e"):i}function xs(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||L.isNegativeZero(e))}var hn=new k("tag:yaml.org,2002:float",{kind:"scalar",resolve:Es,construct:As,predicate:xs,represent:bs,defaultStyle:"lowercase"}),Dn=on.extend({implicit:[ln,an,cn,hn]}),fn=Dn,pn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function vs(e){return e===null?!1:pn.exec(e)!==null||dn.exec(e)!==null}function ws(e){var t,i,r,u,s,n,o,l=0,a=null,h,c,D;if(t=pn.exec(e),t===null&&(t=dn.exec(e)),t===null)throw new Error("Date resolve error");if(i=+t[1],r=+t[2]-1,u=+t[3],!t[4])return new Date(Date.UTC(i,r,u));if(s=+t[4],n=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],c=+(t[11]||0),a=(h*60+c)*6e4,t[9]==="-"&&(a=-a)),D=new Date(Date.UTC(i,r,u,s,n,o,l)),a&&D.setTime(D.getTime()-a),D}function _s(e){return e.toISOString()}var mn=new k("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:vs,construct:ws,instanceOf:Date,represent:_s});function Ts(e){return e==="<<"||e===null}var gn=new k("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ts}),Nt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
67
- \r`;function Ss(e){if(e===null)return!1;var t,i,r=0,u=e.length,s=Nt;for(i=0;i<u;i++)if(t=s.indexOf(e.charAt(i)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function Bs(e){var t,i,r=e.replace(/[\r\n=]/g,""),u=r.length,s=Nt,n=0,o=[];for(t=0;t<u;t++)t%4===0&&t&&(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)),n=n<<6|s.indexOf(r.charAt(t));return i=u%4*6,i===0?(o.push(n>>16&255),o.push(n>>8&255),o.push(n&255)):i===18?(o.push(n>>10&255),o.push(n>>2&255)):i===12&&o.push(n>>4&255),new Uint8Array(o)}function Os(e){var t="",i=0,r,u,s=e.length,n=Nt;for(r=0;r<s;r++)r%3===0&&r&&(t+=n[i>>18&63],t+=n[i>>12&63],t+=n[i>>6&63],t+=n[i&63]),i=(i<<8)+e[r];return u=s%3,u===0?(t+=n[i>>18&63],t+=n[i>>12&63],t+=n[i>>6&63],t+=n[i&63]):u===2?(t+=n[i>>10&63],t+=n[i>>4&63],t+=n[i<<2&63],t+=n[64]):u===1&&(t+=n[i>>2&63],t+=n[i<<4&63],t+=n[64],t+=n[64]),t}function Rs(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Cn=new k("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ss,construct:Bs,predicate:Rs,represent:Os}),Is=Object.prototype.hasOwnProperty,Ls=Object.prototype.toString;function Ns(e){if(e===null)return!0;var t=[],i,r,u,s,n,o=e;for(i=0,r=o.length;i<r;i+=1){if(u=o[i],n=!1,Ls.call(u)!=="[object Object]")return!1;for(s in u)if(Is.call(u,s))if(!n)n=!0;else return!1;if(!n)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function ks(e){return e!==null?e:[]}var Fn=new k("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ns,construct:ks}),$s=Object.prototype.toString;function Hs(e){if(e===null)return!0;var t,i,r,u,s,n=e;for(s=new Array(n.length),t=0,i=n.length;t<i;t+=1){if(r=n[t],$s.call(r)!=="[object Object]"||(u=Object.keys(r),u.length!==1))return!1;s[t]=[u[0],r[u[0]]]}return!0}function Ps(e){if(e===null)return[];var t,i,r,u,s,n=e;for(s=new Array(n.length),t=0,i=n.length;t<i;t+=1)r=n[t],u=Object.keys(r),s[t]=[u[0],r[u[0]]];return s}var En=new k("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hs,construct:Ps}),Ms=Object.prototype.hasOwnProperty;function js(e){if(e===null)return!0;var t,i=e;for(t in i)if(Ms.call(i,t)&&i[t]!==null)return!1;return!0}function Us(e){return e!==null?e:{}}var An=new k("tag:yaml.org,2002:set",{kind:"mapping",resolve:js,construct:Us}),kt=fn.extend({implicit:[mn,gn],explicit:[Cn,Fn,En,An]}),Q=Object.prototype.hasOwnProperty,Pe=1,yn=2,bn=3,Me=4,St=1,Ws=2,Mr=3,Vs=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ys=/[\x85\u2028\u2029]/,Gs=/[,\[\]\{\}]/,xn=/^(?:!|!!|![a-z\-]+!)$/i,vn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function jr(e){return Object.prototype.toString.call(e)}function G(e){return e===10||e===13}function te(e){return e===9||e===32}function M(e){return e===9||e===32||e===10||e===13}function ae(e){return e===44||e===91||e===93||e===123||e===125}function Ks(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function qs(e){return e===120?2:e===117?4:e===85?8:0}function Js(e){return 48<=e&&e<=57?e-48:-1}function Ur(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
68
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function zs(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var wn=new Array(256),_n=new Array(256);for(ee=0;ee<256;ee++)wn[ee]=Ur(ee)?1:0,_n[ee]=Ur(ee);var ee;function Qs(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||kt,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Tn(e,t){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=ts(i),new P(t,i)}function d(e,t){throw Tn(e,t)}function je(e,t){e.onWarning&&e.onWarning.call(null,Tn(e,t))}var Wr={YAML:function(t,i,r){var u,s,n;t.version!==null&&d(t,"duplication of %YAML directive"),r.length!==1&&d(t,"YAML directive accepts exactly one argument"),u=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),u===null&&d(t,"ill-formed argument of the YAML directive"),s=parseInt(u[1],10),n=parseInt(u[2],10),s!==1&&d(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=n<2,n!==1&&n!==2&&je(t,"unsupported YAML version of the document")},TAG:function(t,i,r){var u,s;r.length!==2&&d(t,"TAG directive accepts exactly two arguments"),u=r[0],s=r[1],xn.test(u)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),Q.call(t.tagMap,u)&&d(t,'there is a previously declared suffix for "'+u+'" tag handle'),vn.test(s)||d(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{d(t,"tag prefix is malformed: "+s)}t.tagMap[u]=s}};function z(e,t,i,r){var u,s,n,o;if(t<i){if(o=e.input.slice(t,i),r)for(u=0,s=o.length;u<s;u+=1)n=o.charCodeAt(u),n===9||32<=n&&n<=1114111||d(e,"expected valid JSON character");else Vs.test(o)&&d(e,"the stream contains non-printable characters");e.result+=o}}function Vr(e,t,i,r){var u,s,n,o;for(L.isObject(i)||d(e,"cannot merge mappings; the provided source object is unacceptable"),u=Object.keys(i),n=0,o=u.length;n<o;n+=1)s=u[n],Q.call(t,s)||(t[s]=i[s],r[s]=!0)}function ce(e,t,i,r,u,s,n,o,l){var a,h;if(Array.isArray(u))for(u=Array.prototype.slice.call(u),a=0,h=u.length;a<h;a+=1)Array.isArray(u[a])&&d(e,"nested arrays are not supported inside keys"),typeof u=="object"&&jr(u[a])==="[object Object]"&&(u[a]="[object Object]");if(typeof u=="object"&&jr(u)==="[object Object]"&&(u="[object Object]"),u=String(u),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(a=0,h=s.length;a<h;a+=1)Vr(e,t,s[a],i);else Vr(e,t,s,i);else!e.json&&!Q.call(i,u)&&Q.call(t,u)&&(e.line=n||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,d(e,"duplicated mapping key")),u==="__proto__"?Object.defineProperty(t,u,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[u]=s,delete i[u];return t}function $t(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function O(e,t,i){for(var r=0,u=e.input.charCodeAt(e.position);u!==0;){for(;te(u);)u===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),u=e.input.charCodeAt(++e.position);if(t&&u===35)do u=e.input.charCodeAt(++e.position);while(u!==10&&u!==13&&u!==0);if(G(u))for($t(e),u=e.input.charCodeAt(e.position),r++,e.lineIndent=0;u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);else break}return i!==-1&&r!==0&&e.lineIndent<i&&je(e,"deficient indentation"),r}function Ve(e){var t=e.position,i;return i=e.input.charCodeAt(t),!!((i===45||i===46)&&i===e.input.charCodeAt(t+1)&&i===e.input.charCodeAt(t+2)&&(t+=3,i=e.input.charCodeAt(t),i===0||M(i)))}function Ht(e,t){t===1?e.result+=" ":t>1&&(e.result+=L.repeat(`
69
- `,t-1))}function Zs(e,t,i){var r,u,s,n,o,l,a,h,c=e.kind,D=e.result,f;if(f=e.input.charCodeAt(e.position),M(f)||ae(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(u=e.input.charCodeAt(e.position+1),M(u)||i&&ae(u)))return!1;for(e.kind="scalar",e.result="",s=n=e.position,o=!1;f!==0;){if(f===58){if(u=e.input.charCodeAt(e.position+1),M(u)||i&&ae(u))break}else if(f===35){if(r=e.input.charCodeAt(e.position-1),M(r))break}else{if(e.position===e.lineStart&&Ve(e)||i&&ae(f))break;if(G(f))if(l=e.line,a=e.lineStart,h=e.lineIndent,O(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=n,e.line=l,e.lineStart=a,e.lineIndent=h;break}}o&&(z(e,s,n,!1),Ht(e,e.line-l),s=n=e.position,o=!1),te(f)||(n=e.position+1),f=e.input.charCodeAt(++e.position)}return z(e,s,n,!1),e.result?!0:(e.kind=c,e.result=D,!1)}function Xs(e,t){var i,r,u;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=u=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(z(e,r,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)r=e.position,e.position++,u=e.position;else return!0;else G(i)?(z(e,r,u,!0),Ht(e,O(e,!1,t)),r=u=e.position):e.position===e.lineStart&&Ve(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,u=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function eo(e,t){var i,r,u,s,n,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return z(e,i,e.position,!0),e.position++,!0;if(o===92){if(z(e,i,e.position,!0),o=e.input.charCodeAt(++e.position),G(o))O(e,!1,t);else if(o<256&&wn[o])e.result+=_n[o],e.position++;else if((n=qs(o))>0){for(u=n,s=0;u>0;u--)o=e.input.charCodeAt(++e.position),(n=Ks(o))>=0?s=(s<<4)+n:d(e,"expected hexadecimal character");e.result+=zs(s),e.position++}else d(e,"unknown escape sequence");i=r=e.position}else G(o)?(z(e,i,r,!0),Ht(e,O(e,!1,t)),i=r=e.position):e.position===e.lineStart&&Ve(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function to(e,t){var i=!0,r,u,s,n=e.tag,o,l=e.anchor,a,h,c,D,f,g=Object.create(null),b,F,S,x;if(x=e.input.charCodeAt(e.position),x===91)h=93,f=!1,o=[];else if(x===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),x=e.input.charCodeAt(++e.position);x!==0;){if(O(e,!0,t),x=e.input.charCodeAt(e.position),x===h)return e.position++,e.tag=n,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=o,!0;i?x===44&&d(e,"expected the node content, but found ','"):d(e,"missed comma between flow collection entries"),F=b=S=null,c=D=!1,x===63&&(a=e.input.charCodeAt(e.position+1),M(a)&&(c=D=!0,e.position++,O(e,!0,t))),r=e.line,u=e.lineStart,s=e.position,he(e,t,Pe,!1,!0),F=e.tag,b=e.result,O(e,!0,t),x=e.input.charCodeAt(e.position),(D||e.line===r)&&x===58&&(c=!0,x=e.input.charCodeAt(++e.position),O(e,!0,t),he(e,t,Pe,!1,!0),S=e.result),f?ce(e,o,g,F,b,S,r,u,s):c?o.push(ce(e,null,g,F,b,S,r,u,s)):o.push(b),O(e,!0,t),x=e.input.charCodeAt(e.position),x===44?(i=!0,x=e.input.charCodeAt(++e.position)):i=!1}d(e,"unexpected end of the stream within a flow collection")}function ro(e,t){var i,r,u=St,s=!1,n=!1,o=t,l=0,a=!1,h,c;if(c=e.input.charCodeAt(e.position),c===124)r=!1;else if(c===62)r=!0;else return!1;for(e.kind="scalar",e.result="";c!==0;)if(c=e.input.charCodeAt(++e.position),c===43||c===45)St===u?u=c===43?Mr:Ws:d(e,"repeat of a chomping mode identifier");else if((h=Js(c))>=0)h===0?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):n?d(e,"repeat of an indentation width identifier"):(o=t+h-1,n=!0);else break;if(te(c)){do c=e.input.charCodeAt(++e.position);while(te(c));if(c===35)do c=e.input.charCodeAt(++e.position);while(!G(c)&&c!==0)}for(;c!==0;){for($t(e),e.lineIndent=0,c=e.input.charCodeAt(e.position);(!n||e.lineIndent<o)&&c===32;)e.lineIndent++,c=e.input.charCodeAt(++e.position);if(!n&&e.lineIndent>o&&(o=e.lineIndent),G(c)){l++;continue}if(e.lineIndent<o){u===Mr?e.result+=L.repeat(`
70
- `,s?1+l:l):u===St&&s&&(e.result+=`
71
- `);break}for(r?te(c)?(a=!0,e.result+=L.repeat(`
72
- `,s?1+l:l)):a?(a=!1,e.result+=L.repeat(`
73
- `,l+1)):l===0?s&&(e.result+=" "):e.result+=L.repeat(`
74
- `,l):e.result+=L.repeat(`
75
- `,s?1+l:l),s=!0,n=!0,l=0,i=e.position;!G(c)&&c!==0;)c=e.input.charCodeAt(++e.position);z(e,i,e.position,!1)}return!0}function Yr(e,t){var i,r=e.tag,u=e.anchor,s=[],n,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,d(e,"tab characters must not be used in indentation")),!(l!==45||(n=e.input.charCodeAt(e.position+1),!M(n))));){if(o=!0,e.position++,O(e,!0,-1)&&e.lineIndent<=t){s.push(null),l=e.input.charCodeAt(e.position);continue}if(i=e.line,he(e,t,bn,!1,!0),s.push(e.result),O(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>t)&&l!==0)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=r,e.anchor=u,e.kind="sequence",e.result=s,!0):!1}function no(e,t,i){var r,u,s,n,o,l,a=e.tag,h=e.anchor,c={},D=Object.create(null),f=null,g=null,b=null,F=!1,S=!1,x;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),x=e.input.charCodeAt(e.position);x!==0;){if(!F&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,d(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(x===63||x===58)&&M(r))x===63?(F&&(ce(e,c,D,f,g,null,n,o,l),f=g=b=null),S=!0,F=!0,u=!0):F?(F=!1,u=!0):d(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,x=r;else{if(n=e.line,o=e.lineStart,l=e.position,!he(e,i,yn,!1,!0))break;if(e.line===s){for(x=e.input.charCodeAt(e.position);te(x);)x=e.input.charCodeAt(++e.position);if(x===58)x=e.input.charCodeAt(++e.position),M(x)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),F&&(ce(e,c,D,f,g,null,n,o,l),f=g=b=null),S=!0,F=!1,u=!1,f=e.tag,g=e.result;else if(S)d(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=a,e.anchor=h,!0}else if(S)d(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=a,e.anchor=h,!0}if((e.line===s||e.lineIndent>t)&&(F&&(n=e.line,o=e.lineStart,l=e.position),he(e,t,Me,!0,u)&&(F?g=e.result:b=e.result),F||(ce(e,c,D,f,g,b,n,o,l),f=g=b=null),O(e,!0,-1),x=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&x!==0)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return F&&ce(e,c,D,f,g,null,n,o,l),S&&(e.tag=a,e.anchor=h,e.kind="mapping",e.result=c),S}function io(e){var t,i=!1,r=!1,u,s,n;if(n=e.input.charCodeAt(e.position),n!==33)return!1;if(e.tag!==null&&d(e,"duplication of a tag property"),n=e.input.charCodeAt(++e.position),n===60?(i=!0,n=e.input.charCodeAt(++e.position)):n===33?(r=!0,u="!!",n=e.input.charCodeAt(++e.position)):u="!",t=e.position,i){do n=e.input.charCodeAt(++e.position);while(n!==0&&n!==62);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;n!==0&&!M(n);)n===33&&(r?d(e,"tag suffix cannot contain exclamation marks"):(u=e.input.slice(t-1,e.position+1),xn.test(u)||d(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Gs.test(s)&&d(e,"tag suffix cannot contain flow indicator characters")}s&&!vn.test(s)&&d(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{d(e,"tag name is malformed: "+s)}return i?e.tag=s:Q.call(e.tagMap,u)?e.tag=e.tagMap[u]+s:u==="!"?e.tag="!"+s:u==="!!"?e.tag="tag:yaml.org,2002:"+s:d(e,'undeclared tag handle "'+u+'"'),!0}function uo(e){var t,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&d(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!M(i)&&!ae(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function so(e){var t,i,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!M(r)&&!ae(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),Q.call(e.anchorMap,i)||d(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],O(e,!0,-1),!0}function he(e,t,i,r,u){var s,n,o,l=1,a=!1,h=!1,c,D,f,g,b,F;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=n=o=Me===i||bn===i,r&&O(e,!0,-1)&&(a=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;io(e)||uo(e);)O(e,!0,-1)?(a=!0,o=s,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=a||u),(l===1||Me===i)&&(Pe===i||yn===i?b=t:b=t+1,F=e.position-e.lineStart,l===1?o&&(Yr(e,F)||no(e,F,b))||to(e,b)?h=!0:(n&&ro(e,b)||Xs(e,b)||eo(e,b)?h=!0:so(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&d(e,"alias node should not have any properties")):Zs(e,b,Pe===i)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&Yr(e,F))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&d(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),c=0,D=e.implicitTypes.length;c<D;c+=1)if(g=e.implicitTypes[c],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Q.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],c=0,D=f.length;c<D;c+=1)if(e.tag.slice(0,f[c].tag.length)===f[c].tag){g=f[c];break}g||d(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function oo(e){var t=e.position,i,r,u,s=!1,n;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(n=e.input.charCodeAt(e.position))!==0&&(O(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||n!==37));){for(s=!0,n=e.input.charCodeAt(++e.position),i=e.position;n!==0&&!M(n);)n=e.input.charCodeAt(++e.position);for(r=e.input.slice(i,e.position),u=[],r.length<1&&d(e,"directive name must not be less than one character in length");n!==0;){for(;te(n);)n=e.input.charCodeAt(++e.position);if(n===35){do n=e.input.charCodeAt(++e.position);while(n!==0&&!G(n));break}if(G(n))break;for(i=e.position;n!==0&&!M(n);)n=e.input.charCodeAt(++e.position);u.push(e.input.slice(i,e.position))}n!==0&&$t(e),Q.call(Wr,r)?Wr[r](e,r,u):je(e,'unknown document directive "'+r+'"')}if(O(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,O(e,!0,-1)):s&&d(e,"directives end mark is expected"),he(e,e.lineIndent-1,Me,!1,!0),O(e,!0,-1),e.checkLineBreaks&&Ys.test(e.input.slice(t,e.position))&&je(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ve(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,O(e,!0,-1));return}if(e.position<e.length-1)d(e,"end of the stream or a document separator is expected");else return}function Sn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
76
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Qs(e,t),r=e.indexOf("\0");for(r!==-1&&(i.position=r,d(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)oo(i);return i.documents}function lo(e,t,i){t!==null&&typeof t=="object"&&typeof i>"u"&&(i=t,t=null);var r=Sn(e,i);if(typeof t!="function")return r;for(var u=0,s=r.length;u<s;u+=1)t(r[u])}function ao(e,t){var i=Sn(e,t);if(i.length!==0){if(i.length===1)return i[0];throw new P("expected a single document in the stream, but found more")}}var co=lo,ho=ao,Bn={loadAll:co,load:ho},On=Object.prototype.toString,Rn=Object.prototype.hasOwnProperty,Pt=65279,Do=9,ye=10,fo=13,po=32,mo=33,go=34,Ot=35,Co=37,Fo=38,Eo=39,Ao=42,In=44,yo=45,Ue=58,bo=61,xo=62,vo=63,wo=64,Ln=91,Nn=93,_o=96,kn=123,To=124,$n=125,H={};H[0]="\\0";H[7]="\\a";H[8]="\\b";H[9]="\\t";H[10]="\\n";H[11]="\\v";H[12]="\\f";H[13]="\\r";H[27]="\\e";H[34]='\\"';H[92]="\\\\";H[133]="\\N";H[160]="\\_";H[8232]="\\L";H[8233]="\\P";var So=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Bo=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Oo(e,t){var i,r,u,s,n,o,l;if(t===null)return{};for(i={},r=Object.keys(t),u=0,s=r.length;u<s;u+=1)n=r[u],o=String(t[n]),n.slice(0,2)==="!!"&&(n="tag:yaml.org,2002:"+n.slice(2)),l=e.compiledTypeMap.fallback[n],l&&Rn.call(l.styleAliases,o)&&(o=l.styleAliases[o]),i[n]=o;return i}function Ro(e){var t,i,r;if(t=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else if(e<=4294967295)i="U",r=8;else throw new P("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+L.repeat("0",r-t.length)+t}var Io=1,be=2;function Lo(e){this.schema=e.schema||kt,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=L.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Oo(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?be:Io,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Gr(e,t){for(var i=L.repeat(" ",t),r=0,u=-1,s="",n,o=e.length;r<o;)u=e.indexOf(`
77
- `,r),u===-1?(n=e.slice(r),r=o):(n=e.slice(r,u+1),r=u+1),n.length&&n!==`
78
- `&&(s+=i),s+=n;return s}function Rt(e,t){return`
79
- `+L.repeat(" ",e.indent*t)}function No(e,t){var i,r,u;for(i=0,r=e.implicitTypes.length;i<r;i+=1)if(u=e.implicitTypes[i],u.resolve(t))return!0;return!1}function We(e){return e===po||e===Do}function xe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Pt||65536<=e&&e<=1114111}function Kr(e){return xe(e)&&e!==Pt&&e!==fo&&e!==ye}function qr(e,t,i){var r=Kr(e),u=r&&!We(e);return(i?r:r&&e!==In&&e!==Ln&&e!==Nn&&e!==kn&&e!==$n)&&e!==Ot&&!(t===Ue&&!u)||Kr(t)&&!We(t)&&e===Ot||t===Ue&&u}function ko(e){return xe(e)&&e!==Pt&&!We(e)&&e!==yo&&e!==vo&&e!==Ue&&e!==In&&e!==Ln&&e!==Nn&&e!==kn&&e!==$n&&e!==Ot&&e!==Fo&&e!==Ao&&e!==mo&&e!==To&&e!==bo&&e!==xo&&e!==Eo&&e!==go&&e!==Co&&e!==wo&&e!==_o}function $o(e){return!We(e)&&e!==Ue}function Ee(e,t){var i=e.charCodeAt(t),r;return i>=55296&&i<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(i-55296)*1024+r-56320+65536:i}function Hn(e){var t=/^\n* /;return t.test(e)}var Pn=1,It=2,Mn=3,jn=4,le=5;function Ho(e,t,i,r,u,s,n,o){var l,a=0,h=null,c=!1,D=!1,f=r!==-1,g=-1,b=ko(Ee(e,0))&&$o(Ee(e,e.length-1));if(t||n)for(l=0;l<e.length;a>=65536?l+=2:l++){if(a=Ee(e,l),!xe(a))return le;b=b&&qr(a,h,o),h=a}else{for(l=0;l<e.length;a>=65536?l+=2:l++){if(a=Ee(e,l),a===ye)c=!0,f&&(D=D||l-g-1>r&&e[g+1]!==" ",g=l);else if(!xe(a))return le;b=b&&qr(a,h,o),h=a}D=D||f&&l-g-1>r&&e[g+1]!==" "}return!c&&!D?b&&!n&&!u(e)?Pn:s===be?le:It:i>9&&Hn(e)?le:n?s===be?le:It:D?jn:Mn}function Po(e,t,i,r,u){e.dump=(function(){if(t.length===0)return e.quotingType===be?'""':"''";if(!e.noCompatMode&&(So.indexOf(t)!==-1||Bo.test(t)))return e.quotingType===be?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,i),n=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=r||e.flowLevel>-1&&i>=e.flowLevel;function l(a){return No(e,a)}switch(Ho(t,o,e.indent,n,l,e.quotingType,e.forceQuotes&&!r,u)){case Pn:return t;case It:return"'"+t.replace(/'/g,"''")+"'";case Mn:return"|"+Jr(t,e.indent)+zr(Gr(t,s));case jn:return">"+Jr(t,e.indent)+zr(Gr(Mo(t,n),s));case le:return'"'+jo(t)+'"';default:throw new P("impossible error: invalid scalar style")}})()}function Jr(e,t){var i=Hn(e)?String(t):"",r=e[e.length-1]===`
80
- `,u=r&&(e[e.length-2]===`
146
+ `+e.mark.snippet),n+" "+u):n}function at(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Vs(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}at.prototype=Object.create(Error.prototype);at.prototype.constructor=at;at.prototype.toString=function(t){return this.name+": "+Vs(this,t)};var q=at;function Tu(e,t,u,n,i){var s="",r="",o=Math.floor(i/2)-1;return n-t>o&&(s=" ... ",t=n-o+s.length),u-n>o&&(r=" ...",u=n+o-r.length),{str:s+e.slice(t,u).replace(/\t/g,"\u2192")+r,pos:n-t+s.length}}function Su(e,t){return H.repeat(" ",t-e.length)+e}function D0(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var u=/\r?\n|\r|\0/g,n=[0],i=[],s,r=-1;s=u.exec(e.buffer);)i.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&r<0&&(r=n.length-2);r<0&&(r=n.length-1);var o="",D,l,c=Math.min(e.line+t.linesAfter,i.length).toString().length,a=t.maxLength-(t.indent+c+3);for(D=1;D<=t.linesBefore&&!(r-D<0);D++)l=Tu(e.buffer,n[r-D],i[r-D],e.position-(n[r]-n[r-D]),a),o=H.repeat(" ",t.indent)+Su((e.line-D+1).toString(),c)+" | "+l.str+`
147
+ `+o;for(l=Tu(e.buffer,n[r],i[r],e.position,a),o+=H.repeat(" ",t.indent)+Su((e.line+1).toString(),c)+" | "+l.str+`
148
+ `,o+=H.repeat("-",t.indent+c+3+l.pos)+`^
149
+ `,D=1;D<=t.linesAfter&&!(r+D>=i.length);D++)l=Tu(e.buffer,n[r+D],i[r+D],e.position-(n[r]-n[r+D]),a),o+=H.repeat(" ",t.indent)+Su((e.line+D+1).toString(),c)+" | "+l.str+`
150
+ `;return o.replace(/\n$/,"")}var a0=D0,l0=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],c0=["scalar","sequence","mapping"];function h0(e){var t={};return e!==null&&Object.keys(e).forEach(function(u){e[u].forEach(function(n){t[String(n)]=u})}),t}function f0(e,t){if(t=t||{},Object.keys(t).forEach(function(u){if(l0.indexOf(u)===-1)throw new q('Unknown option "'+u+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(u){return u},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=h0(t.styleAliases||null),c0.indexOf(this.kind)===-1)throw new q('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var G=f0;function _s(e,t){var u=[];return e[t].forEach(function(n){var i=u.length;u.forEach(function(s,r){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(i=r)}),u[i]=n}),u}function p0(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,u;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,u=arguments.length;t<u;t+=1)arguments[t].forEach(n);return e}function ku(e){return this.extend(e)}ku.prototype.extend=function(t){var u=[],n=[];if(t instanceof G)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(u=u.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new q("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.forEach(function(s){if(!(s instanceof G))throw new q("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new q("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new q("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof G))throw new q("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(ku.prototype);return i.implicit=(this.implicit||[]).concat(u),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=_s(i,"implicit"),i.compiledExplicit=_s(i,"explicit"),i.compiledTypeMap=p0(i.compiledImplicit,i.compiledExplicit),i};var Gs=ku,Ys=new G("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),zs=new G("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Ks=new G("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),qs=new Gs({explicit:[Ys,zs,Ks]});function F0(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function d0(){return null}function m0(e){return e===null}var Js=new G("tag:yaml.org,2002:null",{kind:"scalar",resolve:F0,construct:d0,predicate:m0,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function g0(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function C0(e){return e==="true"||e==="True"||e==="TRUE"}function E0(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Zs=new G("tag:yaml.org,2002:bool",{kind:"scalar",resolve:g0,construct:C0,predicate:E0,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function A0(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function y0(e){return 48<=e&&e<=55}function b0(e){return 48<=e&&e<=57}function w0(e){if(e===null)return!1;var t=e.length,u=0,n=!1,i;if(!t)return!1;if(i=e[u],(i==="-"||i==="+")&&(i=e[++u]),i==="0"){if(u+1===t)return!0;if(i=e[++u],i==="b"){for(u++;u<t;u++)if(i=e[u],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(u++;u<t;u++)if(i=e[u],i!=="_"){if(!A0(e.charCodeAt(u)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(u++;u<t;u++)if(i=e[u],i!=="_"){if(!y0(e.charCodeAt(u)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;u<t;u++)if(i=e[u],i!=="_"){if(!b0(e.charCodeAt(u)))return!1;n=!0}return!(!n||i==="_")}function x0(e){var t=e,u=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(u=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return u*parseInt(t.slice(2),2);if(t[1]==="x")return u*parseInt(t.slice(2),16);if(t[1]==="o")return u*parseInt(t.slice(2),8)}return u*parseInt(t,10)}function B0(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!H.isNegativeZero(e)}var Qs=new G("tag:yaml.org,2002:int",{kind:"scalar",resolve:w0,construct:x0,predicate:B0,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),v0=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function _0(e){return!(e===null||!v0.test(e)||e[e.length-1]==="_")}function T0(e){var t,u;return t=e.replace(/_/g,"").toLowerCase(),u=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:u*parseFloat(t,10)}var S0=/^[-+]?[0-9]+e/;function $0(e,t){var u;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(H.isNegativeZero(e))return"-0.0";return u=e.toString(10),S0.test(u)?u.replace("e",".e"):u}function k0(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||H.isNegativeZero(e))}var Xs=new G("tag:yaml.org,2002:float",{kind:"scalar",resolve:_0,construct:T0,predicate:k0,represent:$0,defaultStyle:"lowercase"}),eo=qs.extend({implicit:[Js,Zs,Qs,Xs]}),to=eo,ro=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),uo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function O0(e){return e===null?!1:ro.exec(e)!==null||uo.exec(e)!==null}function R0(e){var t,u,n,i,s,r,o,D=0,l=null,c,a,h;if(t=ro.exec(e),t===null&&(t=uo.exec(e)),t===null)throw new Error("Date resolve error");if(u=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(u,n,i));if(s=+t[4],r=+t[5],o=+t[6],t[7]){for(D=t[7].slice(0,3);D.length<3;)D+="0";D=+D}return t[9]&&(c=+t[10],a=+(t[11]||0),l=(c*60+a)*6e4,t[9]==="-"&&(l=-l)),h=new Date(Date.UTC(u,n,i,s,r,o,D)),l&&h.setTime(h.getTime()-l),h}function I0(e){return e.toISOString()}var no=new G("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:O0,construct:R0,instanceOf:Date,represent:I0});function L0(e){return e==="<<"||e===null}var io=new G("tag:yaml.org,2002:merge",{kind:"scalar",resolve:L0}),Nu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
151
+ \r`;function N0(e){if(e===null)return!1;var t,u,n=0,i=e.length,s=Nu;for(u=0;u<i;u++)if(t=s.indexOf(e.charAt(u)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function P0(e){var t,u,n=e.replace(/[\r\n=]/g,""),i=n.length,s=Nu,r=0,o=[];for(t=0;t<i;t++)t%4===0&&t&&(o.push(r>>16&255),o.push(r>>8&255),o.push(r&255)),r=r<<6|s.indexOf(n.charAt(t));return u=i%4*6,u===0?(o.push(r>>16&255),o.push(r>>8&255),o.push(r&255)):u===18?(o.push(r>>10&255),o.push(r>>2&255)):u===12&&o.push(r>>4&255),new Uint8Array(o)}function j0(e){var t="",u=0,n,i,s=e.length,r=Nu;for(n=0;n<s;n++)n%3===0&&n&&(t+=r[u>>18&63],t+=r[u>>12&63],t+=r[u>>6&63],t+=r[u&63]),u=(u<<8)+e[n];return i=s%3,i===0?(t+=r[u>>18&63],t+=r[u>>12&63],t+=r[u>>6&63],t+=r[u&63]):i===2?(t+=r[u>>10&63],t+=r[u>>4&63],t+=r[u<<2&63],t+=r[64]):i===1&&(t+=r[u>>2&63],t+=r[u<<4&63],t+=r[64],t+=r[64]),t}function M0(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var so=new G("tag:yaml.org,2002:binary",{kind:"scalar",resolve:N0,construct:P0,predicate:M0,represent:j0}),H0=Object.prototype.hasOwnProperty,U0=Object.prototype.toString;function W0(e){if(e===null)return!0;var t=[],u,n,i,s,r,o=e;for(u=0,n=o.length;u<n;u+=1){if(i=o[u],r=!1,U0.call(i)!=="[object Object]")return!1;for(s in i)if(H0.call(i,s))if(!r)r=!0;else return!1;if(!r)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function V0(e){return e!==null?e:[]}var oo=new G("tag:yaml.org,2002:omap",{kind:"sequence",resolve:W0,construct:V0}),G0=Object.prototype.toString;function Y0(e){if(e===null)return!0;var t,u,n,i,s,r=e;for(s=new Array(r.length),t=0,u=r.length;t<u;t+=1){if(n=r[t],G0.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;s[t]=[i[0],n[i[0]]]}return!0}function z0(e){if(e===null)return[];var t,u,n,i,s,r=e;for(s=new Array(r.length),t=0,u=r.length;t<u;t+=1)n=r[t],i=Object.keys(n),s[t]=[i[0],n[i[0]]];return s}var Do=new G("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Y0,construct:z0}),K0=Object.prototype.hasOwnProperty;function q0(e){if(e===null)return!0;var t,u=e;for(t in u)if(K0.call(u,t)&&u[t]!==null)return!1;return!0}function J0(e){return e!==null?e:{}}var ao=new G("tag:yaml.org,2002:set",{kind:"mapping",resolve:q0,construct:J0}),Pu=to.extend({implicit:[no,io],explicit:[so,oo,Do,ao]}),be=Object.prototype.hasOwnProperty,Jt=1,lo=2,co=3,Zt=4,$u=1,Z0=2,Ts=3,Q0=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,X0=/[\x85\u2028\u2029]/,ep=/[,\[\]\{\}]/,ho=/^(?:!|!!|![a-z\-]+!)$/i,fo=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ss(e){return Object.prototype.toString.call(e)}function ce(e){return e===10||e===13}function ke(e){return e===9||e===32}function J(e){return e===9||e===32||e===10||e===13}function Ue(e){return e===44||e===91||e===93||e===123||e===125}function tp(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function rp(e){return e===120?2:e===117?4:e===85?8:0}function up(e){return 48<=e&&e<=57?e-48:-1}function $s(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
152
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function np(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var po=new Array(256),Fo=new Array(256);for($e=0;$e<256;$e++)po[$e]=$s($e)?1:0,Fo[$e]=$s($e);var $e;function ip(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Pu,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function mo(e,t){var u={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return u.snippet=a0(u),new q(t,u)}function m(e,t){throw mo(e,t)}function Qt(e,t){e.onWarning&&e.onWarning.call(null,mo(e,t))}var ks={YAML:function(t,u,n){var i,s,r;t.version!==null&&m(t,"duplication of %YAML directive"),n.length!==1&&m(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&m(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),r=parseInt(i[2],10),s!==1&&m(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=r<2,r!==1&&r!==2&&Qt(t,"unsupported YAML version of the document")},TAG:function(t,u,n){var i,s;n.length!==2&&m(t,"TAG directive accepts exactly two arguments"),i=n[0],s=n[1],ho.test(i)||m(t,"ill-formed tag handle (first argument) of the TAG directive"),be.call(t.tagMap,i)&&m(t,'there is a previously declared suffix for "'+i+'" tag handle'),fo.test(s)||m(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{m(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function ye(e,t,u,n){var i,s,r,o;if(t<u){if(o=e.input.slice(t,u),n)for(i=0,s=o.length;i<s;i+=1)r=o.charCodeAt(i),r===9||32<=r&&r<=1114111||m(e,"expected valid JSON character");else Q0.test(o)&&m(e,"the stream contains non-printable characters");e.result+=o}}function Os(e,t,u,n){var i,s,r,o;for(H.isObject(u)||m(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(u),r=0,o=i.length;r<o;r+=1)s=i[r],be.call(t,s)||(t[s]=u[s],n[s]=!0)}function We(e,t,u,n,i,s,r,o,D){var l,c;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,c=i.length;l<c;l+=1)Array.isArray(i[l])&&m(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Ss(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&Ss(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)Os(e,t,s[l],u);else Os(e,t,s,u);else!e.json&&!be.call(u,i)&&be.call(t,i)&&(e.line=r||e.line,e.lineStart=o||e.lineStart,e.position=D||e.position,m(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[i]=s,delete u[i];return t}function ju(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):m(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function P(e,t,u){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;ke(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(ce(i))for(ju(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return u!==-1&&n!==0&&e.lineIndent<u&&Qt(e,"deficient indentation"),n}function tr(e){var t=e.position,u;return u=e.input.charCodeAt(t),!!((u===45||u===46)&&u===e.input.charCodeAt(t+1)&&u===e.input.charCodeAt(t+2)&&(t+=3,u=e.input.charCodeAt(t),u===0||J(u)))}function Mu(e,t){t===1?e.result+=" ":t>1&&(e.result+=H.repeat(`
153
+ `,t-1))}function sp(e,t,u){var n,i,s,r,o,D,l,c,a=e.kind,h=e.result,f;if(f=e.input.charCodeAt(e.position),J(f)||Ue(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),J(i)||u&&Ue(i)))return!1;for(e.kind="scalar",e.result="",s=r=e.position,o=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),J(i)||u&&Ue(i))break}else if(f===35){if(n=e.input.charCodeAt(e.position-1),J(n))break}else{if(e.position===e.lineStart&&tr(e)||u&&Ue(f))break;if(ce(f))if(D=e.line,l=e.lineStart,c=e.lineIndent,P(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=r,e.line=D,e.lineStart=l,e.lineIndent=c;break}}o&&(ye(e,s,r,!1),Mu(e,e.line-D),s=r=e.position,o=!1),ke(f)||(r=e.position+1),f=e.input.charCodeAt(++e.position)}return ye(e,s,r,!1),e.result?!0:(e.kind=a,e.result=h,!1)}function op(e,t){var u,n,i;if(u=e.input.charCodeAt(e.position),u!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(u=e.input.charCodeAt(e.position))!==0;)if(u===39)if(ye(e,n,e.position,!0),u=e.input.charCodeAt(++e.position),u===39)n=e.position,e.position++,i=e.position;else return!0;else ce(u)?(ye(e,n,i,!0),Mu(e,P(e,!1,t)),n=i=e.position):e.position===e.lineStart&&tr(e)?m(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);m(e,"unexpected end of the stream within a single quoted scalar")}function Dp(e,t){var u,n,i,s,r,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,u=n=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return ye(e,u,e.position,!0),e.position++,!0;if(o===92){if(ye(e,u,e.position,!0),o=e.input.charCodeAt(++e.position),ce(o))P(e,!1,t);else if(o<256&&po[o])e.result+=Fo[o],e.position++;else if((r=rp(o))>0){for(i=r,s=0;i>0;i--)o=e.input.charCodeAt(++e.position),(r=tp(o))>=0?s=(s<<4)+r:m(e,"expected hexadecimal character");e.result+=np(s),e.position++}else m(e,"unknown escape sequence");u=n=e.position}else ce(o)?(ye(e,u,n,!0),Mu(e,P(e,!1,t)),u=n=e.position):e.position===e.lineStart&&tr(e)?m(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}m(e,"unexpected end of the stream within a double quoted scalar")}function ap(e,t){var u=!0,n,i,s,r=e.tag,o,D=e.anchor,l,c,a,h,f,p=Object.create(null),E,C,R,v;if(v=e.input.charCodeAt(e.position),v===91)c=93,f=!1,o=[];else if(v===123)c=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),v=e.input.charCodeAt(++e.position);v!==0;){if(P(e,!0,t),v=e.input.charCodeAt(e.position),v===c)return e.position++,e.tag=r,e.anchor=D,e.kind=f?"mapping":"sequence",e.result=o,!0;u?v===44&&m(e,"expected the node content, but found ','"):m(e,"missed comma between flow collection entries"),C=E=R=null,a=h=!1,v===63&&(l=e.input.charCodeAt(e.position+1),J(l)&&(a=h=!0,e.position++,P(e,!0,t))),n=e.line,i=e.lineStart,s=e.position,Ve(e,t,Jt,!1,!0),C=e.tag,E=e.result,P(e,!0,t),v=e.input.charCodeAt(e.position),(h||e.line===n)&&v===58&&(a=!0,v=e.input.charCodeAt(++e.position),P(e,!0,t),Ve(e,t,Jt,!1,!0),R=e.result),f?We(e,o,p,C,E,R,n,i,s):a?o.push(We(e,null,p,C,E,R,n,i,s)):o.push(E),P(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(u=!0,v=e.input.charCodeAt(++e.position)):u=!1}m(e,"unexpected end of the stream within a flow collection")}function lp(e,t){var u,n,i=$u,s=!1,r=!1,o=t,D=0,l=!1,c,a;if(a=e.input.charCodeAt(e.position),a===124)n=!1;else if(a===62)n=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)$u===i?i=a===43?Ts:Z0:m(e,"repeat of a chomping mode identifier");else if((c=up(a))>=0)c===0?m(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):r?m(e,"repeat of an indentation width identifier"):(o=t+c-1,r=!0);else break;if(ke(a)){do a=e.input.charCodeAt(++e.position);while(ke(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!ce(a)&&a!==0)}for(;a!==0;){for(ju(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!r||e.lineIndent<o)&&a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!r&&e.lineIndent>o&&(o=e.lineIndent),ce(a)){D++;continue}if(e.lineIndent<o){i===Ts?e.result+=H.repeat(`
154
+ `,s?1+D:D):i===$u&&s&&(e.result+=`
155
+ `);break}for(n?ke(a)?(l=!0,e.result+=H.repeat(`
156
+ `,s?1+D:D)):l?(l=!1,e.result+=H.repeat(`
157
+ `,D+1)):D===0?s&&(e.result+=" "):e.result+=H.repeat(`
158
+ `,D):e.result+=H.repeat(`
159
+ `,s?1+D:D),s=!0,r=!0,D=0,u=e.position;!ce(a)&&a!==0;)a=e.input.charCodeAt(++e.position);ye(e,u,e.position,!1)}return!0}function Rs(e,t){var u,n=e.tag,i=e.anchor,s=[],r,o=!1,D;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),D=e.input.charCodeAt(e.position);D!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,m(e,"tab characters must not be used in indentation")),!(D!==45||(r=e.input.charCodeAt(e.position+1),!J(r))));){if(o=!0,e.position++,P(e,!0,-1)&&e.lineIndent<=t){s.push(null),D=e.input.charCodeAt(e.position);continue}if(u=e.line,Ve(e,t,co,!1,!0),s.push(e.result),P(e,!0,-1),D=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&D!==0)m(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function cp(e,t,u){var n,i,s,r,o,D,l=e.tag,c=e.anchor,a={},h=Object.create(null),f=null,p=null,E=null,C=!1,R=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),v=e.input.charCodeAt(e.position);v!==0;){if(!C&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,m(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,(v===63||v===58)&&J(n))v===63?(C&&(We(e,a,h,f,p,null,r,o,D),f=p=E=null),R=!0,C=!0,i=!0):C?(C=!1,i=!0):m(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(r=e.line,o=e.lineStart,D=e.position,!Ve(e,u,lo,!1,!0))break;if(e.line===s){for(v=e.input.charCodeAt(e.position);ke(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),J(v)||m(e,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(We(e,a,h,f,p,null,r,o,D),f=p=E=null),R=!0,C=!1,i=!1,f=e.tag,p=e.result;else if(R)m(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=c,!0}else if(R)m(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(C&&(r=e.line,o=e.lineStart,D=e.position),Ve(e,t,Zt,!0,i)&&(C?p=e.result:E=e.result),C||(We(e,a,h,f,p,E,r,o,D),f=p=E=null),P(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&v!==0)m(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return C&&We(e,a,h,f,p,null,r,o,D),R&&(e.tag=l,e.anchor=c,e.kind="mapping",e.result=a),R}function hp(e){var t,u=!1,n=!1,i,s,r;if(r=e.input.charCodeAt(e.position),r!==33)return!1;if(e.tag!==null&&m(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),r===60?(u=!0,r=e.input.charCodeAt(++e.position)):r===33?(n=!0,i="!!",r=e.input.charCodeAt(++e.position)):i="!",t=e.position,u){do r=e.input.charCodeAt(++e.position);while(r!==0&&r!==62);e.position<e.length?(s=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):m(e,"unexpected end of the stream within a verbatim tag")}else{for(;r!==0&&!J(r);)r===33&&(n?m(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),ho.test(i)||m(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),ep.test(s)&&m(e,"tag suffix cannot contain flow indicator characters")}s&&!fo.test(s)&&m(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{m(e,"tag name is malformed: "+s)}return u?e.tag=s:be.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:m(e,'undeclared tag handle "'+i+'"'),!0}function fp(e){var t,u;if(u=e.input.charCodeAt(e.position),u!==38)return!1;for(e.anchor!==null&&m(e,"duplication of an anchor property"),u=e.input.charCodeAt(++e.position),t=e.position;u!==0&&!J(u)&&!Ue(u);)u=e.input.charCodeAt(++e.position);return e.position===t&&m(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function pp(e){var t,u,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!J(n)&&!Ue(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&m(e,"name of an alias node must contain at least one character"),u=e.input.slice(t,e.position),be.call(e.anchorMap,u)||m(e,'unidentified alias "'+u+'"'),e.result=e.anchorMap[u],P(e,!0,-1),!0}function Ve(e,t,u,n,i){var s,r,o,D=1,l=!1,c=!1,a,h,f,p,E,C;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=r=o=Zt===u||co===u,n&&P(e,!0,-1)&&(l=!0,e.lineIndent>t?D=1:e.lineIndent===t?D=0:e.lineIndent<t&&(D=-1)),D===1)for(;hp(e)||fp(e);)P(e,!0,-1)?(l=!0,o=s,e.lineIndent>t?D=1:e.lineIndent===t?D=0:e.lineIndent<t&&(D=-1)):o=!1;if(o&&(o=l||i),(D===1||Zt===u)&&(Jt===u||lo===u?E=t:E=t+1,C=e.position-e.lineStart,D===1?o&&(Rs(e,C)||cp(e,C,E))||ap(e,E)?c=!0:(r&&lp(e,E)||op(e,E)||Dp(e,E)?c=!0:pp(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&m(e,"alias node should not have any properties")):sp(e,E,Jt===u)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):D===0&&(c=o&&Rs(e,C))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&m(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),a=0,h=e.implicitTypes.length;a<h;a+=1)if(p=e.implicitTypes[a],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(be.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,f=e.typeMap.multi[e.kind||"fallback"],a=0,h=f.length;a<h;a+=1)if(e.tag.slice(0,f[a].tag.length)===f[a].tag){p=f[a];break}p||m(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&m(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):m(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function Fp(e){var t=e.position,u,n,i,s=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(P(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){for(s=!0,r=e.input.charCodeAt(++e.position),u=e.position;r!==0&&!J(r);)r=e.input.charCodeAt(++e.position);for(n=e.input.slice(u,e.position),i=[],n.length<1&&m(e,"directive name must not be less than one character in length");r!==0;){for(;ke(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!ce(r));break}if(ce(r))break;for(u=e.position;r!==0&&!J(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(u,e.position))}r!==0&&ju(e),be.call(ks,n)?ks[n](e,n,i):Qt(e,'unknown document directive "'+n+'"')}if(P(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,P(e,!0,-1)):s&&m(e,"directives end mark is expected"),Ve(e,e.lineIndent-1,Zt,!1,!0),P(e,!0,-1),e.checkLineBreaks&&X0.test(e.input.slice(t,e.position))&&Qt(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&tr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,P(e,!0,-1));return}if(e.position<e.length-1)m(e,"end of the stream or a document separator is expected");else return}function go(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
160
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var u=new ip(e,t),n=e.indexOf("\0");for(n!==-1&&(u.position=n,m(u,"null byte is not allowed in input")),u.input+="\0";u.input.charCodeAt(u.position)===32;)u.lineIndent+=1,u.position+=1;for(;u.position<u.length-1;)Fp(u);return u.documents}function dp(e,t,u){t!==null&&typeof t=="object"&&typeof u>"u"&&(u=t,t=null);var n=go(e,u);if(typeof t!="function")return n;for(var i=0,s=n.length;i<s;i+=1)t(n[i])}function mp(e,t){var u=go(e,t);if(u.length!==0){if(u.length===1)return u[0];throw new q("expected a single document in the stream, but found more")}}var gp=dp,Cp=mp,Co={loadAll:gp,load:Cp},Eo=Object.prototype.toString,Ao=Object.prototype.hasOwnProperty,Hu=65279,Ep=9,lt=10,Ap=13,yp=32,bp=33,wp=34,Ou=35,xp=37,Bp=38,vp=39,_p=42,yo=44,Tp=45,Xt=58,Sp=61,$p=62,kp=63,Op=64,bo=91,wo=93,Rp=96,xo=123,Ip=124,Bo=125,z={};z[0]="\\0";z[7]="\\a";z[8]="\\b";z[9]="\\t";z[10]="\\n";z[11]="\\v";z[12]="\\f";z[13]="\\r";z[27]="\\e";z[34]='\\"';z[92]="\\\\";z[133]="\\N";z[160]="\\_";z[8232]="\\L";z[8233]="\\P";var Lp=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Np=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Pp(e,t){var u,n,i,s,r,o,D;if(t===null)return{};for(u={},n=Object.keys(t),i=0,s=n.length;i<s;i+=1)r=n[i],o=String(t[r]),r.slice(0,2)==="!!"&&(r="tag:yaml.org,2002:"+r.slice(2)),D=e.compiledTypeMap.fallback[r],D&&Ao.call(D.styleAliases,o)&&(o=D.styleAliases[o]),u[r]=o;return u}function jp(e){var t,u,n;if(t=e.toString(16).toUpperCase(),e<=255)u="x",n=2;else if(e<=65535)u="u",n=4;else if(e<=4294967295)u="U",n=8;else throw new q("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+u+H.repeat("0",n-t.length)+t}var Mp=1,ct=2;function Hp(e){this.schema=e.schema||Pu,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=H.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Pp(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ct:Mp,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Is(e,t){for(var u=H.repeat(" ",t),n=0,i=-1,s="",r,o=e.length;n<o;)i=e.indexOf(`
161
+ `,n),i===-1?(r=e.slice(n),n=o):(r=e.slice(n,i+1),n=i+1),r.length&&r!==`
162
+ `&&(s+=u),s+=r;return s}function Ru(e,t){return`
163
+ `+H.repeat(" ",e.indent*t)}function Up(e,t){var u,n,i;for(u=0,n=e.implicitTypes.length;u<n;u+=1)if(i=e.implicitTypes[u],i.resolve(t))return!0;return!1}function er(e){return e===yp||e===Ep}function ht(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Hu||65536<=e&&e<=1114111}function Ls(e){return ht(e)&&e!==Hu&&e!==Ap&&e!==lt}function Ns(e,t,u){var n=Ls(e),i=n&&!er(e);return(u?n:n&&e!==yo&&e!==bo&&e!==wo&&e!==xo&&e!==Bo)&&e!==Ou&&!(t===Xt&&!i)||Ls(t)&&!er(t)&&e===Ou||t===Xt&&i}function Wp(e){return ht(e)&&e!==Hu&&!er(e)&&e!==Tp&&e!==kp&&e!==Xt&&e!==yo&&e!==bo&&e!==wo&&e!==xo&&e!==Bo&&e!==Ou&&e!==Bp&&e!==_p&&e!==bp&&e!==Ip&&e!==Sp&&e!==$p&&e!==vp&&e!==wp&&e!==xp&&e!==Op&&e!==Rp}function Vp(e){return!er(e)&&e!==Xt}function Dt(e,t){var u=e.charCodeAt(t),n;return u>=55296&&u<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(u-55296)*1024+n-56320+65536:u}function vo(e){var t=/^\n* /;return t.test(e)}var _o=1,Iu=2,To=3,So=4,He=5;function Gp(e,t,u,n,i,s,r,o){var D,l=0,c=null,a=!1,h=!1,f=n!==-1,p=-1,E=Wp(Dt(e,0))&&Vp(Dt(e,e.length-1));if(t||r)for(D=0;D<e.length;l>=65536?D+=2:D++){if(l=Dt(e,D),!ht(l))return He;E=E&&Ns(l,c,o),c=l}else{for(D=0;D<e.length;l>=65536?D+=2:D++){if(l=Dt(e,D),l===lt)a=!0,f&&(h=h||D-p-1>n&&e[p+1]!==" ",p=D);else if(!ht(l))return He;E=E&&Ns(l,c,o),c=l}h=h||f&&D-p-1>n&&e[p+1]!==" "}return!a&&!h?E&&!r&&!i(e)?_o:s===ct?He:Iu:u>9&&vo(e)?He:r?s===ct?He:Iu:h?So:To}function Yp(e,t,u,n,i){e.dump=(function(){if(t.length===0)return e.quotingType===ct?'""':"''";if(!e.noCompatMode&&(Lp.indexOf(t)!==-1||Np.test(t)))return e.quotingType===ct?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,u),r=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=n||e.flowLevel>-1&&u>=e.flowLevel;function D(l){return Up(e,l)}switch(Gp(t,o,e.indent,r,D,e.quotingType,e.forceQuotes&&!n,i)){case _o:return t;case Iu:return"'"+t.replace(/'/g,"''")+"'";case To:return"|"+Ps(t,e.indent)+js(Is(t,s));case So:return">"+Ps(t,e.indent)+js(Is(zp(t,r),s));case He:return'"'+Kp(t)+'"';default:throw new q("impossible error: invalid scalar style")}})()}function Ps(e,t){var u=vo(e)?String(t):"",n=e[e.length-1]===`
164
+ `,i=n&&(e[e.length-2]===`
81
165
  `||e===`
82
- `),s=u?"+":r?"":"-";return i+s+`
83
- `}function zr(e){return e[e.length-1]===`
84
- `?e.slice(0,-1):e}function Mo(e,t){for(var i=/(\n+)([^\n]*)/g,r=(function(){var a=e.indexOf(`
85
- `);return a=a!==-1?a:e.length,i.lastIndex=a,Qr(e.slice(0,a),t)})(),u=e[0]===`
86
- `||e[0]===" ",s,n;n=i.exec(e);){var o=n[1],l=n[2];s=l[0]===" ",r+=o+(!u&&!s&&l!==""?`
87
- `:"")+Qr(l,t),u=s}return r}function Qr(e,t){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,r,u=0,s,n=0,o=0,l="";r=i.exec(e);)o=r.index,o-u>t&&(s=n>u?n:o,l+=`
88
- `+e.slice(u,s),u=s+1),n=o;return l+=`
89
- `,e.length-u>t&&n>u?l+=e.slice(u,n)+`
90
- `+e.slice(n+1):l+=e.slice(u),l.slice(1)}function jo(e){for(var t="",i=0,r,u=0;u<e.length;i>=65536?u+=2:u++)i=Ee(e,u),r=H[i],!r&&xe(i)?(t+=e[u],i>=65536&&(t+=e[u+1])):t+=r||Ro(i);return t}function Uo(e,t,i){var r="",u=e.tag,s,n,o;for(s=0,n=i.length;s<n;s+=1)o=i[s],e.replacer&&(o=e.replacer.call(i,String(s),o)),(q(e,t,o,!1,!1)||typeof o>"u"&&q(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=u,e.dump="["+r+"]"}function Zr(e,t,i,r){var u="",s=e.tag,n,o,l;for(n=0,o=i.length;n<o;n+=1)l=i[n],e.replacer&&(l=e.replacer.call(i,String(n),l)),(q(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&q(e,t+1,null,!0,!0,!1,!0))&&((!r||u!=="")&&(u+=Rt(e,t)),e.dump&&ye===e.dump.charCodeAt(0)?u+="-":u+="- ",u+=e.dump);e.tag=s,e.dump=u||"[]"}function Wo(e,t,i){var r="",u=e.tag,s=Object.keys(i),n,o,l,a,h;for(n=0,o=s.length;n<o;n+=1)h="",r!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=s[n],a=i[l],e.replacer&&(a=e.replacer.call(i,l,a)),q(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),q(e,t,a,!1,!1)&&(h+=e.dump,r+=h));e.tag=u,e.dump="{"+r+"}"}function Vo(e,t,i,r){var u="",s=e.tag,n=Object.keys(i),o,l,a,h,c,D;if(e.sortKeys===!0)n.sort();else if(typeof e.sortKeys=="function")n.sort(e.sortKeys);else if(e.sortKeys)throw new P("sortKeys must be a boolean or a function");for(o=0,l=n.length;o<l;o+=1)D="",(!r||u!=="")&&(D+=Rt(e,t)),a=n[o],h=i[a],e.replacer&&(h=e.replacer.call(i,a,h)),q(e,t+1,a,!0,!0,!0)&&(c=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,c&&(e.dump&&ye===e.dump.charCodeAt(0)?D+="?":D+="? "),D+=e.dump,c&&(D+=Rt(e,t)),q(e,t+1,h,!0,c)&&(e.dump&&ye===e.dump.charCodeAt(0)?D+=":":D+=": ",D+=e.dump,u+=D));e.tag=s,e.dump=u||"{}"}function Xr(e,t,i){var r,u,s,n,o,l;for(u=i?e.explicitTypes:e.implicitTypes,s=0,n=u.length;s<n;s+=1)if(o=u[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(i?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,On.call(o.represent)==="[object Function]")r=o.represent(t,l);else if(Rn.call(o.represent,l))r=o.represent[l](t,l);else throw new P("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=r}return!0}return!1}function q(e,t,i,r,u,s,n){e.tag=null,e.dump=i,Xr(e,i,!1)||Xr(e,i,!0);var o=On.call(e.dump),l=r,a;r&&(r=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",c,D;if(h&&(c=e.duplicates.indexOf(i),D=c!==-1),(e.tag!==null&&e.tag!=="?"||D||e.indent!==2&&t>0)&&(u=!1),D&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(h&&D&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(Vo(e,t,e.dump,u),D&&(e.dump="&ref_"+c+e.dump)):(Wo(e,t,e.dump),D&&(e.dump="&ref_"+c+" "+e.dump));else if(o==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!n&&t>0?Zr(e,t-1,e.dump,u):Zr(e,t,e.dump,u),D&&(e.dump="&ref_"+c+e.dump)):(Uo(e,t,e.dump),D&&(e.dump="&ref_"+c+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Po(e,e.dump,t,s,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new P("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(a=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?a="!"+a:a.slice(0,18)==="tag:yaml.org,2002:"?a="!!"+a.slice(18):a="!<"+a+">",e.dump=a+" "+e.dump)}return!0}function Yo(e,t){var i=[],r=[],u,s;for(Lt(e,i,r),u=0,s=r.length;u<s;u+=1)t.duplicates.push(i[r[u]]);t.usedDuplicates=new Array(s)}function Lt(e,t,i){var r,u,s;if(e!==null&&typeof e=="object")if(u=t.indexOf(e),u!==-1)i.indexOf(u)===-1&&i.push(u);else if(t.push(e),Array.isArray(e))for(u=0,s=e.length;u<s;u+=1)Lt(e[u],t,i);else for(r=Object.keys(e),u=0,s=r.length;u<s;u+=1)Lt(e[r[u]],t,i)}function Go(e,t){t=t||{};var i=new Lo(t);i.noRefs||Yo(e,i);var r=e;return i.replacer&&(r=i.replacer.call({"":r},"",r)),q(i,0,r,!0,!0)?i.dump+`
91
- `:""}var Ko=Go,qo={dump:Ko};function Mt(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Jo=k,zo=rn,Qo=on,Zo=Dn,Xo=fn,el=kt,tl=Bn.load,rl=Bn.loadAll,nl=qo.dump,il=P,ul={binary:Cn,float:hn,map:sn,null:ln,pairs:En,set:An,timestamp:mn,bool:an,int:cn,merge:gn,omap:Fn,seq:un,str:nn},sl=Mt("safeLoad","load"),ol=Mt("safeLoadAll","loadAll"),ll=Mt("safeDump","dump"),al={Type:Jo,Schema:zo,FAILSAFE_SCHEMA:Qo,JSON_SCHEMA:Zo,CORE_SCHEMA:Xo,DEFAULT_SCHEMA:el,load:tl,loadAll:rl,dump:nl,YAMLException:il,types:ul,safeLoad:sl,safeLoadAll:ol,safeDump:ll},Ye=al;var _e=Se(Ci(),1);import{readFileSync as sa,writeFileSync as Si,existsSync as it,mkdirSync as oa}from"fs";import{dirname as la}from"path";import{existsSync as rr,mkdirSync as Ii,readFileSync as da,writeFileSync as ma}from"fs";import{homedir as ga}from"os";import{join as Jt,dirname as Li,isAbsolute as Zc,relative as Xc,sep as eh}from"path";var T=$l();function Hl(){let e=process.platform;if(e==="win32"){let t=process.env.APPDATA||E(T,"AppData","Roaming");return{appSupport:t,vscodePath:E(t,"Code","User"),gooseConfigPath:E(t,"Block","goose","config","config.yaml")}}else{if(e==="darwin")return{appSupport:E(T,"Library","Application Support"),vscodePath:E(T,"Library","Application Support","Code","User"),gooseConfigPath:E(T,".config","goose","config.yaml")};{let t=process.env.XDG_CONFIG_HOME||E(T,".config");return{appSupport:t,vscodePath:E(t,"Code","User"),gooseConfigPath:E(t,"goose","config.yaml")}}}}var{appSupport:fe,vscodePath:qt,gooseConfigPath:Fi}=Hl(),Pl=E(T,".gemini","config","mcp_config.json"),Ei=E(process.env.CLINE_DIR||E(T,".cline"),"data","settings","cline_mcp_settings.json"),Ai=E(qt,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),yi=E(process.env.XDG_CONFIG_HOME||E(T,".copilot"),"mcp-config.json"),Ml=E(T,".codeium","windsurf","mcp_config.json");function wi(e){let t={};return e.type&&(t.type=e.type),e.url&&(t.url=e.url),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),typeof e.timeout=="number"&&(t.timeout=e.timeout),t}function zt(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function Xe(e,t){return t.url?wi(t):zt(t)}function jl(e,t){if(!t.url)return zt(t);let i=wi(t);return t.oauthScopes&&t.oauthScopes.length>0&&(i.oauth={scopes:t.oauthScopes}),i}function Ul(e,t){if(t.url){let i=t.type==="sse"?"sse":"streamable_http";return{name:e,description:"",type:i,uri:t.url,headers:t.headers||{},enabled:!0,timeout:300}}return{name:e,description:"",cmd:t.command,args:t.args||[],enabled:!0,envs:t.env||{},type:"stdio",timeout:300}}function Wl(e,t){return t.url?{source:"custom",type:t.type||"http",url:t.url,headers:t.headers||{}}:{source:"custom",command:t.command,args:t.args||[],env:t.env||{}}}function Vl(e,t){return t.url?{type:"remote",url:t.url,enabled:!0,headers:t.headers}:{type:"local",command:[t.command,...t.args||[]],enabled:!0,environment:t.env||{}}}function bi(e,t){return t?t.length===0?(e.default_tools_approval_mode="approve",e):(e.tools=Object.fromEntries(t.map(i=>[i,{approval_mode:"approve"}])),e):e}function Yl(e,t){if(t.url){let i={type:t.type||"http",url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(i.http_headers=t.headers),bi(i,t.autoApproveTools)}return bi({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function Gl(e,t){if(t.url){let i={url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(i.headers=t.headers),t.oauthScopes&&t.oauthScopes.length>0&&(i.auth={scopes:t.oauthScopes}),i}return zt(t)}function xi(e,t){if(t.url){let r={url:t.url,type:t.type==="sse"?"sse":"streamableHttp",disabled:!1};return t.headers&&Object.keys(t.headers).length>0&&(r.headers=t.headers),r}let i={command:t.command,args:t.args||[],disabled:!1};return t.env&&Object.keys(t.env).length>0&&(i.env=t.env),i}function vi(e,t){if(t.url){let r={serverUrl:t.url};return t.headers&&Object.keys(t.headers).length>0&&(r.headers=t.headers),r}let i={command:t.command,args:t.args||[]};return t.env&&Object.keys(t.env).length>0&&(i.env=t.env),i}function Kl(e,t,i){if(i?.local)return t;if(t.url){let u={type:t.type||"http",url:t.url,tools:["*"]};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),u}let r={type:"stdio",command:t.command,args:t.args||[],tools:["*"]};return t.env&&Object.keys(t.env).length>0&&(r.env=t.env),r}function ql(e,t){if(t.local&&e.localConfigPath)return E(t.cwd,e.localConfigPath);let i=e.configPath,r=E(et(i),"mcporter.jsonc");return N(i)?i:N(r)?r:i}var R={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:Pl,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(E(T,".gemini","config")),transformConfig:vi},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:Ai,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(et(Ai)),transformConfig:xi},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:Ei,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(et(Ei)),transformConfig:xi},"claude-code":{name:"claude-code",displayName:"Claude Code",configPath:E(T,".claude.json"),localConfigPath:".mcp.json",projectDetectPaths:[".mcp.json",".claude"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","autoApprove"],detectGlobalInstall:async()=>N(E(T,".claude")),transformConfig:Xe},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:E(fe,"Claude","claude_desktop_config.json"),projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio"],supportedFields:[],unsupportedTransportMessage:"Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings \u2192 Connectors in the app instead.",detectGlobalInstall:async()=>N(E(fe,"Claude")),transformConfig:Xe},codex:{name:"codex",displayName:"Codex",configPath:E(process.env.CODEX_HOME||E(T,".codex"),"config.toml"),localConfigPath:".codex/config.toml",projectDetectPaths:[".codex"],configKey:"mcp_servers",format:"toml",supportedTransports:["stdio","http","sse"],supportedFields:["autoApprove"],detectGlobalInstall:async()=>N(E(T,".codex")),transformConfig:Yl},cursor:{name:"cursor",displayName:"Cursor",configPath:E(T,".cursor","mcp.json"),localConfigPath:".cursor/mcp.json",projectDetectPaths:[".cursor"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["scopes"],detectGlobalInstall:async()=>N(E(T,".cursor")),transformConfig:Gl},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",configPath:E(T,".gemini","settings.json"),localConfigPath:".gemini/settings.json",projectDetectPaths:[".gemini"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","scopes"],detectGlobalInstall:async()=>N(E(T,".gemini")),transformConfig:jl},goose:{name:"goose",displayName:"Goose",configPath:Fi,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(Fi),transformConfig:Ul},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:yi,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(et(yi)),transformConfig:Kl},mcporter:{name:"mcporter",displayName:"MCPorter",configPath:E(T,".mcporter","mcporter.json"),localConfigPath:"config/mcporter.json",projectDetectPaths:["config/mcporter.json"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(E(T,".mcporter")),resolveConfigPath:ql,transformConfig:Xe},opencode:{name:"opencode",displayName:"OpenCode",configPath:E(T,".config","opencode","opencode.json"),localConfigPath:"opencode.json",projectDetectPaths:["opencode.json",".opencode"],configKey:"mcp",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(E(T,".config","opencode")),transformConfig:Vl},vscode:{name:"vscode",displayName:"VS Code",configPath:E(qt,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(qt),transformConfig:Xe},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:Ml,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>N(E(T,".codeium","windsurf")),transformConfig:vi},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?E(fe,"Zed","settings.json"):E(fe,"zed","settings.json"),localConfigPath:".zed/settings.json",projectDetectPaths:[".zed"],configKey:"context_servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>{let e=process.platform==="darwin"||process.platform==="win32"?E(fe,"Zed"):E(fe,"zed");return N(e)},transformConfig:Wl}};function Z(){return Object.keys(R)}function Qt(e){let t=e||process.cwd(),i=[];for(let[r,u]of Object.entries(R))if(u.localConfigPath){for(let s of u.projectDetectPaths)if(N(E(t,s))){i.push(r);break}}return i}async function Zt(){let e=[];for(let[t,i]of Object.entries(R))await i.detectGlobalInstall()&&e.push(t);return e}function ut(e,t){let i={...e};for(let r in t){let u=t[r],s=i[r];u&&typeof u=="object"&&!Array.isArray(u)?i[r]=ut(s&&typeof s=="object"?s:{},u):i[r]=u}return i}function st(e,t){let i=t.split("."),r=e;for(let u of i)if(r&&typeof r=="object"&&u in r)r=r[u];else return;return r}function _i(e){let t=null;return Hr(e,{onObjectProperty:(i,r,u,s,n)=>{if(t===null&&s>0&&n>0){let o=e.lastIndexOf(`
92
- `,r-1)+1,l=e.slice(o,r);t={tabSize:n,insertSpaces:!l.includes(" ")}}}}),t||{tabSize:2,insertSpaces:!0}}function Ql(e){if(!rt(e))return{};let t=Xt(e,"utf-8");return He(t)}function Zl(e,t,i){let r=zl(e);rt(r)||Jl(r,{recursive:!0});let u="",s={};rt(e)&&(u=Xt(e,"utf-8"),s=He(u));let n=ut(s,t);if(u)try{let o=i.split("."),l=st(n,i),a=vt(u,o,l,{formattingOptions:_i(u)}),h=wt(u,a);tt(e,h);return}catch{}tt(e,JSON.stringify(n,null,2))}function Xl(e,t,i){if(!rt(e))return;let r=Xt(e,"utf-8"),u=t.split(".");try{let o=vt(r,[...u,i],void 0,{formattingOptions:_i(r)}),l=wt(r,o);tt(e,l);return}catch{}let s=He(r),n=st(s,t);n&&typeof n=="object"&&i in n&&delete n[i],tt(e,JSON.stringify(s,null,2))}function ea(e,t,i){let r=t.split("."),u=r.pop();if(!u)return;let s=e;for(let n of r)(!s[n]||typeof s[n]!="object")&&(s[n]={}),s=s[n];s[u]=i}function er(e){if(!nt(e))return{};let t=ta(e,"utf-8");return Ye.load(t)||{}}function ia(e,t,i){if(!nt(e))return;let r=er(e),u=t.split("."),s=r;for(let o of u)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&i in s&&delete s[i];let n=Ye.dump(r,{indent:2,lineWidth:-1,noRefs:!0});Ti(e,n)}function ua(e,t){let i=na(e);nt(i)||ra(i,{recursive:!0});let r={};nt(e)&&(r=er(e));let u=ut(r,t),s=Ye.dump(u,{indent:2,lineWidth:-1,noRefs:!0});Ti(e,s)}function tr(e){if(!it(e))return{};let t=sa(e,"utf-8");return _e.parse(t)}function aa(e,t,i){if(!it(e))return;let r=tr(e),u=t.split("."),s=r;for(let o of u)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&i in s&&delete s[i];let n=_e.stringify(r);Si(e,n)}function ca(e,t){let i=la(e);it(i)||oa(i,{recursive:!0});let r={};it(e)&&(r=tr(e));let u=ut(r,t),s=_e.stringify(u);Si(e,s)}function Bi(e,t){switch(t){case"json":return Ql(e);case"yaml":return er(e);case"toml":return tr(e);default:throw new Error(`Unsupported config format: ${t}`)}}function Oi(e,t,i,r){switch(t){case"json":Xl(e,i,r);break;case"yaml":ia(e,i,r);break;case"toml":aa(e,i,r);break;default:throw new Error(`Unsupported config format: ${t}`)}}function ha(e,t,i,r){switch(i){case"json":Zl(e,t,r);break;case"yaml":ua(e,t);break;case"toml":ca(e,t);break;default:throw new Error(`Unsupported config format: ${i}`)}}function Da(e,t,i){let r={},u={};return u[t]=i,ea(r,e,u),r}var Ri={timeout:{label:"request timeout",isSet:e=>typeof e.timeout=="number",clear:e=>{delete e.timeout}},scopes:{label:"OAuth scopes",isSet:e=>Array.isArray(e.oauthScopes)&&e.oauthScopes.length>0,clear:e=>{delete e.oauthScopes}},autoApprove:{label:"tool auto-approval",isSet:e=>Array.isArray(e.autoApproveTools),clear:e=>{delete e.autoApproveTools}}},fa=Object.keys(Ri);function pa(e,t){let i=new Set(t),r={...e};r.oauthScopes&&(r.oauthScopes=[...r.oauthScopes]),r.autoApproveTools&&(r.autoApproveTools=[...r.autoApproveTools]);let u=[];for(let s of fa){let n=Ri[s];n.isSet(r)&&!i.has(s)&&(n.clear(r),u.push(s))}return{config:r,dropped:u}}var Ca=ga();function Fa(e){if(!rr(e))return{};let t=JSON.parse(da(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function Ea(e,t){let i=Li(e);rr(i)||Ii(i,{recursive:!0}),ma(e,`${JSON.stringify(t,null,2)}
93
- `,"utf-8")}function Aa(e,t){let i=Array.isArray(e)?e.filter(r=>typeof r=="string"):[];for(let r of t)i.includes(r)||i.push(r);return i}function ya(e,t){return t.length===0?[`mcp__${e}`]:t.map(i=>`mcp__${e}__${i}`)}function ba(e={}){let t=!!e.local,i=e.cwd||process.cwd();return t?Jt(i,".claude","settings.local.json"):Jt(Ca,".claude","settings.json")}function xa(e,t,i={}){let r=ba(i);try{let u=Fa(r),s=u.permissions&&typeof u.permissions=="object"&&!Array.isArray(u.permissions)?u.permissions:{};return s.allow=Aa(s.allow,ya(e,t)),u.permissions=s,Ea(r,u),{success:!0,path:r}}catch(u){return{success:!1,path:r,error:u instanceof Error?u.message:"Unknown error"}}}function ot(e,t={}){let i=!!t.local,r=t.cwd||process.cwd();return e.resolveConfigPath?e.resolveConfigPath(e,{local:i,cwd:r}):i&&e.localConfigPath?Jt(r,e.localConfigPath):e.configPath}function nr(e,t={}){return t.local&&e.localConfigKey?e.localConfigKey:e.configKey}function Ni(e,t,i,r={}){let u=R[i],s=ot(u,r);try{let n=Li(s);rr(n)||Ii(n,{recursive:!0});let{config:o,dropped:l}=pa(t,u.supportedFields),a=u.transformConfig(e,o,{local:!!r.local}),h=nr(u,r),c=Da(h,e,a);ha(s,c,u.format,h);let D=[];if(i==="claude-code"&&o.autoApproveTools){let f=xa(e,o.autoApproveTools,r);if(!f.success)return{success:!1,path:f.path,error:f.error};D.push(f.path)}return{success:!0,path:s,...l.length>0?{droppedFields:l}:{},...D.length>0?{extraPaths:D}:{}}}catch(n){return{success:!1,path:s,error:n instanceof Error?n.message:"Unknown error"}}}import{existsSync as va}from"fs";function wa(e){return Object.prototype.hasOwnProperty.call(R,e)}function ki(e,t){return wa(e)?t&&!R[e].localConfigPath?`${e} does not support project-level config`:null:`Unknown agent type: ${String(e)}`}function $i(e,t,i,r={}){let u=ki(e,r.local);return u?{success:!1,path:"",error:u}:Ni(t,i,e,r)}function _a(e,t){return!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,t)}function Ta(e,t,i){let r=R[e],u=ot(r,i),s=nr(r,i);if(!va(u))return{success:!0,path:u,removed:!1};let n=Bi(u,r.format);return _a(st(n,s),t)?(Oi(u,r.format,s,t),{success:!0,path:u,removed:!0}):{success:!0,path:u,removed:!1}}function Hi(e,t,i={}){let r=ki(e,i.local);if(r)return{success:!1,path:"",removed:!1,error:r};let u=e;try{return Ta(u,t,i)}catch(s){return{success:!1,path:ot(R[u],i),removed:!1,error:s instanceof Error?s.message:"Unknown error"}}}var Sa="https://shaders.com/mcp",ir="shaders",Pi="https://shaders.com/docs/guide/mcp";function Mi(){let e=Z().join(", ");console.log(`shaders \u2014 Shaders CLI (https://shaders.com)
166
+ `),s=i?"+":n?"":"-";return u+s+`
167
+ `}function js(e){return e[e.length-1]===`
168
+ `?e.slice(0,-1):e}function zp(e,t){for(var u=/(\n+)([^\n]*)/g,n=(function(){var l=e.indexOf(`
169
+ `);return l=l!==-1?l:e.length,u.lastIndex=l,Ms(e.slice(0,l),t)})(),i=e[0]===`
170
+ `||e[0]===" ",s,r;r=u.exec(e);){var o=r[1],D=r[2];s=D[0]===" ",n+=o+(!i&&!s&&D!==""?`
171
+ `:"")+Ms(D,t),i=s}return n}function Ms(e,t){if(e===""||e[0]===" ")return e;for(var u=/ [^ ]/g,n,i=0,s,r=0,o=0,D="";n=u.exec(e);)o=n.index,o-i>t&&(s=r>i?r:o,D+=`
172
+ `+e.slice(i,s),i=s+1),r=o;return D+=`
173
+ `,e.length-i>t&&r>i?D+=e.slice(i,r)+`
174
+ `+e.slice(r+1):D+=e.slice(i),D.slice(1)}function Kp(e){for(var t="",u=0,n,i=0;i<e.length;u>=65536?i+=2:i++)u=Dt(e,i),n=z[u],!n&&ht(u)?(t+=e[i],u>=65536&&(t+=e[i+1])):t+=n||jp(u);return t}function qp(e,t,u){var n="",i=e.tag,s,r,o;for(s=0,r=u.length;s<r;s+=1)o=u[s],e.replacer&&(o=e.replacer.call(u,String(s),o)),(Fe(e,t,o,!1,!1)||typeof o>"u"&&Fe(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function Hs(e,t,u,n){var i="",s=e.tag,r,o,D;for(r=0,o=u.length;r<o;r+=1)D=u[r],e.replacer&&(D=e.replacer.call(u,String(r),D)),(Fe(e,t+1,D,!0,!0,!1,!0)||typeof D>"u"&&Fe(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Ru(e,t)),e.dump&&lt===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function Jp(e,t,u){var n="",i=e.tag,s=Object.keys(u),r,o,D,l,c;for(r=0,o=s.length;r<o;r+=1)c="",n!==""&&(c+=", "),e.condenseFlow&&(c+='"'),D=s[r],l=u[D],e.replacer&&(l=e.replacer.call(u,D,l)),Fe(e,t,D,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Fe(e,t,l,!1,!1)&&(c+=e.dump,n+=c));e.tag=i,e.dump="{"+n+"}"}function Zp(e,t,u,n){var i="",s=e.tag,r=Object.keys(u),o,D,l,c,a,h;if(e.sortKeys===!0)r.sort();else if(typeof e.sortKeys=="function")r.sort(e.sortKeys);else if(e.sortKeys)throw new q("sortKeys must be a boolean or a function");for(o=0,D=r.length;o<D;o+=1)h="",(!n||i!=="")&&(h+=Ru(e,t)),l=r[o],c=u[l],e.replacer&&(c=e.replacer.call(u,l,c)),Fe(e,t+1,l,!0,!0,!0)&&(a=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,a&&(e.dump&&lt===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,a&&(h+=Ru(e,t)),Fe(e,t+1,c,!0,a)&&(e.dump&&lt===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,i+=h));e.tag=s,e.dump=i||"{}"}function Us(e,t,u){var n,i,s,r,o,D;for(i=u?e.explicitTypes:e.implicitTypes,s=0,r=i.length;s<r;s+=1)if(o=i[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(u?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(D=e.styleMap[o.tag]||o.defaultStyle,Eo.call(o.represent)==="[object Function]")n=o.represent(t,D);else if(Ao.call(o.represent,D))n=o.represent[D](t,D);else throw new q("!<"+o.tag+'> tag resolver accepts not "'+D+'" style');e.dump=n}return!0}return!1}function Fe(e,t,u,n,i,s,r){e.tag=null,e.dump=u,Us(e,u,!1)||Us(e,u,!0);var o=Eo.call(e.dump),D=n,l;n&&(n=e.flowLevel<0||e.flowLevel>t);var c=o==="[object Object]"||o==="[object Array]",a,h;if(c&&(a=e.duplicates.indexOf(u),h=a!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(i=!1),h&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&h&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),o==="[object Object]")n&&Object.keys(e.dump).length!==0?(Zp(e,t,e.dump,i),h&&(e.dump="&ref_"+a+e.dump)):(Jp(e,t,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(o==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!r&&t>0?Hs(e,t-1,e.dump,i):Hs(e,t,e.dump,i),h&&(e.dump="&ref_"+a+e.dump)):(qp(e,t,e.dump),h&&(e.dump="&ref_"+a+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Yp(e,e.dump,t,s,D);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new q("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function Qp(e,t){var u=[],n=[],i,s;for(Lu(e,u,n),i=0,s=n.length;i<s;i+=1)t.duplicates.push(u[n[i]]);t.usedDuplicates=new Array(s)}function Lu(e,t,u){var n,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)u.indexOf(i)===-1&&u.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)Lu(e[i],t,u);else for(n=Object.keys(e),i=0,s=n.length;i<s;i+=1)Lu(e[n[i]],t,u)}function Xp(e,t){t=t||{};var u=new Hp(t);u.noRefs||Qp(e,u);var n=e;return u.replacer&&(n=u.replacer.call({"":n},"",n)),Fe(u,0,n,!0,!0)?u.dump+`
175
+ `:""}var eF=Xp,tF={dump:eF};function Uu(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var rF=G,uF=Gs,nF=qs,iF=eo,sF=to,oF=Pu,DF=Co.load,aF=Co.loadAll,lF=tF.dump,cF=q,hF={binary:so,float:Xs,map:Ks,null:Js,pairs:Do,set:ao,timestamp:no,bool:Zs,int:Qs,merge:io,omap:oo,seq:zs,str:Ys},fF=Uu("safeLoad","load"),pF=Uu("safeLoadAll","loadAll"),FF=Uu("safeDump","dump"),dF={Type:rF,Schema:uF,FAILSAFE_SCHEMA:nF,JSON_SCHEMA:iF,CORE_SCHEMA:sF,DEFAULT_SCHEMA:oF,load:DF,loadAll:aF,dump:lF,YAMLException:cF,types:hF,safeLoad:fF,safeLoadAll:pF,safeDump:FF},rr=dF;var Ft=gt(oD(),1);import{readFileSync as fd,writeFileSync as gD,existsSync as Fr,mkdirSync as pd}from"fs";import{dirname as Fd}from"path";import{existsSync as nn,mkdirSync as yD,readFileSync as yd,writeFileSync as bd}from"fs";import{homedir as wd}from"os";import{join as Zu,dirname as bD,isAbsolute as Ug,relative as Wg,sep as Vg}from"path";var I=VF();function GF(){let e=process.platform;if(e==="win32"){let t=process.env.APPDATA||b(I,"AppData","Roaming");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"Block","goose","config","config.yaml")}}else{if(e==="darwin")return{appSupport:b(I,"Library","Application Support"),vscodePath:b(I,"Library","Application Support","Code","User"),gooseConfigPath:b(I,".config","goose","config.yaml")};{let t=process.env.XDG_CONFIG_HOME||b(I,".config");return{appSupport:t,vscodePath:b(t,"Code","User"),gooseConfigPath:b(t,"goose","config.yaml")}}}}var{appSupport:Ye,vscodePath:Ju,gooseConfigPath:DD}=GF(),YF=b(I,".gemini","config","mcp_config.json"),aD=b(process.env.CLINE_DIR||b(I,".cline"),"data","settings","cline_mcp_settings.json"),lD=b(Ju,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),cD=b(process.env.XDG_CONFIG_HOME||b(I,".copilot"),"mcp-config.json"),zF=b(I,".codeium","windsurf","mcp_config.json");function FD(e){let t={};return e.type&&(t.type=e.type),e.url&&(t.url=e.url),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),typeof e.timeout=="number"&&(t.timeout=e.timeout),t}function Qu(e){let t={command:e.command,args:e.args||[]};return e.env&&Object.keys(e.env).length>0&&(t.env=e.env),t}function lr(e,t){return t.url?FD(t):Qu(t)}function KF(e,t){if(!t.url)return Qu(t);let u=FD(t);return t.oauthScopes&&t.oauthScopes.length>0&&(u.oauth={scopes:t.oauthScopes}),u}function qF(e,t){if(t.url){let u=t.type==="sse"?"sse":"streamable_http";return{name:e,description:"",type:u,uri:t.url,headers:t.headers||{},enabled:!0,timeout:300}}return{name:e,description:"",cmd:t.command,args:t.args||[],enabled:!0,envs:t.env||{},type:"stdio",timeout:300}}function JF(e,t){return t.url?{source:"custom",type:t.type||"http",url:t.url,headers:t.headers||{}}:{source:"custom",command:t.command,args:t.args||[],env:t.env||{}}}function ZF(e,t){return t.url?{type:"remote",url:t.url,enabled:!0,headers:t.headers}:{type:"local",command:[t.command,...t.args||[]],enabled:!0,environment:t.env||{}}}function hD(e,t){return t?t.length===0?(e.default_tools_approval_mode="approve",e):(e.tools=Object.fromEntries(t.map(u=>[u,{approval_mode:"approve"}])),e):e}function QF(e,t){if(t.url){let u={type:t.type||"http",url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.http_headers=t.headers),hD(u,t.autoApproveTools)}return hD({command:t.command,args:t.args||[],env:t.env},t.autoApproveTools)}function XF(e,t){if(t.url){let u={url:t.url};return t.headers&&Object.keys(t.headers).length>0&&(u.headers=t.headers),t.oauthScopes&&t.oauthScopes.length>0&&(u.auth={scopes:t.oauthScopes}),u}return Qu(t)}function fD(e,t){if(t.url){let n={url:t.url,type:t.type==="sse"?"sse":"streamableHttp",disabled:!1};return t.headers&&Object.keys(t.headers).length>0&&(n.headers=t.headers),n}let u={command:t.command,args:t.args||[],disabled:!1};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function pD(e,t){if(t.url){let n={serverUrl:t.url};return t.headers&&Object.keys(t.headers).length>0&&(n.headers=t.headers),n}let u={command:t.command,args:t.args||[]};return t.env&&Object.keys(t.env).length>0&&(u.env=t.env),u}function ed(e,t,u){if(u?.local)return t;if(t.url){let i={type:t.type||"http",url:t.url,tools:["*"]};return t.headers&&Object.keys(t.headers).length>0&&(i.headers=t.headers),i}let n={type:"stdio",command:t.command,args:t.args||[],tools:["*"]};return t.env&&Object.keys(t.env).length>0&&(n.env=t.env),n}function td(e,t){if(t.local&&e.localConfigPath)return b(t.cwd,e.localConfigPath);let u=e.configPath,n=b(cr(u),"mcporter.jsonc");return W(u)?u:W(n)?n:u}var L={antigravity:{name:"antigravity",displayName:"Antigravity",configPath:YF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".gemini","config")),transformConfig:pD},cline:{name:"cline",displayName:"Cline VSCode Extension",configPath:lD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(cr(lD)),transformConfig:fD},"cline-cli":{name:"cline-cli",displayName:"Cline CLI",configPath:aD,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(cr(aD)),transformConfig:fD},"claude-code":{name:"claude-code",displayName:"Claude Code",configPath:b(I,".claude.json"),localConfigPath:".mcp.json",projectDetectPaths:[".mcp.json",".claude"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","autoApprove"],detectGlobalInstall:async()=>W(b(I,".claude")),transformConfig:lr},"claude-desktop":{name:"claude-desktop",displayName:"Claude Desktop",configPath:b(Ye,"Claude","claude_desktop_config.json"),projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio"],supportedFields:[],unsupportedTransportMessage:"Claude Desktop only supports local (stdio) servers via its config file. Add remote servers through Settings \u2192 Connectors in the app instead.",detectGlobalInstall:async()=>W(b(Ye,"Claude")),transformConfig:lr},codex:{name:"codex",displayName:"Codex",configPath:b(process.env.CODEX_HOME||b(I,".codex"),"config.toml"),localConfigPath:".codex/config.toml",projectDetectPaths:[".codex"],configKey:"mcp_servers",format:"toml",supportedTransports:["stdio","http","sse"],supportedFields:["autoApprove"],detectGlobalInstall:async()=>W(b(I,".codex")),transformConfig:QF},cursor:{name:"cursor",displayName:"Cursor",configPath:b(I,".cursor","mcp.json"),localConfigPath:".cursor/mcp.json",projectDetectPaths:[".cursor"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["scopes"],detectGlobalInstall:async()=>W(b(I,".cursor")),transformConfig:XF},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",configPath:b(I,".gemini","settings.json"),localConfigPath:".gemini/settings.json",projectDetectPaths:[".gemini"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:["timeout","scopes"],detectGlobalInstall:async()=>W(b(I,".gemini")),transformConfig:KF},goose:{name:"goose",displayName:"Goose",configPath:DD,projectDetectPaths:[],configKey:"extensions",format:"yaml",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(DD),transformConfig:qF},"github-copilot-cli":{name:"github-copilot-cli",displayName:"GitHub Copilot CLI",configPath:cD,localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"mcpServers",localConfigKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(cr(cD)),transformConfig:ed},mcporter:{name:"mcporter",displayName:"MCPorter",configPath:b(I,".mcporter","mcporter.json"),localConfigPath:"config/mcporter.json",projectDetectPaths:["config/mcporter.json"],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".mcporter")),resolveConfigPath:td,transformConfig:lr},opencode:{name:"opencode",displayName:"OpenCode",configPath:b(I,".config","opencode","opencode.json"),localConfigPath:"opencode.json",projectDetectPaths:["opencode.json",".opencode"],configKey:"mcp",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".config","opencode")),transformConfig:ZF},vscode:{name:"vscode",displayName:"VS Code",configPath:b(Ju,"mcp.json"),localConfigPath:".vscode/mcp.json",projectDetectPaths:[".vscode"],configKey:"servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(Ju),transformConfig:lr},windsurf:{name:"windsurf",displayName:"Windsurf",configPath:zF,projectDetectPaths:[],configKey:"mcpServers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>W(b(I,".codeium","windsurf")),transformConfig:pD},zed:{name:"zed",displayName:"Zed",configPath:process.platform==="darwin"||process.platform==="win32"?b(Ye,"Zed","settings.json"):b(Ye,"zed","settings.json"),localConfigPath:".zed/settings.json",projectDetectPaths:[".zed"],configKey:"context_servers",format:"json",supportedTransports:["stdio","http","sse"],supportedFields:[],detectGlobalInstall:async()=>{let e=process.platform==="darwin"||process.platform==="win32"?b(Ye,"Zed"):b(Ye,"zed");return W(e)},transformConfig:JF}};function ze(){return Object.keys(L)}function Xu(e){let t=e||process.cwd(),u=[];for(let[n,i]of Object.entries(L))if(i.localConfigPath){for(let s of i.projectDetectPaths)if(W(b(t,s))){u.push(n);break}}return u}async function en(){let e=[];for(let[t,u]of Object.entries(L))await u.detectGlobalInstall()&&e.push(t);return e}function dr(e,t){let u={...e};for(let n in t){let i=t[n],s=u[n];i&&typeof i=="object"&&!Array.isArray(i)?u[n]=dr(s&&typeof s=="object"?s:{},i):u[n]=i}return u}function mr(e,t){let u=t.split("."),n=e;for(let i of u)if(n&&typeof n=="object"&&i in n)n=n[i];else return;return n}function dD(e){let t=null;return vs(e,{onObjectProperty:(u,n,i,s,r)=>{if(t===null&&s>0&&r>0){let o=e.lastIndexOf(`
176
+ `,n-1)+1,D=e.slice(o,n);t={tabSize:r,insertSpaces:!D.includes(" ")}}}}),t||{tabSize:2,insertSpaces:!0}}function nd(e){if(!fr(e))return{};let t=tn(e,"utf-8");return qt(t)}function id(e,t,u){let n=ud(e);fr(n)||rd(n,{recursive:!0});let i="",s={};fr(e)&&(i=tn(e,"utf-8"),s=qt(i));let r=dr(s,t);if(i)try{let o=u.split("."),D=mr(r,u),l=vu(i,o,D,{formattingOptions:dD(i)}),c=_u(i,l);hr(e,c);return}catch{}hr(e,JSON.stringify(r,null,2))}function sd(e,t,u){if(!fr(e))return;let n=tn(e,"utf-8"),i=t.split(".");try{let o=vu(n,[...i,u],void 0,{formattingOptions:dD(n)}),D=_u(n,o);hr(e,D);return}catch{}let s=qt(n),r=mr(s,t);r&&typeof r=="object"&&u in r&&delete r[u],hr(e,JSON.stringify(s,null,2))}function od(e,t,u){let n=t.split("."),i=n.pop();if(!i)return;let s=e;for(let r of n)(!s[r]||typeof s[r]!="object")&&(s[r]={}),s=s[r];s[i]=u}function rn(e){if(!pr(e))return{};let t=Dd(e,"utf-8");return rr.load(t)||{}}function cd(e,t,u){if(!pr(e))return;let n=rn(e),i=t.split("."),s=n;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&u in s&&delete s[u];let r=rr.dump(n,{indent:2,lineWidth:-1,noRefs:!0});mD(e,r)}function hd(e,t){let u=ld(e);pr(u)||ad(u,{recursive:!0});let n={};pr(e)&&(n=rn(e));let i=dr(n,t),s=rr.dump(i,{indent:2,lineWidth:-1,noRefs:!0});mD(e,s)}function un(e){if(!Fr(e))return{};let t=fd(e,"utf-8");return Ft.parse(t)}function dd(e,t,u){if(!Fr(e))return;let n=un(e),i=t.split("."),s=n;for(let o of i)if(s&&typeof s=="object"&&o in s)s=s[o];else return;s&&typeof s=="object"&&u in s&&delete s[u];let r=Ft.stringify(n);gD(e,r)}function md(e,t){let u=Fd(e);Fr(u)||pd(u,{recursive:!0});let n={};Fr(e)&&(n=un(e));let i=dr(n,t),s=Ft.stringify(i);gD(e,s)}function CD(e,t){switch(t){case"json":return nd(e);case"yaml":return rn(e);case"toml":return un(e);default:throw new Error(`Unsupported config format: ${t}`)}}function ED(e,t,u,n){switch(t){case"json":sd(e,u,n);break;case"yaml":cd(e,u,n);break;case"toml":dd(e,u,n);break;default:throw new Error(`Unsupported config format: ${t}`)}}function gd(e,t,u,n){switch(u){case"json":id(e,t,n);break;case"yaml":hd(e,t);break;case"toml":md(e,t);break;default:throw new Error(`Unsupported config format: ${u}`)}}function Cd(e,t,u){let n={},i={};return i[t]=u,od(n,e,i),n}var AD={timeout:{label:"request timeout",isSet:e=>typeof e.timeout=="number",clear:e=>{delete e.timeout}},scopes:{label:"OAuth scopes",isSet:e=>Array.isArray(e.oauthScopes)&&e.oauthScopes.length>0,clear:e=>{delete e.oauthScopes}},autoApprove:{label:"tool auto-approval",isSet:e=>Array.isArray(e.autoApproveTools),clear:e=>{delete e.autoApproveTools}}},Ed=Object.keys(AD);function Ad(e,t){let u=new Set(t),n={...e};n.oauthScopes&&(n.oauthScopes=[...n.oauthScopes]),n.autoApproveTools&&(n.autoApproveTools=[...n.autoApproveTools]);let i=[];for(let s of Ed){let r=AD[s];r.isSet(n)&&!u.has(s)&&(r.clear(n),i.push(s))}return{config:n,dropped:i}}var xd=wd();function Bd(e){if(!nn(e))return{};let t=JSON.parse(yd(e,"utf-8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}function vd(e,t){let u=bD(e);nn(u)||yD(u,{recursive:!0}),bd(e,`${JSON.stringify(t,null,2)}
177
+ `,"utf-8")}function _d(e,t){let u=Array.isArray(e)?e.filter(n=>typeof n=="string"):[];for(let n of t)u.includes(n)||u.push(n);return u}function Td(e,t){return t.length===0?[`mcp__${e}`]:t.map(u=>`mcp__${e}__${u}`)}function Sd(e={}){let t=!!e.local,u=e.cwd||process.cwd();return t?Zu(u,".claude","settings.local.json"):Zu(xd,".claude","settings.json")}function $d(e,t,u={}){let n=Sd(u);try{let i=Bd(n),s=i.permissions&&typeof i.permissions=="object"&&!Array.isArray(i.permissions)?i.permissions:{};return s.allow=_d(s.allow,Td(e,t)),i.permissions=s,vd(n,i),{success:!0,path:n}}catch(i){return{success:!1,path:n,error:i instanceof Error?i.message:"Unknown error"}}}function gr(e,t={}){let u=!!t.local,n=t.cwd||process.cwd();return e.resolveConfigPath?e.resolveConfigPath(e,{local:u,cwd:n}):u&&e.localConfigPath?Zu(n,e.localConfigPath):e.configPath}function sn(e,t={}){return t.local&&e.localConfigKey?e.localConfigKey:e.configKey}function wD(e,t,u,n={}){let i=L[u],s=gr(i,n);try{let r=bD(s);nn(r)||yD(r,{recursive:!0});let{config:o,dropped:D}=Ad(t,i.supportedFields),l=i.transformConfig(e,o,{local:!!n.local}),c=sn(i,n),a=Cd(c,e,l);gd(s,a,i.format,c);let h=[];if(u==="claude-code"&&o.autoApproveTools){let f=$d(e,o.autoApproveTools,n);if(!f.success)return{success:!1,path:f.path,error:f.error};h.push(f.path)}return{success:!0,path:s,...D.length>0?{droppedFields:D}:{},...h.length>0?{extraPaths:h}:{}}}catch(r){return{success:!1,path:s,error:r instanceof Error?r.message:"Unknown error"}}}import{existsSync as kd}from"fs";function Od(e){return Object.prototype.hasOwnProperty.call(L,e)}function xD(e,t){return Od(e)?t&&!L[e].localConfigPath?`${e} does not support project-level config`:null:`Unknown agent type: ${String(e)}`}function BD(e,t,u,n={}){let i=xD(e,n.local);return i?{success:!1,path:"",error:i}:wD(t,u,e,n)}function Rd(e,t){return!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,t)}function Id(e,t,u){let n=L[e],i=gr(n,u),s=sn(n,u);if(!kd(i))return{success:!0,path:i,removed:!1};let r=CD(i,n.format);return Rd(mr(r,s),t)?(ED(i,n.format,s,t),{success:!0,path:i,removed:!0}):{success:!0,path:i,removed:!1}}function vD(e,t,u={}){let n=xD(e,u.local);if(n)return{success:!1,path:"",removed:!1,error:n};let i=e;try{return Id(i,t,u)}catch(s){return{success:!1,path:gr(L[i],u),removed:!1,error:s instanceof Error?s.message:"Unknown error"}}}var Ld="https://shaders.com/mcp",on="shaders",an="https://shaders.com/docs/guide/mcp";function Dn(e){return L[e].supportedTransports.includes("http")}function dt(){return ze().filter(Dn)}function _D(e,{requireHttp:t}){let u=new Set(ze()),n=t?dt():ze(),i=new Set(n);for(let s of e)if(u.has(s)||De(`Unknown agent "${s}". Supported agents: ${n.join(", ")}`),!i.has(s)){let r=L[s];De(`${r.displayName}: ${r.unsupportedTransportMessage??"this agent does not support remote (HTTP) MCP servers."}`)}return e}async function Nd(e,t){if(e.agents.length>0)return{targets:_D(e.agents,{requireHttp:!0}),scope:e.global?"global":"project"};let u=e.global?[]:Xu(t).filter(Dn),n=e.global||u.length===0?"global":"project",i=n==="project"?u:(await en()).filter(Dn);if(!(!e.yes&&process.stdout.isTTY&&process.stdin.isTTY))return i.length===0&&De(`No coding agents detected. Pass one explicitly, e.g. npx shaders install-mcp -a cursor
178
+ Supported agents: ${dt().join(", ")}`),{targets:i,scope:n};let r=await yu({message:`Install the Shaders MCP server to which agents? (${n} config)`,options:dt().map(o=>({value:o,label:L[o].displayName,hint:n==="project"&&L[o].localConfigPath?L[o].localConfigPath:L[o].configPath.replace(/^\/Users\/[^/]+|^\/home\/[^/]+|^C:\\Users\\[^\\]+/,"~")})),initialValues:i,required:!0});return ut(r)&&(console.log("Cancelled \u2014 nothing was changed."),process.exit(0)),{targets:r,scope:n}}async function TD(e){let t=process.cwd(),{targets:u,scope:n}=await Nd(e,t),i=0;for(let s of u){let r=n==="project"&&!!L[s].localConfigPath,o=BD(s,on,{type:"http",url:Ld},{local:r,cwd:t});o.success?console.log(`\u2713 ${L[s].displayName} \u2014 ${o.path}`):(i++,console.error(`\u2717 ${L[s].displayName} \u2014 ${o.error}`))}i===u.length&&process.exit(1),console.log(`
179
+ Done! Open your agent and connect to the "${on}" MCP server \u2014 you'll be
180
+ prompted to sign in to your Shaders account the first time it connects.
181
+
182
+ Docs: ${an}`)}async function SD(e){let t=process.cwd(),u=e.agents.length>0?_D(e.agents,{requireHttp:!1}):ze(),n=0,i=0,s=0;for(let r of u){let o=e.global||!L[r].localConfigPath?[!1]:[!0,!1];for(let D of o){i++;let l=vD(r,on,{local:D,cwd:t});l.success&&l.removed?(n++,console.log(`\u2713 Removed from ${L[r].displayName} \u2014 ${l.path}`)):l.success||(s++,console.error(`\u2717 ${L[r].displayName} \u2014 ${l.error}`))}}i>0&&s===i&&process.exit(1),n===0&&s===0&&console.log("No Shaders MCP server entries found.")}function $D(){console.log(`shaders \u2014 Shaders CLI (https://shaders.com)
94
183
 
95
184
  Usage:
185
+ npx shaders init [options] Set up Shaders in this project and connect it to your account
186
+ npx shaders login Sign in to your Shaders account
187
+ npx shaders logout Forget the stored sign-in
96
188
  npx shaders install-mcp [options] Add the Shaders MCP server to your coding agents
97
189
  npx shaders uninstall-mcp [options] Remove the Shaders MCP server from your coding agents
98
190
 
99
- Options:
100
- -a, --agent <name> Target specific agent(s), repeatable (e.g. -a cursor -a claude-code)
101
- -g, --global Use global (user-level) config instead of project config
102
- -y, --yes Skip prompts and use auto-detected agents
103
- -h, --help Show this help
104
- -v, --version Show version
191
+ init options:
192
+ -f, --framework <name> Override detection: react, vue, svelte or solid
193
+ -p, --project <id> Connect to a specific shaders.com project (non-interactive)
194
+ --no-install Don't install the shaders package
195
+ --no-auth Skip sign-in and project connection
196
+ -y, --yes Skip prompts (no project is connected unless --project is given)
105
197
 
106
- Supported agents:
107
- ${e}
198
+ install-mcp options:
199
+ -a, --agent <name> Target specific agent(s), repeatable (e.g. -a cursor -a claude-code)
200
+ -g, --global Use global (user-level) config instead of project config
201
+ -y, --yes Skip prompts and use auto-detected agents
202
+
203
+ General:
204
+ -h, --help Show this help
205
+ -v, --version Show version
108
206
 
109
- Docs: ${Pi}`)}function Ba(e){let t={global:!1,yes:!1,agents:[]},i;for(let r=0;r<e.length;r++){let u=e[r];switch(u){case"-g":case"--global":t.global=!0;break;case"-y":case"--yes":t.yes=!0;break;case"-a":case"--agent":{let s=e[++r];s||ie(`Missing value for ${u}`),t.agents.push(...s.split(",").map(n=>n.trim()).filter(Boolean));break}case"-h":case"--help":Mi(),process.exit(0);break;case"-v":case"--version":console.log("3.2.469"),process.exit(0);break;default:u.startsWith("-")&&ie(`Unknown option: ${u} (see npx shaders --help)`),i&&ie(`Unexpected argument: ${u}`),i=u}}return{command:i,flags:t}}function ie(e){console.error(`\u2717 ${e}`),process.exit(1)}function ji(e){let t=new Set(Z());for(let i of e)t.has(i)||ie(`Unknown agent "${i}". Supported agents: ${Z().join(", ")}`);return e}async function Oa(e,t){if(e.agents.length>0)return{targets:ji(e.agents),scope:e.global?"global":"project"};let i=e.global?[]:Qt(t),r=e.global||i.length===0?"global":"project",u=r==="project"?i:await Zt();if(!(!e.yes&&process.stdout.isTTY&&process.stdin.isTTY))return u.length===0&&ie(`No coding agents detected. Pass one explicitly, e.g. npx shaders install-mcp -a cursor
110
- Supported agents: ${Z().join(", ")}`),{targets:u,scope:r};let n=await Et({message:`Install the Shaders MCP server to which agents? (${r} config)`,options:Z().map(o=>({value:o,label:R[o].displayName,hint:r==="project"&&R[o].localConfigPath?R[o].localConfigPath:R[o].configPath.replace(/^\/Users\/[^/]+|^\/home\/[^/]+|^C:\\Users\\[^\\]+/,"~")})),initialValues:u,required:!0});return de(n)&&(console.log("Cancelled \u2014 nothing was changed."),process.exit(0)),{targets:n,scope:r}}async function Ra(e){let t=process.cwd(),{targets:i,scope:r}=await Oa(e,t),u=0;for(let s of i){let n=r==="project"&&!!R[s].localConfigPath,o=$i(s,ir,{type:"http",url:Sa},{local:n,cwd:t});o.success?console.log(`\u2713 ${R[s].displayName} \u2014 ${o.path}`):(u++,console.error(`\u2717 ${R[s].displayName} \u2014 ${o.error}`))}u===i.length&&process.exit(1),console.log(`
111
- Done! Open your agent and connect to the "${ir}" MCP server \u2014 you'll be
112
- prompted to sign in to your Shaders account (Pro) the first time it connects.
207
+ Supported agents:
208
+ ${dt().join(", ")}
113
209
 
114
- Docs: ${Pi}`)}async function Ia(e){let t=process.cwd(),i=e.agents.length>0?ji(e.agents):Z(),r=0,u=0,s=0;for(let n of i){let o=e.global||!R[n].localConfigPath?[!1]:[!0,!1];for(let l of o){u++;let a=Hi(n,ir,{local:l,cwd:t});a.success&&a.removed?(r++,console.log(`\u2713 Removed from ${R[n].displayName} \u2014 ${a.path}`)):a.success||(s++,console.error(`\u2717 ${R[n].displayName} \u2014 ${a.error}`))}}u>0&&s===u&&process.exit(1),r===0&&s===0&&console.log("No Shaders MCP server entries found.")}async function La(){let{command:e,flags:t}=Ba(process.argv.slice(2));switch(e){case"install-mcp":await Ra(t);break;case"uninstall-mcp":await Ia(t);break;case void 0:case"help":Mi();break;default:ie(`Unknown command "${e}" (see npx shaders --help)`)}}La().catch(e=>{ie(e instanceof Error?e.message:String(e))});
210
+ Docs: ${an}`)}function Pd(e){let t={global:!1,yes:!1,agents:[],auth:!0,install:!0},u,n=(i,s)=>{let r=e[s];return(!r||r.startsWith("-"))&&De(`Missing value for ${i}`),r};for(let i=0;i<e.length;i++){let s=e[i];switch(s){case"-g":case"--global":t.global=!0;break;case"-y":case"--yes":t.yes=!0;break;case"--no-auth":t.auth=!1;break;case"--no-install":t.install=!1;break;case"-a":case"--agent":t.agents.push(...n(s,++i).split(",").map(r=>r.trim()).filter(Boolean));break;case"-f":case"--framework":t.framework=n(s,++i);break;case"-p":case"--project":t.project=n(s,++i);break;case"-h":case"--help":$D(),process.exit(0);break;case"-v":case"--version":console.log("3.2.471"),process.exit(0);break;default:s.startsWith("-")&&De(`Unknown option: ${s} (see npx shaders --help)`),u&&De(`Unexpected argument: ${s}`),u=s}}return{command:u,flags:t}}async function jd(){let{me:e}=await _t();k.success(`Signed in to ${fe()}${e.email?` as ${e.email}`:""}`)}async function Md(){let e=await ti();k.success(e?"Signed out \u2014 stored credentials removed":"No stored credentials found")}async function Hd(){let{command:e,flags:t}=Pd(process.argv.slice(2));switch(e){case"init":await qi(t);break;case"login":await jd();break;case"logout":await Md();break;case"install-mcp":await TD(t);break;case"uninstall-mcp":await SD(t);break;case void 0:case"help":$D();break;default:De(`Unknown command "${e}" (see npx shaders --help)`)}}Hd().catch(e=>{De(e instanceof Error?e.message:String(e))});