@canva/cli 0.0.1-beta.1

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 (109) hide show
  1. package/LICENSE.md +48 -0
  2. package/README.md +206 -0
  3. package/cli.js +566 -0
  4. package/package.json +30 -0
  5. package/templates/base/backend/database/database.ts +42 -0
  6. package/templates/base/backend/routers/auth.ts +285 -0
  7. package/templates/base/declarations/declarations.d.ts +29 -0
  8. package/templates/base/eslint.config.mjs +309 -0
  9. package/templates/base/package.json +83 -0
  10. package/templates/base/scripts/ssl/ssl.ts +131 -0
  11. package/templates/base/scripts/start/app_runner.ts +164 -0
  12. package/templates/base/scripts/start/context.ts +165 -0
  13. package/templates/base/scripts/start/start.ts +35 -0
  14. package/templates/base/styles/components.css +38 -0
  15. package/templates/base/tsconfig.json +54 -0
  16. package/templates/base/utils/backend/base_backend/create.ts +104 -0
  17. package/templates/base/utils/backend/jwt_middleware/index.ts +1 -0
  18. package/templates/base/utils/backend/jwt_middleware/jwt_middleware.ts +229 -0
  19. package/templates/base/utils/backend/jwt_middleware/tests/jwt_middleware.tests.ts +630 -0
  20. package/templates/base/webpack.config.cjs +270 -0
  21. package/templates/common/.env.template +6 -0
  22. package/templates/common/.gitignore.template +9 -0
  23. package/templates/common/LICENSE.md +48 -0
  24. package/templates/common/README.md +250 -0
  25. package/templates/common/jest.config.mjs +8 -0
  26. package/templates/dam/backend/database/database.ts +42 -0
  27. package/templates/dam/backend/routers/auth.ts +285 -0
  28. package/templates/dam/backend/routers/dam.ts +86 -0
  29. package/templates/dam/backend/server.ts +65 -0
  30. package/templates/dam/declarations/declarations.d.ts +29 -0
  31. package/templates/dam/eslint.config.mjs +309 -0
  32. package/templates/dam/package.json +90 -0
  33. package/templates/dam/scripts/ssl/ssl.ts +131 -0
  34. package/templates/dam/scripts/start/app_runner.ts +164 -0
  35. package/templates/dam/scripts/start/context.ts +165 -0
  36. package/templates/dam/scripts/start/start.ts +35 -0
  37. package/templates/dam/src/adapter.ts +44 -0
  38. package/templates/dam/src/app.tsx +147 -0
  39. package/templates/dam/src/config.ts +95 -0
  40. package/templates/dam/src/index.css +10 -0
  41. package/templates/dam/src/index.tsx +22 -0
  42. package/templates/dam/tsconfig.json +54 -0
  43. package/templates/dam/utils/backend/base_backend/create.ts +104 -0
  44. package/templates/dam/utils/backend/jwt_middleware/index.ts +1 -0
  45. package/templates/dam/utils/backend/jwt_middleware/jwt_middleware.ts +229 -0
  46. package/templates/dam/utils/backend/jwt_middleware/tests/jwt_middleware.tests.ts +630 -0
  47. package/templates/dam/webpack.config.cjs +270 -0
  48. package/templates/gen_ai/README.md +27 -0
  49. package/templates/gen_ai/backend/database/database.ts +42 -0
  50. package/templates/gen_ai/backend/routers/auth.ts +285 -0
  51. package/templates/gen_ai/backend/routers/image.ts +234 -0
  52. package/templates/gen_ai/backend/server.ts +56 -0
  53. package/templates/gen_ai/declarations/declarations.d.ts +29 -0
  54. package/templates/gen_ai/eslint.config.mjs +309 -0
  55. package/templates/gen_ai/package.json +92 -0
  56. package/templates/gen_ai/scripts/ssl/ssl.ts +131 -0
  57. package/templates/gen_ai/scripts/start/app_runner.ts +164 -0
  58. package/templates/gen_ai/scripts/start/context.ts +165 -0
  59. package/templates/gen_ai/scripts/start/start.ts +35 -0
  60. package/templates/gen_ai/src/api/api.ts +228 -0
  61. package/templates/gen_ai/src/api/index.ts +1 -0
  62. package/templates/gen_ai/src/app.tsx +13 -0
  63. package/templates/gen_ai/src/components/app_error.tsx +18 -0
  64. package/templates/gen_ai/src/components/footer.messages.ts +53 -0
  65. package/templates/gen_ai/src/components/footer.tsx +157 -0
  66. package/templates/gen_ai/src/components/image_grid.tsx +96 -0
  67. package/templates/gen_ai/src/components/index.ts +8 -0
  68. package/templates/gen_ai/src/components/loading_results.tsx +169 -0
  69. package/templates/gen_ai/src/components/logged_in_status.tsx +44 -0
  70. package/templates/gen_ai/src/components/prompt_input.messages.ts +14 -0
  71. package/templates/gen_ai/src/components/prompt_input.tsx +149 -0
  72. package/templates/gen_ai/src/components/remaining_credits.tsx +75 -0
  73. package/templates/gen_ai/src/components/report_box.tsx +53 -0
  74. package/templates/gen_ai/src/config.ts +21 -0
  75. package/templates/gen_ai/src/context/app_context.tsx +174 -0
  76. package/templates/gen_ai/src/context/context.messages.ts +41 -0
  77. package/templates/gen_ai/src/context/index.ts +2 -0
  78. package/templates/gen_ai/src/context/use_app_context.ts +17 -0
  79. package/templates/gen_ai/src/index.tsx +31 -0
  80. package/templates/gen_ai/src/pages/error.tsx +41 -0
  81. package/templates/gen_ai/src/pages/generate.tsx +9 -0
  82. package/templates/gen_ai/src/pages/index.ts +3 -0
  83. package/templates/gen_ai/src/pages/results.tsx +31 -0
  84. package/templates/gen_ai/src/routes/index.ts +1 -0
  85. package/templates/gen_ai/src/routes/routes.tsx +26 -0
  86. package/templates/gen_ai/src/services/auth.tsx +31 -0
  87. package/templates/gen_ai/src/services/index.ts +1 -0
  88. package/templates/gen_ai/src/utils/index.ts +1 -0
  89. package/templates/gen_ai/src/utils/obscenity_filter.ts +33 -0
  90. package/templates/gen_ai/styles/components.css +38 -0
  91. package/templates/gen_ai/styles/utils.css +3 -0
  92. package/templates/gen_ai/tsconfig.json +54 -0
  93. package/templates/gen_ai/utils/backend/base_backend/create.ts +104 -0
  94. package/templates/gen_ai/utils/backend/jwt_middleware/index.ts +1 -0
  95. package/templates/gen_ai/utils/backend/jwt_middleware/jwt_middleware.ts +229 -0
  96. package/templates/gen_ai/utils/backend/jwt_middleware/tests/jwt_middleware.tests.ts +630 -0
  97. package/templates/gen_ai/webpack.config.cjs +270 -0
  98. package/templates/hello_world/declarations/declarations.d.ts +29 -0
  99. package/templates/hello_world/eslint.config.mjs +309 -0
  100. package/templates/hello_world/package.json +73 -0
  101. package/templates/hello_world/scripts/ssl/ssl.ts +131 -0
  102. package/templates/hello_world/scripts/start/app_runner.ts +164 -0
  103. package/templates/hello_world/scripts/start/context.ts +165 -0
  104. package/templates/hello_world/scripts/start/start.ts +35 -0
  105. package/templates/hello_world/src/app.tsx +41 -0
  106. package/templates/hello_world/src/index.tsx +22 -0
  107. package/templates/hello_world/styles/components.css +38 -0
  108. package/templates/hello_world/tsconfig.json +54 -0
  109. package/templates/hello_world/webpack.config.cjs +270 -0
package/cli.js ADDED
@@ -0,0 +1,566 @@
1
+ #!/usr/bin/env node
2
+ // Copyright 2024 Canva Inc. All Rights Reserved.
3
+ import { createRequire } from 'module';const require = createRequire(import.meta.url);
4
+ var Jx=Object.create;var Ga=Object.defineProperty;var Zx=Object.getOwnPropertyDescriptor;var tD=Object.getOwnPropertyNames;var nD=Object.getPrototypeOf,rD=Object.prototype.hasOwnProperty;var Qx=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),$a=e=>{throw TypeError(e)};var eS=(e,t,n)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kx=(e,t)=>Ga(e,"name",{value:t,configurable:!0}),K=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),iD=(e,t)=>{for(var n in t)Ga(e,n,{get:t[n],enumerable:!0})},sD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tD(t))!rD.call(e,i)&&i!==n&&Ga(e,i,{get:()=>t[i],enumerable:!(r=Zx(t,i))||r.enumerable});return e};var Ar=(e,t,n)=>(n=e!=null?Jx(nD(e)):{},sD(t||!e||!e.__esModule?Ga(n,"default",{value:e,enumerable:!0}):n,e));var Ha=e=>[,,,Jx(e?.[Qx("metadata")]??null)],tS=["class","method","getter","setter","accessor","field","value","get","set"],Nu=e=>e!==void 0&&typeof e!="function"?$a("Function expected"):e,oD=(e,t,n,r,i)=>({kind:tS[e],name:t,metadata:r,addInitializer:s=>n._?$a("Already initialized"):i.push(Nu(s||null))}),Io=(e,t)=>eS(t,Qx("metadata"),e[3]),it=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)t&1?s[i].call(n):r=s[i].call(n,r);return r},st=(e,t,n,r,i,s)=>{var o,a,l,u,c,f=t&7,p=!!(t&8),d=!!(t&16),m=f>3?e.length+1:f?p?1:2:0,y=tS[f+5],v=f>3&&(e[m-1]=[]),h=e[m]||(e[m]=[]),g=f&&(!d&&!p&&(i=i.prototype),f<5&&(f>3||!d)&&Zx(f<4?i:{get[n](){return Yx(this,s)},set[n](x){return Xx(this,s,x)}},n));f?d&&f<4&&Kx(s,(f>2?"set ":f>1?"get ":"")+n):Kx(i,n);for(var w=r.length-1;w>=0;w--)u=oD(f,n,l={},e[3],h),f&&(u.static=p,u.private=d,c=u.access={has:d?x=>aD(i,x):x=>n in x},f^3&&(c.get=d?x=>(f^1?Yx:lD)(x,i,f^4?s:g.get):x=>x[n]),f>2&&(c.set=d?(x,C)=>Xx(x,i,C,f^4?s:g.set):(x,C)=>x[n]=C)),a=(0,r[w])(f?f<4?d?s:g[y]:f>4?void 0:{get:g.get,set:g.set}:i,u),l._=1,f^4||a===void 0?Nu(a)&&(f>4?v.unshift(a):f?d?s=a:g[y]=a:i=a):typeof a!="object"||a===null?$a("Object expected"):(Nu(o=a.get)&&(g.get=o),Nu(o=a.set)&&(g.set=o),Nu(o=a.init)&&v.unshift(o));return f||Io(e,i),g&&Ga(i,n,g),d?f^4?s:g:i},ug=(e,t,n)=>eS(e,typeof t!="symbol"?t+"":t,n),cg=(e,t,n)=>t.has(e)||$a("Cannot "+n),aD=(e,t)=>Object(t)!==t?$a('Cannot use the "in" operator on this value'):e.has(t),Yx=(e,t,n)=>(cg(e,t,"read from private field"),n?n.call(e):t.get(e)),Lr=(e,t,n)=>t.has(e)?$a("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Xx=(e,t,n,r)=>(cg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),lD=(e,t,n)=>(cg(e,t,"access private method"),n);var Bg=oe((M$,s_)=>{"use strict";s_.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}});var Wg=oe((R$,a_)=>{"use strict";var rk=K("os"),o_=K("tty"),ar=Bg(),{env:Ft}=process,ps;ar("no-color")||ar("no-colors")||ar("color=false")||ar("color=never")?ps=0:(ar("color")||ar("colors")||ar("color=true")||ar("color=always"))&&(ps=1);"FORCE_COLOR"in Ft&&(Ft.FORCE_COLOR==="true"?ps=1:Ft.FORCE_COLOR==="false"?ps=0:ps=Ft.FORCE_COLOR.length===0?1:Math.min(parseInt(Ft.FORCE_COLOR,10),3));function Ug(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Fg(e,t){if(ps===0)return 0;if(ar("color=16m")||ar("color=full")||ar("color=truecolor"))return 3;if(ar("color=256"))return 2;if(e&&!t&&ps===void 0)return 0;let n=ps||0;if(Ft.TERM==="dumb")return n;if(process.platform==="win32"){let r=rk.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ft)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ft)||Ft.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ft)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ft.TEAMCITY_VERSION)?1:0;if(Ft.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ft){let r=parseInt((Ft.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ft.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ft.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ft.TERM)||"COLORTERM"in Ft?1:n}function ik(e){let t=Fg(e,e&&e.isTTY);return Ug(t)}a_.exports={supportsColor:ik,stdout:Ug(Fg(!0,o_.isatty(1))),stderr:Ug(Fg(!0,o_.isatty(2)))}});var c_=oe((V$,u_)=>{"use strict";var sk=Wg(),Qa=Bg();function l_(e){if(/^\d{3,4}$/.test(e)){let n=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(n[1],10),patch:parseInt(n[2],10)}}let t=(e||"").split(".").map(n=>parseInt(n,10));return{major:t[0],minor:t[1],patch:t[2]}}function zg(e){let{env:t}=process;if("FORCE_HYPERLINK"in t)return!(t.FORCE_HYPERLINK.length>0&&parseInt(t.FORCE_HYPERLINK,10)===0);if(Qa("no-hyperlink")||Qa("no-hyperlinks")||Qa("hyperlink=false")||Qa("hyperlink=never"))return!1;if(Qa("hyperlink=true")||Qa("hyperlink=always")||"NETLIFY"in t)return!0;if(!sk.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in t||"TEAMCITY_VERSION"in t)return!1;if("TERM_PROGRAM"in t){let n=l_(t.TERM_PROGRAM_VERSION);switch(t.TERM_PROGRAM){case"iTerm.app":return n.major===3?n.minor>=1:n.major>3;case"WezTerm":return n.major>=20200620;case"vscode":return n.major>1||n.major===1&&n.minor>=72}}if("VTE_VERSION"in t){if(t.VTE_VERSION==="0.50.0")return!1;let n=l_(t.VTE_VERSION);return n.major>0||n.minor>=50}return!1}u_.exports={supportsHyperlink:zg,stdout:zg(process.stdout),stderr:zg(process.stderr)}});var h_=oe((X$,m_)=>{"use strict";var ck="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";m_.exports=ck});var w_=oe((J$,v_)=>{"use strict";var fk=h_();function g_(){}function y_(){}y_.resetWarningCache=g_;v_.exports=function(){function e(r,i,s,o,a,l){if(l!==fk){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:y_,resetWarningCache:g_};return n.PropTypes=n,n}});var S_=oe((eH,x_)=>{x_.exports=w_()();var Z$,Q$});var C_=oe((tH,__)=>{"use strict";__.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var $g=oe((nH,O_)=>{var Fu=C_(),b_={};for(let e of Object.keys(Fu))b_[Fu[e]]=e;var pe={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};O_.exports=pe;for(let e of Object.keys(pe)){if(!("channels"in pe[e]))throw new Error("missing channels property: "+e);if(!("labels"in pe[e]))throw new Error("missing channel labels property: "+e);if(pe[e].labels.length!==pe[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:n}=pe[e];delete pe[e].channels,delete pe[e].labels,Object.defineProperty(pe[e],"channels",{value:t}),Object.defineProperty(pe[e],"labels",{value:n})}pe.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=s-i,a,l;s===i?a=0:t===s?a=(n-r)/o:n===s?a=2+(r-t)/o:r===s&&(a=4+(t-n)/o),a=Math.min(a*60,360),a<0&&(a+=360);let u=(i+s)/2;return s===i?l=0:u<=.5?l=o/(s+i):l=o/(2-s-i),[a,l*100,u*100]};pe.rgb.hsv=function(e){let t,n,r,i,s,o=e[0]/255,a=e[1]/255,l=e[2]/255,u=Math.max(o,a,l),c=u-Math.min(o,a,l),f=function(p){return(u-p)/6/c+1/2};return c===0?(i=0,s=0):(s=c/u,t=f(o),n=f(a),r=f(l),o===u?i=r-n:a===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,u*100]};pe.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=pe.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,s*100,r*100]};pe.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),s=(1-t-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function pk(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}pe.rgb.keyword=function(e){let t=b_[e];if(t)return t;let n=1/0,r;for(let i of Object.keys(Fu)){let s=Fu[i],o=pk(e,s);o<n&&(n=o,r=i)}return r};pe.keyword.rgb=function(e){return Fu[e]};pe.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let i=t*.4124+n*.3576+r*.1805,s=t*.2126+n*.7152+r*.0722,o=t*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};pe.rgb.lab=function(e){let t=pe.rgb.xyz(e),n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let s=116*r-16,o=500*(n-r),a=200*(r-i);return[s,o,a]};pe.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;let a=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)s=t+1/3*-(u-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,l[u]=o*255;return l};pe.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;let o=(r+n)/2,a=r===0?2*i/(s+i):2*n/(r+n);return[t,a*100,o*100]};pe.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}};pe.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),s,o;o=(2-n)*r;let a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[t,s*100,o*100]};pe.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,s;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),a=1-r;s=6*t-o,o&1&&(s=1-s);let l=n+s*(a-n),u,c,f;switch(o){default:case 6:case 0:u=a,c=l,f=n;break;case 1:u=l,c=a,f=n;break;case 2:u=n,c=a,f=l;break;case 3:u=n,c=l,f=a;break;case 4:u=l,c=n,f=a;break;case 5:u=a,c=n,f=l;break}return[u*255,c*255,f*255]};pe.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,s=1-Math.min(1,t*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};pe.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,s,o;return i=t*3.2406+n*-1.5372+r*-.4986,s=t*-.9689+n*1.8758+r*.0415,o=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};pe.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let i=116*n-16,s=500*(t-n),o=200*(n-r);return[i,s,o]};pe.lab.xyz=function(e){let t=e[0],n=e[1],r=e[2],i,s,o;s=(t+16)/116,i=n/500+s,o=s-r/200;let a=s**3,l=i**3,u=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};pe.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);let o=Math.sqrt(n*n+r*r);return[t,o,i]};pe.lch.lab=function(e){let t=e[0],n=e[1],i=e[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[t,s,o]};pe.rgb.ansi16=function(e,t=null){let[n,r,i]=e,s=t===null?pe.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};pe.hsv.ansi16=function(e){return pe.rgb.ansi16(pe.hsv.rgb(e),e[2])};pe.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};pe.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,s=(t>>2&1)*n*255;return[r,i,s]};pe.ansi256.rgb=function(e){if(e>=232){let s=(e-232)*10+8;return[s,s,s]}e-=16;let t,n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};pe.rgb.hex=function(e){let n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};pe.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(a=>a+a).join(""));let r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};pe.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),s=Math.min(Math.min(t,n),r),o=i-s,a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:i===t?l=(n-r)/o%6:i===n?l=2+(r-t)/o:l=4+(t-n)/o,l/=6,l%=1,[l*360,o*100,a*100]};pe.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};pe.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};pe.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];let i=[0,0,0],s=t%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};pe.hcg.hsv=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t),i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};pe.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};pe.hcg.hwb=function(e){let t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};pe.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,i=r-t,s=0;return i<1&&(s=(r-i)/(1-i)),[e[0],i*100,s*100]};pe.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};pe.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};pe.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};pe.gray.hsl=function(e){return[0,0,e[0]]};pe.gray.hsv=pe.gray.hsl;pe.gray.hwb=function(e){return[0,100,e[0]]};pe.gray.cmyk=function(e){return[0,0,0,e[0]]};pe.gray.lab=function(e){return[e[0],0,0]};pe.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};pe.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var I_=oe((rH,E_)=>{var bp=$g();function dk(){let e={},t=Object.keys(bp);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function mk(e){let t=dk(),n=[e];for(t[e].distance=0;n.length;){let r=n.pop(),i=Object.keys(bp[r]);for(let s=i.length,o=0;o<s;o++){let a=i[o],l=t[a];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(a))}}return t}function hk(e,t){return function(n){return t(e(n))}}function gk(e,t){let n=[t[e].parent,e],r=bp[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=hk(bp[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}E_.exports=function(e){let t=mk(e),n={},r=Object.keys(t);for(let i=r.length,s=0;s<i;s++){let o=r[s];t[o].parent!==null&&(n[o]=gk(o,t))}return n}});var T_=oe((iH,P_)=>{var Hg=$g(),yk=I_(),el={},vk=Object.keys(Hg);function wk(e){let t=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function xk(e){let t=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let i=e(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}vk.forEach(e=>{el[e]={},Object.defineProperty(el[e],"channels",{value:Hg[e].channels}),Object.defineProperty(el[e],"labels",{value:Hg[e].labels});let t=yk(e);Object.keys(t).forEach(r=>{let i=t[r];el[e][r]=xk(i),el[e][r].raw=wk(i)})});P_.exports=el});var M_=oe((sH,k_)=>{"use strict";var A_=(e,t)=>(...n)=>`\x1B[${e(...n)+t}m`,L_=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};5;${r}m`},N_=(e,t)=>(...n)=>{let r=e(...n);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`},Op=e=>e,D_=(e,t,n)=>[e,t,n],tl=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{let r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})},qg,nl=(e,t,n,r)=>{qg===void 0&&(qg=T_());let i=r?10:0,s={};for(let[o,a]of Object.entries(qg)){let l=o==="ansi16"?"ansi":o;o===t?s[l]=e(n,i):typeof a=="object"&&(s[l]=e(a[t],i))}return s};function Sk(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[n,r]of Object.entries(t)){for(let[i,s]of Object.entries(r))t[i]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[i]=t[i],e.set(s[0],s[1]);Object.defineProperty(t,n,{value:r,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",tl(t.color,"ansi",()=>nl(A_,"ansi16",Op,!1)),tl(t.color,"ansi256",()=>nl(L_,"ansi256",Op,!1)),tl(t.color,"ansi16m",()=>nl(N_,"rgb",D_,!1)),tl(t.bgColor,"ansi",()=>nl(A_,"ansi16",Op,!0)),tl(t.bgColor,"ansi256",()=>nl(L_,"ansi256",Op,!0)),tl(t.bgColor,"ansi16m",()=>nl(N_,"rgb",D_,!0)),t}Object.defineProperty(k_,"exports",{enumerable:!0,get:Sk})});var V_=oe((oH,R_)=>{"use strict";var _k=(e,t,n)=>{let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,o="";do o+=e.substr(s,r-s)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return o+=e.substr(s),o},Ck=(e,t,n,r)=>{let i=0,s="";do{let o=e[r-1]==="\r";s+=e.substr(i,(o?r-1:r)-i)+t+(o?`\r
5
+ `:`
6
+ `)+n,i=r+1,r=e.indexOf(`
7
+ `,i)}while(r!==-1);return s+=e.substr(i),s};R_.exports={stringReplaceAll:_k,stringEncaseCRLFWithFirstIndex:Ck}});var W_=oe((aH,F_)=>{"use strict";var bk=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,j_=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Ok=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Ek=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ik=new Map([["n",`
8
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function U_(e){let t=e[0]==="u",n=e[1]==="{";return t&&!n&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):Ik.get(e)||e}function Pk(e,t){let n=[],r=t.trim().split(/\s*,\s*/g),i;for(let s of r){let o=Number(s);if(!Number.isNaN(o))n.push(o);else if(i=s.match(Ok))n.push(i[2].replace(Ek,(a,l,u)=>l?U_(l):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${e}')`)}return n}function Tk(e){j_.lastIndex=0;let t=[],n;for(;(n=j_.exec(e))!==null;){let r=n[1];if(n[2]){let i=Pk(r,n[2]);t.push([r].concat(i))}else t.push([r])}return t}function B_(e,t){let n={};for(let i of t)for(let s of i.styles)n[s[0]]=i.inverse?null:s.slice(1);let r=e;for(let[i,s]of Object.entries(n))if(Array.isArray(s)){if(!(i in r))throw new Error(`Unknown Chalk style: ${i}`);r=s.length>0?r[i](...s):r[i]}return r}F_.exports=(e,t)=>{let n=[],r=[],i=[];if(t.replace(bk,(s,o,a,l,u,c)=>{if(o)i.push(U_(o));else if(l){let f=i.join("");i=[],r.push(n.length===0?f:B_(e,n)(f)),n.push({inverse:a,styles:Tk(l)})}else if(u){if(n.length===0)throw new Error("Found extraneous } in Chalk template literal");r.push(B_(e,n)(i.join(""))),i=[],n.pop()}else i.push(c)}),r.push(i.join("")),n.length>0){let s=`Chalk template literal is missing ${n.length} closing bracket${n.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return r.join("")}});var Y_=oe((lH,K_)=>{"use strict";var Wu=M_(),{stdout:Yg,stderr:Xg}=Wg(),{stringReplaceAll:Ak,stringEncaseCRLFWithFirstIndex:Lk}=V_(),{isArray:Ep}=Array,G_=["ansi","ansi","ansi256","ansi16m"],rl=Object.create(null),Nk=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Yg?Yg.level:0;e.level=t.level===void 0?n:t.level},Jg=class{constructor(t){return $_(t)}},$_=e=>{let t={};return Nk(t,e),t.template=(...n)=>q_(t.template,...n),Object.setPrototypeOf(t,Ip.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=Jg,t.template};function Ip(e){return $_(e)}for(let[e,t]of Object.entries(Wu))rl[e]={get(){let n=Pp(this,Zg(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:n}),n}};rl.visible={get(){let e=Pp(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};var H_=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let e of H_)rl[e]={get(){let{level:t}=this;return function(...n){let r=Zg(Wu.color[G_[t]][e](...n),Wu.color.close,this._styler);return Pp(this,r,this._isEmpty)}}};for(let e of H_){let t="bg"+e[0].toUpperCase()+e.slice(1);rl[t]={get(){let{level:n}=this;return function(...r){let i=Zg(Wu.bgColor[G_[n]][e](...r),Wu.bgColor.close,this._styler);return Pp(this,i,this._isEmpty)}}}}var Dk=Object.defineProperties(()=>{},{...rl,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),Zg=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},Pp=(e,t,n)=>{let r=(...i)=>Ep(i[0])&&Ep(i[0].raw)?z_(r,q_(r,...i)):z_(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,Dk),r._generator=e,r._styler=t,r._isEmpty=n,r},z_=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.indexOf("\x1B")!==-1)for(;n!==void 0;)t=Ak(t,n.close,n.open),n=n.parent;let s=t.indexOf(`
9
+ `);return s!==-1&&(t=Lk(t,i,r,s)),r+t+i},Kg,q_=(e,...t)=>{let[n]=t;if(!Ep(n)||!Ep(n.raw))return t.join(" ");let r=t.slice(1),i=[n.raw[0]];for(let s=1;s<n.length;s++)i.push(String(r[s-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[s]));return Kg===void 0&&(Kg=W_()),Kg(e,i.join(""))};Object.defineProperties(Ip.prototype,rl);var Tp=Ip();Tp.supportsColor=Yg;Tp.stderr=Ip({level:Xg?Xg.level:0});Tp.stderr.supportsColor=Xg;K_.exports=Tp});var X_=oe((Qg,e0)=>{(function(e,t){typeof Qg=="object"&&typeof e0<"u"?e0.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.tinycolor=t())})(Qg,function(){"use strict";function e(_){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},e(_)}var t=/^\s+/,n=/\s+$/;function r(_,O){if(_=_||"",O=O||{},_ instanceof r)return _;if(!(this instanceof r))return new r(_,O);var b=i(_);this._originalInput=_,this._r=b.r,this._g=b.g,this._b=b.b,this._a=b.a,this._roundA=Math.round(100*this._a)/100,this._format=O.format||b.format,this._gradientType=O.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=b.ok}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var O=this.toRgb();return(O.r*299+O.g*587+O.b*114)/1e3},getLuminance:function(){var O=this.toRgb(),b,L,G,B,Le,Re;return b=O.r/255,L=O.g/255,G=O.b/255,b<=.03928?B=b/12.92:B=Math.pow((b+.055)/1.055,2.4),L<=.03928?Le=L/12.92:Le=Math.pow((L+.055)/1.055,2.4),G<=.03928?Re=G/12.92:Re=Math.pow((G+.055)/1.055,2.4),.2126*B+.7152*Le+.0722*Re},setAlpha:function(O){return this._a=F(O),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var O=l(this._r,this._g,this._b);return{h:O.h*360,s:O.s,v:O.v,a:this._a}},toHsvString:function(){var O=l(this._r,this._g,this._b),b=Math.round(O.h*360),L=Math.round(O.s*100),G=Math.round(O.v*100);return this._a==1?"hsv("+b+", "+L+"%, "+G+"%)":"hsva("+b+", "+L+"%, "+G+"%, "+this._roundA+")"},toHsl:function(){var O=o(this._r,this._g,this._b);return{h:O.h*360,s:O.s,l:O.l,a:this._a}},toHslString:function(){var O=o(this._r,this._g,this._b),b=Math.round(O.h*360),L=Math.round(O.s*100),G=Math.round(O.l*100);return this._a==1?"hsl("+b+", "+L+"%, "+G+"%)":"hsla("+b+", "+L+"%, "+G+"%, "+this._roundA+")"},toHex:function(O){return c(this._r,this._g,this._b,O)},toHexString:function(O){return"#"+this.toHex(O)},toHex8:function(O){return f(this._r,this._g,this._b,this._a,O)},toHex8String:function(O){return"#"+this.toHex8(O)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(V(this._r,255)*100)+"%",g:Math.round(V(this._g,255)*100)+"%",b:Math.round(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%)":"rgba("+Math.round(V(this._r,255)*100)+"%, "+Math.round(V(this._g,255)*100)+"%, "+Math.round(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:U[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(O){var b="#"+p(this._r,this._g,this._b,this._a),L=b,G=this._gradientType?"GradientType = 1, ":"";if(O){var B=r(O);L="#"+p(B._r,B._g,B._b,B._a)}return"progid:DXImageTransform.Microsoft.gradient("+G+"startColorstr="+b+",endColorstr="+L+")"},toString:function(O){var b=!!O;O=O||this._format;var L=!1,G=this._a<1&&this._a>=0,B=!b&&G&&(O==="hex"||O==="hex6"||O==="hex3"||O==="hex4"||O==="hex8"||O==="name");return B?O==="name"&&this._a===0?this.toName():this.toRgbString():(O==="rgb"&&(L=this.toRgbString()),O==="prgb"&&(L=this.toPercentageRgbString()),(O==="hex"||O==="hex6")&&(L=this.toHexString()),O==="hex3"&&(L=this.toHexString(!0)),O==="hex4"&&(L=this.toHex8String(!0)),O==="hex8"&&(L=this.toHex8String()),O==="name"&&(L=this.toName()),O==="hsl"&&(L=this.toHslString()),O==="hsv"&&(L=this.toHsvString()),L||this.toHexString())},clone:function(){return r(this.toString())},_applyModification:function(O,b){var L=O.apply(null,[this].concat([].slice.call(b)));return this._r=L._r,this._g=L._g,this._b=L._b,this.setAlpha(L._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(h,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(O,b){return O.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(C,[3])},tetrad:function(){return this._applyCombination(C,[4])}},r.fromRatio=function(_,O){if(e(_)=="object"){var b={};for(var L in _)_.hasOwnProperty(L)&&(L==="a"?b[L]=_[L]:b[L]=Je(_[L]));_=b}return r(_,O)};function i(_){var O={r:0,g:0,b:0},b=1,L=null,G=null,B=null,Le=!1,Re=!1;return typeof _=="string"&&(_=Ce(_)),e(_)=="object"&&(qt(_.r)&&qt(_.g)&&qt(_.b)?(O=s(_.r,_.g,_.b),Le=!0,Re=String(_.r).substr(-1)==="%"?"prgb":"rgb"):qt(_.h)&&qt(_.s)&&qt(_.v)?(L=Je(_.s),G=Je(_.v),O=u(_.h,L,G),Le=!0,Re="hsv"):qt(_.h)&&qt(_.s)&&qt(_.l)&&(L=Je(_.s),B=Je(_.l),O=a(_.h,L,B),Le=!0,Re="hsl"),_.hasOwnProperty("a")&&(b=_.a)),b=F(b),{ok:Le,format:_.format||Re,r:Math.min(255,Math.max(O.r,0)),g:Math.min(255,Math.max(O.g,0)),b:Math.min(255,Math.max(O.b,0)),a:b}}function s(_,O,b){return{r:V(_,255)*255,g:V(O,255)*255,b:V(b,255)*255}}function o(_,O,b){_=V(_,255),O=V(O,255),b=V(b,255);var L=Math.max(_,O,b),G=Math.min(_,O,b),B,Le,Re=(L+G)/2;if(L==G)B=Le=0;else{var et=L-G;switch(Le=Re>.5?et/(2-L-G):et/(L+G),L){case _:B=(O-b)/et+(O<b?6:0);break;case O:B=(b-_)/et+2;break;case b:B=(_-O)/et+4;break}B/=6}return{h:B,s:Le,l:Re}}function a(_,O,b){var L,G,B;_=V(_,360),O=V(O,100),b=V(b,100);function Le(E,I,$){return $<0&&($+=1),$>1&&($-=1),$<1/6?E+(I-E)*6*$:$<1/2?I:$<2/3?E+(I-E)*(2/3-$)*6:E}if(O===0)L=G=B=b;else{var Re=b<.5?b*(1+O):b+O-b*O,et=2*b-Re;L=Le(et,Re,_+1/3),G=Le(et,Re,_),B=Le(et,Re,_-1/3)}return{r:L*255,g:G*255,b:B*255}}function l(_,O,b){_=V(_,255),O=V(O,255),b=V(b,255);var L=Math.max(_,O,b),G=Math.min(_,O,b),B,Le,Re=L,et=L-G;if(Le=L===0?0:et/L,L==G)B=0;else{switch(L){case _:B=(O-b)/et+(O<b?6:0);break;case O:B=(b-_)/et+2;break;case b:B=(_-O)/et+4;break}B/=6}return{h:B,s:Le,v:Re}}function u(_,O,b){_=V(_,360)*6,O=V(O,100),b=V(b,100);var L=Math.floor(_),G=_-L,B=b*(1-O),Le=b*(1-G*O),Re=b*(1-(1-G)*O),et=L%6,E=[b,Le,B,B,Re,b][et],I=[Re,b,b,Le,B,B][et],$=[B,B,Re,b,b,Le][et];return{r:E*255,g:I*255,b:$*255}}function c(_,O,b,L){var G=[Te(Math.round(_).toString(16)),Te(Math.round(O).toString(16)),Te(Math.round(b).toString(16))];return L&&G[0].charAt(0)==G[0].charAt(1)&&G[1].charAt(0)==G[1].charAt(1)&&G[2].charAt(0)==G[2].charAt(1)?G[0].charAt(0)+G[1].charAt(0)+G[2].charAt(0):G.join("")}function f(_,O,b,L,G){var B=[Te(Math.round(_).toString(16)),Te(Math.round(O).toString(16)),Te(Math.round(b).toString(16)),Te(ve(L))];return G&&B[0].charAt(0)==B[0].charAt(1)&&B[1].charAt(0)==B[1].charAt(1)&&B[2].charAt(0)==B[2].charAt(1)&&B[3].charAt(0)==B[3].charAt(1)?B[0].charAt(0)+B[1].charAt(0)+B[2].charAt(0)+B[3].charAt(0):B.join("")}function p(_,O,b,L){var G=[Te(ve(L)),Te(Math.round(_).toString(16)),Te(Math.round(O).toString(16)),Te(Math.round(b).toString(16))];return G.join("")}r.equals=function(_,O){return!_||!O?!1:r(_).toRgbString()==r(O).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(_,O){O=O===0?0:O||10;var b=r(_).toHsl();return b.s-=O/100,b.s=se(b.s),r(b)}function m(_,O){O=O===0?0:O||10;var b=r(_).toHsl();return b.s+=O/100,b.s=se(b.s),r(b)}function y(_){return r(_).desaturate(100)}function v(_,O){O=O===0?0:O||10;var b=r(_).toHsl();return b.l+=O/100,b.l=se(b.l),r(b)}function h(_,O){O=O===0?0:O||10;var b=r(_).toRgb();return b.r=Math.max(0,Math.min(255,b.r-Math.round(255*-(O/100)))),b.g=Math.max(0,Math.min(255,b.g-Math.round(255*-(O/100)))),b.b=Math.max(0,Math.min(255,b.b-Math.round(255*-(O/100)))),r(b)}function g(_,O){O=O===0?0:O||10;var b=r(_).toHsl();return b.l-=O/100,b.l=se(b.l),r(b)}function w(_,O){var b=r(_).toHsl(),L=(b.h+O)%360;return b.h=L<0?360+L:L,r(b)}function x(_){var O=r(_).toHsl();return O.h=(O.h+180)%360,r(O)}function C(_,O){if(isNaN(O)||O<=0)throw new Error("Argument to polyad must be a positive number");for(var b=r(_).toHsl(),L=[r(_)],G=360/O,B=1;B<O;B++)L.push(r({h:(b.h+B*G)%360,s:b.s,l:b.l}));return L}function A(_){var O=r(_).toHsl(),b=O.h;return[r(_),r({h:(b+72)%360,s:O.s,l:O.l}),r({h:(b+216)%360,s:O.s,l:O.l})]}function T(_,O,b){O=O||6,b=b||30;var L=r(_).toHsl(),G=360/b,B=[r(_)];for(L.h=(L.h-(G*O>>1)+720)%360;--O;)L.h=(L.h+G)%360,B.push(r(L));return B}function z(_,O){O=O||6;for(var b=r(_).toHsv(),L=b.h,G=b.s,B=b.v,Le=[],Re=1/O;O--;)Le.push(r({h:L,s:G,v:B})),B=(B+Re)%1;return Le}r.mix=function(_,O,b){b=b===0?0:b||50;var L=r(_).toRgb(),G=r(O).toRgb(),B=b/100,Le={r:(G.r-L.r)*B+L.r,g:(G.g-L.g)*B+L.g,b:(G.b-L.b)*B+L.b,a:(G.a-L.a)*B+L.a};return r(Le)},r.readability=function(_,O){var b=r(_),L=r(O);return(Math.max(b.getLuminance(),L.getLuminance())+.05)/(Math.min(b.getLuminance(),L.getLuminance())+.05)},r.isReadable=function(_,O,b){var L=r.readability(_,O),G,B;switch(B=!1,G=Lu(b),G.level+G.size){case"AAsmall":case"AAAlarge":B=L>=4.5;break;case"AAlarge":B=L>=3;break;case"AAAsmall":B=L>=7;break}return B},r.mostReadable=function(_,O,b){var L=null,G=0,B,Le,Re,et;b=b||{},Le=b.includeFallbackColors,Re=b.level,et=b.size;for(var E=0;E<O.length;E++)B=r.readability(_,O[E]),B>G&&(G=B,L=r(O[E]));return r.isReadable(_,L,{level:Re,size:et})||!Le?L:(b.includeFallbackColors=!1,r.mostReadable(_,["#fff","#000"],b))};var M=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},U=r.hexNames=D(M);function D(_){var O={};for(var b in _)_.hasOwnProperty(b)&&(O[_[b]]=b);return O}function F(_){return _=parseFloat(_),(isNaN(_)||_<0||_>1)&&(_=1),_}function V(_,O){Ve(_)&&(_="100%");var b=we(_);return _=Math.min(O,Math.max(0,parseFloat(_))),b&&(_=parseInt(_*O,10)/100),Math.abs(_-O)<1e-6?1:_%O/parseFloat(O)}function se(_){return Math.min(1,Math.max(0,_))}function X(_){return parseInt(_,16)}function Ve(_){return typeof _=="string"&&_.indexOf(".")!=-1&&parseFloat(_)===1}function we(_){return typeof _=="string"&&_.indexOf("%")!=-1}function Te(_){return _.length==1?"0"+_:""+_}function Je(_){return _<=1&&(_=_*100+"%"),_}function ve(_){return Math.round(parseFloat(_)*255).toString(16)}function Me(_){return X(_)/255}var pt=function(){var _="[-\\+]?\\d+%?",O="[-\\+]?\\d*\\.\\d+%?",b="(?:"+O+")|(?:"+_+")",L="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?",G="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?";return{CSS_UNIT:new RegExp(b),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function qt(_){return!!pt.CSS_UNIT.exec(_)}function Ce(_){_=_.replace(t,"").replace(n,"").toLowerCase();var O=!1;if(M[_])_=M[_],O=!0;else if(_=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var b;return(b=pt.rgb.exec(_))?{r:b[1],g:b[2],b:b[3]}:(b=pt.rgba.exec(_))?{r:b[1],g:b[2],b:b[3],a:b[4]}:(b=pt.hsl.exec(_))?{h:b[1],s:b[2],l:b[3]}:(b=pt.hsla.exec(_))?{h:b[1],s:b[2],l:b[3],a:b[4]}:(b=pt.hsv.exec(_))?{h:b[1],s:b[2],v:b[3]}:(b=pt.hsva.exec(_))?{h:b[1],s:b[2],v:b[3],a:b[4]}:(b=pt.hex8.exec(_))?{r:X(b[1]),g:X(b[2]),b:X(b[3]),a:Me(b[4]),format:O?"name":"hex8"}:(b=pt.hex6.exec(_))?{r:X(b[1]),g:X(b[2]),b:X(b[3]),format:O?"name":"hex"}:(b=pt.hex4.exec(_))?{r:X(b[1]+""+b[1]),g:X(b[2]+""+b[2]),b:X(b[3]+""+b[3]),a:Me(b[4]+""+b[4]),format:O?"name":"hex8"}:(b=pt.hex3.exec(_))?{r:X(b[1]+""+b[1]),g:X(b[2]+""+b[2]),b:X(b[3]+""+b[3]),format:O?"name":"hex"}:!1}function Lu(_){var O,b;return _=_||{level:"AA",size:"small"},O=(_.level||"AA").toUpperCase(),b=(_.size||"small").toLowerCase(),O!=="AA"&&O!=="AAA"&&(O="AA"),b!=="small"&&b!=="large"&&(b="small"),{level:O,size:b}}return r})});var rC=oe((uH,nC)=>{var zu=X_(),eC={r:256,g:256,b:256,a:1},tC={h:360,s:1,v:1,a:1};function r0(e,t,n){let r={};for(let i in e)e.hasOwnProperty(i)&&(r[i]=n===0?0:(t[i]-e[i])/n);return r}function i0(e,t,n,r){let i={};for(let s in t)t.hasOwnProperty(s)&&(i[s]=e[s]*n+t[s],i[s]=i[s]<0?i[s]+r[s]:r[s]!==1?i[s]%r[s]:i[s]);return i}function t0(e,t,n){let r=e.color.toRgb(),i=t.color.toRgb(),s=r0(r,i,n),o=[e.color];for(let a=1;a<n;a++){let l=i0(s,r,a,eC);o.push(zu(l))}return o}function J_(e,t,n,r){let i=e.color.toHsv(),s=t.color.toHsv();if(i.s===0||s.s===0)return t0(e,t,n);let o;if(typeof r=="boolean")o=r;else{let c=i.h<s.h&&s.h-i.h<180||i.h>s.h&&i.h-s.h>180;o=r==="long"&&c||r==="short"&&!c}let a=r0(i,s,n),l=[e.color],u;i.h<=s.h&&!o||i.h>=s.h&&o?u=s.h-i.h:o?u=360-s.h+i.h:u=360-i.h+s.h,a.h=Math.pow(-1,o?1:0)*Math.abs(u)/n;for(let c=1;c<n;c++){let f=i0(a,i,c,tC);l.push(zu(f))}return l}function Z_(e,t){let n=e.length;if(t=parseInt(t,10),isNaN(t)||t<2)throw new Error("Invalid number of steps (< 2)");if(t<n)throw new Error("Number of steps cannot be inferior to number of stops");let r=[];for(let s=1;s<n;s++){let o=(t-1)*(e[s].pos-e[s-1].pos);r.push(Math.max(1,Math.round(o)))}let i=1;for(let s=n-1;s--;)i+=r[s];for(;i!==t;)if(i<t){let s=Math.min.apply(null,r);r[r.indexOf(s)]++,i++}else{let s=Math.max.apply(null,r);r[r.indexOf(s)]--,i--}return r}function Q_(e,t,n,r){if(t<0||t>1)throw new Error("Position must be between 0 and 1");let i,s;for(let l=0,u=e.length;l<u-1;l++)if(t>=e[l].pos&&t<e[l+1].pos){i=e[l],s=e[l+1];break}i||(i=s=e[e.length-1]);let o=r0(i.color[n](),s.color[n](),(s.pos-i.pos)*100),a=i0(o,i.color[n](),(t-i.pos)*100,r);return zu(a)}var n0=class e{constructor(t){if(t.length<2)throw new Error("Invalid number of stops (< 2)");let n=t[0].pos!==void 0,r=t.length,i=-1,s=!1;this.stops=t.map((o,a)=>{let l=o.pos!==void 0;if(n^l)throw new Error("Cannot mix positionned and not posionned color stops");if(l){let u=o.color!==void 0;if(!u&&(s||a===0||a===r-1))throw new Error("Cannot define two consecutive position-only stops");if(s=!u,o={color:u?zu(o.color):null,colorLess:!u,pos:o.pos},o.pos<0||o.pos>1)throw new Error("Color stops positions must be between 0 and 1");if(o.pos<i)throw new Error("Color stops positions are not ordered");i=o.pos}else o={color:zu(o.color!==void 0?o.color:o),pos:a/(r-1)};return o}),this.stops[0].pos!==0&&(this.stops.unshift({color:this.stops[0].color,pos:0}),r++),this.stops[r-1].pos!==1&&this.stops.push({color:this.stops[r-1].color,pos:1})}reverse(){let t=[];return this.stops.forEach(function(n){t.push({color:n.color,pos:1-n.pos})}),new e(t.reverse())}loop(){let t=[],n=[];return this.stops.forEach(r=>{t.push({color:r.color,pos:r.pos/2})}),this.stops.slice(0,-1).forEach(r=>{n.push({color:r.color,pos:1-r.pos/2})}),new e(t.concat(n.reverse()))}rgb(t){let n=Z_(this.stops,t),r=[];this.stops.forEach((i,s)=>{i.colorLess&&(i.color=t0(this.stops[s-1],this.stops[s+1],2)[1])});for(let i=0,s=this.stops.length;i<s-1;i++){let o=t0(this.stops[i],this.stops[i+1],n[i]);r.splice(r.length,0,...o)}return r.push(this.stops[this.stops.length-1].color),r}hsv(t,n){let r=Z_(this.stops,t),i=[];this.stops.forEach((s,o)=>{s.colorLess&&(s.color=J_(this.stops[o-1],this.stops[o+1],2,n)[1])});for(let s=0,o=this.stops.length;s<o-1;s++){let a=J_(this.stops[s],this.stops[s+1],r[s],n);i.splice(i.length,0,...a)}return i.push(this.stops[this.stops.length-1].color),i}css(t,n){t=t||"linear",n=n||(t==="linear"?"to right":"ellipse at center");let r=t+"-gradient("+n;return this.stops.forEach(function(i){r+=", "+(i.colorLess?"":i.color.toRgbString()+" ")+i.pos*100+"%"}),r+=")",r}rgbAt(t){return Q_(this.stops,t,"toRgb",eC)}hsvAt(t){return Q_(this.stops,t,"toHsv",tC)}};nC.exports=function(e){if(arguments.length===1){if(!Array.isArray(arguments[0]))throw new Error('"stops" is not an array');e=arguments[0]}else e=Array.prototype.slice.call(arguments);return new n0(e)}});var lC=oe((cH,Ap)=>{"use strict";var sC=Y_(),kk=rC(),iC=/\s/g;function s0(...e){let t=kk.apply(this,e),n=(r,i)=>Mk(r?r.toString():"",t,i);return n.multiline=(r,i)=>Rk(r?r.toString():"",t,i),n}var oC=(e,t,n)=>t.interpolation.toLowerCase()==="hsv"?e.hsv(n,t.hsvSpin.toLowerCase()):e.rgb(n);function Mk(e,t,n){let r=aC(n),i=Math.max(e.replace(iC,"").length,t.stops.length),s=oC(t,r,i),o="";for(let a of e)o+=a.match(iC)?a:sC.hex(s.shift().toHex())(a);return o}function Rk(e,t,n){let r=aC(n),i=e.split(`
10
+ `),s=Math.max.apply(null,i.map(l=>l.length).concat([t.stops.length])),o=oC(t,r,s),a=[];for(let l of i){let u=o.slice(0),c="";for(let f of l)c+=sC.hex(u.shift().toHex())(f);a.push(c)}return a.join(`
11
+ `)}function aC(e){let t={interpolation:"rgb",hsvSpin:"short",...e};if(e!==void 0&&typeof e!="object")throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof e}\``);if(typeof t.interpolation!="string")throw new TypeError(`Expected \`options.interpolation\` to be a \`string\`, got \`${typeof t.interpolation}\``);if(t.interpolation.toLowerCase()==="hsv"&&typeof t.hsvSpin!="string")throw new TypeError(`Expected \`options.hsvSpin\` to be a \`string\`, got \`${typeof t.hsvSpin}\``);return t}var Gu={atlas:{colors:["#feac5e","#c779d0","#4bc0c8"],options:{}},cristal:{colors:["#bdfff3","#4ac29a"],options:{}},teen:{colors:["#77a1d3","#79cbca","#e684ae"],options:{}},mind:{colors:["#473b7b","#3584a7","#30d2be"],options:{}},morning:{colors:["#ff5f6d","#ffc371"],options:{interpolation:"hsv"}},vice:{colors:["#5ee7df","#b490ca"],options:{interpolation:"hsv"}},passion:{colors:["#f43b47","#453a94"],options:{}},fruit:{colors:["#ff4e50","#f9d423"],options:{}},instagram:{colors:["#833ab4","#fd1d1d","#fcb045"],options:{}},retro:{colors:["#3f51b1","#5a55ae","#7b5fac","#8f6aae","#a86aa4","#cc6b8e","#f18271","#f3a469","#f7c978"],options:{}},summer:{colors:["#fdbb2d","#22c1c3"],options:{}},rainbow:{colors:["#ff0000","#ff0100"],options:{interpolation:"hsv",hsvSpin:"long"}},pastel:{colors:["#74ebd5","#74ecd5"],options:{interpolation:"hsv",hsvSpin:"long"}}};Ap.exports=s0;for(let e in Gu)Ap.exports[e]=t=>new s0(Gu[e].colors)(t,Gu[e].options),Ap.exports[e].multiline=t=>new s0(Gu[e].colors).multiline(t,Gu[e].options)});var xb=oe(te=>{function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}function m0(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:I5}function RC(){P5||Ae("Proxy not available")}function VC(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function zn(e){return typeof e=="function"}function Go(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Kp(e){return e!==null&&typeof e=="object"}function Vi(e){if(!Kp(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n.toString()===T5}function jC(e){var t=e?.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction")}function Zu(e,t,n){ui(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function BC(e,t,n){ui(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ws(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(r){return Kp(r)&&r[n]===!0}}function ul(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function Di(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}function UC(e){return e===null?null:typeof e=="object"?""+e:e}function ki(e,t){return oc.hasOwnProperty.call(e,t)}function Fn(e,t){return!!(e&t)}function Wn(e,t,n){return n?e|=t:e&=~t,e}function wC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i5(r.key),r)}}function dl(e,t,n){return t&&xC(e.prototype,t),n&&xC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sl(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(i,s){if(i){if(typeof i=="string")return wC(i,s);var o={}.toString.call(i).slice(8,-1);return o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set"?Array.from(i):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?wC(i,s):void 0}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ko(){return(Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function FC(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,function(n,r){(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i})(n,r)}(e,t)}function i5(e){var t=function(n){if(typeof n!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,"string");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(e);return typeof t=="symbol"?t:t+""}function Mr(e){return Object.assign(function(t,n){if(tc(n))return e.t(t,n);ml(t,n,e)},e)}function ml(e,t,n){ki(e,li)||Zu(e,li,Ko({},e[li])),function(r){return r.i==="override"}(n)||(e[li][t]=n)}function tc(e){return typeof e=="object"&&typeof e.kind=="string"}function E0(e,t,n){t===void 0&&(t=ol),n===void 0&&(n=ol);var r=new hs(e);return t!==ol&&sb(r,t),n!==ol&&A0(r,n),r}function cl(e,t,n){return Up(e)?e:Array.isArray(e)?Wt.array(e,{name:n}):Vi(e)?Wt.object(e,void 0,{name:n}):ul(e)?Wt.map(e,{name:n}):Di(e)?Wt.set(e,{name:n}):typeof e!="function"||rc(e)||fl(e)?e:jC(e)?qo(e):pl(n,e)}function Yp(e){return e}function nc(e,t){return{i:e,u:t,o:s5,s:o5,t:a5}}function s5(e,t,n,r){var i;if((i=this.u)!=null&&i.bound)return this.s(e,t,n,!1)===null?0:1;if(r===e.h)return this.s(e,t,n,!1)===null?0:2;if(rc(n.value))return 1;var s=WC(e,this,t,n,!1);return ui(r,t,s),2}function o5(e,t,n,r){var i=WC(e,this,t,n);return e.v(t,i,r)}function a5(e,t){var n=t.kind,r=t.name,i=t.addInitializer,s=this;if(n!="field"){var o,a,l,u,c,f;if(n=="method")return rc(e)||(a=e,e=ys((l=(u=s.u)==null?void 0:u.name)!=null?l:r.toString(),a,(c=(f=s.u)==null?void 0:f.autoAction)!=null&&c)),(o=this.u)!=null&&o.bound&&i(function(){var p=this[r].bind(this);p.isMobxAction=!0,this[r]=p}),e;Ae("Cannot apply '"+s.i+"' to '"+String(r)+"' (kind: "+n+`):
13
+ '`+s.i+"' can only be used on properties with a function value.")}else i(function(){ml(this,r,s)})}function WC(e,t,n,r,i){var s,o,a,l,u,c,f;i===void 0&&(i=Y.safeDescriptors);var p,d=r.value;return(s=t.u)!=null&&s.bound&&(d=d.bind((p=e.l)!=null?p:e.h)),{value:ys((o=(a=t.u)==null?void 0:a.name)!=null?o:n.toString(),d,(l=(u=t.u)==null?void 0:u.autoAction)!=null&&l,(c=t.u)!=null&&c.bound?(f=e.l)!=null?f:e.h:void 0),configurable:!i||e.p,enumerable:!1,writable:!i}}function zC(e,t){return{i:e,u:t,o:l5,s:u5,t:c5}}function l5(e,t,n,r){var i;if(r===e.h)return this.s(e,t,n,!1)===null?0:2;if((i=this.u)!=null&&i.bound&&(!ki(e.h,t)||!fl(e.h[t]))&&this.s(e,t,n,!1)===null)return 0;if(fl(n.value))return 1;var s=GC(e,0,0,n,!1,!1);return ui(r,t,s),2}function u5(e,t,n,r){var i,s=GC(e,0,0,n,(i=this.u)==null?void 0:i.bound);return e.v(t,s,r)}function c5(e,t){var n,r=t.name,i=t.addInitializer;return fl(e)||(e=qo(e)),(n=this.u)!=null&&n.bound&&i(function(){var s=this[r].bind(this);s.isMobXFlow=!0,this[r]=s}),e}function GC(e,t,n,r,i,s){s===void 0&&(s=Y.safeDescriptors);var o,a=r.value;return fl(a)||(a=qo(a)),i&&((a=a.bind((o=e.l)!=null?o:e.h)).isMobXFlow=!0),{value:a,configurable:!s||e.p,enumerable:!1,writable:!s}}function I0(e,t){return{i:e,u:t,o:f5,s:p5,t:d5}}function f5(e,t,n){return this.s(e,t,n,!1)===null?0:1}function p5(e,t,n,r){return e.m(t,Ko({},this.u,{get:n.get,set:n.set}),r)}function d5(e,t){var n=this,r=t.name;return(0,t.addInitializer)(function(){var i=$o(this)[de],s=Ko({},n.u,{get:e,context:this});s.name||(s.name="ObservableObject."+r.toString()),i.j.set(r,new kr(s))}),function(){return this[de].O(r)}}function Xp(e,t){return{i:e,u:t,o:m5,s:h5,t:g5}}function m5(e,t,n){return this.s(e,t,n,!1)===null?0:1}function h5(e,t,n,r){var i,s;return e.g(t,n.value,(i=(s=this.u)==null?void 0:s.enhancer)!=null?i:cl,r)}function g5(e,t){function n(a,l){var u,c,f=$o(a)[de],p=new gs(l,(u=(c=r.u)==null?void 0:c.enhancer)!=null?u:cl,"ObservableObject."+s.toString(),!1);f.j.set(s,p),o.add(a)}var r=this,i=t.kind,s=t.name,o=new WeakSet;if(i=="accessor")return{get:function(){return o.has(this)||n(this,e.get.call(this)),this[de].O(s)},set:function(a){return o.has(this)||n(this,a),this[de]._(s,a)},init:function(a){return o.has(this)||n(this,a),a}}}function $C(e){return{i:"true",u:e,o:y5,s:v5,t:w5}}function y5(e,t,n,r){var i,s,o,a;if(n.get)return ec.o(e,t,n,r);if(n.set){var l=ys(t.toString(),n.set);return r===e.h?e.v(t,{configurable:!Y.safeDescriptors||e.p,set:l})===null?0:2:(ui(r,t,{configurable:!0,set:l}),2)}if(r!==e.h&&typeof n.value=="function")return jC(n.value)?((a=this.u)!=null&&a.autoBind?qo.bound:qo).o(e,t,n,r):((o=this.u)!=null&&o.autoBind?pl.bound:pl).o(e,t,n,r);var u,c=((i=this.u)==null?void 0:i.deep)===!1?Wt.ref:Wt;return typeof n.value=="function"&&(s=this.u)!=null&&s.autoBind&&(n.value=n.value.bind((u=e.l)!=null?u:e.h)),c.o(e,t,n,r)}function v5(e,t,n,r){var i,s,o;return n.get?ec.s(e,t,n,r):n.set?e.v(t,{configurable:!Y.safeDescriptors||e.p,set:ys(t.toString(),n.set)},r):(typeof n.value=="function"&&(i=this.u)!=null&&i.autoBind&&(n.value=n.value.bind((o=e.l)!=null?o:e.h)),(((s=this.u)==null?void 0:s.deep)===!1?Wt.ref:Wt).s(e,t,n,r))}function w5(){Ae("'"+this.i+"' cannot be used as a decorator")}function Dp(e){return e||hb}function kp(e){return e.deep===!0?cl:e.deep===!1?Yp:(t=e.defaultDecorator)&&(n=(r=t.u)==null?void 0:r.enhancer)!=null?n:cl;var t,n,r}function HC(e,t,n){return tc(t)?S0.t(e,t):Go(t)?void ml(e,t,S0):Up(e)?e:Vi(e)?Wt.object(e,t,n):Array.isArray(e)?Wt.array(e,t):ul(e)?Wt.map(e,t):Di(e)?Wt.set(e,t):typeof e=="object"&&e!==null?e:Wt.box(e,t)}function ys(e,t,n,r){function i(){return qC(0,n,t,r||this,arguments)}return n===void 0&&(n=!1),i.isMobxAction=!0,i.toString=function(){return t.toString()},j5&&(DC.value=e,ui(i,"name",DC)),i}function qC(e,t,n,r,i){var s=KC(0,t);try{return n.apply(r,i)}catch(o){throw s.A=o,o}finally{YC(s)}}function KC(e,t){var n=Y.trackingDerivation,r=!t||!n;bn();var i=Y.allowStateChanges;r&&(Yo(),i=Jp(!0));var s={S:r,k:n,V:i,M:Qp(!0),N:!1,R:0,T:V5++,L:zp};return zp=s.T,s}function YC(e){zp!==e.T&&Ae(30),zp=e.L,e.A!==void 0&&(Y.suppressReactionErrors=!0),Zp(e.V),al(e.M),On(),e.S&&Mi(e.k),Y.suppressReactionErrors=!1}function h0(e,t){var n=Jp(e);try{return t()}finally{Zp(n)}}function Jp(e){var t=Y.allowStateChanges;return Y.allowStateChanges=e,t}function Zp(e){Y.allowStateChanges=e}function Vp(e){return e instanceof $p}function g0(e){switch(e.C){case He.P:return!1;case He.I:case He.K:return!0;case He.B:for(var t=Qp(!0),n=Yo(),r=e.D,i=r.length,s=0;s<i;s++){var o=r[s];if(Ho(o)){if(Y.disableErrorBoundaries)o.get();else try{o.get()}catch{return Mi(n),al(t),!0}if(e.C===He.K)return Mi(n),al(t),!0}}return JC(e),Mi(n),al(t),!1}}function XC(e,t,n){var r=Qp(!0);JC(e),e.W=new Array(e.q===0?100:e.D.length),e.G=0,e.q=++Y.runId;var i,s=Y.trackingDerivation;if(Y.trackingDerivation=e,Y.inBatch++,Y.disableErrorBoundaries===!0)i=t.call(n);else try{i=t.call(n)}catch(o){i=new $p(o)}return Y.inBatch--,Y.trackingDerivation=s,function(o){for(var a=o.D,l=o.D=o.W,u=He.P,c=0,f=o.G,p=0;p<f;p++){var d=l[p];d.diffValue===0&&(d.diffValue=1,c!==p&&(l[c]=d),c++),d.C>u&&(u=d.C)}for(l.length=c,o.W=null,f=a.length;f--;){var m=a[f];m.diffValue===0&&ZC(m,o),m.diffValue=0}for(;c--;){var y=l[c];y.diffValue===1&&(y.diffValue=0,x5(y,o))}u!==He.P&&(o.C=u,o.H())}(e),al(r),i}function y0(e){var t=e.D;e.D=[];for(var n=t.length;n--;)ZC(t[n],e);e.C=He.I}function P0(e){var t=Yo();try{return e()}finally{Mi(t)}}function Yo(){var e=Y.trackingDerivation;return Y.trackingDerivation=null,e}function Mi(e){Y.trackingDerivation=e}function Qp(e){var t=Y.allowStateReads;return Y.allowStateReads=e,t}function al(e){Y.allowStateReads=e}function JC(e){if(e.C!==He.P){e.C=He.P;for(var t=e.D,n=t.length;n--;)t[n].U=He.P}}function x5(e,t){e.X.add(t),e.U>t.C&&(e.U=t.C)}function ZC(e,t){e.X.delete(t),e.X.size===0&&QC(e)}function QC(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,Y.pendingUnobservations.push(e))}function bn(){Y.inBatch++}function On(){if(--Y.inBatch==0){nb();for(var e=Y.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,n.X.size===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof kr&&n.F())}Y.pendingUnobservations=[]}}function eb(e){var t=Y.trackingDerivation;return t!==null?(t.q!==e.$&&(e.$=t.q,t.W[t.G++]=e,!e.isBeingObserved&&Y.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.X.size===0&&Y.inBatch>0&&QC(e),!1)}function tb(e){e.U!==He.K&&(e.U=He.K,e.X.forEach(function(t){t.C===He.P&&t.H(),t.C=He.K}))}function nb(){Y.inBatch>0||Y.isRunningReactions||C0(S5)}function S5(){Y.isRunningReactions=!0;for(var e=Y.pendingReactions,t=0;e.length>0;){++t==100&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].J()}Y.isRunningReactions=!1}function SC(){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function rb(e){return function(t,n){return zn(t)?ys(t.name||"<unnamed action>",t,e):zn(n)?ys(t,n,e):tc(n)?(e?O0:b0).t(t,n):Go(n)?ml(t,n,e?O0:b0):Go(t)?Mr(nc(e?"autoAction":"action",{name:t,autoAction:e})):void 0}}function _C(e){return qC(0,!1,e,this,void 0)}function rc(e){return zn(e)&&e.isMobxAction===!0}function T0(e,t){function n(){e(a)}var r,i,s,o;t===void 0&&(t=L0);var a,l=(r=(i=t)==null?void 0:i.name)!=null?r:"Autorun";if(t.scheduler||t.delay){var u=ib(t),c=!1;a=new ai(l,function(){c||(c=!0,u(function(){c=!1,a.isDisposed||a.track(n)}))},t.onError,t.requiresObservable)}else a=new ai(l,function(){this.track(n)},t.onError,t.requiresObservable);return(s=t)!=null&&(s=s.signal)!=null&&s.aborted||a.Y(),a.Z((o=t)==null?void 0:o.signal)}function ib(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:W5}function sb(e,t,n){return ob("onBO",e,t,n)}function A0(e,t,n){return ob("onBUO",e,t,n)}function ob(e,t,n,r){var i=typeof r=="function"?Ri(t,n):Ri(t),s=zn(r)?r:n,o=e+"L";return i[o]?i[o].add(s):i[o]=new Set([s]),function(){var a=i[o];a&&(a.delete(s),a.size===0&&delete i[o])}}function v0(e,t,n,r){var i=A5(t);return vs(function(){var s=$o(e,r)[de];ll(i).forEach(function(o){s.s(o,i[o],!n||!(o in n)||n[o])})}),e}function ab(e){var t,n={name:e.tt};return e.D&&e.D.length>0&&(n.dependencies=(t=e.D,Array.from(new Set(t))).map(ab)),n}function lb(e){var t={name:e.tt};return function(n){return n.X&&n.X.size>0}(e)&&(t.observers=Array.from(function(n){return n.X}(e)).map(lb)),t}function Bp(){this.message="FLOW_CANCELLED"}function CC(e){zn(e.cancel)&&e.cancel()}function fl(e){return e?.isMobXFlow===!0}function bC(e,t){if(t===void 0)return Ho(e);if(Kt(e)===!1||!e[de].j.has(t))return!1;var n=Ri(e,t);return Ho(n)}function ub(e,t){return!!e&&(t!==void 0?!!Kt(e)&&e[de].j.has(t):Kt(e)||!!e[de]||N0(e)||Hp(e)||Ho(e))}function Up(e){return ub(e)}function Yu(e){return Kt(e)?e[de].nt():Yt(e)||Nt(e)?Array.from(e.keys()):Cn(e)?e.map(function(t,n){return n}):void Ae(5)}function OC(e,t){return Kt(e)?e[de].it(t):Yt(e)||Nt(e)?e.has(t):Cn(e)?t>=0&&t<e.length:void Ae(10)}function EC(e){if(Kt(e))return e[de].rt();Ae(38)}function Mp(e,t,n){return e.set(t,n),n}function oi(e,t){t===void 0&&(t=void 0),bn();try{return e.apply(t)}finally{On()}}function cb(e,t,n){var r;if(typeof n.timeout=="number"){var i=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!o[de].isDisposed){if(o(),!n.onError)throw i;n.onError(i)}},n.timeout)}n.name="When";var s=ys("When-effect",t),o=T0(function(a){h0(!1,e)&&(a.dispose(),r&&clearTimeout(r),s())},n);return o}function _5(e,t){var n,r,i;if(t!=null&&(n=t.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var s=new Promise(function(o,a){var l,u=cb(e,o,Ko({},t,{onError:a}));r=function(){u(),a(new Error("WHEN_CANCELLED"))},i=function(){u(),a(new Error("WHEN_ABORTED"))},t==null||(l=t.signal)==null||l.addEventListener==null||l.addEventListener("abort",i)}).finally(function(){var o;return t==null||(o=t.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",i)});return s.cancel=r,s}function il(e){return e[de]}function ur(e){return e.et!==void 0&&e.et.length>0}function ic(e,t){var n=e.et||(e.et=[]);return n.push(t),VC(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function cr(e,t){var n=Yo();try{for(var r=[].concat(e.et||[]),i=0,s=r.length;i<s&&((t=r[i](t))&&!t.type&&Ae(14),t);i++);return t}finally{Mi(n)}}function Rr(e){return e.ut!==void 0&&e.ut.length>0}function sc(e,t){var n=e.ut||(e.ut=[]);return n.push(t),VC(function(){var r=n.indexOf(t);r!==-1&&n.splice(r,1)})}function Vr(e,t){var n=Yo(),r=e.ut;if(r){for(var i=0,s=(r=r.slice()).length;i<s;i++)r[i](t);Mi(n)}}function C5(e,t,n,r){return n===void 0&&(n="ObservableArray"),r===void 0&&(r=!1),RC(),vs(function(){var i=new D0(n,t,r,!1);BC(i.j,de,i);var s=new Proxy(i.j,H5);return i.l=s,e&&e.length&&i.ot(0,0,e),s})}function tt(e,t){typeof Array.prototype[e]=="function"&&(qp[e]=t(e))}function Un(e){return function(){var t=this[de];t.st.reportObserved();var n=t.ft(t.j);return n[e].apply(n,arguments)}}function Dr(e){return function(t,n){var r=this,i=this[de];return i.st.reportObserved(),i.ft(i.j)[e](function(s,o){return t.call(n,s,o,r)})}}function IC(e){return function(){var t=this,n=this[de];n.st.reportObserved();var r=n.ft(n.j),i=arguments[0];return arguments[0]=function(s,o,a){return i(s,o,a,t)},r[e].apply(r,arguments)}}function Cn(e){return Kp(e)&&q5(e[de])}function $o(e,t){var n;if(ki(e,de))return e;var r=(n=t?.name)!=null?n:"ObservableObject",i=new vb(e,new Map,String(r),function(s){var o;return s?(o=s.defaultDecorator)!=null?o:$C(s):void 0}(t));return Zu(e,de,i),e}function PC(e){return kC[e]||(kC[e]={get:function(){return this[de].O(e)},set:function(t){return this[de]._(e,t)}})}function Kt(e){return!!Kp(e)&&X5(e[de])}function TC(e,t,n){var r;(r=e.h[li])==null||delete r[n]}function fb(e){return{enumerable:!1,configurable:!0,get:function(){return this[de].ct(e)},set:function(t){this[de].ht(e,t)}}}function b5(e){ui(R0.prototype,""+e,fb(e))}function pb(e){if(e>d0){for(var t=d0;t<e+100;t++)b5(t);d0=e}}function O5(e,t,n){return new R0(e,t,n)}function Ri(e,t){if(typeof e=="object"&&e!==null){if(Cn(e))return t!==void 0&&Ae(23),e[de].st;if(Nt(e))return e.st;if(Yt(e)){if(t===void 0)return e.vt;var n=e.lt.get(t)||e.dt.get(t);return n||Ae(25,t,Fp(e)),n}if(Kt(e)){if(!t)return Ae(26);var r=e[de].j.get(t);return r||Ae(27,t,Fp(e)),r}if(N0(e)||Ho(e)||Hp(e))return e}else if(zn(e)&&Hp(e[de]))return e[de];Ae(28)}function Ni(e,t){return e||Ae(29),t!==void 0?Ni(Ri(e,t)):N0(e)||Ho(e)||Hp(e)||Yt(e)||Nt(e)?e:e[de]?e[de]:void Ae(24,e)}function Fp(e,t){var n;if(t!==void 0)n=Ri(e,t);else{if(rc(e))return e.name;n=Kt(e)||Yt(e)||Nt(e)?Ni(e):Ri(e)}return n.tt}function vs(e){var t=Yo(),n=Jp(!0);bn();try{return e()}finally{On(),Zp(n),Mi(t)}}function w0(e,t,n){return n===void 0&&(n=-1),function r(i,s,o,a,l){if(i===s)return i!==0||1/i==1/s;if(i==null||s==null)return!1;if(i!=i)return s!=s;var u=typeof i;if(u!=="function"&&u!=="object"&&typeof s!="object")return!1;var c=MC.call(i);if(c!==MC.call(s))return!1;switch(c){case"[object RegExp]":case"[object String]":return""+i==""+s;case"[object Number]":return+i!=+i?+s!=+s:+i==0?1/+i==1/s:+i==+s;case"[object Date]":case"[object Boolean]":return+i==+s;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(i)===Symbol.valueOf.call(s);case"[object Map]":case"[object Set]":o>=0&&o++}i=AC(i),s=AC(s);var f=c==="[object Array]";if(!f){if(typeof i!="object"||typeof s!="object")return!1;var p=i.constructor,d=s.constructor;if(p!==d&&!(zn(p)&&p instanceof p&&zn(d)&&d instanceof d)&&"constructor"in i&&"constructor"in s)return!1}if(o===0)return!1;o<0&&(o=-1),l=l||[];for(var m=(a=a||[]).length;m--;)if(a[m]===i)return l[m]===s;if(a.push(i),l.push(s),f){if((m=i.length)!==s.length)return!1;for(;m--;)if(!r(i[m],s[m],o-1,a,l))return!1}else{var y,v=Object.keys(i);if(m=v.length,Object.keys(s).length!==m)return!1;for(;m--;)if(!ki(s,y=v[m])||!r(i[y],s[y],o-1,a,l))return!1}return a.pop(),l.pop(),!0}(e,t,n)}function AC(e){return Cn(e)?e.slice():ul(e)||Yt(e)||Di(e)||Nt(e)?Array.from(e.entries()):e}function Qu(e){return e[Symbol.iterator]=E5,e}function E5(){return this}Object.defineProperty(te,"__esModule",{value:!0});var I5={},db=Object.assign,Wp=Object.getOwnPropertyDescriptor,ui=Object.defineProperty,oc=Object.prototype,x0=[];Object.freeze(x0);var L0={};Object.freeze(L0);var P5=typeof Proxy<"u",T5=Object.toString(),ol=function(){},mb=Object.getOwnPropertySymbols!==void 0,ll=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:mb?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A5=Object.getOwnPropertyDescriptors||function(e){var t={};return ll(e).forEach(function(n){t[n]=Wp(e,n)}),t},li=Symbol("mobx-stored-annotations"),de=Symbol("mobx administration"),hs=function(){function e(n){n===void 0&&(n="Atom"),this.tt=void 0,this.bt=0,this.X=new Set,this.$=0,this.U=He.I,this.onBOL=void 0,this.onBUOL=void 0,this.tt=n}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return eb(this)},t.reportChanged=function(){bn(),tb(this),On()},t.toString=function(){return this.tt},dl(e,[{key:"isBeingObserved",get:function(){return Fn(this.bt,e.pt)},set:function(n){this.bt=Wn(this.bt,e.pt,n)}},{key:"isPendingUnobservation",get:function(){return Fn(this.bt,e.yt)},set:function(n){this.bt=Wn(this.bt,e.yt,n)}},{key:"diffValue",get:function(){return Fn(this.bt,e.wt)?1:0},set:function(n){this.bt=Wn(this.bt,e.wt,n===1)}}])}();hs.pt=1,hs.yt=2,hs.wt=4;var N0=ws("Atom",hs),zo={identity:function(e,t){return e===t},structural:function(e,t){return w0(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){return w0(e,t,1)}},L5=Mr({i:"override",o:function(){return 0},s:function(){Ae("'"+this.i+"' can only be used with 'makeObservable'")},t:function(){console.warn("'"+this.i+"' cannot be used with decorators - this is a no-op")}}),N5=$C(),hb={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(hb);var S0=Xp("observable"),D5=Xp("observable.ref",{enhancer:Yp}),k5=Xp("observable.shallow",{enhancer:function(e,t,n){return e==null||Kt(e)||Cn(e)||Yt(e)||Nt(e)?e:Array.isArray(e)?Wt.array(e,{name:n,deep:!1}):Vi(e)?Wt.object(e,void 0,{name:n,deep:!1}):ul(e)?Wt.map(e,{name:n,deep:!1}):Di(e)?Wt.set(e,{name:n,deep:!1}):void 0}}),M5=Xp("observable.struct",{enhancer:function(e,t){return w0(e,t)?t:e}}),gb=Mr(S0);db(HC,gb);var LC,NC,Wt=db(HC,{box:function(e,t){var n=Dp(t);return new gs(e,kp(n),n.name,!0,n.equals)},array:function(e,t){var n=Dp(t);return(Y.useProxies===!1||n.proxy===!1?O5:C5)(e,kp(n),n.name)},map:function(e,t){var n=Dp(t);return new k0(e,kp(n),n.name)},set:function(e,t){var n=Dp(t);return new M0(e,kp(n),n.name)},object:function(e,t,n){return vs(function(){return v0(Y.useProxies===!1||n?.proxy===!1?$o({},n):function(r,i){var s,o;return RC(),(o=(s=(r=$o(r,i))[de]).l)!=null?o:s.l=new Proxy(r,$5)}({},n),e,t)})},ref:Mr(D5),shallow:Mr(k5),deep:gb,struct:Mr(M5)}),_0=I0("computed"),R5=I0("computed.struct",{equals:zo.structural}),ec=function(e,t){if(tc(t))return _0.t(e,t);if(Go(t))return ml(e,t,_0);if(Vi(e))return Mr(I0("computed",e));var n=Vi(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new kr(n)};Object.assign(ec,_0),ec.struct=Mr(R5);var zp=0,V5=1,j5=(LC=(NC=Wp(function(){},"name"))==null?void 0:NC.configurable)!=null&&LC,DC={value:"action",configurable:!0,writable:!1,enumerable:!1},gs=function(e){function t(r,i,s,o,a){var l;return s===void 0&&(s="ObservableValue"),a===void 0&&(a=zo.default),(l=e.call(this,s)||this).enhancer=void 0,l.tt=void 0,l.equals=void 0,l.jt=!1,l.et=void 0,l.ut=void 0,l.Ot=void 0,l.dehancer=void 0,l.enhancer=i,l.tt=s,l.equals=a,l.Ot=i(r,void 0,s),l}FC(t,e);var n=t.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){(r=this.xt(r))!==Y.UNCHANGED&&this.gt(r)},n.xt=function(r){if(ur(this)){var i=cr(this,{object:this,type:ci,newValue:r});if(!i)return Y.UNCHANGED;r=i.newValue}return r=this.enhancer(r,this.Ot,this.tt),this.equals(this.Ot,r)?Y.UNCHANGED:r},n.gt=function(r){var i=this.Ot;this.Ot=r,this.reportChanged(),Rr(this)&&Vr(this,{type:ci,object:this,newValue:r,oldValue:i})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.Ot)},n._t=function(r){return ic(this,r)},n.At=function(r,i){return i&&r({observableKind:"value",debugObjectName:this.tt,object:this,type:ci,newValue:this.Ot,oldValue:void 0}),sc(this,r)},n.raw=function(){return this.Ot},n.toJSON=function(){return this.get()},n.toString=function(){return this.tt+"["+this.Ot+"]"},n.valueOf=function(){return UC(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(hs),c0=ws("ObservableValue",gs),kr=function(){function e(n){this.C=He.I,this.D=[],this.W=null,this.X=new Set,this.q=0,this.$=0,this.U=He.P,this.G=0,this.Ot=new $p(null),this.tt=void 0,this.St=void 0,this.bt=0,this.derivation=void 0,this.kt=void 0,this.Vt=Gp.NONE,this.Mt=void 0,this.Et=void 0,this.Nt=void 0,this.Rt=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||Ae(31),this.derivation=n.get,this.tt=n.name||"ComputedValue",n.set&&(this.kt=ys("ComputedValue-setter",n.set)),this.Et=n.equals||(n.compareStructural||n.struct?zo.structural:zo.default),this.Mt=n.context,this.Nt=n.requiresReaction,this.Rt=!!n.keepAlive}var t=e.prototype;return t.H=function(){(function(n){n.U===He.P&&(n.U=He.B,n.X.forEach(function(r){r.C===He.P&&(r.C=He.B,r.H())}))})(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing&&Ae(32,this.tt,this.derivation),Y.inBatch!==0||this.X.size!==0||this.Rt){if(eb(this),g0(this)){var n=Y.trackingContext;this.Rt&&!n&&(Y.trackingContext=this),this.trackAndCompute()&&function(i){i.U!==He.K&&(i.U=He.K,i.X.forEach(function(s){s.C===He.B?s.C=He.K:s.C===He.P&&(i.U=He.P)}))}(this),Y.trackingContext=n}}else g0(this)&&(this.Tt(),bn(),this.Ot=this.Lt(!1),On());var r=this.Ot;if(Vp(r))throw r.cause;return r},t.set=function(n){if(this.kt){this.isRunningSetter&&Ae(33,this.tt),this.isRunningSetter=!0;try{this.kt.call(this.Mt,n)}finally{this.isRunningSetter=!1}}else Ae(34,this.tt)},t.trackAndCompute=function(){var n=this.Ot,r=this.C===He.I,i=this.Lt(!0),s=r||Vp(n)||Vp(i)||!this.Et(n,i);return s&&(this.Ot=i),s},t.Lt=function(n){this.isComputing=!0;var r,i=Jp(!1);if(n)r=XC(this,this.derivation,this.Mt);else if(Y.disableErrorBoundaries===!0)r=this.derivation.call(this.Mt);else try{r=this.derivation.call(this.Mt)}catch(s){r=new $p(s)}return Zp(i),this.isComputing=!1,r},t.F=function(){this.Rt||(y0(this),this.Ot=void 0)},t.At=function(n,r){var i=this,s=!0,o=void 0;return T0(function(){var a=i.get();if(!s||r){var l=Yo();n({observableKind:"computed",debugObjectName:i.tt,type:ci,object:i,newValue:a,oldValue:o}),Mi(l)}s=!1,o=a})},t.Tt=function(){},t.toString=function(){return this.tt+"["+this.derivation.toString()+"]"},t.valueOf=function(){return UC(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},dl(e,[{key:"isComputing",get:function(){return Fn(this.bt,e.Ct)},set:function(n){this.bt=Wn(this.bt,e.Ct,n)}},{key:"isRunningSetter",get:function(){return Fn(this.bt,e.Pt)},set:function(n){this.bt=Wn(this.bt,e.Pt,n)}},{key:"isBeingObserved",get:function(){return Fn(this.bt,e.pt)},set:function(n){this.bt=Wn(this.bt,e.pt,n)}},{key:"isPendingUnobservation",get:function(){return Fn(this.bt,e.yt)},set:function(n){this.bt=Wn(this.bt,e.yt,n)}},{key:"diffValue",get:function(){return Fn(this.bt,e.wt)?1:0},set:function(n){this.bt=Wn(this.bt,e.wt,n===1)}}])}();kr.Ct=1,kr.Pt=2,kr.pt=4,kr.yt=8,kr.wt=16;var He,Gp,Ho=ws("ComputedValue",kr);(function(e){e[e.I=-1]="NOT_TRACKING_",e[e.P=0]="UP_TO_DATE_",e[e.B=1]="POSSIBLY_STALE_",e[e.K=2]="STALE_"})(He||(He={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Gp||(Gp={}));var $p=function(e){this.cause=void 0,this.cause=e},B5=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],Ju=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},jp=!0,yb=!1,Y=function(){var e=m0();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(jp=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Ju().version&&(jp=!1),jp?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ju):(setTimeout(function(){yb||Ae(35)},1),new Ju)}(),ai=function(){function e(n,r,i,s){n===void 0&&(n="Reaction"),this.tt=void 0,this.It=void 0,this.Kt=void 0,this.Bt=void 0,this.D=[],this.W=[],this.C=He.I,this.q=0,this.G=0,this.bt=0,this.Vt=Gp.NONE,this.tt=n,this.It=r,this.Kt=i,this.Bt=s}var t=e.prototype;return t.H=function(){this.Y()},t.Y=function(){this.isScheduled||(this.isScheduled=!0,Y.pendingReactions.push(this),nb())},t.J=function(){if(!this.isDisposed){bn(),this.isScheduled=!1;var n=Y.trackingContext;if(Y.trackingContext=this,g0(this)){this.isTrackPending=!0;try{this.It()}catch(r){this.Dt(r)}}Y.trackingContext=n,On()}},t.track=function(n){if(!this.isDisposed){bn(),this.isRunning=!0;var r=Y.trackingContext;Y.trackingContext=this;var i=XC(this,n,void 0);Y.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&y0(this),Vp(i)&&this.Dt(i.cause),On()}},t.Dt=function(n){var r=this;if(this.Kt)this.Kt(n,this);else{if(Y.disableErrorBoundaries)throw n;Y.suppressReactionErrors||console.error("[mobx] uncaught error in '"+this+"'",n),Y.globalReactionErrorHandlers.forEach(function(i){return i(n,r)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(bn(),y0(this),On()))},t.Z=function(n){var r=this,i=function s(){r.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",s)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[de]=this,i},t.toString=function(){return"Reaction["+this.tt+"]"},t.trace=function(){},dl(e,[{key:"isDisposed",get:function(){return Fn(this.bt,e.Wt)},set:function(n){this.bt=Wn(this.bt,e.Wt,n)}},{key:"isScheduled",get:function(){return Fn(this.bt,e.qt)},set:function(n){this.bt=Wn(this.bt,e.qt,n)}},{key:"isTrackPending",get:function(){return Fn(this.bt,e.Gt)},set:function(n){this.bt=Wn(this.bt,e.Gt,n)}},{key:"isRunning",get:function(){return Fn(this.bt,e.Ht)},set:function(n){this.bt=Wn(this.bt,e.Ht,n)}},{key:"diffValue",get:function(){return Fn(this.bt,e.wt)?1:0},set:function(n){this.bt=Wn(this.bt,e.wt,n===1)}}])}();ai.Wt=1,ai.qt=2,ai.Gt=4,ai.Ht=8,ai.wt=16;var C0=function(e){return e()},Hp=ws("Reaction",ai),b0=nc("action"),U5=nc("action.bound",{bound:!0}),O0=nc("autoAction",{autoAction:!0}),F5=nc("autoAction.bound",{autoAction:!0,bound:!0}),ds=rb(!1);Object.assign(ds,b0);var pl=rb(!0);Object.assign(pl,O0),ds.bound=Mr(U5),pl.bound=Mr(F5);var W5=function(e){return e()},z5=0;Bp.prototype=Object.create(Error.prototype);var f0=zC("flow"),G5=zC("flow.bound",{bound:!0}),qo=Object.assign(function(e,t){if(tc(t))return f0.t(e,t);if(Go(t))return ml(e,t,f0);var n=e,r=n.name||"<unnamed flow>",i=function(){var s,o=this,a=arguments,l=++z5,u=ds(r+" - runid: "+l+" - init",n).apply(o,a),c=void 0,f=new Promise(function(p,d){function m(g){var w;c=void 0;try{w=ds(r+" - runid: "+l+" - yield "+h++,u.next).call(u,g)}catch(x){return d(x)}v(w)}function y(g){var w;c=void 0;try{w=ds(r+" - runid: "+l+" - yield "+h++,u.throw).call(u,g)}catch(x){return d(x)}v(w)}function v(g){if(!zn(g?.then))return g.done?p(g.value):(c=Promise.resolve(g.value)).then(m,y);g.then(v,d)}var h=0;s=d,m(void 0)});return f.cancel=ds(r+" - runid: "+l+" - cancel",function(){try{c&&CC(c);var p=u.return(void 0),d=Promise.resolve(p.value);d.then(ol,ol),CC(d),s(new Bp)}catch(m){s(m)}}),f};return i.isMobXFlow=!0,i},f0);qo.bound=Mr(G5);var $5={has:function(e,t){return il(e).it(t)},get:function(e,t){return il(e).ct(t)},set:function(e,t,n){var r;return!!Go(t)&&((r=il(e).ht(t,n,!0))==null||r)},deleteProperty:function(e,t){var n;return!!Go(t)&&((n=il(e).Ut(t,!0))==null||n)},defineProperty:function(e,t,n){var r;return(r=il(e).v(t,n))==null||r},ownKeys:function(e){return il(e).rt()},preventExtensions:function(){Ae(13)}},p0=Symbol("mobx-keys"),ci="update",H5={get:function(e,t){var n=e[de];return t===de?n:t==="length"?n.Xt():typeof t!="string"||isNaN(t)?ki(qp,t)?qp[t]:e[t]:n.ct(parseInt(t))},set:function(e,t,n){var r=e[de];return t==="length"&&r.Ft(n),typeof t=="symbol"||isNaN(t)?e[t]=n:r.ht(parseInt(t),n),!0},preventExtensions:function(){Ae(15)}},D0=function(){function e(n,r,i,s){n===void 0&&(n="ObservableArray"),this.zt=void 0,this.$t=void 0,this.st=void 0,this.j=[],this.et=void 0,this.ut=void 0,this.Jt=void 0,this.dehancer=void 0,this.l=void 0,this.Yt=0,this.zt=i,this.$t=s,this.st=new hs(n),this.Jt=function(o,a){return r(o,a,"ObservableArray[..]")}}var t=e.prototype;return t.Qt=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.ft=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t._t=function(n){return ic(this,n)},t.At=function(n,r){return r===void 0&&(r=!1),r&&n({observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:0,added:this.j.slice(),addedCount:this.j.length,removed:[],removedCount:0}),sc(this,n)},t.Xt=function(){return this.st.reportObserved(),this.j.length},t.Ft=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Ae("Out of range: "+n);var r=this.j.length;if(n!==r)if(n>r){for(var i=new Array(n-r),s=0;s<n-r;s++)i[s]=void 0;this.ot(r,0,i)}else this.ot(n,r-n)},t.Zt=function(n,r){n!==this.Yt&&Ae(16),this.Yt+=r,this.$t&&r>0&&pb(n+r+1)},t.ot=function(n,r,i){var s=this,o=this.j.length;if(n===void 0?n=0:n>o?n=o:n<0&&(n=Math.max(0,o+n)),r=arguments.length===1?o-n:r==null?0:Math.max(0,Math.min(r,o-n)),i===void 0&&(i=x0),ur(this)){var a=cr(this,{object:this.l,type:"splice",index:n,removedCount:r,added:i});if(!a)return x0;r=a.removedCount,i=a.added}if(i=i.length===0?i:i.map(function(c){return s.Jt(c,void 0)}),this.$t){var l=i.length-r;this.Zt(o,l)}var u=this.tn(n,r,i);return r===0&&i.length===0||this.nn(n,i,u),this.ft(u)},t.tn=function(n,r,i){var s;if(i.length<1e4)return(s=this.j).splice.apply(s,[n,r].concat(i));var o=this.j.slice(n,n+r),a=this.j.slice(n+r);this.j.length+=i.length-r;for(var l=0;l<i.length;l++)this.j[n+l]=i[l];for(var u=0;u<a.length;u++)this.j[n+i.length+u]=a[u];return o},t.in=function(n,r,i){var s=!this.zt&&!1,o=Rr(this),a=o||s?{observableKind:"array",object:this.l,type:ci,debugObjectName:this.st.tt,index:n,newValue:r,oldValue:i}:null;this.st.reportChanged(),o&&Vr(this,a)},t.nn=function(n,r,i){var s=!this.zt&&!1,o=Rr(this),a=o||s?{observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:n,removed:i,added:r,removedCount:i.length,addedCount:r.length}:null;this.st.reportChanged(),o&&Vr(this,a)},t.ct=function(n){if(!(this.$t&&n>=this.j.length))return this.st.reportObserved(),this.Qt(this.j[n]);console.warn("[mobx] Out of bounds read: "+n)},t.ht=function(n,r){var i=this.j;if(this.$t&&n>i.length&&Ae(17,n,i.length),n<i.length){var s=i[n];if(ur(this)){var o=cr(this,{type:ci,object:this.l,index:n,newValue:r});if(!o)return;r=o.newValue}(r=this.Jt(r,s))!==s&&(i[n]=r,this.in(n,r,s))}else{for(var a=new Array(n+1-i.length),l=0;l<a.length-1;l++)a[l]=void 0;a[a.length-1]=r,this.ot(i.length,0,a)}},e}(),qp={clear:function(){return this.splice(0)},replace:function(e){var t=this[de];return t.ot(0,t.j.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s=this[de];switch(arguments.length){case 0:return[];case 1:return s.ot(e);case 2:return s.ot(e,t)}return s.ot(e,t,r)},spliceWithArray:function(e,t,n){return this[de].ot(e,t,n)},push:function(){for(var e=this[de],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.ot(e.j.length,0,n),e.j.length},pop:function(){return this.splice(Math.max(this[de].j.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[de],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.ot(0,0,n),e.j.length},reverse:function(){return Y.trackingDerivation&&Ae(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Y.trackingDerivation&&Ae(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[de],n=t.ft(t.j).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};tt("at",Un),tt("concat",Un),tt("flat",Un),tt("includes",Un),tt("indexOf",Un),tt("join",Un),tt("lastIndexOf",Un),tt("slice",Un),tt("toString",Un),tt("toLocaleString",Un),tt("toSorted",Un),tt("toSpliced",Un),tt("with",Un),tt("every",Dr),tt("filter",Dr),tt("find",Dr),tt("findIndex",Dr),tt("findLast",Dr),tt("findLastIndex",Dr),tt("flatMap",Dr),tt("forEach",Dr),tt("map",Dr),tt("some",Dr),tt("toReversed",Dr),tt("reduce",IC),tt("reduceRight",IC);var Xu,Rp,q5=ws("ObservableArrayAdministration",D0),K5={},ms="add",k0=function(){function e(n,r,i){var s=this;r===void 0&&(r=cl),i===void 0&&(i="ObservableMap"),this.Jt=void 0,this.tt=void 0,this[de]=K5,this.lt=void 0,this.dt=void 0,this.vt=void 0,this.et=void 0,this.ut=void 0,this.dehancer=void 0,this.Jt=r,this.tt=i,zn(Map)||Ae(18),vs(function(){s.vt=E0("ObservableMap.keys()"),s.lt=new Map,s.dt=new Map,n&&s.merge(n)})}var t=e.prototype;return t.it=function(n){return this.lt.has(n)},t.has=function(n){var r=this;if(!Y.trackingDerivation)return this.it(n);var i=this.dt.get(n);if(!i){var s=i=new gs(this.it(n),Yp,"ObservableMap.key?",!1);this.dt.set(n,s),A0(s,function(){return r.dt.delete(n)})}return i.get()},t.set=function(n,r){var i=this.it(n);if(ur(this)){var s=cr(this,{type:i?ci:ms,object:this,newValue:r,name:n});if(!s)return this;r=s.newValue}return i?this.rn(n,r):this.en(n,r),this},t.delete=function(n){var r=this;if(ur(this)&&!cr(this,{type:"delete",object:this,name:n}))return!1;if(this.it(n)){var i=Rr(this),s=i?{observableKind:"map",debugObjectName:this.tt,type:"delete",object:this,oldValue:this.lt.get(n).Ot,name:n}:null;return oi(function(){var o;r.vt.reportChanged(),(o=r.dt.get(n))==null||o.gt(!1),r.lt.get(n).gt(void 0),r.lt.delete(n)}),i&&Vr(this,s),!0}return!1},t.rn=function(n,r){var i=this.lt.get(n);if((r=i.xt(r))!==Y.UNCHANGED){var s=Rr(this),o=s?{observableKind:"map",debugObjectName:this.tt,type:ci,object:this,oldValue:i.Ot,name:n,newValue:r}:null;i.gt(r),s&&Vr(this,o)}},t.en=function(n,r){var i=this;oi(function(){var o,a=new gs(r,i.Jt,"ObservableMap.key",!1);i.lt.set(n,a),r=a.Ot,(o=i.dt.get(n))==null||o.gt(!0),i.vt.reportChanged()});var s=Rr(this);s&&Vr(this,s?{observableKind:"map",debugObjectName:this.tt,type:ms,object:this,name:n,newValue:r}:null)},t.get=function(n){return this.has(n)?this.Qt(this.lt.get(n).get()):this.Qt(void 0)},t.Qt=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.vt.reportObserved(),this.lt.keys()},t.values=function(){var n=this,r=this.keys();return Qu({next:function(){var i=r.next(),s=i.done;return{done:s,value:s?void 0:n.get(i.value)}}})},t.entries=function(){var n=this,r=this.keys();return Qu({next:function(){var i=r.next(),s=i.done,o=i.value;return{done:s,value:s?void 0:[o,n.get(o)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(n,r){for(var i,s=sl(this);!(i=s()).done;){var o=i.value;n.call(r,o[1],o[0],this)}},t.merge=function(n){var r=this;return Yt(n)&&(n=new Map(n)),oi(function(){var i,s;Vi(n)?function(o){var a=Object.keys(o);if(!mb)return a;var l=Object.getOwnPropertySymbols(o);return l.length?[].concat(a,l.filter(function(u){return oc.propertyIsEnumerable.call(o,u)})):a}(n).forEach(function(o){return r.set(o,n[o])}):Array.isArray(n)?n.forEach(function(o){return r.set(o[0],o[1])}):ul(n)?(i=Object.getPrototypeOf(n),s=Object.getPrototypeOf(i),Object.getPrototypeOf(s)!==null&&Ae(19,n),n.forEach(function(o,a){return r.set(a,o)})):n!=null&&Ae(20,n)}),this},t.clear=function(){var n=this;oi(function(){P0(function(){for(var r,i=sl(n.keys());!(r=i()).done;)n.delete(r.value)})})},t.replace=function(n){var r=this;return oi(function(){for(var i,s=function(A){if(ul(A)||Yt(A))return A;if(Array.isArray(A))return new Map(A);if(Vi(A)){var T=new Map;for(var z in A)T.set(z,A[z]);return T}return Ae(21,A)}(n),o=new Map,a=!1,l=sl(r.lt.keys());!(i=l()).done;){var u=i.value;if(!s.has(u))if(r.delete(u))a=!0;else{var c=r.lt.get(u);o.set(u,c)}}for(var f,p=sl(s.entries());!(f=p()).done;){var d=f.value,m=d[0],y=d[1],v=r.lt.has(m);if(r.set(m,y),r.lt.has(m)){var h=r.lt.get(m);o.set(m,h),v||(a=!0)}}if(!a)if(r.lt.size!==o.size)r.vt.reportChanged();else for(var g=r.lt.keys(),w=o.keys(),x=g.next(),C=w.next();!x.done;){if(x.value!==C.value){r.vt.reportChanged();break}x=g.next(),C=w.next()}r.lt=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.At=function(n){return sc(this,n)},t._t=function(n){return ic(this,n)},dl(e,[{key:"size",get:function(){return this.vt.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Yt=ws("ObservableMap",k0),Y5={},M0=function(){function e(n,r,i){var s=this;r===void 0&&(r=cl),i===void 0&&(i="ObservableSet"),this.tt=void 0,this[de]=Y5,this.lt=new Set,this.st=void 0,this.ut=void 0,this.et=void 0,this.dehancer=void 0,this.Jt=void 0,this.tt=i,zn(Set)||Ae(22),this.Jt=function(o,a){return r(o,a,i)},vs(function(){s.st=E0(s.tt),n&&s.replace(n)})}var t=e.prototype;return t.Qt=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;oi(function(){P0(function(){for(var r,i=sl(n.lt.values());!(r=i()).done;)n.delete(r.value)})})},t.forEach=function(n,r){for(var i,s=sl(this);!(i=s()).done;){var o=i.value;n.call(r,o,o,this)}},t.add=function(n){var r=this;if(ur(this)&&!cr(this,{type:ms,object:this,newValue:n}))return this;if(!this.has(n)){oi(function(){r.lt.add(r.Jt(n,void 0)),r.st.reportChanged()});var i=Rr(this);i&&Vr(this,i?{observableKind:"set",debugObjectName:this.tt,type:ms,object:this,newValue:n}:null)}return this},t.delete=function(n){var r=this;if(ur(this)&&!cr(this,{type:"delete",object:this,oldValue:n}))return!1;if(this.has(n)){var i=Rr(this),s=i?{observableKind:"set",debugObjectName:this.tt,type:"delete",object:this,oldValue:n}:null;return oi(function(){r.st.reportChanged(),r.lt.delete(n)}),i&&Vr(this,s),!0}return!1},t.has=function(n){return this.st.reportObserved(),this.lt.has(this.Qt(n))},t.entries=function(){var n=0,r=Array.from(this.keys()),i=Array.from(this.values());return Qu({next:function(){var s=n;return n+=1,s<i.length?{value:[r[s],i[s]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.st.reportObserved();var n=this,r=0,i=Array.from(this.lt.values());return Qu({next:function(){return r<i.length?{value:n.Qt(i[r++]),done:!1}:{done:!0}}})},t.intersection=function(n){return Di(n)&&!Nt(n)?n.intersection(this):new Set(this).intersection(n)},t.union=function(n){return Di(n)&&!Nt(n)?n.union(this):new Set(this).union(n)},t.difference=function(n){return new Set(this).difference(n)},t.symmetricDifference=function(n){return Di(n)&&!Nt(n)?n.symmetricDifference(this):new Set(this).symmetricDifference(n)},t.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},t.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},t.isDisjointFrom=function(n){return Di(n)&&!Nt(n)?n.isDisjointFrom(this):new Set(this).isDisjointFrom(n)},t.replace=function(n){var r=this;return Nt(n)&&(n=new Set(n)),oi(function(){Array.isArray(n)||Di(n)?(r.clear(),n.forEach(function(i){return r.add(i)})):n!=null&&Ae("Cannot initialize set from "+n)}),this},t.At=function(n){return sc(this,n)},t._t=function(n){return ic(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},dl(e,[{key:"size",get:function(){return this.st.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Nt=ws("ObservableSet",M0),kC=Object.create(null),vb=function(){function e(n,r,i,s){r===void 0&&(r=new Map),s===void 0&&(s=N5),this.h=void 0,this.j=void 0,this.tt=void 0,this.un=void 0,this.vt=void 0,this.ut=void 0,this.et=void 0,this.l=void 0,this.p=void 0,this.on=void 0,this.sn=void 0,this.h=n,this.j=r,this.tt=i,this.un=s,this.vt=new hs("ObservableObject.keys"),this.p=Vi(this.h)}var t=e.prototype;return t.O=function(n){return this.j.get(n).get()},t._=function(n,r){var i=this.j.get(n);if(i instanceof kr)return i.set(r),!0;if(ur(this)){var s=cr(this,{type:ci,object:this.l||this.h,name:n,newValue:r});if(!s)return null;r=s.newValue}if((r=i.xt(r))!==Y.UNCHANGED){var o=Rr(this),a=o?{type:ci,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,oldValue:i.Ot,name:n,newValue:r}:null;i.gt(r),o&&Vr(this,a)}return!0},t.ct=function(n){return Y.trackingDerivation&&!ki(this.h,n)&&this.it(n),this.h[n]},t.ht=function(n,r,i){return i===void 0&&(i=!1),ki(this.h,n)?this.j.has(n)?this._(n,r):i?Reflect.set(this.h,n,r):(this.h[n]=r,!0):this.s(n,{value:r,enumerable:!0,writable:!0,configurable:!0},this.un,i)},t.it=function(n){if(!Y.trackingDerivation)return n in this.h;this.sn||(this.sn=new Map);var r=this.sn.get(n);return r||(r=new gs(n in this.h,Yp,"ObservableObject.key?",!1),this.sn.set(n,r)),r.get()},t.o=function(n,r){if(r===!0&&(r=this.un),r!==!1){if(!(n in this.h)){var i;if((i=this.h[li])!=null&&i[n])return;Ae(1,r.i,this.tt+"."+n.toString())}for(var s=this.h;s&&s!==oc;){var o=Wp(s,n);if(o){var a=r.o(this,n,o,s);if(a===0)return;if(a===1)break}s=Object.getPrototypeOf(s)}TC(this,0,n)}},t.s=function(n,r,i,s){if(s===void 0&&(s=!1),i===!0&&(i=this.un),i===!1)return this.v(n,r,s);var o=i.s(this,n,r,s);return o&&TC(this,0,n),o},t.v=function(n,r,i){i===void 0&&(i=!1);try{bn();var s=this.Ut(n);if(!s)return s;if(ur(this)){var o=cr(this,{object:this.l||this.h,name:n,type:ms,newValue:r.value});if(!o)return null;var a=o.newValue;r.value!==a&&(r=Ko({},r,{value:a}))}if(i){if(!Reflect.defineProperty(this.h,n,r))return!1}else ui(this.h,n,r);this.fn(n,r.value)}finally{On()}return!0},t.g=function(n,r,i,s){s===void 0&&(s=!1);try{bn();var o=this.Ut(n);if(!o)return o;if(ur(this)){var a=cr(this,{object:this.l||this.h,name:n,type:ms,newValue:r});if(!a)return null;r=a.newValue}var l=PC(n),u={configurable:!Y.safeDescriptors||this.p,enumerable:!0,get:l.get,set:l.set};if(s){if(!Reflect.defineProperty(this.h,n,u))return!1}else ui(this.h,n,u);var c=new gs(r,i,"ObservableObject.key",!1);this.j.set(n,c),this.fn(n,c.Ot)}finally{On()}return!0},t.m=function(n,r,i){i===void 0&&(i=!1);try{bn();var s=this.Ut(n);if(!s)return s;if(ur(this)&&!cr(this,{object:this.l||this.h,name:n,type:ms,newValue:void 0}))return null;r.name||(r.name="ObservableObject.key"),r.context=this.l||this.h;var o=PC(n),a={configurable:!Y.safeDescriptors||this.p,enumerable:!1,get:o.get,set:o.set};if(i){if(!Reflect.defineProperty(this.h,n,a))return!1}else ui(this.h,n,a);this.j.set(n,new kr(r)),this.fn(n,void 0)}finally{On()}return!0},t.Ut=function(n,r){if(r===void 0&&(r=!1),!ki(this.h,n))return!0;if(ur(this)&&!cr(this,{object:this.l||this.h,name:n,type:"remove"}))return null;try{var i;bn();var s,o=Rr(this),a=this.j.get(n),l=void 0;if(!a&&o&&(l=(s=Wp(this.h,n))==null?void 0:s.value),r){if(!Reflect.deleteProperty(this.h,n))return!1}else delete this.h[n];a&&(this.j.delete(n),a instanceof gs&&(l=a.Ot),tb(a)),this.vt.reportChanged(),(i=this.sn)==null||(i=i.get(n))==null||i.set(n in this.h),o&&o&&Vr(this,{type:"remove",observableKind:"object",object:this.l||this.h,debugObjectName:this.tt,oldValue:l,name:n})}finally{On()}return!0},t.At=function(n){return sc(this,n)},t._t=function(n){return ic(this,n)},t.fn=function(n,r){var i,s=Rr(this);s&&s&&Vr(this,s?{type:ms,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,name:n,newValue:r}:null),(i=this.sn)==null||(i=i.get(n))==null||i.set(!0),this.vt.reportChanged()},t.rt=function(){return this.vt.reportObserved(),ll(this.h)},t.nt=function(){return this.vt.reportObserved(),Object.keys(this.h)},e}(),X5=ws("ObservableObjectAdministration",vb),J5=fb(0),Z5=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),d0=0,wb=function(){};Xu=wb,Rp=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Xu.prototype,Rp):Xu.prototype.__proto__!==void 0?Xu.prototype.__proto__=Rp:Xu.prototype=Rp;var R0=function(e){function t(r,i,s,o){var a;return s===void 0&&(s="ObservableArray"),o===void 0&&(o=!1),a=e.call(this)||this,vs(function(){var l=new D0(s,i,o,!0);l.l=a,BC(a,de,l),r&&r.length&&a.spliceWithArray(0,0,r),Z5&&Object.defineProperty(a,"0",J5)}),a}FC(t,e);var n=t.prototype;return n.concat=function(){this[de].st.reportObserved();for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return Array.prototype.concat.apply(this.slice(),i.map(function(o){return Cn(o)?o.slice():o}))},n[Symbol.iterator]=function(){var r=this,i=0;return Qu({next:function(){return i<r.length?{value:r[i++],done:!1}:{done:!0,value:void 0}}})},dl(t,[{key:"length",get:function(){return this[de].Xt()},set:function(r){this[de].Ft(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(wb);Object.entries(qp).forEach(function(e){var t=e[0];t!=="concat"&&Zu(R0.prototype,t,e[1])}),pb(1e3);var MC=oc.toString;["Symbol","Map","Set"].forEach(function(e){m0()[e]===void 0&&Ae("MobX requires global '"+e+"' to be available or polyfilled")}),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:SC,extras:{getDebugName:Fp},$mobx:de}),te.$mobx=de,te.FlowCancellationError=Bp,te.ObservableMap=k0,te.ObservableSet=M0,te.Reaction=ai,te._allowStateChanges=h0,te._allowStateChangesInsideComputed=_C,te._allowStateReadsEnd=al,te._allowStateReadsStart=Qp,te._autoAction=pl,te._endAction=YC,te._getAdministration=Ni,te._getGlobalState=function(){return Y},te._interceptReads=function(e,t,n){var r;return Yt(e)||Cn(e)||c0(e)?r=Ni(e):Kt(e)&&(r=Ni(e,t)),r.dehancer=typeof t=="function"?t:n,function(){r.dehancer=void 0}},te._isComputingDerivation=function(){return Y.trackingDerivation!==null},te._resetGlobalState=function(){var e=new Ju;for(var t in e)B5.indexOf(t)===-1&&(Y[t]=e[t]);Y.allowStateChanges=!Y.enforceActions},te._startAction=KC,te.action=ds,te.autorun=T0,te.comparer=zo,te.computed=ec,te.configure=function(e){e.isolateGlobalState===!0&&function(){if((Y.pendingReactions.length||Y.inBatch||Y.isRunningReactions)&&Ae(36),yb=!0,jp){var o=m0();--o.__mobxInstanceCount==0&&(o.__mobxGlobals=void 0),Y=new Ju}}();var t,n,r=e.useProxies,i=e.enforceActions;if(r!==void 0&&(Y.useProxies=r==="always"||r!=="never"&&typeof Proxy<"u"),r==="ifavailable"&&(Y.verifyProxies=!0),i!==void 0){var s=i==="always"?"always":i==="observed";Y.enforceActions=s,Y.allowStateChanges=s!==!0&&s!=="always"}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(o){o in e&&(Y[o]=!!e[o])}),Y.allowStateReads=!Y.observableRequiresReaction,e.reactionScheduler&&(t=e.reactionScheduler,n=C0,C0=function(o){return t(function(){return n(o)})})},te.createAtom=E0,te.defineProperty=function(e,t,n){if(Kt(e))return e[de].v(t,n);Ae(39)},te.entries=function(e){return Kt(e)?Yu(e).map(function(t){return[t,e[t]]}):Yt(e)?Yu(e).map(function(t){return[t,e.get(t)]}):Nt(e)?Array.from(e.entries()):Cn(e)?e.map(function(t,n){return[n,t]}):void Ae(7)},te.extendObservable=v0,te.flow=qo,te.flowResult=function(e){return e},te.get=function(e,t){if(OC(e,t))return Kt(e)?e[de].ct(t):Yt(e)?e.get(t):Cn(e)?e[t]:void Ae(11)},te.getAtom=Ri,te.getDebugName=Fp,te.getDependencyTree=function(e,t){return ab(Ri(e,t))},te.getObserverTree=function(e,t){return lb(Ri(e,t))},te.has=OC,te.intercept=function(e,t,n){return zn(n)?function(r,i,s){return Ni(r,i)._t(s)}(e,t,n):function(r,i){return Ni(r)._t(i)}(e,t)},te.isAction=rc,te.isBoxedObservable=c0,te.isComputed=function(e){return bC(e)},te.isComputedProp=function(e,t){return bC(e,t)},te.isFlow=fl,te.isFlowCancellationError=function(e){return e instanceof Bp},te.isObservable=Up,te.isObservableArray=Cn,te.isObservableMap=Yt,te.isObservableObject=Kt,te.isObservableProp=function(e,t){return ub(e,t)},te.isObservableSet=Nt,te.keys=Yu,te.makeAutoObservable=function(e,t,n){return Vi(e)?v0(e,e,t,n):(vs(function(){var r=$o(e,n)[de];if(!e[p0]){var i=Object.getPrototypeOf(e),s=new Set([].concat(ll(e),ll(i)));s.delete("constructor"),s.delete(de),Zu(i,p0,s)}e[p0].forEach(function(o){return r.o(o,!t||!(o in t)||t[o])})}),e)},te.makeObservable=function(e,t,n){return vs(function(){var r=$o(e,n)[de];t!=null||(t=function(i){return ki(i,li)||Zu(i,li,Ko({},i[li])),i[li]}(e)),ll(t).forEach(function(i){return r.o(i,t[i])})}),e},te.observable=Wt,te.observe=function(e,t,n,r){return zn(n)?function(i,s,o,a){return Ni(i,s).At(o,a)}(e,t,n,r):function(i,s,o){return Ni(i).At(s,o)}(e,t,n)},te.onBecomeObserved=sb,te.onBecomeUnobserved=A0,te.onReactionError=function(e){return Y.globalReactionErrorHandlers.push(e),function(){var t=Y.globalReactionErrorHandlers.indexOf(e);t>=0&&Y.globalReactionErrorHandlers.splice(t,1)}},te.override=L5,te.ownKeys=EC,te.reaction=function(e,t,n){function r(){if(y=!1,!h.isDisposed){var g=!1,w=u;h.track(function(){var x=h0(!1,function(){return e(h)});g=m||!v(u,x),u=x}),(m&&n.fireImmediately||!m&&g)&&f(u,w,h),m=!1}}var i,s,o;n===void 0&&(n=L0);var a,l,u,c=(i=n.name)!=null?i:"Reaction",f=ds(c,n.onError?(a=n.onError,l=t,function(){try{return l.apply(this,arguments)}catch(g){a.call(this,g)}}):t),p=!n.scheduler&&!n.delay,d=ib(n),m=!0,y=!1,v=n.compareStructural?zo.structural:n.equals||zo.default,h=new ai(c,function(){m||p?r():y||(y=!0,d(r))},n.onError,n.requiresObservable);return(s=n)!=null&&(s=s.signal)!=null&&s.aborted||h.Y(),h.Z((o=n)==null?void 0:o.signal)},te.remove=function(e,t){Kt(e)?e[de].Ut(t):Yt(e)||Nt(e)?e.delete(t):Cn(e)?(typeof t!="number"&&(t=parseInt(t,10)),e.splice(t,1)):Ae(9)},te.runInAction=_C,te.set=function e(t,n,r){if(arguments.length!==2||Nt(t))Kt(t)?t[de].ht(n,r):Yt(t)?t.set(n,r):Nt(t)?t.add(n):Cn(t)?(typeof n!="number"&&(n=parseInt(n,10)),n<0&&Ae("Invalid index: '"+n+"'"),bn(),n>=t.length&&(t.length=n+1),t[n]=r,On()):Ae(8);else{bn();var i=n;try{for(var s in i)e(t,s,i[s])}finally{On()}}},te.spy=SC,te.toJS=function(e){return function t(n,r){if(n==null||typeof n!="object"||n instanceof Date||!Up(n))return n;if(c0(n)||Ho(n))return t(n.get(),r);if(r.has(n))return r.get(n);if(Cn(n)){var i=Mp(r,n,new Array(n.length));return n.forEach(function(l,u){i[u]=t(l,r)}),i}if(Nt(n)){var s=Mp(r,n,new Set);return n.forEach(function(l){s.add(t(l,r))}),s}if(Yt(n)){var o=Mp(r,n,new Map);return n.forEach(function(l,u){o.set(u,t(l,r))}),o}var a=Mp(r,n,{});return EC(n).forEach(function(l){oc.propertyIsEnumerable.call(n,l)&&(a[l]=t(n[l],r))}),a}(e,new Map)},te.trace=function(){},te.transaction=oi,te.untracked=P0,te.values=function(e){return Kt(e)?Yu(e).map(function(t){return e[t]}):Yt(e)?Yu(e).map(function(t){return e.get(t)}):Nt(e)?Array.from(e.values()):Cn(e)?e.slice():void Ae(6)},te.when=function(e,t,n){return arguments.length===1||t&&typeof t=="object"?_5(e,t):cb(e,t,n||{})}});var ac=oe((yq,Sb)=>{"use strict";Sb.exports=xb()});var i2=oe(nt=>{"use strict";function dy(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(0<sd(i,t))e[r]=t,e[n]=i,n=r;else break e}}function Ur(e){return e.length===0?null:e[0]}function ad(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,a=e[o],l=o+1,u=e[l];if(0>sd(a,n))l<i&&0>sd(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else if(l<i&&0>sd(u,n))e[r]=u,e[l]=n,r=l;else break e}}return t}function sd(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Yb=performance,nt.unstable_now=function(){return Yb.now()}):(cy=Date,Xb=cy.now(),nt.unstable_now=function(){return cy.now()-Xb});var Yb,cy,Xb,fi=[],xs=[],NM=1,fr=null,rn=3,ld=!1,Zo=!1,fc=!1,Qb=typeof setTimeout=="function"?setTimeout:null,e2=typeof clearTimeout=="function"?clearTimeout:null,Jb=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function my(e){for(var t=Ur(xs);t!==null;){if(t.callback===null)ad(xs);else if(t.startTime<=e)ad(xs),t.sortIndex=t.expirationTime,dy(fi,t);else break;t=Ur(xs)}}function hy(e){if(fc=!1,my(e),!Zo)if(Ur(fi)!==null)Zo=!0,yy(gy);else{var t=Ur(xs);t!==null&&vy(hy,t.startTime-e)}}function gy(e,t){Zo=!1,fc&&(fc=!1,e2(pc),pc=-1),ld=!0;var n=rn;try{for(my(t),fr=Ur(fi);fr!==null&&(!(fr.expirationTime>t)||e&&!r2());){var r=fr.callback;if(typeof r=="function"){fr.callback=null,rn=fr.priorityLevel;var i=r(fr.expirationTime<=t);t=nt.unstable_now(),typeof i=="function"?fr.callback=i:fr===Ur(fi)&&ad(fi),my(t)}else ad(fi);fr=Ur(fi)}if(fr!==null)var s=!0;else{var o=Ur(xs);o!==null&&vy(hy,o.startTime-t),s=!1}return s}finally{fr=null,rn=n,ld=!1}}var ud=!1,od=null,pc=-1,t2=5,n2=-1;function r2(){return!(nt.unstable_now()-n2<t2)}function fy(){if(od!==null){var e=nt.unstable_now();n2=e;var t=!0;try{t=od(!0,e)}finally{t?cc():(ud=!1,od=null)}}else ud=!1}var cc;typeof Jb=="function"?cc=function(){Jb(fy)}:typeof MessageChannel<"u"?(py=new MessageChannel,Zb=py.port2,py.port1.onmessage=fy,cc=function(){Zb.postMessage(null)}):cc=function(){Qb(fy,0)};var py,Zb;function yy(e){od=e,ud||(ud=!0,cc())}function vy(e,t){pc=Qb(function(){e(nt.unstable_now())},t)}nt.unstable_IdlePriority=5;nt.unstable_ImmediatePriority=1;nt.unstable_LowPriority=4;nt.unstable_NormalPriority=3;nt.unstable_Profiling=null;nt.unstable_UserBlockingPriority=2;nt.unstable_cancelCallback=function(e){e.callback=null};nt.unstable_continueExecution=function(){Zo||ld||(Zo=!0,yy(gy))};nt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):t2=0<e?Math.floor(1e3/e):5};nt.unstable_getCurrentPriorityLevel=function(){return rn};nt.unstable_getFirstCallbackNode=function(){return Ur(fi)};nt.unstable_next=function(e){switch(rn){case 1:case 2:case 3:var t=3;break;default:t=rn}var n=rn;rn=t;try{return e()}finally{rn=n}};nt.unstable_pauseExecution=function(){};nt.unstable_requestPaint=function(){};nt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=rn;rn=e;try{return t()}finally{rn=n}};nt.unstable_scheduleCallback=function(e,t,n){var r=nt.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:NM++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>r?(e.sortIndex=n,dy(xs,e),Ur(fi)===null&&e===Ur(xs)&&(fc?(e2(pc),pc=-1):fc=!0,vy(hy,n-r))):(e.sortIndex=i,dy(fi,e),Zo||ld||(Zo=!0,yy(gy))),e};nt.unstable_shouldYield=r2;nt.unstable_wrapCallback=function(e){var t=rn;return function(){var n=rn;rn=t;try{return e.apply(this,arguments)}finally{rn=n}}}});var o2=oe((AK,s2)=>{"use strict";s2.exports=i2()});var cI=oe(Yn=>{"use strict";var DM=K("react"),qn=o2();function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var dO=new Set,kc={};function fa(e,t){Bl(e,t),Bl(e+"Capture",t)}function Bl(e,t){for(kc[e]=t,e=0;e<t.length;e++)dO.add(t[e])}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fy=Object.prototype.hasOwnProperty,kM=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a2={},l2={};function MM(e){return Fy.call(l2,e)?!0:Fy.call(a2,e)?!1:kM.test(e)?l2[e]=!0:(a2[e]=!0,!1)}function RM(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function VM(e,t,n,r){if(t===null||typeof t>"u"||RM(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yn(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var en={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){en[e]=new yn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];en[t]=new yn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){en[e]=new yn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){en[e]=new yn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){en[e]=new yn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){en[e]=new yn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){en[e]=new yn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){en[e]=new yn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){en[e]=new yn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Dv=/[\-:]([a-z])/g;function kv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Dv,kv);en[t]=new yn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Dv,kv);en[t]=new yn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Dv,kv);en[t]=new yn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){en[e]=new yn(e,1,!1,e.toLowerCase(),null,!1,!1)});en.xlinkHref=new yn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){en[e]=new yn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mv(e,t,n,r){var i=en.hasOwnProperty(t)?en[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(VM(t,n,i,r)&&(n=null),r||i===null?MM(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ki=DM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cd=Symbol.for("react.element"),Sl=Symbol.for("react.portal"),_l=Symbol.for("react.fragment"),Rv=Symbol.for("react.strict_mode"),Wy=Symbol.for("react.profiler"),mO=Symbol.for("react.provider"),hO=Symbol.for("react.context"),Vv=Symbol.for("react.forward_ref"),zy=Symbol.for("react.suspense"),Gy=Symbol.for("react.suspense_list"),jv=Symbol.for("react.memo"),_s=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var gO=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var u2=Symbol.iterator;function dc(e){return e===null||typeof e!="object"?null:(e=u2&&e[u2]||e["@@iterator"],typeof e=="function"?e:null)}var yt=Object.assign,wy;function Sc(e){if(wy===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wy=t&&t[1]||""}return`
14
+ `+wy+e}var xy=!1;function Sy(e,t){if(!e||xy)return"";xy=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
15
+ `),s=r.stack.split(`
16
+ `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
17
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{xy=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sc(e):""}function jM(e){switch(e.tag){case 5:return Sc(e.type);case 16:return Sc("Lazy");case 13:return Sc("Suspense");case 19:return Sc("SuspenseList");case 0:case 2:case 15:return e=Sy(e.type,!1),e;case 11:return e=Sy(e.type.render,!1),e;case 1:return e=Sy(e.type,!0),e;default:return""}}function $y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _l:return"Fragment";case Sl:return"Portal";case Wy:return"Profiler";case Rv:return"StrictMode";case zy:return"Suspense";case Gy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case hO:return(e.displayName||"Context")+".Consumer";case mO:return(e._context.displayName||"Context")+".Provider";case Vv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jv:return t=e.displayName||null,t!==null?t:$y(e.type)||"Memo";case _s:t=e._payload,e=e._init;try{return $y(e(t))}catch{}}return null}function BM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $y(t);case 8:return t===Rv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UM(e){var t=yO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fd(e){e._valueTracker||(e._valueTracker=UM(e))}function vO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hy(e,t){var n=t.checked;return yt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function c2(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wO(e,t){t=t.checked,t!=null&&Mv(e,"checked",t,!1)}function qy(e,t){wO(e,t);var n=Rs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ky(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ky(e,t.type,Rs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function f2(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ky(e,t,n){(t!=="number"||Bd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _c=Array.isArray;function Dl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Rs(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yy(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return yt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function p2(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(_c(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Rs(n)}}function xO(e,t){var n=Rs(t.value),r=Rs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function d2(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function SO(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xy(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?SO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pd,_O=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pd=pd||document.createElement("div"),pd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},FM=["Webkit","ms","Moz","O"];Object.keys(Oc).forEach(function(e){FM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Oc[t]=Oc[e]})});function CO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Oc.hasOwnProperty(e)&&Oc[e]?(""+t).trim():t+"px"}function bO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=CO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var WM=yt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Jy(e,t){if(t){if(WM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Zy(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Qy=null;function Bv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ev=null,kl=null,Ml=null;function m2(e){if(e=Qc(e)){if(typeof ev!="function")throw Error(H(280));var t=e.stateNode;t&&(t=dm(t),ev(e.stateNode,e.type,t))}}function OO(e){kl?Ml?Ml.push(e):Ml=[e]:kl=e}function EO(){if(kl){var e=kl,t=Ml;if(Ml=kl=null,m2(e),t)for(e=0;e<t.length;e++)m2(t[e])}}function IO(e,t){return e(t)}function PO(){}var _y=!1;function TO(e,t,n){if(_y)return e(t,n);_y=!0;try{return IO(e,t,n)}finally{_y=!1,(kl!==null||Ml!==null)&&(PO(),EO())}}function Rc(e,t){var n=e.stateNode;if(n===null)return null;var r=dm(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var tv=!1;if(Gi)try{wl={},Object.defineProperty(wl,"passive",{get:function(){tv=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{tv=!1}var wl;function zM(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ec=!1,Ud=null,Fd=!1,nv=null,GM={onError:function(e){Ec=!0,Ud=e}};function $M(e,t,n,r,i,s,o,a,l){Ec=!1,Ud=null,zM.apply(GM,arguments)}function HM(e,t,n,r,i,s,o,a,l){if($M.apply(this,arguments),Ec){if(Ec){var u=Ud;Ec=!1,Ud=null}else throw Error(H(198));Fd||(Fd=!0,nv=u)}}function pa(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function AO(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h2(e){if(pa(e)!==e)throw Error(H(188))}function qM(e){var t=e.alternate;if(!t){if(t=pa(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return h2(i),e;if(s===r)return h2(i),t;s=s.sibling}throw Error(H(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function LO(e){return e=qM(e),e!==null?NO(e):null}function NO(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=NO(e);if(t!==null)return t;e=e.sibling}return null}var DO=qn.unstable_scheduleCallback,g2=qn.unstable_cancelCallback,KM=qn.unstable_shouldYield,YM=qn.unstable_requestPaint,Ot=qn.unstable_now,XM=qn.unstable_getCurrentPriorityLevel,Uv=qn.unstable_ImmediatePriority,kO=qn.unstable_UserBlockingPriority,Wd=qn.unstable_NormalPriority,JM=qn.unstable_LowPriority,MO=qn.unstable_IdlePriority,um=null,hi=null;function ZM(e){if(hi&&typeof hi.onCommitFiberRoot=="function")try{hi.onCommitFiberRoot(um,e,void 0,(e.current.flags&128)===128)}catch{}}var $r=Math.clz32?Math.clz32:t4,QM=Math.log,e4=Math.LN2;function t4(e){return e>>>=0,e===0?32:31-(QM(e)/e4|0)|0}var dd=64,md=4194304;function Cc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Cc(a):(s&=o,s!==0&&(r=Cc(s)))}else o=n&~i,o!==0?r=Cc(o):s!==0&&(r=Cc(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-$r(t),i=1<<n,r|=e[n],t&=~i;return r}function n4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function r4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-$r(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=n4(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function rv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function RO(){var e=dd;return dd<<=1,!(dd&4194240)&&(dd=64),e}function Cy(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-$r(t),e[t]=n}function i4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-$r(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Fv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$r(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Xe=0;function VO(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jO,Wv,BO,UO,FO,iv=!1,hd=[],Ps=null,Ts=null,As=null,Vc=new Map,jc=new Map,bs=[],s4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function y2(e,t){switch(e){case"focusin":case"focusout":Ps=null;break;case"dragenter":case"dragleave":Ts=null;break;case"mouseover":case"mouseout":As=null;break;case"pointerover":case"pointerout":Vc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jc.delete(t.pointerId)}}function mc(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Qc(t),t!==null&&Wv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function o4(e,t,n,r,i){switch(t){case"focusin":return Ps=mc(Ps,e,t,n,r,i),!0;case"dragenter":return Ts=mc(Ts,e,t,n,r,i),!0;case"mouseover":return As=mc(As,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Vc.set(s,mc(Vc.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,jc.set(s,mc(jc.get(s)||null,e,t,n,r,i)),!0}return!1}function WO(e){var t=ta(e.target);if(t!==null){var n=pa(t);if(n!==null){if(t=n.tag,t===13){if(t=AO(n),t!==null){e.blockedOn=t,FO(e.priority,function(){BO(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Td(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=sv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qy=r,n.target.dispatchEvent(r),Qy=null}else return t=Qc(n),t!==null&&Wv(t),e.blockedOn=n,!1;t.shift()}return!0}function v2(e,t,n){Td(e)&&n.delete(t)}function a4(){iv=!1,Ps!==null&&Td(Ps)&&(Ps=null),Ts!==null&&Td(Ts)&&(Ts=null),As!==null&&Td(As)&&(As=null),Vc.forEach(v2),jc.forEach(v2)}function hc(e,t){e.blockedOn===t&&(e.blockedOn=null,iv||(iv=!0,qn.unstable_scheduleCallback(qn.unstable_NormalPriority,a4)))}function Bc(e){function t(i){return hc(i,e)}if(0<hd.length){hc(hd[0],e);for(var n=1;n<hd.length;n++){var r=hd[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ps!==null&&hc(Ps,e),Ts!==null&&hc(Ts,e),As!==null&&hc(As,e),Vc.forEach(t),jc.forEach(t),n=0;n<bs.length;n++)r=bs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<bs.length&&(n=bs[0],n.blockedOn===null);)WO(n),n.blockedOn===null&&bs.shift()}var Rl=Ki.ReactCurrentBatchConfig,Gd=!0;function l4(e,t,n,r){var i=Xe,s=Rl.transition;Rl.transition=null;try{Xe=1,zv(e,t,n,r)}finally{Xe=i,Rl.transition=s}}function u4(e,t,n,r){var i=Xe,s=Rl.transition;Rl.transition=null;try{Xe=4,zv(e,t,n,r)}finally{Xe=i,Rl.transition=s}}function zv(e,t,n,r){if(Gd){var i=sv(e,t,n,r);if(i===null)Ay(e,t,r,$d,n),y2(e,r);else if(o4(i,e,t,n,r))r.stopPropagation();else if(y2(e,r),t&4&&-1<s4.indexOf(e)){for(;i!==null;){var s=Qc(i);if(s!==null&&jO(s),s=sv(e,t,n,r),s===null&&Ay(e,t,r,$d,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Ay(e,t,r,null,n)}}var $d=null;function sv(e,t,n,r){if($d=null,e=Bv(r),e=ta(e),e!==null)if(t=pa(e),t===null)e=null;else if(n=t.tag,n===13){if(e=AO(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $d=e,null}function zO(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(XM()){case Uv:return 1;case kO:return 4;case Wd:case JM:return 16;case MO:return 536870912;default:return 16}default:return 16}}var Es=null,Gv=null,Ad=null;function GO(){if(Ad)return Ad;var e,t=Gv,n=t.length,r,i="value"in Es?Es.value:Es.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Ad=i.slice(e,1<r?1-r:void 0)}function Ld(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gd(){return!0}function w2(){return!1}function Kn(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?gd:w2,this.isPropagationStopped=w2,this}return yt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=gd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=gd)},persist:function(){},isPersistent:gd}),t}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$v=Kn(Hl),Zc=yt({},Hl,{view:0,detail:0}),c4=Kn(Zc),by,Oy,gc,cm=yt({},Zc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gc&&(gc&&e.type==="mousemove"?(by=e.screenX-gc.screenX,Oy=e.screenY-gc.screenY):Oy=by=0,gc=e),by)},movementY:function(e){return"movementY"in e?e.movementY:Oy}}),x2=Kn(cm),f4=yt({},cm,{dataTransfer:0}),p4=Kn(f4),d4=yt({},Zc,{relatedTarget:0}),Ey=Kn(d4),m4=yt({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),h4=Kn(m4),g4=yt({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y4=Kn(g4),v4=yt({},Hl,{data:0}),S2=Kn(v4),w4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},x4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},S4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S4[e])?!!t[e]:!1}function Hv(){return _4}var C4=yt({},Zc,{key:function(e){if(e.key){var t=w4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ld(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?x4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hv,charCode:function(e){return e.type==="keypress"?Ld(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ld(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b4=Kn(C4),O4=yt({},cm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_2=Kn(O4),E4=yt({},Zc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hv}),I4=Kn(E4),P4=yt({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),T4=Kn(P4),A4=yt({},cm,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),L4=Kn(A4),N4=[9,13,27,32],qv=Gi&&"CompositionEvent"in window,Ic=null;Gi&&"documentMode"in document&&(Ic=document.documentMode);var D4=Gi&&"TextEvent"in window&&!Ic,$O=Gi&&(!qv||Ic&&8<Ic&&11>=Ic),C2=" ",b2=!1;function HO(e,t){switch(e){case"keyup":return N4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cl=!1;function k4(e,t){switch(e){case"compositionend":return qO(t);case"keypress":return t.which!==32?null:(b2=!0,C2);case"textInput":return e=t.data,e===C2&&b2?null:e;default:return null}}function M4(e,t){if(Cl)return e==="compositionend"||!qv&&HO(e,t)?(e=GO(),Ad=Gv=Es=null,Cl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $O&&t.locale!=="ko"?null:t.data;default:return null}}var R4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function O2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!R4[e.type]:t==="textarea"}function KO(e,t,n,r){OO(r),t=Hd(t,"onChange"),0<t.length&&(n=new $v("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Pc=null,Uc=null;function V4(e){sE(e,0)}function fm(e){var t=El(e);if(vO(t))return e}function j4(e,t){if(e==="change")return t}var YO=!1;Gi&&(Gi?(vd="oninput"in document,vd||(Iy=document.createElement("div"),Iy.setAttribute("oninput","return;"),vd=typeof Iy.oninput=="function"),yd=vd):yd=!1,YO=yd&&(!document.documentMode||9<document.documentMode));var yd,vd,Iy;function E2(){Pc&&(Pc.detachEvent("onpropertychange",XO),Uc=Pc=null)}function XO(e){if(e.propertyName==="value"&&fm(Uc)){var t=[];KO(t,Uc,e,Bv(e)),TO(V4,t)}}function B4(e,t,n){e==="focusin"?(E2(),Pc=t,Uc=n,Pc.attachEvent("onpropertychange",XO)):e==="focusout"&&E2()}function U4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fm(Uc)}function F4(e,t){if(e==="click")return fm(t)}function W4(e,t){if(e==="input"||e==="change")return fm(t)}function z4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qr=typeof Object.is=="function"?Object.is:z4;function Fc(e,t){if(qr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Fy.call(t,i)||!qr(e[i],t[i]))return!1}return!0}function I2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function P2(e,t){var n=I2(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I2(n)}}function JO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?JO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ZO(){for(var e=window,t=Bd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bd(e.document)}return t}function Kv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function G4(e){var t=ZO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&JO(n.ownerDocument.documentElement,n)){if(r!==null&&Kv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=P2(n,s);var o=P2(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $4=Gi&&"documentMode"in document&&11>=document.documentMode,bl=null,ov=null,Tc=null,av=!1;function T2(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;av||bl==null||bl!==Bd(r)||(r=bl,"selectionStart"in r&&Kv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tc&&Fc(Tc,r)||(Tc=r,r=Hd(ov,"onSelect"),0<r.length&&(t=new $v("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=bl)))}function wd(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ol={animationend:wd("Animation","AnimationEnd"),animationiteration:wd("Animation","AnimationIteration"),animationstart:wd("Animation","AnimationStart"),transitionend:wd("Transition","TransitionEnd")},Py={},QO={};Gi&&(QO=document.createElement("div").style,"AnimationEvent"in window||(delete Ol.animationend.animation,delete Ol.animationiteration.animation,delete Ol.animationstart.animation),"TransitionEvent"in window||delete Ol.transitionend.transition);function pm(e){if(Py[e])return Py[e];if(!Ol[e])return e;var t=Ol[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in QO)return Py[e]=t[n];return e}var eE=pm("animationend"),tE=pm("animationiteration"),nE=pm("animationstart"),rE=pm("transitionend"),iE=new Map,A2="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function js(e,t){iE.set(e,t),fa(t,[e])}for(xd=0;xd<A2.length;xd++)Sd=A2[xd],L2=Sd.toLowerCase(),N2=Sd[0].toUpperCase()+Sd.slice(1),js(L2,"on"+N2);var Sd,L2,N2,xd;js(eE,"onAnimationEnd");js(tE,"onAnimationIteration");js(nE,"onAnimationStart");js("dblclick","onDoubleClick");js("focusin","onFocus");js("focusout","onBlur");js(rE,"onTransitionEnd");Bl("onMouseEnter",["mouseout","mouseover"]);Bl("onMouseLeave",["mouseout","mouseover"]);Bl("onPointerEnter",["pointerout","pointerover"]);Bl("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),H4=new Set("cancel close invalid load scroll toggle".split(" ").concat(bc));function D2(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,HM(r,t,void 0,e),e.currentTarget=null}function sE(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;D2(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;D2(i,a,u),s=l}}}if(Fd)throw e=nv,Fd=!1,nv=null,e}function ut(e,t){var n=t[pv];n===void 0&&(n=t[pv]=new Set);var r=e+"__bubble";n.has(r)||(oE(t,e,2,!1),n.add(r))}function Ty(e,t,n){var r=0;t&&(r|=4),oE(n,e,r,t)}var _d="_reactListening"+Math.random().toString(36).slice(2);function Wc(e){if(!e[_d]){e[_d]=!0,dO.forEach(function(n){n!=="selectionchange"&&(H4.has(n)||Ty(n,!1,e),Ty(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_d]||(t[_d]=!0,Ty("selectionchange",!1,t))}}function oE(e,t,n,r){switch(zO(t)){case 1:var i=l4;break;case 4:i=u4;break;default:i=zv}n=i.bind(null,t,n,e),i=void 0,!tv||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ay(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=ta(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}TO(function(){var u=s,c=Bv(n),f=[];e:{var p=iE.get(e);if(p!==void 0){var d=$v,m=e;switch(e){case"keypress":if(Ld(n)===0)break e;case"keydown":case"keyup":d=b4;break;case"focusin":m="focus",d=Ey;break;case"focusout":m="blur",d=Ey;break;case"beforeblur":case"afterblur":d=Ey;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=x2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=p4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=I4;break;case eE:case tE:case nE:d=h4;break;case rE:d=T4;break;case"scroll":d=c4;break;case"wheel":d=L4;break;case"copy":case"cut":case"paste":d=y4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=_2}var y=(t&4)!==0,v=!y&&e==="scroll",h=y?p!==null?p+"Capture":null:p;y=[];for(var g=u,w;g!==null;){w=g;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,h!==null&&(x=Rc(g,h),x!=null&&y.push(zc(g,x,w)))),v)break;g=g.return}0<y.length&&(p=new d(p,m,null,n,c),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",p&&n!==Qy&&(m=n.relatedTarget||n.fromElement)&&(ta(m)||m[$i]))break e;if((d||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,d?(m=n.relatedTarget||n.toElement,d=u,m=m?ta(m):null,m!==null&&(v=pa(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(d=null,m=u),d!==m)){if(y=x2,x="onMouseLeave",h="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=_2,x="onPointerLeave",h="onPointerEnter",g="pointer"),v=d==null?p:El(d),w=m==null?p:El(m),p=new y(x,g+"leave",d,n,c),p.target=v,p.relatedTarget=w,x=null,ta(c)===u&&(y=new y(h,g+"enter",m,n,c),y.target=w,y.relatedTarget=v,x=y),v=x,d&&m)t:{for(y=d,h=m,g=0,w=y;w;w=xl(w))g++;for(w=0,x=h;x;x=xl(x))w++;for(;0<g-w;)y=xl(y),g--;for(;0<w-g;)h=xl(h),w--;for(;g--;){if(y===h||h!==null&&y===h.alternate)break t;y=xl(y),h=xl(h)}y=null}else y=null;d!==null&&k2(f,p,d,y,!1),m!==null&&v!==null&&k2(f,v,m,y,!0)}}e:{if(p=u?El(u):window,d=p.nodeName&&p.nodeName.toLowerCase(),d==="select"||d==="input"&&p.type==="file")var C=j4;else if(O2(p))if(YO)C=W4;else{C=U4;var A=B4}else(d=p.nodeName)&&d.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=F4);if(C&&(C=C(e,u))){KO(f,C,n,c);break e}A&&A(e,p,u),e==="focusout"&&(A=p._wrapperState)&&A.controlled&&p.type==="number"&&Ky(p,"number",p.value)}switch(A=u?El(u):window,e){case"focusin":(O2(A)||A.contentEditable==="true")&&(bl=A,ov=u,Tc=null);break;case"focusout":Tc=ov=bl=null;break;case"mousedown":av=!0;break;case"contextmenu":case"mouseup":case"dragend":av=!1,T2(f,n,c);break;case"selectionchange":if($4)break;case"keydown":case"keyup":T2(f,n,c)}var T;if(qv)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else Cl?HO(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&($O&&n.locale!=="ko"&&(Cl||z!=="onCompositionStart"?z==="onCompositionEnd"&&Cl&&(T=GO()):(Es=c,Gv="value"in Es?Es.value:Es.textContent,Cl=!0)),A=Hd(u,z),0<A.length&&(z=new S2(z,e,null,n,c),f.push({event:z,listeners:A}),T?z.data=T:(T=qO(n),T!==null&&(z.data=T)))),(T=D4?k4(e,n):M4(e,n))&&(u=Hd(u,"onBeforeInput"),0<u.length&&(c=new S2("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=T))}sE(f,t)})}function zc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hd(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Rc(e,n),s!=null&&r.unshift(zc(e,s,i)),s=Rc(e,t),s!=null&&r.push(zc(e,s,i))),e=e.return}return r}function xl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function k2(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Rc(n,s),l!=null&&o.unshift(zc(n,l,a))):i||(l=Rc(n,s),l!=null&&o.push(zc(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var q4=/\r\n?/g,K4=/\u0000|\uFFFD/g;function M2(e){return(typeof e=="string"?e:""+e).replace(q4,`
18
+ `).replace(K4,"")}function Cd(e,t,n){if(t=M2(t),M2(e)!==t&&n)throw Error(H(425))}function qd(){}var lv=null,uv=null;function cv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fv=typeof setTimeout=="function"?setTimeout:void 0,Y4=typeof clearTimeout=="function"?clearTimeout:void 0,R2=typeof Promise=="function"?Promise:void 0,X4=typeof queueMicrotask=="function"?queueMicrotask:typeof R2<"u"?function(e){return R2.resolve(null).then(e).catch(J4)}:fv;function J4(e){setTimeout(function(){throw e})}function Ly(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Bc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Bc(t)}function Ls(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function V2(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ql=Math.random().toString(36).slice(2),mi="__reactFiber$"+ql,Gc="__reactProps$"+ql,$i="__reactContainer$"+ql,pv="__reactEvents$"+ql,Z4="__reactListeners$"+ql,Q4="__reactHandles$"+ql;function ta(e){var t=e[mi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$i]||n[mi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=V2(e);e!==null;){if(n=e[mi])return n;e=V2(e)}return t}e=n,n=e.parentNode}return null}function Qc(e){return e=e[mi]||e[$i],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function El(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function dm(e){return e[Gc]||null}var dv=[],Il=-1;function Bs(e){return{current:e}}function ct(e){0>Il||(e.current=dv[Il],dv[Il]=null,Il--)}function rt(e,t){Il++,dv[Il]=e.current,e.current=t}var Vs={},ln=Bs(Vs),Tn=Bs(!1),oa=Vs;function Ul(e,t){var n=e.type.contextTypes;if(!n)return Vs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function An(e){return e=e.childContextTypes,e!=null}function Kd(){ct(Tn),ct(ln)}function j2(e,t,n){if(ln.current!==Vs)throw Error(H(168));rt(ln,t),rt(Tn,n)}function aE(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(H(108,BM(e)||"Unknown",i));return yt({},n,r)}function Yd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vs,oa=ln.current,rt(ln,e),rt(Tn,Tn.current),!0}function B2(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=aE(e,t,oa),r.__reactInternalMemoizedMergedChildContext=e,ct(Tn),ct(ln),rt(ln,e)):ct(Tn),rt(Tn,n)}var Ui=null,mm=!1,Ny=!1;function lE(e){Ui===null?Ui=[e]:Ui.push(e)}function eR(e){mm=!0,lE(e)}function Us(){if(!Ny&&Ui!==null){Ny=!0;var e=0,t=Xe;try{var n=Ui;for(Xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ui=null,mm=!1}catch(i){throw Ui!==null&&(Ui=Ui.slice(e+1)),DO(Uv,Us),i}finally{Xe=t,Ny=!1}}return null}var Pl=[],Tl=0,Xd=null,Jd=0,pr=[],dr=0,aa=null,Fi=1,Wi="";function Qo(e,t){Pl[Tl++]=Jd,Pl[Tl++]=Xd,Xd=e,Jd=t}function uE(e,t,n){pr[dr++]=Fi,pr[dr++]=Wi,pr[dr++]=aa,aa=e;var r=Fi;e=Wi;var i=32-$r(r)-1;r&=~(1<<i),n+=1;var s=32-$r(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Fi=1<<32-$r(t)+i|n<<i|r,Wi=s+e}else Fi=1<<s|n<<i|r,Wi=e}function Yv(e){e.return!==null&&(Qo(e,1),uE(e,1,0))}function Xv(e){for(;e===Xd;)Xd=Pl[--Tl],Pl[Tl]=null,Jd=Pl[--Tl],Pl[Tl]=null;for(;e===aa;)aa=pr[--dr],pr[dr]=null,Wi=pr[--dr],pr[dr]=null,Fi=pr[--dr],pr[dr]=null}var Hn=null,$n=null,dt=!1,Gr=null;function cE(e,t){var n=mr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function U2(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Hn=e,$n=Ls(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Hn=e,$n=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=aa!==null?{id:Fi,overflow:Wi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Hn=e,$n=null,!0):!1;default:return!1}}function mv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function hv(e){if(dt){var t=$n;if(t){var n=t;if(!U2(e,t)){if(mv(e))throw Error(H(418));t=Ls(n.nextSibling);var r=Hn;t&&U2(e,t)?cE(r,n):(e.flags=e.flags&-4097|2,dt=!1,Hn=e)}}else{if(mv(e))throw Error(H(418));e.flags=e.flags&-4097|2,dt=!1,Hn=e}}}function F2(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Hn=e}function bd(e){if(e!==Hn)return!1;if(!dt)return F2(e),dt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!cv(e.type,e.memoizedProps)),t&&(t=$n)){if(mv(e))throw fE(),Error(H(418));for(;t;)cE(e,t),t=Ls(t.nextSibling)}if(F2(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$n=Ls(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$n=null}}else $n=Hn?Ls(e.stateNode.nextSibling):null;return!0}function fE(){for(var e=$n;e;)e=Ls(e.nextSibling)}function Fl(){$n=Hn=null,dt=!1}function Jv(e){Gr===null?Gr=[e]:Gr.push(e)}var tR=Ki.ReactCurrentBatchConfig;function yc(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Od(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function W2(e){var t=e._init;return t(e._payload)}function pE(e){function t(h,g){if(e){var w=h.deletions;w===null?(h.deletions=[g],h.flags|=16):w.push(g)}}function n(h,g){if(!e)return null;for(;g!==null;)t(h,g),g=g.sibling;return null}function r(h,g){for(h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function i(h,g){return h=Ms(h,g),h.index=0,h.sibling=null,h}function s(h,g,w){return h.index=w,e?(w=h.alternate,w!==null?(w=w.index,w<g?(h.flags|=2,g):w):(h.flags|=2,g)):(h.flags|=1048576,g)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,g,w,x){return g===null||g.tag!==6?(g=By(w,h.mode,x),g.return=h,g):(g=i(g,w),g.return=h,g)}function l(h,g,w,x){var C=w.type;return C===_l?c(h,g,w.props.children,x,w.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===_s&&W2(C)===g.type)?(x=i(g,w.props),x.ref=yc(h,g,w),x.return=h,x):(x=jd(w.type,w.key,w.props,null,h.mode,x),x.ref=yc(h,g,w),x.return=h,x)}function u(h,g,w,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==w.containerInfo||g.stateNode.implementation!==w.implementation?(g=Uy(w,h.mode,x),g.return=h,g):(g=i(g,w.children||[]),g.return=h,g)}function c(h,g,w,x,C){return g===null||g.tag!==7?(g=sa(w,h.mode,x,C),g.return=h,g):(g=i(g,w),g.return=h,g)}function f(h,g,w){if(typeof g=="string"&&g!==""||typeof g=="number")return g=By(""+g,h.mode,w),g.return=h,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case cd:return w=jd(g.type,g.key,g.props,null,h.mode,w),w.ref=yc(h,null,g),w.return=h,w;case Sl:return g=Uy(g,h.mode,w),g.return=h,g;case _s:var x=g._init;return f(h,x(g._payload),w)}if(_c(g)||dc(g))return g=sa(g,h.mode,w,null),g.return=h,g;Od(h,g)}return null}function p(h,g,w,x){var C=g!==null?g.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:a(h,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case cd:return w.key===C?l(h,g,w,x):null;case Sl:return w.key===C?u(h,g,w,x):null;case _s:return C=w._init,p(h,g,C(w._payload),x)}if(_c(w)||dc(w))return C!==null?null:c(h,g,w,x,null);Od(h,w)}return null}function d(h,g,w,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return h=h.get(w)||null,a(g,h,""+x,C);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case cd:return h=h.get(x.key===null?w:x.key)||null,l(g,h,x,C);case Sl:return h=h.get(x.key===null?w:x.key)||null,u(g,h,x,C);case _s:var A=x._init;return d(h,g,w,A(x._payload),C)}if(_c(x)||dc(x))return h=h.get(w)||null,c(g,h,x,C,null);Od(g,x)}return null}function m(h,g,w,x){for(var C=null,A=null,T=g,z=g=0,M=null;T!==null&&z<w.length;z++){T.index>z?(M=T,T=null):M=T.sibling;var U=p(h,T,w[z],x);if(U===null){T===null&&(T=M);break}e&&T&&U.alternate===null&&t(h,T),g=s(U,g,z),A===null?C=U:A.sibling=U,A=U,T=M}if(z===w.length)return n(h,T),dt&&Qo(h,z),C;if(T===null){for(;z<w.length;z++)T=f(h,w[z],x),T!==null&&(g=s(T,g,z),A===null?C=T:A.sibling=T,A=T);return dt&&Qo(h,z),C}for(T=r(h,T);z<w.length;z++)M=d(T,h,z,w[z],x),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?z:M.key),g=s(M,g,z),A===null?C=M:A.sibling=M,A=M);return e&&T.forEach(function(D){return t(h,D)}),dt&&Qo(h,z),C}function y(h,g,w,x){var C=dc(w);if(typeof C!="function")throw Error(H(150));if(w=C.call(w),w==null)throw Error(H(151));for(var A=C=null,T=g,z=g=0,M=null,U=w.next();T!==null&&!U.done;z++,U=w.next()){T.index>z?(M=T,T=null):M=T.sibling;var D=p(h,T,U.value,x);if(D===null){T===null&&(T=M);break}e&&T&&D.alternate===null&&t(h,T),g=s(D,g,z),A===null?C=D:A.sibling=D,A=D,T=M}if(U.done)return n(h,T),dt&&Qo(h,z),C;if(T===null){for(;!U.done;z++,U=w.next())U=f(h,U.value,x),U!==null&&(g=s(U,g,z),A===null?C=U:A.sibling=U,A=U);return dt&&Qo(h,z),C}for(T=r(h,T);!U.done;z++,U=w.next())U=d(T,h,z,U.value,x),U!==null&&(e&&U.alternate!==null&&T.delete(U.key===null?z:U.key),g=s(U,g,z),A===null?C=U:A.sibling=U,A=U);return e&&T.forEach(function(F){return t(h,F)}),dt&&Qo(h,z),C}function v(h,g,w,x){if(typeof w=="object"&&w!==null&&w.type===_l&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case cd:e:{for(var C=w.key,A=g;A!==null;){if(A.key===C){if(C=w.type,C===_l){if(A.tag===7){n(h,A.sibling),g=i(A,w.props.children),g.return=h,h=g;break e}}else if(A.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===_s&&W2(C)===A.type){n(h,A.sibling),g=i(A,w.props),g.ref=yc(h,A,w),g.return=h,h=g;break e}n(h,A);break}else t(h,A);A=A.sibling}w.type===_l?(g=sa(w.props.children,h.mode,x,w.key),g.return=h,h=g):(x=jd(w.type,w.key,w.props,null,h.mode,x),x.ref=yc(h,g,w),x.return=h,h=x)}return o(h);case Sl:e:{for(A=w.key;g!==null;){if(g.key===A)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(h,g.sibling),g=i(g,w.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=Uy(w,h.mode,x),g.return=h,h=g}return o(h);case _s:return A=w._init,v(h,g,A(w._payload),x)}if(_c(w))return m(h,g,w,x);if(dc(w))return y(h,g,w,x);Od(h,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(h,g.sibling),g=i(g,w),g.return=h,h=g):(n(h,g),g=By(w,h.mode,x),g.return=h,h=g),o(h)):n(h,g)}return v}var Wl=pE(!0),dE=pE(!1),Zd=Bs(null),Qd=null,Al=null,Zv=null;function Qv(){Zv=Al=Qd=null}function e1(e){var t=Zd.current;ct(Zd),e._currentValue=t}function gv(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vl(e,t){Qd=e,Zv=Al=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pn=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(Zv!==e)if(e={context:e,memoizedValue:t,next:null},Al===null){if(Qd===null)throw Error(H(308));Al=e,Qd.dependencies={lanes:0,firstContext:e}}else Al=Al.next=e;return t}var na=null;function t1(e){na===null?na=[e]:na.push(e)}function mE(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,t1(t)):(n.next=i.next,i.next=n),t.interleaved=n,Hi(e,r)}function Hi(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Cs=!1;function n1(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hE(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ns(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$e&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Hi(e,n)}return i=r.interleaved,i===null?(t.next=t,t1(r)):(t.next=i.next,i.next=t),r.interleaved=t,Hi(e,n)}function Nd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fv(e,n)}}function z2(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function em(e,t,n,r){var i=e.updateQueue;Cs=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,c=u=l=null,a=s;do{var p=a.lane,d=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(p=t,d=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){f=m.call(d,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,p=typeof m=="function"?m.call(d,f,p):m,p==null)break e;f=yt({},f,p);break e;case 2:Cs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else d={eventTime:d,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,o|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);ua|=o,e.lanes=o,e.memoizedState=f}}function G2(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(H(191,i));i.call(r)}}}var ef={},gi=Bs(ef),$c=Bs(ef),Hc=Bs(ef);function ra(e){if(e===ef)throw Error(H(174));return e}function r1(e,t){switch(rt(Hc,t),rt($c,e),rt(gi,ef),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xy(t,e)}ct(gi),rt(gi,t)}function zl(){ct(gi),ct($c),ct(Hc)}function gE(e){ra(Hc.current);var t=ra(gi.current),n=Xy(t,e.type);t!==n&&(rt($c,e),rt(gi,n))}function i1(e){$c.current===e&&(ct(gi),ct($c))}var ht=Bs(0);function tm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dy=[];function s1(){for(var e=0;e<Dy.length;e++)Dy[e]._workInProgressVersionPrimary=null;Dy.length=0}var Dd=Ki.ReactCurrentDispatcher,ky=Ki.ReactCurrentBatchConfig,la=0,gt=null,kt=null,zt=null,nm=!1,Ac=!1,qc=0,nR=0;function sn(){throw Error(H(321))}function o1(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qr(e[n],t[n]))return!1;return!0}function a1(e,t,n,r,i,s){if(la=s,gt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Dd.current=e===null||e.memoizedState===null?oR:aR,e=n(r,i),Ac){s=0;do{if(Ac=!1,qc=0,25<=s)throw Error(H(301));s+=1,zt=kt=null,t.updateQueue=null,Dd.current=lR,e=n(r,i)}while(Ac)}if(Dd.current=rm,t=kt!==null&&kt.next!==null,la=0,zt=kt=gt=null,nm=!1,t)throw Error(H(300));return e}function l1(){var e=qc!==0;return qc=0,e}function di(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?gt.memoizedState=zt=e:zt=zt.next=e,zt}function yr(){if(kt===null){var e=gt.alternate;e=e!==null?e.memoizedState:null}else e=kt.next;var t=zt===null?gt.memoizedState:zt.next;if(t!==null)zt=t,kt=e;else{if(e===null)throw Error(H(310));kt=e,e={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},zt===null?gt.memoizedState=zt=e:zt=zt.next=e}return zt}function Kc(e,t){return typeof t=="function"?t(e):t}function My(e){var t=yr(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=kt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((la&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,gt.lanes|=c,ua|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,qr(r,t.memoizedState)||(Pn=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,gt.lanes|=s,ua|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ry(e){var t=yr(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);qr(s,t.memoizedState)||(Pn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function yE(){}function vE(e,t){var n=gt,r=yr(),i=t(),s=!qr(r.memoizedState,i);if(s&&(r.memoizedState=i,Pn=!0),r=r.queue,u1(SE.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||zt!==null&&zt.memoizedState.tag&1){if(n.flags|=2048,Yc(9,xE.bind(null,n,r,i,t),void 0,null),Gt===null)throw Error(H(349));la&30||wE(n,t,i)}return i}function wE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=gt.updateQueue,t===null?(t={lastEffect:null,stores:null},gt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xE(e,t,n,r){t.value=n,t.getSnapshot=r,_E(t)&&CE(e)}function SE(e,t,n){return n(function(){_E(t)&&CE(e)})}function _E(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qr(e,n)}catch{return!0}}function CE(e){var t=Hi(e,1);t!==null&&Hr(t,e,1,-1)}function $2(e){var t=di();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Kc,lastRenderedState:e},t.queue=e,e=e.dispatch=sR.bind(null,gt,e),[t.memoizedState,e]}function Yc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=gt.updateQueue,t===null?(t={lastEffect:null,stores:null},gt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function bE(){return yr().memoizedState}function kd(e,t,n,r){var i=di();gt.flags|=e,i.memoizedState=Yc(1|t,n,void 0,r===void 0?null:r)}function hm(e,t,n,r){var i=yr();r=r===void 0?null:r;var s=void 0;if(kt!==null){var o=kt.memoizedState;if(s=o.destroy,r!==null&&o1(r,o.deps)){i.memoizedState=Yc(t,n,s,r);return}}gt.flags|=e,i.memoizedState=Yc(1|t,n,s,r)}function H2(e,t){return kd(8390656,8,e,t)}function u1(e,t){return hm(2048,8,e,t)}function OE(e,t){return hm(4,2,e,t)}function EE(e,t){return hm(4,4,e,t)}function IE(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function PE(e,t,n){return n=n!=null?n.concat([e]):null,hm(4,4,IE.bind(null,t,e),n)}function c1(){}function TE(e,t){var n=yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&o1(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function AE(e,t){var n=yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&o1(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function LE(e,t,n){return la&21?(qr(n,t)||(n=RO(),gt.lanes|=n,ua|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pn=!0),e.memoizedState=n)}function rR(e,t){var n=Xe;Xe=n!==0&&4>n?n:4,e(!0);var r=ky.transition;ky.transition={};try{e(!1),t()}finally{Xe=n,ky.transition=r}}function NE(){return yr().memoizedState}function iR(e,t,n){var r=ks(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DE(e))kE(t,n);else if(n=mE(e,t,n,r),n!==null){var i=gn();Hr(n,e,r,i),ME(n,t,r)}}function sR(e,t,n){var r=ks(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DE(e))kE(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,qr(a,o)){var l=t.interleaved;l===null?(i.next=i,t1(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=mE(e,t,i,r),n!==null&&(i=gn(),Hr(n,e,r,i),ME(n,t,r))}}function DE(e){var t=e.alternate;return e===gt||t!==null&&t===gt}function kE(e,t){Ac=nm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ME(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fv(e,n)}}var rm={readContext:gr,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useInsertionEffect:sn,useLayoutEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useMutableSource:sn,useSyncExternalStore:sn,useId:sn,unstable_isNewReconciler:!1},oR={readContext:gr,useCallback:function(e,t){return di().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:H2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kd(4194308,4,IE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kd(4194308,4,e,t)},useInsertionEffect:function(e,t){return kd(4,2,e,t)},useMemo:function(e,t){var n=di();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=di();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iR.bind(null,gt,e),[r.memoizedState,e]},useRef:function(e){var t=di();return e={current:e},t.memoizedState=e},useState:$2,useDebugValue:c1,useDeferredValue:function(e){return di().memoizedState=e},useTransition:function(){var e=$2(!1),t=e[0];return e=rR.bind(null,e[1]),di().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=gt,i=di();if(dt){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Gt===null)throw Error(H(349));la&30||wE(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,H2(SE.bind(null,r,s,e),[e]),r.flags|=2048,Yc(9,xE.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=di(),t=Gt.identifierPrefix;if(dt){var n=Wi,r=Fi;n=(r&~(1<<32-$r(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=nR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},aR={readContext:gr,useCallback:TE,useContext:gr,useEffect:u1,useImperativeHandle:PE,useInsertionEffect:OE,useLayoutEffect:EE,useMemo:AE,useReducer:My,useRef:bE,useState:function(){return My(Kc)},useDebugValue:c1,useDeferredValue:function(e){var t=yr();return LE(t,kt.memoizedState,e)},useTransition:function(){var e=My(Kc)[0],t=yr().memoizedState;return[e,t]},useMutableSource:yE,useSyncExternalStore:vE,useId:NE,unstable_isNewReconciler:!1},lR={readContext:gr,useCallback:TE,useContext:gr,useEffect:u1,useImperativeHandle:PE,useInsertionEffect:OE,useLayoutEffect:EE,useMemo:AE,useReducer:Ry,useRef:bE,useState:function(){return Ry(Kc)},useDebugValue:c1,useDeferredValue:function(e){var t=yr();return kt===null?t.memoizedState=e:LE(t,kt.memoizedState,e)},useTransition:function(){var e=Ry(Kc)[0],t=yr().memoizedState;return[e,t]},useMutableSource:yE,useSyncExternalStore:vE,useId:NE,unstable_isNewReconciler:!1};function Wr(e,t){if(e&&e.defaultProps){t=yt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function yv(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:yt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gm={isMounted:function(e){return(e=e._reactInternals)?pa(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gn(),i=ks(e),s=zi(r,i);s.payload=t,n!=null&&(s.callback=n),t=Ns(e,s,i),t!==null&&(Hr(t,e,i,r),Nd(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gn(),i=ks(e),s=zi(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ns(e,s,i),t!==null&&(Hr(t,e,i,r),Nd(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gn(),r=ks(e),i=zi(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ns(e,i,r),t!==null&&(Hr(t,e,r,n),Nd(t,e,r))}};function q2(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Fc(n,r)||!Fc(i,s):!0}function RE(e,t,n){var r=!1,i=Vs,s=t.contextType;return typeof s=="object"&&s!==null?s=gr(s):(i=An(t)?oa:ln.current,r=t.contextTypes,s=(r=r!=null)?Ul(e,i):Vs),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=gm,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function K2(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gm.enqueueReplaceState(t,t.state,null)}function vv(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},n1(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=gr(s):(s=An(t)?oa:ln.current,i.context=Ul(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(yv(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&gm.enqueueReplaceState(i,i.state,null),em(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Gl(e,t){try{var n="",r=t;do n+=jM(r),r=r.return;while(r);var i=n}catch(s){i=`
19
+ Error generating stack: `+s.message+`
20
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Vy(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function wv(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uR=typeof WeakMap=="function"?WeakMap:Map;function VE(e,t,n){n=zi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){sm||(sm=!0,Tv=r),wv(e,t)},n}function jE(e,t,n){n=zi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){wv(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){wv(e,t),typeof r!="function"&&(Ds===null?Ds=new Set([this]):Ds.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Y2(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uR;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=CR.bind(null,e,t,n),t.then(e,e))}function X2(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function J2(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zi(-1,1),t.tag=2,Ns(n,t,1))),n.lanes|=1),e)}var cR=Ki.ReactCurrentOwner,Pn=!1;function hn(e,t,n,r){t.child=e===null?dE(t,null,n,r):Wl(t,e.child,n,r)}function Z2(e,t,n,r,i){n=n.render;var s=t.ref;return Vl(t,i),r=a1(e,t,n,r,s,i),n=l1(),e!==null&&!Pn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qi(e,t,i)):(dt&&n&&Yv(t),t.flags|=1,hn(e,t,r,i),t.child)}function Q2(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!v1(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,BE(e,t,s,r,i)):(e=jd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Fc,n(o,r)&&e.ref===t.ref)return qi(e,t,i)}return t.flags|=1,e=Ms(s,r),e.ref=t.ref,e.return=t,t.child=e}function BE(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Fc(s,r)&&e.ref===t.ref)if(Pn=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pn=!0);else return t.lanes=e.lanes,qi(e,t,i)}return xv(e,t,n,r,i)}function UE(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Nl,Gn),Gn|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,rt(Nl,Gn),Gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,rt(Nl,Gn),Gn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,rt(Nl,Gn),Gn|=r;return hn(e,t,i,n),t.child}function FE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xv(e,t,n,r,i){var s=An(n)?oa:ln.current;return s=Ul(t,s),Vl(t,i),n=a1(e,t,n,r,s,i),r=l1(),e!==null&&!Pn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,qi(e,t,i)):(dt&&r&&Yv(t),t.flags|=1,hn(e,t,n,i),t.child)}function eO(e,t,n,r,i){if(An(n)){var s=!0;Yd(t)}else s=!1;if(Vl(t,i),t.stateNode===null)Md(e,t),RE(t,n,r),vv(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=gr(u):(u=An(n)?oa:ln.current,u=Ul(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&K2(t,o,r,u),Cs=!1;var p=t.memoizedState;o.state=p,em(t,r,o,i),l=t.memoizedState,a!==r||p!==l||Tn.current||Cs?(typeof c=="function"&&(yv(t,n,c,r),l=t.memoizedState),(a=Cs||q2(t,n,a,r,p,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,hE(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Wr(t.type,a),o.props=u,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=gr(l):(l=An(n)?oa:ln.current,l=Ul(t,l));var d=n.getDerivedStateFromProps;(c=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&K2(t,o,r,l),Cs=!1,p=t.memoizedState,o.state=p,em(t,r,o,i);var m=t.memoizedState;a!==f||p!==m||Tn.current||Cs?(typeof d=="function"&&(yv(t,n,d,r),m=t.memoizedState),(u=Cs||q2(t,n,u,r,p,m,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Sv(e,t,n,r,s,i)}function Sv(e,t,n,r,i,s){FE(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&B2(t,n,!1),qi(e,t,s);r=t.stateNode,cR.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Wl(t,e.child,null,s),t.child=Wl(t,null,a,s)):hn(e,t,a,s),t.memoizedState=r.state,i&&B2(t,n,!0),t.child}function WE(e){var t=e.stateNode;t.pendingContext?j2(e,t.pendingContext,t.pendingContext!==t.context):t.context&&j2(e,t.context,!1),r1(e,t.containerInfo)}function tO(e,t,n,r,i){return Fl(),Jv(i),t.flags|=256,hn(e,t,n,r),t.child}var _v={dehydrated:null,treeContext:null,retryLane:0};function Cv(e){return{baseLanes:e,cachePool:null,transitions:null}}function zE(e,t,n){var r=t.pendingProps,i=ht.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),rt(ht,i&1),e===null)return hv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=wm(o,r,0,null),e=sa(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Cv(n),t.memoizedState=_v,e):f1(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return fR(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ms(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Ms(a,s):(s=sa(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Cv(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=_v,r}return s=e.child,e=s.sibling,r=Ms(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function f1(e,t){return t=wm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ed(e,t,n,r){return r!==null&&Jv(r),Wl(t,e.child,null,n),e=f1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fR(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Vy(Error(H(422))),Ed(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=wm({mode:"visible",children:r.children},i,0,null),s=sa(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Wl(t,e.child,null,o),t.child.memoizedState=Cv(o),t.memoizedState=_v,s);if(!(t.mode&1))return Ed(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(H(419)),r=Vy(s,r,void 0),Ed(e,t,o,r)}if(a=(o&e.childLanes)!==0,Pn||a){if(r=Gt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Hi(e,i),Hr(r,e,i,-1))}return y1(),r=Vy(Error(H(421))),Ed(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=bR.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,$n=Ls(i.nextSibling),Hn=t,dt=!0,Gr=null,e!==null&&(pr[dr++]=Fi,pr[dr++]=Wi,pr[dr++]=aa,Fi=e.id,Wi=e.overflow,aa=t),t=f1(t,r.children),t.flags|=4096,t)}function nO(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),gv(e.return,t,n)}function jy(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function GE(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(hn(e,t,r.children,n),r=ht.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nO(e,n,t);else if(e.tag===19)nO(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(rt(ht,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&tm(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jy(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&tm(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jy(t,!0,n,null,s);break;case"together":jy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Md(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function qi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ua|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Ms(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ms(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pR(e,t,n){switch(t.tag){case 3:WE(t),Fl();break;case 5:gE(t);break;case 1:An(t.type)&&Yd(t);break;case 4:r1(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;rt(Zd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(rt(ht,ht.current&1),t.flags|=128,null):n&t.child.childLanes?zE(e,t,n):(rt(ht,ht.current&1),e=qi(e,t,n),e!==null?e.sibling:null);rt(ht,ht.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return GE(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),rt(ht,ht.current),r)break;return null;case 22:case 23:return t.lanes=0,UE(e,t,n)}return qi(e,t,n)}var $E,bv,HE,qE;$E=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bv=function(){};HE=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ra(gi.current);var s=null;switch(n){case"input":i=Hy(e,i),r=Hy(e,r),s=[];break;case"select":i=yt({},i,{value:void 0}),r=yt({},r,{value:void 0}),s=[];break;case"textarea":i=Yy(e,i),r=Yy(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=qd)}Jy(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(kc.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i?.[u],r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(kc.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ut("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};qE=function(e,t,n,r){n!==r&&(t.flags|=4)};function vc(e,t){if(!dt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function on(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function dR(e,t,n){var r=t.pendingProps;switch(Xv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(t),null;case 1:return An(t.type)&&Kd(),on(t),null;case 3:return r=t.stateNode,zl(),ct(Tn),ct(ln),s1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(bd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gr!==null&&(Nv(Gr),Gr=null))),bv(e,t),on(t),null;case 5:i1(t);var i=ra(Hc.current);if(n=t.type,e!==null&&t.stateNode!=null)HE(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return on(t),null}if(e=ra(gi.current),bd(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[mi]=t,r[Gc]=s,e=(t.mode&1)!==0,n){case"dialog":ut("cancel",r),ut("close",r);break;case"iframe":case"object":case"embed":ut("load",r);break;case"video":case"audio":for(i=0;i<bc.length;i++)ut(bc[i],r);break;case"source":ut("error",r);break;case"img":case"image":case"link":ut("error",r),ut("load",r);break;case"details":ut("toggle",r);break;case"input":c2(r,s),ut("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ut("invalid",r);break;case"textarea":p2(r,s),ut("invalid",r)}Jy(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Cd(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Cd(r.textContent,a,e),i=["children",""+a]):kc.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ut("scroll",r)}switch(n){case"input":fd(r),f2(r,s,!0);break;case"textarea":fd(r),d2(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=qd)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=SO(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[mi]=t,e[Gc]=r,$E(e,t,!1,!1),t.stateNode=e;e:{switch(o=Zy(n,r),n){case"dialog":ut("cancel",e),ut("close",e),i=r;break;case"iframe":case"object":case"embed":ut("load",e),i=r;break;case"video":case"audio":for(i=0;i<bc.length;i++)ut(bc[i],e);i=r;break;case"source":ut("error",e),i=r;break;case"img":case"image":case"link":ut("error",e),ut("load",e),i=r;break;case"details":ut("toggle",e),i=r;break;case"input":c2(e,r),i=Hy(e,r),ut("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=yt({},r,{value:void 0}),ut("invalid",e);break;case"textarea":p2(e,r),i=Yy(e,r),ut("invalid",e);break;default:i=r}Jy(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?bO(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&_O(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Mc(e,l):typeof l=="number"&&Mc(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(kc.hasOwnProperty(s)?l!=null&&s==="onScroll"&&ut("scroll",e):l!=null&&Mv(e,s,l,o))}switch(n){case"input":fd(e),f2(e,r,!1);break;case"textarea":fd(e),d2(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Rs(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Dl(e,!!r.multiple,s,!1):r.defaultValue!=null&&Dl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=qd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return on(t),null;case 6:if(e&&t.stateNode!=null)qE(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=ra(Hc.current),ra(gi.current),bd(t)){if(r=t.stateNode,n=t.memoizedProps,r[mi]=t,(s=r.nodeValue!==n)&&(e=Hn,e!==null))switch(e.tag){case 3:Cd(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cd(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mi]=t,t.stateNode=r}return on(t),null;case 13:if(ct(ht),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(dt&&$n!==null&&t.mode&1&&!(t.flags&128))fE(),Fl(),t.flags|=98560,s=!1;else if(s=bd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(H(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(H(317));s[mi]=t}else Fl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;on(t),s=!1}else Gr!==null&&(Nv(Gr),Gr=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ht.current&1?Mt===0&&(Mt=3):y1())),t.updateQueue!==null&&(t.flags|=4),on(t),null);case 4:return zl(),bv(e,t),e===null&&Wc(t.stateNode.containerInfo),on(t),null;case 10:return e1(t.type._context),on(t),null;case 17:return An(t.type)&&Kd(),on(t),null;case 19:if(ct(ht),s=t.memoizedState,s===null)return on(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)vc(s,!1);else{if(Mt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=tm(e),o!==null){for(t.flags|=128,vc(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return rt(ht,ht.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ot()>$l&&(t.flags|=128,r=!0,vc(s,!1),t.lanes=4194304)}else{if(!r)if(e=tm(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!dt)return on(t),null}else 2*Ot()-s.renderingStartTime>$l&&n!==1073741824&&(t.flags|=128,r=!0,vc(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ot(),t.sibling=null,n=ht.current,rt(ht,r?n&1|2:n&1),t):(on(t),null);case 22:case 23:return g1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gn&1073741824&&(on(t),t.subtreeFlags&6&&(t.flags|=8192)):on(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function mR(e,t){switch(Xv(t),t.tag){case 1:return An(t.type)&&Kd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zl(),ct(Tn),ct(ln),s1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return i1(t),null;case 13:if(ct(ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ct(ht),null;case 4:return zl(),null;case 10:return e1(t.type._context),null;case 22:case 23:return g1(),null;case 24:return null;default:return null}}var Id=!1,an=!1,hR=typeof WeakSet=="function"?WeakSet:Set,ae=null;function Ll(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){St(e,t,r)}else n.current=null}function Ov(e,t,n){try{n()}catch(r){St(e,t,r)}}var rO=!1;function gR(e,t){if(lv=Gd,e=ZO(),Kv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var d;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(d=f.firstChild)!==null;)p=f,f=d;for(;;){if(f===e)break t;if(p===n&&++u===i&&(a=o),p===s&&++c===r&&(l=o),(d=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=d}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(uv={focusedElem:e,selectionRange:n},Gd=!1,ae=t;ae!==null;)if(t=ae,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ae=e;else for(;ae!==null;){t=ae;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,v=m.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Wr(t.type,y),v);h.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(x){St(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,ae=e;break}ae=t.return}return m=rO,rO=!1,m}function Lc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ov(t,n,s)}i=i.next}while(i!==r)}}function ym(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ev(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function KE(e){var t=e.alternate;t!==null&&(e.alternate=null,KE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mi],delete t[Gc],delete t[pv],delete t[Z4],delete t[Q4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YE(e){return e.tag===5||e.tag===3||e.tag===4}function iO(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Iv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qd));else if(r!==4&&(e=e.child,e!==null))for(Iv(e,t,n),e=e.sibling;e!==null;)Iv(e,t,n),e=e.sibling}function Pv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Pv(e,t,n),e=e.sibling;e!==null;)Pv(e,t,n),e=e.sibling}var Zt=null,zr=!1;function Ss(e,t,n){for(n=n.child;n!==null;)XE(e,t,n),n=n.sibling}function XE(e,t,n){if(hi&&typeof hi.onCommitFiberUnmount=="function")try{hi.onCommitFiberUnmount(um,n)}catch{}switch(n.tag){case 5:an||Ll(n,t);case 6:var r=Zt,i=zr;Zt=null,Ss(e,t,n),Zt=r,zr=i,Zt!==null&&(zr?(e=Zt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Zt.removeChild(n.stateNode));break;case 18:Zt!==null&&(zr?(e=Zt,n=n.stateNode,e.nodeType===8?Ly(e.parentNode,n):e.nodeType===1&&Ly(e,n),Bc(e)):Ly(Zt,n.stateNode));break;case 4:r=Zt,i=zr,Zt=n.stateNode.containerInfo,zr=!0,Ss(e,t,n),Zt=r,zr=i;break;case 0:case 11:case 14:case 15:if(!an&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ov(n,t,o),i=i.next}while(i!==r)}Ss(e,t,n);break;case 1:if(!an&&(Ll(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){St(n,t,a)}Ss(e,t,n);break;case 21:Ss(e,t,n);break;case 22:n.mode&1?(an=(r=an)||n.memoizedState!==null,Ss(e,t,n),an=r):Ss(e,t,n);break;default:Ss(e,t,n)}}function sO(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hR),t.forEach(function(r){var i=OR.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Fr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Zt=a.stateNode,zr=!1;break e;case 3:Zt=a.stateNode.containerInfo,zr=!0;break e;case 4:Zt=a.stateNode.containerInfo,zr=!0;break e}a=a.return}if(Zt===null)throw Error(H(160));XE(s,o,i),Zt=null,zr=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){St(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)JE(t,e),t=t.sibling}function JE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fr(t,e),pi(e),r&4){try{Lc(3,e,e.return),ym(3,e)}catch(y){St(e,e.return,y)}try{Lc(5,e,e.return)}catch(y){St(e,e.return,y)}}break;case 1:Fr(t,e),pi(e),r&512&&n!==null&&Ll(n,n.return);break;case 5:if(Fr(t,e),pi(e),r&512&&n!==null&&Ll(n,n.return),e.flags&32){var i=e.stateNode;try{Mc(i,"")}catch(y){St(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&wO(i,s),Zy(a,o);var u=Zy(a,s);for(o=0;o<l.length;o+=2){var c=l[o],f=l[o+1];c==="style"?bO(i,f):c==="dangerouslySetInnerHTML"?_O(i,f):c==="children"?Mc(i,f):Mv(i,c,f,u)}switch(a){case"input":qy(i,s);break;case"textarea":xO(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var d=s.value;d!=null?Dl(i,!!s.multiple,d,!1):p!==!!s.multiple&&(s.defaultValue!=null?Dl(i,!!s.multiple,s.defaultValue,!0):Dl(i,!!s.multiple,s.multiple?[]:"",!1))}i[Gc]=s}catch(y){St(e,e.return,y)}}break;case 6:if(Fr(t,e),pi(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){St(e,e.return,y)}}break;case 3:if(Fr(t,e),pi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bc(t.containerInfo)}catch(y){St(e,e.return,y)}break;case 4:Fr(t,e),pi(e);break;case 13:Fr(t,e),pi(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(m1=Ot())),r&4&&sO(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(an=(u=an)||c,Fr(t,e),an=u):Fr(t,e),pi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(ae=e,c=e.child;c!==null;){for(f=ae=c;ae!==null;){switch(p=ae,d=p.child,p.tag){case 0:case 11:case 14:case 15:Lc(4,p,p.return);break;case 1:Ll(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){St(r,n,y)}}break;case 5:Ll(p,p.return);break;case 22:if(p.memoizedState!==null){aO(f);continue}}d!==null?(d.return=p,ae=d):aO(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=CO("display",o))}catch(y){St(e,e.return,y)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){St(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Fr(t,e),pi(e),r&4&&sO(e);break;case 21:break;default:Fr(t,e),pi(e)}}function pi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(YE(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Mc(i,""),r.flags&=-33);var s=iO(e);Pv(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=iO(e);Iv(e,a,o);break;default:throw Error(H(161))}}catch(l){St(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yR(e,t,n){ae=e,ZE(e,t,n)}function ZE(e,t,n){for(var r=(e.mode&1)!==0;ae!==null;){var i=ae,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Id;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||an;a=Id;var u=an;if(Id=o,(an=l)&&!u)for(ae=i;ae!==null;)o=ae,l=o.child,o.tag===22&&o.memoizedState!==null?lO(i):l!==null?(l.return=o,ae=l):lO(i);for(;s!==null;)ae=s,ZE(s,t,n),s=s.sibling;ae=i,Id=a,an=u}oO(e,t,n)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ae=s):oO(e,t,n)}}function oO(e){for(;ae!==null;){var t=ae;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:an||ym(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!an)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Wr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&G2(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}G2(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Bc(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}an||t.flags&512&&Ev(t)}catch(p){St(t,t.return,p)}}if(t===e){ae=null;break}if(n=t.sibling,n!==null){n.return=t.return,ae=n;break}ae=t.return}}function aO(e){for(;ae!==null;){var t=ae;if(t===e){ae=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ae=n;break}ae=t.return}}function lO(e){for(;ae!==null;){var t=ae;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ym(4,t)}catch(l){St(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){St(t,i,l)}}var s=t.return;try{Ev(t)}catch(l){St(t,s,l)}break;case 5:var o=t.return;try{Ev(t)}catch(l){St(t,o,l)}}}catch(l){St(t,t.return,l)}if(t===e){ae=null;break}var a=t.sibling;if(a!==null){a.return=t.return,ae=a;break}ae=t.return}}var vR=Math.ceil,im=Ki.ReactCurrentDispatcher,p1=Ki.ReactCurrentOwner,hr=Ki.ReactCurrentBatchConfig,$e=0,Gt=null,Et=null,Qt=0,Gn=0,Nl=Bs(0),Mt=0,Xc=null,ua=0,vm=0,d1=0,Nc=null,In=null,m1=0,$l=1/0,Bi=null,sm=!1,Tv=null,Ds=null,Pd=!1,Is=null,om=0,Dc=0,Av=null,Rd=-1,Vd=0;function gn(){return $e&6?Ot():Rd!==-1?Rd:Rd=Ot()}function ks(e){return e.mode&1?$e&2&&Qt!==0?Qt&-Qt:tR.transition!==null?(Vd===0&&(Vd=RO()),Vd):(e=Xe,e!==0||(e=window.event,e=e===void 0?16:zO(e.type)),e):1}function Hr(e,t,n,r){if(50<Dc)throw Dc=0,Av=null,Error(H(185));Jc(e,n,r),(!($e&2)||e!==Gt)&&(e===Gt&&(!($e&2)&&(vm|=n),Mt===4&&Os(e,Qt)),Ln(e,r),n===1&&$e===0&&!(t.mode&1)&&($l=Ot()+500,mm&&Us()))}function Ln(e,t){var n=e.callbackNode;r4(e,t);var r=zd(e,e===Gt?Qt:0);if(r===0)n!==null&&g2(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&g2(n),t===1)e.tag===0?eR(uO.bind(null,e)):lE(uO.bind(null,e)),X4(function(){!($e&6)&&Us()}),n=null;else{switch(VO(r)){case 1:n=Uv;break;case 4:n=kO;break;case 16:n=Wd;break;case 536870912:n=MO;break;default:n=Wd}n=oI(n,QE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function QE(e,t){if(Rd=-1,Vd=0,$e&6)throw Error(H(327));var n=e.callbackNode;if(jl()&&e.callbackNode!==n)return null;var r=zd(e,e===Gt?Qt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=am(e,r);else{t=r;var i=$e;$e|=2;var s=tI();(Gt!==e||Qt!==t)&&(Bi=null,$l=Ot()+500,ia(e,t));do try{SR();break}catch(a){eI(e,a)}while(!0);Qv(),im.current=s,$e=i,Et!==null?t=0:(Gt=null,Qt=0,t=Mt)}if(t!==0){if(t===2&&(i=rv(e),i!==0&&(r=i,t=Lv(e,i))),t===1)throw n=Xc,ia(e,0),Os(e,r),Ln(e,Ot()),n;if(t===6)Os(e,r);else{if(i=e.current.alternate,!(r&30)&&!wR(i)&&(t=am(e,r),t===2&&(s=rv(e),s!==0&&(r=s,t=Lv(e,s))),t===1))throw n=Xc,ia(e,0),Os(e,r),Ln(e,Ot()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:ea(e,In,Bi);break;case 3:if(Os(e,r),(r&130023424)===r&&(t=m1+500-Ot(),10<t)){if(zd(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){gn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=fv(ea.bind(null,e,In,Bi),t);break}ea(e,In,Bi);break;case 4:if(Os(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-$r(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=Ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vR(r/1960))-r,10<r){e.timeoutHandle=fv(ea.bind(null,e,In,Bi),r);break}ea(e,In,Bi);break;case 5:ea(e,In,Bi);break;default:throw Error(H(329))}}}return Ln(e,Ot()),e.callbackNode===n?QE.bind(null,e):null}function Lv(e,t){var n=Nc;return e.current.memoizedState.isDehydrated&&(ia(e,t).flags|=256),e=am(e,t),e!==2&&(t=In,In=n,t!==null&&Nv(t)),e}function Nv(e){In===null?In=e:In.push.apply(In,e)}function wR(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!qr(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Os(e,t){for(t&=~d1,t&=~vm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$r(t),r=1<<n;e[n]=-1,t&=~r}}function uO(e){if($e&6)throw Error(H(327));jl();var t=zd(e,0);if(!(t&1))return Ln(e,Ot()),null;var n=am(e,t);if(e.tag!==0&&n===2){var r=rv(e);r!==0&&(t=r,n=Lv(e,r))}if(n===1)throw n=Xc,ia(e,0),Os(e,t),Ln(e,Ot()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ea(e,In,Bi),Ln(e,Ot()),null}function h1(e,t){var n=$e;$e|=1;try{return e(t)}finally{$e=n,$e===0&&($l=Ot()+500,mm&&Us())}}function ca(e){Is!==null&&Is.tag===0&&!($e&6)&&jl();var t=$e;$e|=1;var n=hr.transition,r=Xe;try{if(hr.transition=null,Xe=1,e)return e()}finally{Xe=r,hr.transition=n,$e=t,!($e&6)&&Us()}}function g1(){Gn=Nl.current,ct(Nl)}function ia(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Y4(n)),Et!==null)for(n=Et.return;n!==null;){var r=n;switch(Xv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Kd();break;case 3:zl(),ct(Tn),ct(ln),s1();break;case 5:i1(r);break;case 4:zl();break;case 13:ct(ht);break;case 19:ct(ht);break;case 10:e1(r.type._context);break;case 22:case 23:g1()}n=n.return}if(Gt=e,Et=e=Ms(e.current,null),Qt=Gn=t,Mt=0,Xc=null,d1=vm=ua=0,In=Nc=null,na!==null){for(t=0;t<na.length;t++)if(n=na[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}na=null}return e}function eI(e,t){do{var n=Et;try{if(Qv(),Dd.current=rm,nm){for(var r=gt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}nm=!1}if(la=0,zt=kt=gt=null,Ac=!1,qc=0,p1.current=null,n===null||n.return===null){Mt=1,Xc=t,Et=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=Qt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=X2(o);if(d!==null){d.flags&=-257,J2(d,o,a,s,t),d.mode&1&&Y2(s,u,t),t=d,l=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(l),t.updateQueue=y}else m.add(l);break e}else{if(!(t&1)){Y2(s,u,t),y1();break e}l=Error(H(426))}}else if(dt&&a.mode&1){var v=X2(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),J2(v,o,a,s,t),Jv(Gl(l,a));break e}}s=l=Gl(l,a),Mt!==4&&(Mt=2),Nc===null?Nc=[s]:Nc.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=VE(s,l,t);z2(s,h);break e;case 1:a=l;var g=s.type,w=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Ds===null||!Ds.has(w)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=jE(s,a,t);z2(s,x);break e}}s=s.return}while(s!==null)}rI(n)}catch(C){t=C,Et===n&&n!==null&&(Et=n=n.return);continue}break}while(!0)}function tI(){var e=im.current;return im.current=rm,e===null?rm:e}function y1(){(Mt===0||Mt===3||Mt===2)&&(Mt=4),Gt===null||!(ua&268435455)&&!(vm&268435455)||Os(Gt,Qt)}function am(e,t){var n=$e;$e|=2;var r=tI();(Gt!==e||Qt!==t)&&(Bi=null,ia(e,t));do try{xR();break}catch(i){eI(e,i)}while(!0);if(Qv(),$e=n,im.current=r,Et!==null)throw Error(H(261));return Gt=null,Qt=0,Mt}function xR(){for(;Et!==null;)nI(Et)}function SR(){for(;Et!==null&&!KM();)nI(Et)}function nI(e){var t=sI(e.alternate,e,Gn);e.memoizedProps=e.pendingProps,t===null?rI(e):Et=t,p1.current=null}function rI(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mR(n,t),n!==null){n.flags&=32767,Et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Mt=6,Et=null;return}}else if(n=dR(n,t,Gn),n!==null){Et=n;return}if(t=t.sibling,t!==null){Et=t;return}Et=t=e}while(t!==null);Mt===0&&(Mt=5)}function ea(e,t,n){var r=Xe,i=hr.transition;try{hr.transition=null,Xe=1,_R(e,t,n,r)}finally{hr.transition=i,Xe=r}return null}function _R(e,t,n,r){do jl();while(Is!==null);if($e&6)throw Error(H(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(i4(e,s),e===Gt&&(Et=Gt=null,Qt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Pd||(Pd=!0,oI(Wd,function(){return jl(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=hr.transition,hr.transition=null;var o=Xe;Xe=1;var a=$e;$e|=4,p1.current=null,gR(e,n),JE(n,e),G4(uv),Gd=!!lv,uv=lv=null,e.current=n,yR(n,e,i),YM(),$e=a,Xe=o,hr.transition=s}else e.current=n;if(Pd&&(Pd=!1,Is=e,om=i),s=e.pendingLanes,s===0&&(Ds=null),ZM(n.stateNode,r),Ln(e,Ot()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(sm)throw sm=!1,e=Tv,Tv=null,e;return om&1&&e.tag!==0&&jl(),s=e.pendingLanes,s&1?e===Av?Dc++:(Dc=0,Av=e):Dc=0,Us(),null}function jl(){if(Is!==null){var e=VO(om),t=hr.transition,n=Xe;try{if(hr.transition=null,Xe=16>e?16:e,Is===null)var r=!1;else{if(e=Is,Is=null,om=0,$e&6)throw Error(H(331));var i=$e;for($e|=4,ae=e.current;ae!==null;){var s=ae,o=s.child;if(ae.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(ae=u;ae!==null;){var c=ae;switch(c.tag){case 0:case 11:case 15:Lc(8,c,s)}var f=c.child;if(f!==null)f.return=c,ae=f;else for(;ae!==null;){c=ae;var p=c.sibling,d=c.return;if(KE(c),c===u){ae=null;break}if(p!==null){p.return=d,ae=p;break}ae=d}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var v=y.sibling;y.sibling=null,y=v}while(y!==null)}}ae=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,ae=o;else e:for(;ae!==null;){if(s=ae,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Lc(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,ae=h;break e}ae=s.return}}var g=e.current;for(ae=g;ae!==null;){o=ae;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,ae=w;else e:for(o=g;ae!==null;){if(a=ae,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ym(9,a)}}catch(C){St(a,a.return,C)}if(a===o){ae=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,ae=x;break e}ae=a.return}}if($e=i,Us(),hi&&typeof hi.onPostCommitFiberRoot=="function")try{hi.onPostCommitFiberRoot(um,e)}catch{}r=!0}return r}finally{Xe=n,hr.transition=t}}return!1}function cO(e,t,n){t=Gl(n,t),t=VE(e,t,1),e=Ns(e,t,1),t=gn(),e!==null&&(Jc(e,1,t),Ln(e,t))}function St(e,t,n){if(e.tag===3)cO(e,e,n);else for(;t!==null;){if(t.tag===3){cO(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ds===null||!Ds.has(r))){e=Gl(n,e),e=jE(t,e,1),t=Ns(t,e,1),e=gn(),t!==null&&(Jc(t,1,e),Ln(t,e));break}}t=t.return}}function CR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=gn(),e.pingedLanes|=e.suspendedLanes&n,Gt===e&&(Qt&n)===n&&(Mt===4||Mt===3&&(Qt&130023424)===Qt&&500>Ot()-m1?ia(e,0):d1|=n),Ln(e,t)}function iI(e,t){t===0&&(e.mode&1?(t=md,md<<=1,!(md&130023424)&&(md=4194304)):t=1);var n=gn();e=Hi(e,t),e!==null&&(Jc(e,t,n),Ln(e,n))}function bR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),iI(e,n)}function OR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),iI(e,n)}var sI;sI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tn.current)Pn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pn=!1,pR(e,t,n);Pn=!!(e.flags&131072)}else Pn=!1,dt&&t.flags&1048576&&uE(t,Jd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Md(e,t),e=t.pendingProps;var i=Ul(t,ln.current);Vl(t,n),i=a1(null,t,r,e,i,n);var s=l1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,An(r)?(s=!0,Yd(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,n1(t),i.updater=gm,t.stateNode=i,i._reactInternals=t,vv(t,r,e,n),t=Sv(null,t,r,!0,s,n)):(t.tag=0,dt&&s&&Yv(t),hn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Md(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=IR(r),e=Wr(r,e),i){case 0:t=xv(null,t,r,e,n);break e;case 1:t=eO(null,t,r,e,n);break e;case 11:t=Z2(null,t,r,e,n);break e;case 14:t=Q2(null,t,r,Wr(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wr(r,i),xv(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wr(r,i),eO(e,t,r,i,n);case 3:e:{if(WE(t),e===null)throw Error(H(387));r=t.pendingProps,s=t.memoizedState,i=s.element,hE(e,t),em(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Gl(Error(H(423)),t),t=tO(e,t,r,n,i);break e}else if(r!==i){i=Gl(Error(H(424)),t),t=tO(e,t,r,n,i);break e}else for($n=Ls(t.stateNode.containerInfo.firstChild),Hn=t,dt=!0,Gr=null,n=dE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fl(),r===i){t=qi(e,t,n);break e}hn(e,t,r,n)}t=t.child}return t;case 5:return gE(t),e===null&&hv(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,cv(r,i)?o=null:s!==null&&cv(r,s)&&(t.flags|=32),FE(e,t),hn(e,t,o,n),t.child;case 6:return e===null&&hv(t),null;case 13:return zE(e,t,n);case 4:return r1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wl(t,null,r,n):hn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wr(r,i),Z2(e,t,r,i,n);case 7:return hn(e,t,t.pendingProps,n),t.child;case 8:return hn(e,t,t.pendingProps.children,n),t.child;case 12:return hn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,rt(Zd,r._currentValue),r._currentValue=o,s!==null)if(qr(s.value,o)){if(s.children===i.children&&!Tn.current){t=qi(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=zi(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),gv(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(H(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),gv(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}hn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Vl(t,n),i=gr(i),r=r(i),t.flags|=1,hn(e,t,r,n),t.child;case 14:return r=t.type,i=Wr(r,t.pendingProps),i=Wr(r.type,i),Q2(e,t,r,i,n);case 15:return BE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Wr(r,i),Md(e,t),t.tag=1,An(r)?(e=!0,Yd(t)):e=!1,Vl(t,n),RE(t,r,i),vv(t,r,i,n),Sv(null,t,r,!0,e,n);case 19:return GE(e,t,n);case 22:return UE(e,t,n)}throw Error(H(156,t.tag))};function oI(e,t){return DO(e,t)}function ER(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mr(e,t,n,r){return new ER(e,t,n,r)}function v1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IR(e){if(typeof e=="function")return v1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vv)return 11;if(e===jv)return 14}return 2}function Ms(e,t){var n=e.alternate;return n===null?(n=mr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jd(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")v1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case _l:return sa(n.children,i,s,t);case Rv:o=8,i|=8;break;case Wy:return e=mr(12,n,t,i|2),e.elementType=Wy,e.lanes=s,e;case zy:return e=mr(13,n,t,i),e.elementType=zy,e.lanes=s,e;case Gy:return e=mr(19,n,t,i),e.elementType=Gy,e.lanes=s,e;case gO:return wm(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mO:o=10;break e;case hO:o=9;break e;case Vv:o=11;break e;case jv:o=14;break e;case _s:o=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=mr(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function sa(e,t,n,r){return e=mr(7,e,r,t),e.lanes=n,e}function wm(e,t,n,r){return e=mr(22,e,r,t),e.elementType=gO,e.lanes=n,e.stateNode={isHidden:!1},e}function By(e,t,n){return e=mr(6,e,null,t),e.lanes=n,e}function Uy(e,t,n){return t=mr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PR(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cy(0),this.expirationTimes=Cy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cy(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w1(e,t,n,r,i,s,o,a,l){return e=new PR(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=mr(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},n1(s),e}function TR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Sl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function aI(e){if(!e)return Vs;e=e._reactInternals;e:{if(pa(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(An(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(An(n))return aE(e,n,t)}return t}function lI(e,t,n,r,i,s,o,a,l){return e=w1(n,r,!0,e,i,s,o,a,l),e.context=aI(null),n=e.current,r=gn(),i=ks(n),s=zi(r,i),s.callback=t??null,Ns(n,s,i),e.current.lanes=i,Jc(e,i,r),Ln(e,r),e}function xm(e,t,n,r){var i=t.current,s=gn(),o=ks(i);return n=aI(n),t.context===null?t.context=n:t.pendingContext=n,t=zi(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ns(i,t,o),e!==null&&(Hr(e,i,o,s),Nd(e,i,o)),o}function lm(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function x1(e,t){fO(e,t),(e=e.alternate)&&fO(e,t)}function AR(){return null}var uI=typeof reportError=="function"?reportError:function(e){console.error(e)};function S1(e){this._internalRoot=e}Sm.prototype.render=S1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));xm(e,t,null,null)};Sm.prototype.unmount=S1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ca(function(){xm(null,e,null,null)}),t[$i]=null}};function Sm(e){this._internalRoot=e}Sm.prototype.unstable_scheduleHydration=function(e){if(e){var t=UO();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bs.length&&t!==0&&t<bs[n].priority;n++);bs.splice(n,0,e),n===0&&WO(e)}};function _1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pO(){}function LR(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=lm(o);s.call(u)}}var o=lI(t,r,e,0,null,!1,!1,"",pO);return e._reactRootContainer=o,e[$i]=o.current,Wc(e.nodeType===8?e.parentNode:e),ca(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=lm(l);a.call(u)}}var l=w1(e,0,!1,null,null,!1,!1,"",pO);return e._reactRootContainer=l,e[$i]=l.current,Wc(e.nodeType===8?e.parentNode:e),ca(function(){xm(t,l,n,r)}),l}function Cm(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=lm(o);a.call(l)}}xm(t,o,e,i)}else o=LR(n,t,e,i,r);return lm(o)}jO=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cc(t.pendingLanes);n!==0&&(Fv(t,n|1),Ln(t,Ot()),!($e&6)&&($l=Ot()+500,Us()))}break;case 13:ca(function(){var r=Hi(e,1);if(r!==null){var i=gn();Hr(r,e,1,i)}}),x1(e,1)}};Wv=function(e){if(e.tag===13){var t=Hi(e,134217728);if(t!==null){var n=gn();Hr(t,e,134217728,n)}x1(e,134217728)}};BO=function(e){if(e.tag===13){var t=ks(e),n=Hi(e,t);if(n!==null){var r=gn();Hr(n,e,t,r)}x1(e,t)}};UO=function(){return Xe};FO=function(e,t){var n=Xe;try{return Xe=e,t()}finally{Xe=n}};ev=function(e,t,n){switch(t){case"input":if(qy(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=dm(r);if(!i)throw Error(H(90));vO(r),qy(r,i)}}}break;case"textarea":xO(e,n);break;case"select":t=n.value,t!=null&&Dl(e,!!n.multiple,t,!1)}};IO=h1;PO=ca;var NR={usingClientEntryPoint:!1,Events:[Qc,El,dm,OO,EO,h1]},wc={findFiberByHostInstance:ta,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DR={bundleType:wc.bundleType,version:wc.version,rendererPackageName:wc.rendererPackageName,rendererConfig:wc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ki.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=LO(e),e===null?null:e.stateNode},findFiberByHostInstance:wc.findFiberByHostInstance||AR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(xc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!xc.isDisabled&&xc.supportsFiber))try{um=xc.inject(DR),hi=xc}catch{}var xc;Yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NR;Yn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_1(t))throw Error(H(200));return TR(e,t,null,n)};Yn.createRoot=function(e,t){if(!_1(e))throw Error(H(299));var n=!1,r="",i=uI;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=w1(e,1,!1,null,null,n,!1,r,i),e[$i]=t.current,Wc(e.nodeType===8?e.parentNode:e),new S1(t)};Yn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=LO(t),e=e===null?null:e.stateNode,e};Yn.flushSync=function(e){return ca(e)};Yn.hydrate=function(e,t,n){if(!_m(t))throw Error(H(200));return Cm(null,e,t,!0,n)};Yn.hydrateRoot=function(e,t,n){if(!_1(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=uI;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=lI(t,null,e,1,n??null,i,!1,s,o),e[$i]=t.current,Wc(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Sm(t)};Yn.render=function(e,t,n){if(!_m(t))throw Error(H(200));return Cm(null,e,t,!1,n)};Yn.unmountComponentAtNode=function(e){if(!_m(e))throw Error(H(40));return e._reactRootContainer?(ca(function(){Cm(null,null,e,!1,function(){e._reactRootContainer=null,e[$i]=null})}),!0):!1};Yn.unstable_batchedUpdates=h1;Yn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_m(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Cm(e,t,n,!1,r)};Yn.version="18.3.1-next-f1338f8080-20240426"});var dI=oe((NK,pI)=>{"use strict";function fI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fI)}catch(e){console.error(e)}}fI(),pI.exports=cI()});var hI=oe(mI=>{"use strict";var Kl=K("react");function kR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var MR=typeof Object.is=="function"?Object.is:kR,RR=Kl.useState,VR=Kl.useEffect,jR=Kl.useLayoutEffect,BR=Kl.useDebugValue;function UR(e,t){var n=t(),r=RR({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return jR(function(){i.value=n,i.getSnapshot=t,C1(i)&&s({inst:i})},[e,n,t]),VR(function(){return C1(i)&&s({inst:i}),e(function(){C1(i)&&s({inst:i})})},[e]),BR(n),n}function C1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!MR(e,n)}catch{return!0}}function FR(e,t){return t()}var WR=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?FR:UR;mI.useSyncExternalStore=Kl.useSyncExternalStore!==void 0?Kl.useSyncExternalStore:WR});var yI=oe((kK,gI)=>{"use strict";gI.exports=hI()});var LI=oe(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var tf,Fs=ac(),Kr=K("react"),vI=(tf=Kr)&&typeof tf=="object"&&"default"in tf?tf.default:tf,zR=dI(),GR=yI();if(!Kr.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Fs.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function $R(e){e()}function II(e){e||(e=$R),Fs.configure({reactionScheduler:e})}function HR(e){return Fs.getDependencyTree(e)}var PI=!1;function wI(e){PI=e}function b1(){return PI}var xI,SI,bm=new(typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){function e(n){var r=this;this.finalize=void 0,this.registrations=new Map,this.sweepTimeout=void 0,this.sweep=function(i){i===void 0&&(i=1e4),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var s=Date.now();r.registrations.forEach(function(o,a){s-o.registeredAt>=i&&(r.finalize(o.value),r.registrations.delete(a))}),r.registrations.size>0&&r.scheduleSweep()},this.finalizeAllImmediately=function(){r.sweep(0)},this.finalize=n}var t=e.prototype;return t.register=function(n,r,i){this.registrations.set(i,{value:r,registeredAt:Date.now()}),this.scheduleSweep()},t.unregister=function(n){this.registrations.delete(n)},t.scheduleSweep=function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,1e4))},e}())(function(e){var t;(t=e.reaction)==null||t.dispose(),e.reaction=null});function _I(e){e.reaction=new Fs.Reaction("observer"+e.name,function(){e.stateVersion=Symbol(),e.onStoreChange==null||e.onStoreChange()})}function O1(e,t){if(t===void 0&&(t="observed"),b1())return e();var n=vI.useRef(null);if(!n.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(a){return bm.unregister(r),r.onStoreChange=a,r.reaction||(_I(r),r.stateVersion=Symbol()),function(){var l;r.onStoreChange=null,(l=r.reaction)==null||l.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};n.current=r}var i,s,o=n.current;if(o.reaction||(_I(o),bm.register(n,o,o)),vI.useDebugValue(o.reaction,HR),GR.useSyncExternalStore(o.subscribe,o.getSnapshot,o.getSnapshot),o.reaction.track(function(){try{i=e()}catch(a){s=a}}),s)throw s;return i}var CI,TI=typeof Symbol=="function"&&Symbol.for,qR=(xI=(SI=Object.getOwnPropertyDescriptor(function(){},"name"))==null?void 0:SI.configurable)!=null&&xI,bI=TI?Symbol.for("react.forward_ref"):typeof Kr.forwardRef=="function"&&Kr.forwardRef(function(e){return null}).$$typeof,OI=TI?Symbol.for("react.memo"):typeof Kr.memo=="function"&&Kr.memo(function(e){return null}).$$typeof,KR={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function AI(e){var t=e.children||e.render;return typeof t!="function"?null:O1(t)}function EI(e){var t=Kr.useState(function(){return Fs.observable(e,{},{deep:!1})})[0];return Fs.runInAction(function(){Object.assign(t,e)}),t}AI.displayName="Observer",II(zR.unstable_batchedUpdates);var YR=(CI=bm.finalizeAllImmediately)!=null?CI:function(){};vn.Observer=AI,vn._observerFinalizationRegistry=bm,vn.clearTimers=YR,vn.enableStaticRendering=wI,vn.isObserverBatched=function(){return!0},vn.isUsingStaticRendering=b1,vn.observer=function(e,t){var n;if(OI&&e.$$typeof===OI)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(b1())return e;var r=(n=t?.forwardRef)!=null&&n,i=e,s=e.displayName||e.name;if(bI&&e.$$typeof===bI&&(r=!0,typeof(i=e.render)!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o,a,l=function(u,c){return O1(function(){return i(u,c)},s)};return l.displayName=e.displayName,qR&&Object.defineProperty(l,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(l.contextTypes=e.contextTypes),r&&(l=Kr.forwardRef(l)),l=Kr.memo(l),o=e,a=l,Object.keys(o).forEach(function(u){KR[u]||Object.defineProperty(a,u,Object.getOwnPropertyDescriptor(o,u))}),l},vn.observerBatching=II,vn.useAsObservableSource=EI,vn.useLocalObservable=function(e,t){return Kr.useState(function(){return Fs.observable(e(),t,{autoBind:!0})})[0]},vn.useLocalStore=function(e,t){var n=t&&EI(t);return Kr.useState(function(){return Fs.observable(e(n),void 0,{autoBind:!0})})[0]},vn.useObserver=function(e,t){return t===void 0&&(t="observed"),O1(e,t)},vn.useStaticRendering=function(e){wI(e)}});var DI=oe((RK,NI)=>{"use strict";NI.exports=LI()});var XI=oe(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var nf,Yi=ac(),rf=K("react"),Nn=(nf=rf)&&typeof nf=="object"&&"default"in nf?nf.default:nf,wn=DI();function kI(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}var XR={$$typeof:1,render:1,compare:1,type:1,childContextTypes:1,contextType:1,contextTypes:1,defaultProps:1,getDefaultProps:1,getDerivedStateFromError:1,getDerivedStateFromProps:1,mixins:1,displayName:1,propTypes:1},MI=Symbol("patchMixins"),RI=Symbol("patchedDefinition");function VI(e,t){for(var n=this,r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];t.locks++;try{var o;return e!=null&&(o=e.apply(this,i)),o}finally{t.locks--,t.locks===0&&t.methods.forEach(function(a){a.apply(n,i)})}}function jI(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];VI.call.apply(VI,[this,e,t].concat(r))}}function HI(e,t,n){var r=function(o,a){var l=o[MI]=o[MI]||{},u=l[a]=l[a]||{};return u.locks=u.locks||0,u.methods=u.methods||[],u}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var i=Object.getOwnPropertyDescriptor(e,t);if(!i||!i[RI]){var s=function o(a,l,u,c,f){var p,d=jI(f,c);return(p={})[RI]=!0,p.get=function(){return d},p.set=function(m){if(this===a)d=jI(m,c);else{var y=o(this,l,u,c,m);Object.defineProperty(this,l,y)}},p.configurable=!0,p.enumerable=u,p}(e,t,i?i.enumerable:void 0,r,e[t]);Object.defineProperty(e,t,s)}}var BI=Symbol("ObserverAdministration"),UI=Symbol("isMobXReactObserver");function E1(e){var t;return(t=e[BI])!=null?t:e[BI]={reaction:null,mounted:!1,reactionInvalidatedBeforeMount:!1,forceUpdate:null,name:I1(e.constructor),state:void 0,props:void 0,context:void 0}}function I1(e){return e.displayName||e.name||"<component>"}function JR(e){var t=e.bind(this),n=E1(this);return function(){n.reaction||(n.reaction=function(s){return new Yi.Reaction(s.name+".render()",function(){if(s.mounted)try{s.forceUpdate==null||s.forceUpdate()}catch{var o;(o=s.reaction)==null||o.dispose(),s.reaction=null}else s.reactionInvalidatedBeforeMount=!0})}(n),n.mounted||wn._observerFinalizationRegistry.register(this,n,this));var r=void 0,i=void 0;if(n.reaction.track(function(){try{i=Yi._allowStateChanges(!1,t)}catch(s){r=s}}),r)throw r;return i}}function FI(e,t){return wn.isUsingStaticRendering()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||!function(n,r){if(kI(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var i=Object.keys(n),s=Object.keys(r);if(i.length!==s.length)return!1;for(var o=0;o<i.length;o++)if(!Object.hasOwnProperty.call(r,i[o])||!kI(n[i[o]],r[i[o]]))return!1;return!0}(this.props,e)}function qI(e,t){if(t&&t.kind!=="class")throw new Error("The @observer decorator can be used on classes only");return e.isMobxInjector===!0&&console.warn("Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`"),Object.prototype.isPrototypeOf.call(rf.Component,e)||Object.prototype.isPrototypeOf.call(rf.PureComponent,e)?function(n){var r=n.prototype;if(n[UI]){var i=I1(n);throw new Error("The provided component class ("+i+") has already been declared as an observer component.")}if(n[UI]=!0,r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(n.__proto__!==rf.PureComponent)if(r.shouldComponentUpdate){if(r.shouldComponentUpdate!==FI)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else r.shouldComponentUpdate=FI;var s=r.render;if(typeof s!="function"){var o=I1(n);throw new Error("[mobx-react] class component ("+o+") is missing `render` method.\n`observer` requires `render` being a function defined on prototype.\n`render = () => {}` or `render = function() {}` is not supported.")}r.render=function(){return Object.defineProperty(this,"render",{configurable:!1,writable:!1,value:wn.isUsingStaticRendering()?s:JR.call(this,s)}),this.render()};var a=r.componentDidMount;return r.componentDidMount=function(){var l=this,u=E1(this);return u.mounted=!0,wn._observerFinalizationRegistry.unregister(this),u.forceUpdate=function(){return l.forceUpdate()},u.reaction&&!u.reactionInvalidatedBeforeMount||u.forceUpdate(),a?.apply(this,arguments)},HI(r,"componentWillUnmount",function(){var l;if(!wn.isUsingStaticRendering()){var u=E1(this);(l=u.reaction)==null||l.dispose(),u.reaction=null,u.forceUpdate=null,u.mounted=!1,u.reactionInvalidatedBeforeMount=!1}}),n}(e):wn.observer(e)}function P1(){return(P1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ZR=["children"],Im=Nn.createContext({});function KI(e){var t=e.children,n=function(s,o){if(s==null)return{};var a,l,u={},c=Object.keys(s);for(l=0;l<c.length;l++)o.indexOf(a=c[l])>=0||(u[a]=s[a]);return u}(e,ZR),r=Nn.useContext(Im),i=Nn.useRef(P1({},r,n));return Nn.createElement(Im.Provider,{value:i.current},t)}function WI(e,t,n,r){var i,s,o,a=Nn.forwardRef(function(l,u){var c=P1({},l),f=Nn.useContext(Im);return Object.assign(c,e(f||{},c)||{}),u&&(c.ref=u),Nn.createElement(t,c)});return r&&(a=qI(a)),a.isMobxInjector=!0,i=t,s=a,o=Object.getOwnPropertyNames(Object.getPrototypeOf(i)),Object.getOwnPropertyNames(i).forEach(function(l){XR[l]||o.indexOf(l)!==-1||Object.defineProperty(s,l,Object.getOwnPropertyDescriptor(i,l))}),a.wrappedComponent=t,a.displayName=function(l,u){var c=l.displayName||l.name||l.constructor&&l.constructor.name||"Component";return u?"inject-with-"+u+"("+c+")":"inject("+c+")"}(t,n),a}function QR(e){return function(t,n){return e.forEach(function(r){if(!(r in n)){if(!(r in t))throw new Error("MobX injector: Store '"+r+"' is not available! Make sure it is provided by some Provider");n[r]=t[r]}}),n}}KI.displayName="MobXProvider";var eV=Number.parseInt(Nn.version.split(".")[0]),zI=!1,Om=Symbol("disposeOnUnmountProto"),Em=Symbol("disposeOnUnmountInst");function tV(){var e=this;[].concat(this[Om]||[],this[Em]||[]).forEach(function(t){var n=typeof t=="string"?e[t]:t;n!=null&&(Array.isArray(n)?n.map(function(r){return r()}):n())})}function YI(e){function t(r,i,s,o,a,l){for(var u=arguments.length,c=new Array(u>6?u-6:0),f=6;f<u;f++)c[f-6]=arguments[f];return Yi.untracked(function(){return o=o||"<<anonymous>>",l=l||s,i[s]==null?r?new Error("The "+a+" `"+l+"` is marked as required in `"+o+"`, but its value is `"+(i[s]===null?"null":"undefined")+"`."):null:e.apply(void 0,[i,s,o,a,l].concat(c))})}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function GI(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(n,r){return n==="symbol"||r["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&r instanceof Symbol}(t,e)?"symbol":t}function Yl(e,t){return YI(function(n,r,i,s,o){return Yi.untracked(function(){if(e&&GI(n[r])===t.toLowerCase())return null;var a;switch(t){case"Array":a=Yi.isObservableArray;break;case"Object":a=Yi.isObservableObject;break;case"Map":a=Yi.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var l=n[r];if(!a(l)){var u=function(f){var p=GI(f);if(p==="object"){if(f instanceof Date)return"date";if(f instanceof RegExp)return"regexp"}return p}(l),c=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+o+"` of type `"+u+"` supplied to `"+i+"`, expected `mobx.Observable"+t+"`"+c+".")}return null})})}function $I(e,t){return YI(function(n,r,i,s,o){for(var a=arguments.length,l=new Array(a>5?a-5:0),u=5;u<a;u++)l[u-5]=arguments[u];return Yi.untracked(function(){if(typeof t!="function")return new Error("Property `"+o+"` of component `"+i+"` has invalid PropType notation.");var c=Yl(e,"Array")(n,r,i,s,o);if(c instanceof Error)return c;for(var f=n[r],p=0;p<f.length;p++)if((c=t.apply(void 0,[f,p,i,s,o+"["+p+"]"].concat(l)))instanceof Error)return c;return null})})}var nV={observableArray:Yl(!1,"Array"),observableArrayOf:$I.bind(null,!1),observableMap:Yl(!1,"Map"),observableObject:Yl(!1,"Object"),arrayOrObservableArray:Yl(!0,"Array"),arrayOrObservableArrayOf:$I.bind(null,!0),objectOrObservableObject:Yl(!0,"Object")};if(!rf.Component)throw new Error("mobx-react requires React to be available");if(!Yi.observable)throw new Error("mobx-react requires mobx to be available");Object.defineProperty(tn,"Observer",{enumerable:!0,get:function(){return wn.Observer}}),Object.defineProperty(tn,"enableStaticRendering",{enumerable:!0,get:function(){return wn.enableStaticRendering}}),Object.defineProperty(tn,"isUsingStaticRendering",{enumerable:!0,get:function(){return wn.isUsingStaticRendering}}),Object.defineProperty(tn,"observerBatching",{enumerable:!0,get:function(){return wn.observerBatching}}),Object.defineProperty(tn,"useAsObservableSource",{enumerable:!0,get:function(){return wn.useAsObservableSource}}),Object.defineProperty(tn,"useLocalObservable",{enumerable:!0,get:function(){return wn.useLocalObservable}}),Object.defineProperty(tn,"useLocalStore",{enumerable:!0,get:function(){return wn.useLocalStore}}),Object.defineProperty(tn,"useObserver",{enumerable:!0,get:function(){return wn.useObserver}}),Object.defineProperty(tn,"useStaticRendering",{enumerable:!0,get:function(){return wn.useStaticRendering}}),tn.MobXProviderContext=Im,tn.PropTypes=nV,tn.Provider=KI,tn.disposeOnUnmount=function e(t,n){if(Array.isArray(n))return n.map(function(a){return e(t,a)});zI||(eV>=18?console.error("[mobx-react] disposeOnUnmount is not compatible with React 18 and higher. Don't use it."):console.warn("[mobx-react] disposeOnUnmount is deprecated. It won't work correctly with React 18 and higher."),zI=!0);var r=Object.getPrototypeOf(t).constructor,i=Object.getPrototypeOf(t.constructor),s=Object.getPrototypeOf(Object.getPrototypeOf(t));if(r!==Nn.Component&&r!==Nn.PureComponent&&i!==Nn.Component&&i!==Nn.PureComponent&&s!==Nn.Component&&s!==Nn.PureComponent)throw new Error("[mobx-react] disposeOnUnmount only supports direct subclasses of React.Component or React.PureComponent.");if(typeof n!="string"&&typeof n!="function"&&!Array.isArray(n))throw new Error("[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.");var o=!!t[Om]||!!t[Em];return(typeof n=="string"?t[Om]||(t[Om]=[]):t[Em]||(t[Em]=[])).push(n),o||HI(t,"componentWillUnmount",tV),typeof n!="string"?n:void 0},tn.inject=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(typeof arguments[0]=="function"){var r=arguments[0];return function(i){return WI(r,i,r.name,!0)}}return function(i){return WI(QR(t),i,t.join("-"),!1)}},tn.observer=qI});var T1=oe((jK,JI)=>{"use strict";JI.exports=XI()});var tP=oe((BK,eP)=>{"use strict";var rV=function(t){return iV(t)&&!sV(t)};function iV(e){return!!e&&typeof e=="object"}function sV(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||lV(e)}var oV=typeof Symbol=="function"&&Symbol.for,aV=oV?Symbol.for("react.element"):60103;function lV(e){return e.$$typeof===aV}function uV(e){return Array.isArray(e)?[]:{}}function sf(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Xl(uV(e),e,t):e}function cV(e,t,n){return e.concat(t).map(function(r){return sf(r,n)})}function fV(e,t){if(!t.customMerge)return Xl;var n=t.customMerge(e);return typeof n=="function"?n:Xl}function pV(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function ZI(e){return Object.keys(e).concat(pV(e))}function QI(e,t){try{return t in e}catch{return!1}}function dV(e,t){return QI(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mV(e,t,n){var r={};return n.isMergeableObject(e)&&ZI(e).forEach(function(i){r[i]=sf(e[i],n)}),ZI(t).forEach(function(i){dV(e,i)||(QI(e,i)&&n.isMergeableObject(t[i])?r[i]=fV(i,n)(e[i],t[i],n):r[i]=sf(t[i],n))}),r}function Xl(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||cV,n.isMergeableObject=n.isMergeableObject||rV,n.cloneUnlessOtherwiseSpecified=sf;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):mV(e,t,n):sf(t,n)}Xl.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return Xl(r,i,n)},{})};var hV=Xl;eP.exports=hV});var iT=oe((oee,rT)=>{rT.exports=nT;nT.sync=Zj;var eT=K("fs");function Jj(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function tT(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Jj(t,n)}function nT(e,t,n){eT.stat(e,function(r,i){n(r,r?!1:tT(i,e,t))})}function Zj(e,t){return tT(eT.statSync(e),e,t)}});var uT=oe((aee,lT)=>{lT.exports=oT;oT.sync=Qj;var sT=K("fs");function oT(e,t,n){sT.stat(e,function(r,i){n(r,r?!1:aT(i,t))})}function Qj(e,t){return aT(sT.statSync(e),t)}function aT(e,t){return e.isFile()&&eB(e,t)}function eB(e,t){var n=e.mode,r=e.uid,i=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),o=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),u=parseInt("001",8),c=a|l,f=n&u||n&l&&i===o||n&a&&r===s||n&c&&s===0;return f}});var fT=oe((uee,cT)=>{var lee=K("fs"),km;process.platform==="win32"||global.TESTING_WINDOWS?km=iT():km=uT();cT.exports=K1;K1.sync=tB;function K1(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,i){K1(e,t||{},function(s,o){s?i(s):r(o)})})}km(e,t||{},function(r,i){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,i=!1),n(r,i)})}function tB(e,t){try{return km.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var vT=oe((cee,yT)=>{var tu=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pT=K("path"),nB=tu?";":":",dT=fT(),mT=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),hT=(e,t)=>{let n=t.colon||nB,r=e.match(/\//)||tu&&e.match(/\\/)?[""]:[...tu?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],i=tu?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=tu?i.split(n):[""];return tu&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:i}},gT=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:i,pathExtExe:s}=hT(e,t),o=[],a=u=>new Promise((c,f)=>{if(u===r.length)return t.all&&o.length?c(o):f(mT(e));let p=r[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,m=pT.join(d,e),y=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+m:m;c(l(y,u,0))}),l=(u,c,f)=>new Promise((p,d)=>{if(f===i.length)return p(a(c+1));let m=i[f];dT(u+m,{pathExt:s},(y,v)=>{if(!y&&v)if(t.all)o.push(u+m);else return p(u+m);return p(l(u,c,f+1))})});return n?a(0).then(u=>n(null,u),n):a(0)},rB=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:i}=hT(e,t),s=[];for(let o=0;o<n.length;o++){let a=n[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=pT.join(l,e),c=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<r.length;f++){let p=c+r[f];try{if(dT.sync(p,{pathExt:i}))if(t.all)s.push(p);else return p}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw mT(e)};yT.exports=gT;gT.sync=rB});var xT=oe((fee,Y1)=>{"use strict";var wT=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};Y1.exports=wT;Y1.exports.default=wT});var bT=oe((pee,CT)=>{"use strict";var ST=K("path"),iB=vT(),sB=xT();function _T(e,t){let n=e.options.env||process.env,r=process.cwd(),i=e.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let o;try{o=iB.sync(e.command,{path:n[sB({env:n})],pathExt:t?ST.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return o&&(o=ST.resolve(i?e.options.cwd:"",o)),o}function oB(e){return _T(e)||_T(e,!0)}CT.exports=oB});var OT=oe((dee,J1)=>{"use strict";var X1=/([()\][%!^"`<>&|;, *?])/g;function aB(e){return e=e.replace(X1,"^$1"),e}function lB(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(X1,"^$1"),t&&(e=e.replace(X1,"^$1")),e}J1.exports.command=aB;J1.exports.argument=lB});var IT=oe((mee,ET)=>{"use strict";ET.exports=/^#!(.*)/});var TT=oe((hee,PT)=>{"use strict";var uB=IT();PT.exports=(e="")=>{let t=e.match(uB);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),i=n.split("/").pop();return i==="env"?r:r?`${i} ${r}`:i}});var LT=oe((gee,AT)=>{"use strict";var Z1=K("fs"),cB=TT();function fB(e){let n=Buffer.alloc(150),r;try{r=Z1.openSync(e,"r"),Z1.readSync(r,n,0,150,0),Z1.closeSync(r)}catch{}return cB(n.toString())}AT.exports=fB});var MT=oe((yee,kT)=>{"use strict";var pB=K("path"),NT=bT(),DT=OT(),dB=LT(),mB=process.platform==="win32",hB=/\.(?:com|exe)$/i,gB=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function yB(e){e.file=NT(e);let t=e.file&&dB(e.file);return t?(e.args.unshift(e.file),e.command=t,NT(e)):e.file}function vB(e){if(!mB)return e;let t=yB(e),n=!hB.test(t);if(e.options.forceShell||n){let r=gB.test(t);e.command=pB.normalize(e.command),e.command=DT.command(e.command),e.args=e.args.map(s=>DT.argument(s,r));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function wB(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:vB(r)}kT.exports=wB});var jT=oe((vee,VT)=>{"use strict";var Q1=process.platform==="win32";function ew(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function xB(e,t){if(!Q1)return;let n=e.emit;e.emit=function(r,i){if(r==="exit"){let s=RT(i,t,"spawn");if(s)return n.call(e,"error",s)}return n.apply(e,arguments)}}function RT(e,t){return Q1&&e===1&&!t.file?ew(t.original,"spawn"):null}function SB(e,t){return Q1&&e===1&&!t.file?ew(t.original,"spawnSync"):null}VT.exports={hookChildProcess:xB,verifyENOENT:RT,verifyENOENTSync:SB,notFoundError:ew}});var FT=oe((wee,nu)=>{"use strict";var BT=K("child_process"),tw=MT(),nw=jT();function UT(e,t,n){let r=tw(e,t,n),i=BT.spawn(r.command,r.args,r.options);return nw.hookChildProcess(i,r),i}function _B(e,t,n){let r=tw(e,t,n),i=BT.spawnSync(r.command,r.args,r.options);return i.error=i.error||nw.verifyENOENTSync(i.status,r),i}nu.exports=UT;nu.exports.spawn=UT;nu.exports.sync=_B;nu.exports._parse=tw;nu.exports._enoent=nw});var hA=oe((Cte,mA)=>{"use strict";var{PassThrough:x6}=K("stream");mA.exports=function(){var e=[],t=new x6({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(n),t;function n(s){return Array.isArray(s)?(s.forEach(n),this):(e.push(s),s.once("end",i.bind(null,s)),s.once("error",t.emit.bind(t,"error")),s.pipe(t,{end:!1}),this)}function r(){return e.length==0}function i(s){e=e.filter(function(o){return o!==s}),!e.length&&t.readable&&t.end()}}});var o3=oe((Hse,s8)=>{s8.exports={name:"systeminformation",version:"5.23.5",description:"Advanced, lightweight system and OS information library",license:"MIT",author:"Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",homepage:"https://systeminformation.io",main:"./lib/index.js",bin:{systeminformation:"lib/cli.js"},types:"./lib/index.d.ts",scripts:{test:"node ./test/test.js"},files:["lib/"],keywords:["system information","sysinfo","monitor","monitoring","os","linux","osx","windows","freebsd","openbsd","netbsd","cpu","cpuload","physical cores","logical cores","processor","cores","threads","socket type","memory","file system","fsstats","diskio","block devices","netstats","network","network interfaces","network connections","network stats","iface","printer","processes","users","internet","battery","docker","docker stats","docker processes","graphics","graphic card","graphic controller","gpu","display","smart","disk layout","usb","audio","bluetooth","wifi","wifinetworks","virtual box","virtualbox","vm","backend","hardware","BIOS","chassis"],repository:{type:"git",url:"https://github.com/sebhildebrandt/systeminformation.git"},funding:{type:"Buy me a coffee",url:"https://www.buymeacoffee.com/systeminfo"},os:["darwin","linux","win32","freebsd","openbsd","netbsd","sunos","android"],engines:{node:">=8.0.0"}}});var Pt=oe(Se=>{"use strict";var Js=K("os"),Ci=K("fs"),o8=K("path"),Qw=K("child_process").spawn,a8=K("child_process").exec,gu=K("child_process").execSync,ex=K("util"),Ma=process.platform,tx=Ma==="linux"||Ma==="android",c3=Ma==="darwin",nx=Ma==="win32",f3=Ma==="freebsd",p3=Ma==="openbsd",d3=Ma==="netbsd",qw=0,Da="",Zr="",Xs=null,Zs=null,m3=process.env.WINDIR||"C:\\Windows",Vt,hu="",Tf=[],rx=!1,a3="$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; ",Yw="--###START###--",l3="--ERROR--",Eh="--###ENDCMD###--",Xw="--##ID##--",Af={windowsHide:!0,maxBuffer:1024*2e4,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})},h3={maxBuffer:1024*2e4,encoding:"UTF-8",stdio:["pipe","pipe","ignore"]};function l8(e){let t=parseInt(e,10);return isNaN(t)&&(t=0),t}function u8(e){let t=!1,n="",r="";for(let i of e)i>="0"&&i<="9"||t?(t=!0,n+=i):r+=i;return[r,n]}var Jw=new String().replace,Zw=new String().toLowerCase,g3=new String().toString,y3=new String().substr,c8=new String().trim,f8=new String().startsWith,v3=Math.min;function p8(e){return e&&{}.toString.call(e)==="[object Function]"}function d8(e){let t=[],n={};for(let r=0;r<e.length;r++){let i=Object.keys(e[r]);i.sort(function(o,a){return o-a});let s="";for(let o=0;o<i.length;o++)s+=JSON.stringify(i[o]),s+=JSON.stringify(e[r][i[o]]);({}).hasOwnProperty.call(n,s)||(t.push(e[r]),n[s]=!0)}return t}function m8(e,t){return e.sort(function(n,r){let i="",s="";return t.forEach(function(o){i=i+n[o],s=s+r[o]}),i<s?-1:i>s?1:0})}function h8(){return qw===0&&(qw=Js.cpus().length),qw}function ka(e,t,n,r,i){n=n||":",t=t.toLowerCase(),r=r||!1,i=i||!1;let s="";return e.some(o=>{let a=o.toLowerCase().replace(/\t/g,"");if(r&&(a=a.trim()),a.startsWith(t)&&(!i||a.match(t+n)||a.match(t+" "+n))){let l=r?o.trim().split(n):o.split(n);if(l.length>=2)return l.shift(),s=l.join(n).trim(),!0}}),s}function g8(e,t){return t=t||16,e.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],t))})}function y8(e){let t="",n=0;return e.split("").forEach(r=>{r>="0"&&r<="9"?n===1&&n++:(n===0&&n++,n===1&&(t+=r))}),t}function v8(e,t){t=t||"",e=e.toUpperCase();let n=0,r=0,i=y8(e),s=e.split(i);if(s.length>=2){s[2]&&(s[1]+=s[2]);let o=s[1]&&s[1].toLowerCase().indexOf("pm")>-1||s[1].toLowerCase().indexOf("p.m.")>-1||s[1].toLowerCase().indexOf("p. m.")>-1||s[1].toLowerCase().indexOf("n")>-1||s[1].toLowerCase().indexOf("ch")>-1||s[1].toLowerCase().indexOf("\xF6s")>-1||t&&s[1].toLowerCase().indexOf(t)>-1;return n=parseInt(s[0],10),r=parseInt(s[1],10),n=o&&n<12?n+12:n,("0"+n).substr(-2)+":"+("0"+r).substr(-2)}}function w8(e,t){let n={date:"",time:""};t=t||{};let r=(t.dateFormat||"").toLowerCase(),i=t.pmDesignator||"",s=e.split(" ");if(s[0]){if(s[0].indexOf("/")>=0){let o=s[0].split("/");o.length===3&&(o[0].length===4?n.date=o[0]+"-"+("0"+o[1]).substr(-2)+"-"+("0"+o[2]).substr(-2):o[2].length===2?(r.indexOf("/d/")>-1||r.indexOf("/dd/")>-1,n.date="20"+o[2]+"-"+("0"+o[1]).substr(-2)+"-"+("0"+o[0]).substr(-2)):(e.toLowerCase().indexOf("pm")>-1||e.toLowerCase().indexOf("p.m.")>-1||e.toLowerCase().indexOf("p. m.")>-1||e.toLowerCase().indexOf("am")>-1||e.toLowerCase().indexOf("a.m.")>-1||e.toLowerCase().indexOf("a. m.")>-1||r.indexOf("/d/")>-1||r.indexOf("/dd/")>-1)&&r.indexOf("dd/")!==0?n.date=o[2]+"-"+("0"+o[0]).substr(-2)+"-"+("0"+o[1]).substr(-2):n.date=o[2]+"-"+("0"+o[1]).substr(-2)+"-"+("0"+o[0]).substr(-2))}if(s[0].indexOf(".")>=0){let o=s[0].split(".");o.length===3&&(r.indexOf(".d.")>-1||r.indexOf(".dd.")>-1?n.date=o[2]+"-"+("0"+o[0]).substr(-2)+"-"+("0"+o[1]).substr(-2):n.date=o[2]+"-"+("0"+o[1]).substr(-2)+"-"+("0"+o[0]).substr(-2))}if(s[0].indexOf("-")>=0){let o=s[0].split("-");o.length===3&&(n.date=o[0]+"-"+("0"+o[1]).substr(-2)+"-"+("0"+o[2]).substr(-2))}}if(s[1]){s.shift();let o=s.join(" ");n.time=v8(o,i)}return n}function x8(e,t){let n=t>0,r=1,i=0,s=0,o=[];for(let l=0;l<e.length;l++)r<=t?(/\s/.test(e[l])&&!n&&(s=l-1,o.push({from:i,to:s+1,cap:e.substring(i,s+1)}),i=s+2,r++),n=e[l]===" "):(!/\s/.test(e[l])&&n&&(s=l-1,i<s&&o.push({from:i,to:s,cap:e.substring(i,s)}),i=s+1,r++),n=e[l]===" ");s=5e3,o.push({from:i,to:s,cap:e.substring(i,s)});let a=o.length;for(let l=0;l<a;l++)o[l].cap.replace(/\s/g,"").length===0&&l+1<a&&(o[l].to=o[l+1].to,o[l].cap=o[l].cap+o[l+1].cap,o.splice(l+1,1),a=a-1);return o}function S8(e,t,n){for(let r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}function w3(){if(Js.type()==="Windows_NT"&&!Da&&(Da=m3+"\\system32\\wbem\\wmic.exe",!Ci.existsSync(Da)))try{let e=gu("WHERE WMIC",Af).toString().split(`\r
21
+ `);e&&e.length?Da=e[0]:Da="wmic"}catch{Da="wmic"}return Da}function _8(e){return new Promise(t=>{process.nextTick(()=>{try{x3(w3()+" "+e).then(n=>{t(n,"")})}catch(n){t("",n)}})})}function C8(){return nx?`"${process.env.VBOX_INSTALL_PATH||process.env.VBOX_MSI_INSTALL_PATH}\\VBoxManage.exe"`:"vboxmanage"}function Kw(e){let t="",n,r="";if(e.indexOf(Yw)>=0){n=e.split(Yw);let s=n[1].split(Xw);t=s[0],s.length>1&&(e=s.slice(1).join(Xw))}e.indexOf(Eh)>=0&&(n=e.split(Eh),r=n[0]);let i=-1;for(let s=0;s<Tf.length;s++)Tf[s].id===t&&(i=s,Tf[s].callback(r));i>=0&&Tf.splice(i,1)}function b8(){Vt||(Vt=Qw("powershell.exe",["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:1024*2e4,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})}),Vt&&Vt.pid&&(rx=!0,Vt.stdout.on("data",function(e){hu=hu+e.toString("utf8"),e.indexOf(Eh)>=0&&(Kw(hu),hu="")}),Vt.stderr.on("data",function(){Kw(hu+l3)}),Vt.on("error",function(){Kw(hu+l3)}),Vt.on("close",function(){Vt&&Vt.kill()})))}function O8(){try{Vt&&(Vt.stdin.write("exit"+Js.EOL),Vt.stdin.end(),rx=!1)}catch{Vt&&Vt.kill()}Vt=null}function x3(e){if(rx){let t=Math.random().toString(36).substring(2,12);return new Promise(n=>{process.nextTick(()=>{function r(i){n(i)}Tf.push({id:t,cmd:e,callback:r,start:new Date});try{Vt&&Vt.pid&&Vt.stdin.write(a3+"echo "+Yw+t+Xw+"; "+Js.EOL+e+Js.EOL+"echo "+Eh+Js.EOL)}catch{n("")}})})}else{let t="";return new Promise(n=>{process.nextTick(()=>{try{let r=Qw("powershell.exe",["-NoProfile","-NoLogo","-InputFormat","Text","-NoExit","-ExecutionPolicy","Unrestricted","-Command","-"],{stdio:"pipe",windowsHide:!0,maxBuffer:2048e4,encoding:"UTF-8",env:Object.assign({},process.env,{LANG:"en_US.UTF-8"})});if(r&&!r.pid&&r.on("error",function(){n(t)}),r&&r.pid){r.stdout.on("data",function(i){t=t+i.toString("utf8")}),r.stderr.on("data",function(){r.kill(),n(t)}),r.on("close",function(){r.kill(),n(t)}),r.on("error",function(){r.kill(),n(t)});try{r.stdin.write(a3+e+Js.EOL),r.stdin.write("exit"+Js.EOL),r.stdin.end()}catch{r.kill(),n(t)}}else n(t)}catch{n(t)}})})}}function E8(e,t,n){let r="";return n=n||{},new Promise(i=>{process.nextTick(()=>{try{let s=Qw(e,t,n);s&&!s.pid&&s.on("error",function(){i(r)}),s&&s.pid?(s.stdout.on("data",function(o){r+=o.toString()}),s.on("close",function(){s.kill(),i(r)}),s.on("error",function(){s.kill(),i(r)})):i(r)}catch{i(r)}})})}function I8(){if(nx){if(!Zr)try{let n=gu("chcp",Af).toString().split(`\r
22
+ `)[0].split(":");Zr=n.length>1?n[1].replace(".","").trim():""}catch{Zr="437"}return Zr}if(tx||c3||f3||p3||d3){if(!Zr)try{let n=gu("echo $LANG",ex.execOptsLinux).toString().split(`\r
23
+ `)[0].split(".");Zr=n.length>1?n[1].trim():"",Zr||(Zr="UTF-8")}catch{Zr="UTF-8"}return Zr}}function P8(){if(Xs!==null)return Xs;if(Xs=!1,nx)try{let e=gu("WHERE smartctl 2>nul",Af).toString().split(`\r
24
+ `);e&&e.length?Xs=e[0].indexOf(":\\")>=0:Xs=!1}catch{Xs=!1}if(tx||c3||f3||p3||d3)try{Xs=gu("which smartctl 2>/dev/null",h3).toString().split(`\r
25
+ `).length>0}catch{ex.noop()}return Xs}function T8(){let e=["BCM2708","BCM2709","BCM2710","BCM2711","BCM2712","BCM2835","BCM2836","BCM2837","BCM2837B0"],t=[];if(Zs!==null)t=Zs;else try{t=Ci.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
26
+ `),Zs=t}catch{return!1}let n=ka(t,"hardware");return n&&e.indexOf(n)>-1}function A8(){let e=[];try{e=Ci.readFileSync("/etc/os-release",{encoding:"utf8"}).toString().split(`
27
+ `)}catch{return!1}let t=ka(e,"id","=");return t&&t.indexOf("raspbian")>-1}function L8(e,t,n){n||(n=t,t=Af);let r="chcp 65001 > nul && cmd /C "+e+" && chcp "+Zr+" > nul";a8(r,t,function(i,s){n(i,s)})}function N8(){let e=Ci.existsSync("/Library/Developer/CommandLineTools/usr/bin/"),t=Ci.existsSync("/Applications/Xcode.app/Contents/Developer/Tools"),n=Ci.existsSync("/Library/Developer/Xcode/");return e||n||t}function D8(){let e=process.hrtime();return!Array.isArray(e)||e.length!==2?0:+e[0]*1e9+ +e[1]}function k8(e,t){t=t||"";let n=[];return e.forEach(r=>{r.startsWith(t)&&n.indexOf(r)===-1&&n.push(r)}),n.length}function M8(e,t){t=t||"";let n=[];return e.forEach(r=>{r.startsWith(t)&&n.push(r)}),n.length}function R8(e,t){typeof t>"u"&&(t=!1);let n=e||"",r="",i=v3(n.length,2e3);for(let s=0;s<=i;s++)n[s]===void 0||n[s]===">"||n[s]==="<"||n[s]==="*"||n[s]==="?"||n[s]==="["||n[s]==="]"||n[s]==="|"||n[s]==="\u02DA"||n[s]==="$"||n[s]===";"||n[s]==="&"||n[s]==="]"||n[s]==="#"||n[s]==="\\"||n[s]===" "||n[s]===`
28
+ `||n[s]==="\r"||n[s]==="'"||n[s]==="`"||n[s]==='"'||n[s].length>1||t&&n[s]==="("||t&&n[s]===")"||t&&n[s]==="@"||t&&n[s]===" "||t&&n[s]=="{"||t&&n[s]==";"||t&&n[s]=="}"||(r=r+n[s]);return r}function V8(){let e="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=!0,n="";n.__proto__.replace=Jw,n.__proto__.toLowerCase=Zw,n.__proto__.toString=g3,n.__proto__.substr=y3,t=t||e.length!==62;let r=Date.now();if(typeof r=="number"&&r>16e11){let i=r%100+15;for(let u=0;u<i;u++){let c=Math.random()*61.99999999+1,f=parseInt(Math.floor(c).toString(),10),p=parseInt(c.toString().split(".")[0],10),d=Math.random()*61.99999999+1,m=parseInt(Math.floor(d).toString(),10),y=parseInt(d.toString().split(".")[0],10);t=t&&c!==d,t=t&&f===p&&m===y,n+=e[f-1]}t=t&&n.length===i;let s=Math.random()*i*.9999999999,o=n.substr(0,s)+" "+n.substr(s,2e3);o.__proto__.replace=Jw;let a=o.replace(/ /g,"");t=t&&n===a,s=Math.random()*i*.9999999999,o=n.substr(0,s)+"{"+n.substr(s,2e3),a=o.replace(/{/g,""),t=t&&n===a,s=Math.random()*i*.9999999999,o=n.substr(0,s)+"*"+n.substr(s,2e3),a=o.replace(/\*/g,""),t=t&&n===a,s=Math.random()*i*.9999999999,o=n.substr(0,s)+"$"+n.substr(s,2e3),a=o.replace(/\$/g,""),t=t&&n===a;let l=n.toLowerCase();t=t&&l.length===i&&l[i-1]&&!l[i];for(let u=0;u<i;u++){let c=n[u];c.__proto__.toLowerCase=Zw;let f=l?l[u]:"",p=c.toLowerCase();t=t&&p[0]===f&&p[0]&&!p[1]}}return!t}function j8(e){return("00000000"+parseInt(e,16).toString(2)).substr(-8)}function B8(e){let t=Ci.lstatSync,n=Ci.readdirSync,r=o8.join;function i(u){return t(u).isDirectory()}function s(u){return t(u).isFile()}function o(u){return n(u).map(function(c){return r(u,c)}).filter(i)}function a(u){return n(u).map(function(c){return r(u,c)}).filter(s)}function l(u){try{return o(u).map(function(p){return l(p)}).reduce(function(p,d){return p.concat(d)},[]).concat(a(u))}catch{return[]}}return Ci.existsSync(e)?l(e):[]}function S3(e){Zs===null&&(Zs=e);let t={"0002":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0003":{type:"B",revision:"1.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0004":{type:"B",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0005":{type:"B",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"0006":{type:"B",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0007":{type:"A",revision:"2.0",memory:256,manufacturer:"Egoman",processor:"BCM2835"},"0008":{type:"A",revision:"2.0",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0009":{type:"A",revision:"2.0",memory:256,manufacturer:"Qisda",processor:"BCM2835"},"000d":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"000e":{type:"B",revision:"2.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"000f":{type:"B",revision:"2.0",memory:512,manufacturer:"Egoman",processor:"BCM2835"},"0010":{type:"B+",revision:"1.2",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0011":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Sony UK",processor:"BCM2835"},"0012":{type:"A+",revision:"1.1",memory:256,manufacturer:"Sony UK",processor:"BCM2835"},"0013":{type:"B+",revision:"1.2",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0014":{type:"CM1",revision:"1.0",memory:512,manufacturer:"Embest",processor:"BCM2835"},"0015":{type:"A+",revision:"1.1",memory:256,manufacturer:"512MB Embest",processor:"BCM2835"}},n=["BCM2835","BCM2836","BCM2837","BCM2711","BCM2712"],r=["Sony UK","Egoman","Embest","Sony Japan","Embest","Stadium"],i={"00":"A","01":"B","02":"A+","03":"B+","04":"2B","05":"Alpha (early prototype)","06":"CM1","08":"3B","09":"Zero","0a":"CM3","0c":"Zero W","0d":"3B+","0e":"3A+","0f":"Internal use only",10:"CM3+",11:"4B",12:"Zero 2 W",13:"400",14:"CM4",15:"CM4S",17:"5"},s=ka(e,"revision",":",!0),o=ka(e,"model:",":",!0),a=ka(e,"serial",":",!0),l={};if({}.hasOwnProperty.call(t,s))l={model:o,serial:a,revisionCode:s,memory:t[s].memory,manufacturer:t[s].manufacturer,processor:t[s].processor,type:t[s].type,revision:t[s].revision};else{let u=("00000000"+ka(e,"revision",":",!0).toLowerCase()).substr(-8),c=parseInt(j8(u.substr(2,1)).substr(5,3),2)||0,f=r[parseInt(u.substr(3,1),10)],p=n[parseInt(u.substr(4,1),10)],d=u.substr(5,2);l={model:o,serial:a,revisionCode:s,memory:256*Math.pow(2,c),manufacturer:f,processor:p,type:{}.hasOwnProperty.call(i,d)?i[d]:"",revision:"1."+u.substr(7,1)}}return l}function U8(){let e=null;if(Zs!==null)e=Zs;else try{e=Ci.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
29
+ `),Zs=e}catch{return!1}let t=S3(e);return t.type==="4B"||t.type==="CM4"||t.type==="CM4S"||t.type==="400"?"VideoCore VI":t.type==="5"?"VideoCore VII":"VideoCore IV"}function F8(e){let t=e.map(function(i){return new Promise(function(s){let o=new Array(2);i.then(function(a){o[0]=a}).catch(function(a){o[1]=a}).then(function(){s(o)})})}),n=[],r=[];return Promise.all(t).then(function(i){return i.forEach(function(s){s[1]?(n.push(s[1]),r.push(null)):(n.push(null),r.push(s[0]))}),{errors:n,results:r}})}function W8(e){return function(){let t=Array.prototype.slice.call(arguments);return new Promise(function(n,r){t.push(function(i,s){i?r(i):n(s)}),e.apply(null,t)})}}function z8(e){return function(){let t=Array.prototype.slice.call(arguments);return new Promise(function(n){t.push(function(r,i){n(i)}),e.apply(null,t)})}}function G8(){let e="";if(tx)try{e=gu("uname -v",ex.execOptsLinux).toString()}catch{e=""}return e}function $8(e){let t=["array","dict","key","string","integer","date","real","data","boolean","arrayEmpty"],r=e.indexOf("<plist version"),i=e.length;for(;e[r]!==">"&&r<i;)r++;let s=0,o=!1,a=!1,l=!1,u=[{tagStart:"",tagEnd:"",tagContent:"",key:"",data:null}],c="",f=e[r];for(;r<i;)c=f,r+1<i&&(f=e[r+1]),c==="<"?(a=!1,f==="/"?l=!0:u[s].tagStart?(u[s].tagContent="",u[s].data||(u[s].data=u[s].tagStart==="array"?[]:{}),s++,u.push({tagStart:"",tagEnd:"",tagContent:"",key:null,data:null}),o=!0,a=!1):o||(o=!0)):c===">"?(u[s].tagStart==="true/"&&(o=!1,l=!0,u[s].tagStart="",u[s].tagEnd="/boolean",u[s].data=!0),u[s].tagStart==="false/"&&(o=!1,l=!0,u[s].tagStart="",u[s].tagEnd="/boolean",u[s].data=!1),u[s].tagStart==="array/"&&(o=!1,l=!0,u[s].tagStart="",u[s].tagEnd="/arrayEmpty",u[s].data=[]),a&&(a=!1),o&&(o=!1,a=!0,u[s].tagStart==="array"&&(u[s].data=[]),u[s].tagStart==="dict"&&(u[s].data={})),l&&(l=!1,u[s].tagEnd&&t.indexOf(u[s].tagEnd.substr(1))>=0&&(u[s].tagEnd==="/dict"||u[s].tagEnd==="/array"?(s>1&&u[s-2].tagStart==="array"&&u[s-2].data.push(u[s-1].data),s>1&&u[s-2].tagStart==="dict"&&(u[s-2].data[u[s-1].key]=u[s-1].data),s--,u.pop(),u[s].tagContent="",u[s].tagStart="",u[s].tagEnd=""):(u[s].tagEnd==="/key"&&u[s].tagContent?u[s].key=u[s].tagContent:(u[s].tagEnd==="/real"&&u[s].tagContent&&(u[s].data=parseFloat(u[s].tagContent)||0),u[s].tagEnd==="/integer"&&u[s].tagContent&&(u[s].data=parseInt(u[s].tagContent)||0),u[s].tagEnd==="/string"&&u[s].tagContent&&(u[s].data=u[s].tagContent||""),u[s].tagEnd==="/boolean"&&(u[s].data=u[s].tagContent||!1),u[s].tagEnd==="/arrayEmpty"&&(u[s].data=u[s].tagContent||[]),s>0&&u[s-1].tagStart==="array"&&u[s-1].data.push(u[s].data),s>0&&u[s-1].tagStart==="dict"&&(u[s-1].data[u[s].key]=u[s].data)),u[s].tagContent="",u[s].tagStart="",u[s].tagEnd="")),u[s].tagEnd="",o=!1,a=!1)):(o&&(u[s].tagStart+=c),l&&(u[s].tagEnd+=c),a&&(u[s].tagContent+=c)),r++;return u[0].data}function u3(e){return typeof e=="string"&&!isNaN(e)&&!isNaN(parseFloat(e))}function H8(e){let t=e.split(`
30
+ `);for(let r=0;r<t.length;r++){if(t[r].indexOf(" = ")>=0){let i=t[r].split(" = ");if(i[0]=i[0].trim(),i[0].startsWith('"')||(i[0]='"'+i[0]+'"'),i[1]=i[1].trim(),i[1].indexOf('"')===-1&&i[1].endsWith(";")){let s=i[1].substring(0,i[1].length-1);u3(s)||(i[1]=`"${s}";`)}if(i[1].indexOf('"')>=0&&i[1].endsWith(";")){let s=i[1].substring(0,i[1].length-1).replace(/"/g,"");u3(s)&&(i[1]=`${s};`)}t[r]=i.join(" : ")}t[r]=t[r].replace(/\(/g,"[").replace(/\)/g,"]").replace(/;/g,",").trim(),t[r].startsWith("}")&&t[r-1]&&t[r-1].endsWith(",")&&(t[r-1]=t[r-1].substring(0,t[r-1].length-1))}e=t.join("");let n={};try{n=JSON.parse(e)}catch{}return n}function q8(e,t){let n=0,r=e.split("."),i=t.split(".");return r[0]<i[0]?n=1:r[0]>i[0]?n=-1:r[0]===i[0]&&r.length>=2&&i.length>=2&&(r[1]<i[1]?n=1:r[1]>i[1]?n=-1:r[1]===i[1]&&(r.length>=3&&i.length>=3?r[2]<i[2]?n=1:r[2]>i[2]&&(n=-1):i.length>=3&&(n=1))),n}function K8(){}Se.toInt=l8;Se.splitByNumber=u8;Se.execOptsWin=Af;Se.execOptsLinux=h3;Se.getCodepage=I8;Se.execWin=L8;Se.isFunction=p8;Se.unique=d8;Se.sortByKey=m8;Se.cores=h8;Se.getValue=ka;Se.decodeEscapeSequence=g8;Se.parseDateTime=w8;Se.parseHead=x8;Se.findObjectByKey=S8;Se.getWmic=w3;Se.wmic=_8;Se.darwinXcodeExists=N8;Se.getVboxmanage=C8;Se.powerShell=x3;Se.powerShellStart=b8;Se.powerShellRelease=O8;Se.execSafe=E8;Se.nanoSeconds=D8;Se.countUniqueLines=k8;Se.countLines=M8;Se.noop=K8;Se.isRaspberry=T8;Se.isRaspbian=A8;Se.sanitizeShellString=R8;Se.isPrototypePolluted=V8;Se.decodePiCpuinfo=S3;Se.getRpiGpu=U8;Se.promiseAll=F8;Se.promisify=W8;Se.promisifySave=z8;Se.smartMonToolsInstalled=P8;Se.linuxVersion=G8;Se.plistParser=$8;Se.plistReader=H8;Se.stringReplace=Jw;Se.stringToLower=Zw;Se.stringToString=g3;Se.stringSubstr=y3;Se.stringTrim=c8;Se.stringStartWith=f8;Se.mathMin=v3;Se.WINDIR=m3;Se.getFilesInPath=B8;Se.semverCompare=q8});var _3=oe(kf=>{"use strict";var Ph=K("fs"),Ra=K("os"),N=Pt(),vu=K("child_process").exec,yu=K("child_process").execSync,Ih=N.promisify(K("child_process").exec),Qs=process.platform,Th=Qs==="linux"||Qs==="android",Ah=Qs==="darwin",Lh=Qs==="win32",Lf=Qs==="freebsd",Nf=Qs==="openbsd",Df=Qs==="netbsd",Nh=Qs==="sunos";function Y8(e){return new Promise(t=>{process.nextTick(()=>{let n={manufacturer:"",model:"Computer",version:"",serial:"-",uuid:"-",sku:"-",virtual:!1};if((Th||Lf||Nf||Df)&&vu("export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL",function(r,i){let s=i.toString().split(`
31
+ `);n.manufacturer=N.getValue(s,"manufacturer"),n.model=N.getValue(s,"product name"),n.version=N.getValue(s,"version"),n.serial=N.getValue(s,"serial number"),n.uuid=N.getValue(s,"uuid").toLowerCase(),n.sku=N.getValue(s,"sku number");let o=`echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo;
32
+ echo -n "product_serial: "; cat /sys/devices/virtual/dmi/id/product_serial 2>/dev/null; echo;
33
+ echo -n "product_uuid: "; cat /sys/devices/virtual/dmi/id/product_uuid 2>/dev/null; echo;
34
+ echo -n "product_version: "; cat /sys/devices/virtual/dmi/id/product_version 2>/dev/null; echo;
35
+ echo -n "sys_vendor: "; cat /sys/devices/virtual/dmi/id/sys_vendor 2>/dev/null; echo;`;try{s=yu(o,N.execOptsLinux).toString().split(`
36
+ `),n.manufacturer=n.manufacturer===""?N.getValue(s,"sys_vendor"):n.manufacturer,n.model=n.model===""?N.getValue(s,"product_name"):n.model,n.version=n.version===""?N.getValue(s,"product_version"):n.version,n.serial=n.serial===""?N.getValue(s,"product_serial"):n.serial,n.uuid=n.uuid===""?N.getValue(s,"product_uuid").toLowerCase():n.uuid}catch{N.noop()}if((!n.serial||n.serial.toLowerCase().indexOf("o.e.m.")!==-1)&&(n.serial="-"),(!n.manufacturer||n.manufacturer.toLowerCase().indexOf("o.e.m.")!==-1)&&(n.manufacturer=""),(!n.model||n.model.toLowerCase().indexOf("o.e.m.")!==-1)&&(n.model="Computer"),(!n.version||n.version.toLowerCase().indexOf("o.e.m.")!==-1)&&(n.version=""),(!n.sku||n.sku.toLowerCase().indexOf("o.e.m.")!==-1)&&(n.sku="-"),n.model.toLowerCase()==="virtualbox"||n.model.toLowerCase()==="kvm"||n.model.toLowerCase()==="virtual machine"||n.model.toLowerCase()==="bochs"||n.model.toLowerCase().startsWith("vmware")||n.model.toLowerCase().startsWith("droplet"))switch(n.virtual=!0,n.model.toLowerCase()){case"virtualbox":n.virtualHost="VirtualBox";break;case"vmware":n.virtualHost="VMware";break;case"kvm":n.virtualHost="KVM";break;case"bochs":n.virtualHost="bochs";break}if(n.manufacturer.toLowerCase().startsWith("vmware")||n.manufacturer.toLowerCase()==="xen")switch(n.virtual=!0,n.manufacturer.toLowerCase()){case"vmware":n.virtualHost="VMware";break;case"xen":n.virtualHost="Xen";break}if(!n.virtual)try{let a=yu("ls -1 /dev/disk/by-id/ 2>/dev/null",N.execOptsLinux).toString();a.indexOf("_QEMU_")>=0&&(n.virtual=!0,n.virtualHost="QEMU"),a.indexOf("_VBOX_")>=0&&(n.virtual=!0,n.virtualHost="VirtualBox")}catch{N.noop()}if(!n.virtual&&(Ra.release().toLowerCase().indexOf("microsoft")>=0||Ra.release().toLowerCase().endsWith("wsl2"))){let a=parseFloat(Ra.release().toLowerCase());n.virtual=!0,n.manufacturer="Microsoft",n.model="WSL",n.version=a<4.19?"1":"2"}if((Lf||Nf||Df)&&!n.virtualHost)try{let l=yu("dmidecode -t 4",N.execOptsLinux).toString().split(`
37
+ `);switch(N.getValue(l,"manufacturer",":",!0).toLowerCase()){case"virtualbox":n.virtualHost="VirtualBox";break;case"vmware":n.virtualHost="VMware";break;case"kvm":n.virtualHost="KVM";break;case"bochs":n.virtualHost="bochs";break}}catch{N.noop()}(Ph.existsSync("/.dockerenv")||Ph.existsSync("/.dockerinit"))&&(n.model="Docker Container");try{let a=yu('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -viE "Nested Virtualization|/virtual/"');a.toString().split(`
38
+ `).length>0&&(n.model==="Computer"&&(n.model="Virtual machine"),n.virtual=!0,a.toString().toLowerCase().indexOf("vmware")>=0&&!n.virtualHost&&(n.virtualHost="VMware"),a.toString().toLowerCase().indexOf("qemu")>=0&&!n.virtualHost&&(n.virtualHost="QEMU"),a.toString().toLowerCase().indexOf("xen")>=0&&!n.virtualHost&&(n.virtualHost="Xen"),a.toString().toLowerCase().indexOf("kvm")>=0&&!n.virtualHost&&(n.virtualHost="KVM"))}catch{N.noop()}n.manufacturer===""&&n.model==="Computer"&&n.version===""?Ph.readFile("/proc/cpuinfo",function(a,l){if(!a){let u=l.toString().split(`
39
+ `);n.model=N.getValue(u,"hardware",":",!0).toUpperCase(),n.version=N.getValue(u,"revision",":",!0).toLowerCase(),n.serial=N.getValue(u,"serial",":",!0);let c=N.getValue(u,"model:",":",!0);if((n.model==="BCM2835"||n.model==="BCM2708"||n.model==="BCM2709"||n.model==="BCM2710"||n.model==="BCM2711"||n.model==="BCM2836"||n.model==="BCM2837")&&c.toLowerCase().indexOf("raspberry")>=0){let f=N.decodePiCpuinfo(u);n.model=f.model,n.version=f.revisionCode,n.manufacturer="Raspberry Pi Foundation",n.raspberry={manufacturer:f.manufacturer,processor:f.processor,type:f.type,revision:f.revision}}}e&&e(n),t(n)}):(e&&e(n),t(n))}),Ah&&vu("ioreg -c IOPlatformExpertDevice -d 2",function(r,i){if(!r){let s=i.toString().replace(/[<>"]/g,"").split(`
40
+ `),o=N.splitByNumber(N.getValue(s,"model","=",!0)),a=N.getValue(s,"version","=",!0);n.manufacturer=N.getValue(s,"manufacturer","=",!0),n.model=a?N.getValue(s,"model","=",!0):o[0],n.version=a||o[1],n.serial=N.getValue(s,"ioplatformserialnumber","=",!0),n.uuid=N.getValue(s,"ioplatformuuid","=",!0).toLowerCase(),n.sku=N.getValue(s,"board-id","=",!0)||N.getValue(s,"target-sub-type","=",!0)}e&&e(n),t(n)}),Nh&&(e&&e(n),t(n)),Lh)try{N.powerShell("Get-CimInstance Win32_ComputerSystemProduct | select Name,Vendor,Version,IdentifyingNumber,UUID | fl").then((r,i)=>{if(i)e&&e(n),t(n);else{let s=r.split(`\r
41
+ `);n.manufacturer=N.getValue(s,"vendor",":"),n.model=N.getValue(s,"name",":"),n.version=N.getValue(s,"version",":"),n.serial=N.getValue(s,"identifyingnumber",":"),n.uuid=N.getValue(s,"uuid",":").toLowerCase();let o=n.model.toLowerCase();(o==="virtualbox"||o==="kvm"||o==="virtual machine"||o==="bochs"||o.startsWith("vmware")||o.startsWith("qemu")||o.startsWith("parallels"))&&(n.virtual=!0,o.startsWith("virtualbox")&&(n.virtualHost="VirtualBox"),o.startsWith("vmware")&&(n.virtualHost="VMware"),o.startsWith("kvm")&&(n.virtualHost="KVM"),o.startsWith("bochs")&&(n.virtualHost="bochs"),o.startsWith("qemu")&&(n.virtualHost="KVM"),o.startsWith("parallels")&&(n.virtualHost="Parallels"));let a=n.manufacturer.toLowerCase();(a.startsWith("vmware")||a.startsWith("qemu")||a==="xen"||a.startsWith("parallels"))&&(n.virtual=!0,a.startsWith("vmware")&&(n.virtualHost="VMware"),a.startsWith("xen")&&(n.virtualHost="Xen"),a.startsWith("qemu")&&(n.virtualHost="KVM"),a.startsWith("parallels")&&(n.virtualHost="Parallels")),N.powerShell('Get-CimInstance MS_Systeminformation -Namespace "root/wmi" | select systemsku | fl ').then((l,u)=>{if(!u){let c=l.split(`\r
42
+ `);n.sku=N.getValue(c,"systemsku",":")}n.virtual?(e&&e(n),t(n)):N.powerShell("Get-CimInstance Win32_bios | select Version, SerialNumber, SMBIOSBIOSVersion").then((c,f)=>{if(f)e&&e(n),t(n);else{let p=c.toString();(p.indexOf("VRTUAL")>=0||p.indexOf("A M I ")>=0||p.indexOf("VirtualBox")>=0||p.indexOf("VMWare")>=0||p.indexOf("Xen")>=0||p.indexOf("Parallels")>=0)&&(n.virtual=!0,p.indexOf("VirtualBox")>=0&&!n.virtualHost&&(n.virtualHost="VirtualBox"),p.indexOf("VMware")>=0&&!n.virtualHost&&(n.virtualHost="VMware"),p.indexOf("Xen")>=0&&!n.virtualHost&&(n.virtualHost="Xen"),p.indexOf("VRTUAL")>=0&&!n.virtualHost&&(n.virtualHost="Hyper-V"),p.indexOf("A M I")>=0&&!n.virtualHost&&(n.virtualHost="Virtual PC"),p.indexOf("Parallels")>=0&&!n.virtualHost&&(n.virtualHost="Parallels")),e&&e(n),t(n)}})})}})}catch{e&&e(n),t(n)}})})}kf.system=Y8;function qe(e){let t=e.toLowerCase();return t.indexOf("o.e.m.")===-1&&t.indexOf("default string")===-1&&t!=="default"&&e||""}function X8(e){return new Promise(t=>{process.nextTick(()=>{let n={vendor:"",version:"",releaseDate:"",revision:""},r="";if((Th||Lf||Nf||Df)&&(process.arch==="arm"?r="cat /proc/cpuinfo | grep Serial":r="export LC_ALL=C; dmidecode -t bios 2>/dev/null; unset LC_ALL",vu(r,function(i,s){let o=s.toString().split(`
43
+ `);n.vendor=N.getValue(o,"Vendor"),n.version=N.getValue(o,"Version");let a=N.getValue(o,"Release Date");n.releaseDate=N.parseDateTime(a).date,n.revision=N.getValue(o,"BIOS Revision"),n.serial=N.getValue(o,"SerialNumber");let l=N.getValue(o,"Currently Installed Language").split("|")[0];if(l&&(n.language=l),o.length&&s.toString().indexOf("Characteristics:")>=0){let c=[];o.forEach(f=>{if(f.indexOf(" is supported")>=0){let p=f.split(" is supported")[0].trim();c.push(p)}}),n.features=c}let u=`echo -n "bios_date: "; cat /sys/devices/virtual/dmi/id/bios_date 2>/dev/null; echo;
44
+ echo -n "bios_vendor: "; cat /sys/devices/virtual/dmi/id/bios_vendor 2>/dev/null; echo;
45
+ echo -n "bios_version: "; cat /sys/devices/virtual/dmi/id/bios_version 2>/dev/null; echo;`;try{o=yu(u,N.execOptsLinux).toString().split(`
46
+ `),n.vendor=n.vendor?n.vendor:N.getValue(o,"bios_vendor"),n.version=n.version?n.version:N.getValue(o,"bios_version"),a=N.getValue(o,"bios_date"),n.releaseDate=n.releaseDate?n.releaseDate:N.parseDateTime(a).date}catch{N.noop()}e&&e(n),t(n)})),Ah&&(n.vendor="Apple Inc.",vu("system_profiler SPHardwareDataType -json",function(i,s){try{let o=JSON.parse(s.toString());if(o&&o.SPHardwareDataType&&o.SPHardwareDataType.length){let a=o.SPHardwareDataType[0].boot_rom_version;a=a?a.split("(")[0].trim():null,n.version=a}}catch{N.noop()}e&&e(n),t(n)})),Nh&&(n.vendor="Sun Microsystems",e&&e(n),t(n)),Lh)try{N.powerShell('Get-CimInstance Win32_bios | select Description,Version,Manufacturer,@{n="ReleaseDate";e={$_.ReleaseDate.ToString("yyyy-MM-dd")}},BuildNumber,SerialNumber,SMBIOSBIOSVersion | fl').then((i,s)=>{if(!s){let o=i.toString().split(`\r
47
+ `),a=N.getValue(o,"description",":"),l=N.getValue(o,"SMBIOSBIOSVersion",":");a.indexOf(" Version ")!==-1?(n.vendor=a.split(" Version ")[0].trim(),n.version=a.split(" Version ")[1].trim()):a.indexOf(" Ver: ")!==-1?(n.vendor=N.getValue(o,"manufacturer",":"),n.version=a.split(" Ver: ")[1].trim()):(n.vendor=N.getValue(o,"manufacturer",":"),n.version=l||N.getValue(o,"version",":")),n.releaseDate=N.getValue(o,"releasedate",":"),n.revision=N.getValue(o,"buildnumber",":"),n.serial=qe(N.getValue(o,"serialnumber",":"))}e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}kf.bios=X8;function J8(e){return new Promise(t=>{process.nextTick(()=>{let n={manufacturer:"",model:"",version:"",serial:"-",assetTag:"-",memMax:null,memSlots:null},r="";if(Th||Lf||Nf||Df){process.arch==="arm"?r="cat /proc/cpuinfo | grep Serial":r="export LC_ALL=C; dmidecode -t 2 2>/dev/null; unset LC_ALL";let i=[];i.push(Ih(r)),i.push(Ih("export LC_ALL=C; dmidecode -t memory 2>/dev/null")),N.promiseAll(i).then(s=>{let o=s.results[0]?s.results[0].toString().split(`
48
+ `):[""];n.manufacturer=qe(N.getValue(o,"Manufacturer")),n.model=qe(N.getValue(o,"Product Name")),n.version=qe(N.getValue(o,"Version")),n.serial=qe(N.getValue(o,"Serial Number")),n.assetTag=qe(N.getValue(o,"Asset Tag"));let a=`echo -n "board_asset_tag: "; cat /sys/devices/virtual/dmi/id/board_asset_tag 2>/dev/null; echo;
49
+ echo -n "board_name: "; cat /sys/devices/virtual/dmi/id/board_name 2>/dev/null; echo;
50
+ echo -n "board_serial: "; cat /sys/devices/virtual/dmi/id/board_serial 2>/dev/null; echo;
51
+ echo -n "board_vendor: "; cat /sys/devices/virtual/dmi/id/board_vendor 2>/dev/null; echo;
52
+ echo -n "board_version: "; cat /sys/devices/virtual/dmi/id/board_version 2>/dev/null; echo;`;try{o=yu(a,N.execOptsLinux).toString().split(`
53
+ `),n.manufacturer=qe(n.manufacturer?n.manufacturer:N.getValue(o,"board_vendor")),n.model=qe(n.model?n.model:N.getValue(o,"board_name")),n.version=qe(n.version?n.version:N.getValue(o,"board_version")),n.serial=qe(n.serial?n.serial:N.getValue(o,"board_serial")),n.assetTag=qe(n.assetTag?n.assetTag:N.getValue(o,"board_asset_tag"))}catch{N.noop()}o=s.results[1]?s.results[1].toString().split(`
54
+ `):[""],n.memMax=N.toInt(N.getValue(o,"Maximum Capacity"))*1024*1024*1024||null,n.memSlots=N.toInt(N.getValue(o,"Number Of Devices"))||null;let l="";try{l=Ph.readFileSync("/proc/cpuinfo").toString().split(`
55
+ `)}catch{N.noop()}if(l&&N.getValue(l,"hardware").startsWith("BCM")){let c=N.decodePiCpuinfo(l);n.manufacturer=c.manufacturer,n.model="Raspberry Pi",n.serial=c.serial,n.version=c.type+" - "+c.revision,n.memMax=Ra.totalmem(),n.memSlots=0}e&&e(n),t(n)})}if(Ah){let i=[];i.push(Ih("ioreg -c IOPlatformExpertDevice -d 2")),i.push(Ih("system_profiler SPMemoryDataType")),N.promiseAll(i).then(s=>{let o=s.results[0]?s.results[0].toString().replace(/[<>"]/g,"").split(`
56
+ `):[""];n.manufacturer=N.getValue(o,"manufacturer","=",!0),n.model=N.getValue(o,"model","=",!0),n.version=N.getValue(o,"version","=",!0),n.serial=N.getValue(o,"ioplatformserialnumber","=",!0),n.assetTag=N.getValue(o,"board-id","=",!0);let a=s.results[1]?s.results[1].toString().split(" BANK "):[""];a.length===1&&(a=s.results[1]?s.results[1].toString().split(" DIMM"):[""]),a.shift(),n.memSlots=a.length,Ra.arch()==="arm64"&&(n.memSlots=0,n.memMax=Ra.totalmem()),e&&e(n),t(n)})}if(Nh&&(e&&e(n),t(n)),Lh)try{let i=[],s=parseInt(Ra.release())>=10,o=s?"MaxCapacityEx":"MaxCapacity";i.push(N.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl")),i.push(N.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${o}, MemoryDevices | fl`)),N.promiseAll(i).then(a=>{let l=a.results[0]?a.results[0].toString().split(`\r
57
+ `):[""];n.manufacturer=qe(N.getValue(l,"manufacturer",":")),n.model=qe(N.getValue(l,"model",":")),n.model||(n.model=qe(N.getValue(l,"product",":"))),n.version=qe(N.getValue(l,"version",":")),n.serial=qe(N.getValue(l,"serialnumber",":")),n.assetTag=qe(N.getValue(l,"partnumber",":")),n.assetTag||(n.assetTag=qe(N.getValue(l,"sku",":"))),l=a.results[1]?a.results[1].toString().split(`\r
58
+ `):[""],n.memMax=N.toInt(N.getValue(l,o,":"))*(s?1024:1)||null,n.memSlots=N.toInt(N.getValue(l,"MemoryDevices",":"))||null,e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}kf.baseboard=J8;function Z8(e){return e=e.toLowerCase(),e.startsWith("macbookair")?"Notebook":e.startsWith("macbookpro")?"Laptop":e.startsWith("macbook")?"Notebook":e.startsWith("macmini")||e.startsWith("imac")||e.startsWith("macstudio")?"Desktop":e.startsWith("macpro")?"Tower":"Other"}function Q8(e){let t=["Other","Unknown","Desktop","Low Profile Desktop","Pizza Box","Mini Tower","Tower","Portable","Laptop","Notebook","Hand Held","Docking Station","All in One","Sub Notebook","Space-Saving","Lunch Box","Main System Chassis","Expansion Chassis","SubChassis","Bus Expansion Chassis","Peripheral Chassis","Storage Chassis","Rack Mount Chassis","Sealed-Case PC","Multi-System Chassis","Compact PCI","Advanced TCA","Blade","Blade Enclosure","Tablet","Convertible","Detachable","IoT Gateway ","Embedded PC","Mini PC","Stick PC"];return new Promise(n=>{process.nextTick(()=>{let r={manufacturer:"",model:"",type:"",version:"",serial:"-",assetTag:"-",sku:""};if((Th||Lf||Nf||Df)&&vu(`echo -n "chassis_asset_tag: "; cat /sys/devices/virtual/dmi/id/chassis_asset_tag 2>/dev/null; echo;
59
+ echo -n "chassis_serial: "; cat /sys/devices/virtual/dmi/id/chassis_serial 2>/dev/null; echo;
60
+ echo -n "chassis_type: "; cat /sys/devices/virtual/dmi/id/chassis_type 2>/dev/null; echo;
61
+ echo -n "chassis_vendor: "; cat /sys/devices/virtual/dmi/id/chassis_vendor 2>/dev/null; echo;
62
+ echo -n "chassis_version: "; cat /sys/devices/virtual/dmi/id/chassis_version 2>/dev/null; echo;`,function(s,o){let a=o.toString().split(`
63
+ `);r.manufacturer=qe(N.getValue(a,"chassis_vendor"));let l=parseInt(N.getValue(a,"chassis_type").replace(/\D/g,""));r.type=qe(l&&!isNaN(l)&&l<t.length?t[l-1]:""),r.version=qe(N.getValue(a,"chassis_version")),r.serial=qe(N.getValue(a,"chassis_serial")),r.assetTag=qe(N.getValue(a,"chassis_asset_tag")),e&&e(r),n(r)}),Ah&&vu("ioreg -c IOPlatformExpertDevice -d 2",function(i,s){if(!i){let o=s.toString().replace(/[<>"]/g,"").split(`
64
+ `),a=N.getValue(o,"model","=",!0),l=N.splitByNumber(a),u=N.getValue(o,"version","=",!0);r.manufacturer=N.getValue(o,"manufacturer","=",!0),r.model=u?N.getValue(o,"model","=",!0):l[0],r.type=Z8(r.model),r.version=u||a,r.serial=N.getValue(o,"ioplatformserialnumber","=",!0),r.assetTag=N.getValue(o,"board-id","=",!0)||N.getValue(o,"target-type","=",!0),r.sku=N.getValue(o,"target-sub-type","=",!0)}e&&e(r),n(r)}),Nh&&(e&&e(r),n(r)),Lh)try{N.powerShell("Get-CimInstance Win32_SystemEnclosure | select Model,Manufacturer,ChassisTypes,Version,SerialNumber,PartNumber,SKU,SMBIOSAssetTag | fl").then((i,s)=>{if(!s){let o=i.toString().split(`\r
65
+ `);r.manufacturer=qe(N.getValue(o,"manufacturer",":")),r.model=qe(N.getValue(o,"model",":"));let a=parseInt(N.getValue(o,"ChassisTypes",":").replace(/\D/g,""));r.type=a&&!isNaN(a)&&a<t.length?t[a-1]:"",r.version=qe(N.getValue(o,"version",":")),r.serial=qe(N.getValue(o,"serialnumber",":")),r.assetTag=qe(N.getValue(o,"partnumber",":")),r.assetTag||(r.assetTag=qe(N.getValue(o,"SMBIOSAssetTag",":"))),r.sku=qe(N.getValue(o,"sku",":"))}e&&e(r),n(r)})}catch{e&&e(r),n(r)}})})}kf.chassis=Q8});var b3=oe(wu=>{"use strict";var bi=K("os"),_r=K("fs"),ye=Pt(),_e=K("child_process").exec,Rf=K("child_process").execSync,ei=process.platform,Vf=ei==="linux"||ei==="android",Qr=ei==="darwin",Cr=ei==="win32",ix=ei==="freebsd",sx=ei==="openbsd",ox=ei==="netbsd",e9=ei==="sunos";function t9(){let e=new Date().toString().split(" ");return{current:Date.now(),uptime:bi.uptime(),timezone:e.length>=7?e[5]:"",timezoneName:Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:e.length>=7?e.slice(6).join(" ").replace(/\(/g,"").replace(/\)/g,""):""}}wu.time=t9;function Mf(e){e=e||"",e=e.toLowerCase();let t=ei;return Cr?t="windows":e.indexOf("mac os")!==-1?t="apple":e.indexOf("arch")!==-1?t="arch":e.indexOf("centos")!==-1?t="centos":e.indexOf("coreos")!==-1?t="coreos":e.indexOf("debian")!==-1?t="debian":e.indexOf("deepin")!==-1?t="deepin":e.indexOf("elementary")!==-1?t="elementary":e.indexOf("fedora")!==-1?t="fedora":e.indexOf("gentoo")!==-1?t="gentoo":e.indexOf("mageia")!==-1?t="mageia":e.indexOf("mandriva")!==-1?t="mandriva":e.indexOf("manjaro")!==-1?t="manjaro":e.indexOf("mint")!==-1?t="mint":e.indexOf("mx")!==-1?t="mx":e.indexOf("openbsd")!==-1?t="openbsd":e.indexOf("freebsd")!==-1?t="freebsd":e.indexOf("opensuse")!==-1?t="opensuse":e.indexOf("pclinuxos")!==-1?t="pclinuxos":e.indexOf("puppy")!==-1?t="puppy":e.indexOf("raspbian")!==-1?t="raspbian":e.indexOf("reactos")!==-1?t="reactos":e.indexOf("redhat")!==-1?t="redhat":e.indexOf("slackware")!==-1?t="slackware":e.indexOf("sugar")!==-1?t="sugar":e.indexOf("steam")!==-1?t="steam":e.indexOf("suse")!==-1?t="suse":e.indexOf("mate")!==-1?t="ubuntu-mate":e.indexOf("lubuntu")!==-1?t="lubuntu":e.indexOf("xubuntu")!==-1?t="xubuntu":e.indexOf("ubuntu")!==-1?t="ubuntu":e.indexOf("solaris")!==-1?t="solaris":e.indexOf("tails")!==-1?t="tails":e.indexOf("feren")!==-1?t="ferenos":e.indexOf("robolinux")!==-1?t="robolinux":Vf&&e&&(t=e.toLowerCase().trim().replace(/\s+/g,"-")),t}function n9(){let e=bi.hostname;if(Vf||Qr)try{let t=Rf("hostnamectl --json short 2>/dev/null",ye.execOptsLinux);e=JSON.parse(t.toString()).StaticHostname}catch{try{e=Rf("hostname -f 2>/dev/null",ye.execOptsLinux).toString().split(bi.EOL)[0]}catch{ye.noop()}}if(ix||sx||ox)try{e=Rf("hostname 2>/dev/null").toString().split(bi.EOL)[0]}catch{ye.noop()}if(Cr)try{e=Rf("echo %COMPUTERNAME%.%USERDNSDOMAIN%",ye.execOptsWin).toString().replace(".%USERDNSDOMAIN%","").split(bi.EOL)[0]}catch{ye.noop()}return e}function r9(e){return new Promise(t=>{process.nextTick(()=>{let n={platform:ei==="win32"?"Windows":ei,distro:"unknown",release:"unknown",codename:"",kernel:bi.release(),arch:bi.arch(),hostname:bi.hostname(),fqdn:n9(),codepage:"",logofile:"",serial:"",build:"",servicepack:"",uefi:!1};if(Vf&&_e("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release",function(r,i){let s={};i.toString().split(`
66
+ `).forEach(function(c){c.indexOf("=")!==-1&&(s[c.split("=")[0].trim().toUpperCase()]=c.split("=")[1].trim())}),n.distro=(s.DISTRIB_ID||s.NAME||"unknown").replace(/"/g,""),n.logofile=Mf(n.distro);let a=(s.VERSION||"").replace(/"/g,""),l=(s.DISTRIB_CODENAME||s.VERSION_CODENAME||"").replace(/"/g,""),u=(s.PRETTY_NAME||"").replace(/"/g,"");u.indexOf(n.distro+" ")===0&&(a=u.replace(n.distro+" ","").trim()),a.indexOf("(")>=0&&(l=a.split("(")[1].replace(/[()]/g,"").trim(),a=a.split("(")[0].trim()),n.release=(a||s.DISTRIB_RELEASE||s.VERSION_ID||"unknown").replace(/"/g,""),n.codename=l,n.codepage=ye.getCodepage(),n.build=(s.BUILD_ID||"").replace(/"/g,"").trim(),i9().then(c=>{n.uefi=c,C3().then(f=>{n.serial=f.os,e&&e(n),t(n)})})}),(ix||sx||ox)&&_e("sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod kern.geom.confxml",function(r,i){let s=i.toString().split(`
67
+ `),o=ye.getValue(s,"kern.ostype"),a=Mf(o),l=ye.getValue(s,"kern.osrelease").split("-")[0],u=ye.getValue(s,"kern.uuid"),c=ye.getValue(s,"machdep.bootmethod"),f=i.toString().indexOf("<type>efi</type>")>=0,p=c?c.toLowerCase().indexOf("uefi")>=0:f||null;n.distro=o||n.distro,n.logofile=a||n.logofile,n.release=l||n.release,n.serial=u||n.serial,n.codename="",n.codepage=ye.getCodepage(),n.uefi=p||null,e&&e(n),t(n)}),Qr&&_e("sw_vers; sysctl kern.ostype kern.osrelease kern.osrevision kern.uuid",function(r,i){let s=i.toString().split(`
68
+ `);n.serial=ye.getValue(s,"kern.uuid"),n.distro=ye.getValue(s,"ProductName"),n.release=(ye.getValue(s,"ProductVersion",":",!0,!0)+" "+ye.getValue(s,"ProductVersionExtra",":",!0,!0)).trim(),n.build=ye.getValue(s,"BuildVersion"),n.logofile=Mf(n.distro),n.codename="macOS",n.codename=n.release.indexOf("10.4")>-1?"Mac OS X Tiger":n.codename,n.codename=n.release.indexOf("10.5")>-1?"Mac OS X Leopard":n.codename,n.codename=n.release.indexOf("10.6")>-1?"Mac OS X Snow Leopard":n.codename,n.codename=n.release.indexOf("10.7")>-1?"Mac OS X Lion":n.codename,n.codename=n.release.indexOf("10.8")>-1?"OS X Mountain Lion":n.codename,n.codename=n.release.indexOf("10.9")>-1?"OS X Mavericks":n.codename,n.codename=n.release.indexOf("10.10")>-1?"OS X Yosemite":n.codename,n.codename=n.release.indexOf("10.11")>-1?"OS X El Capitan":n.codename,n.codename=n.release.indexOf("10.12")>-1?"macOS Sierra":n.codename,n.codename=n.release.indexOf("10.13")>-1?"macOS High Sierra":n.codename,n.codename=n.release.indexOf("10.14")>-1?"macOS Mojave":n.codename,n.codename=n.release.indexOf("10.15")>-1?"macOS Catalina":n.codename,n.codename=n.release.startsWith("11.")?"macOS Big Sur":n.codename,n.codename=n.release.startsWith("12.")?"macOS Monterey":n.codename,n.codename=n.release.startsWith("13.")?"macOS Ventura":n.codename,n.codename=n.release.startsWith("14.")?"macOS Sonoma":n.codename,n.codename=n.release.startsWith("15.")?"macOS Sequoia":n.codename,n.uefi=!0,n.codepage=ye.getCodepage(),e&&e(n),t(n)}),e9&&(n.release=n.kernel,_e("uname -o",function(r,i){let s=i.toString().split(`
69
+ `);n.distro=s[0],n.logofile=Mf(n.distro),e&&e(n),t(n)})),Cr){n.logofile=Mf(),n.release=n.kernel;try{let r=[];r.push(ye.powerShell("Get-CimInstance Win32_OperatingSystem | select Caption,SerialNumber,BuildNumber,ServicePackMajorVersion,ServicePackMinorVersion | fl")),r.push(ye.powerShell("(Get-CimInstance Win32_ComputerSystem).HypervisorPresent")),r.push(ye.powerShell("Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SystemInformation]::TerminalServerSession")),ye.promiseAll(r).then(i=>{let s=i.results[0]?i.results[0].toString().split(`\r
70
+ `):[""];n.distro=ye.getValue(s,"Caption",":").trim(),n.serial=ye.getValue(s,"SerialNumber",":").trim(),n.build=ye.getValue(s,"BuildNumber",":").trim(),n.servicepack=ye.getValue(s,"ServicePackMajorVersion",":").trim()+"."+ye.getValue(s,"ServicePackMinorVersion",":").trim(),n.codepage=ye.getCodepage();let o=i.results[1]?i.results[1].toString().toLowerCase():"";n.hypervisor=o.indexOf("true")!==-1;let a=i.results[2]?i.results[2].toString():"";n.remoteSession=a.toString().toLowerCase().indexOf("true")>=0,s9().then(l=>{n.uefi=l,e&&e(n),t(n)})})}catch{e&&e(n),t(n)}}})})}wu.osInfo=r9;function i9(){return new Promise(e=>{process.nextTick(()=>{_r.stat("/sys/firmware/efi",function(t){if(t)_e('dmesg | grep -E "EFI v"',function(n,r){if(!n){let i=r.toString().split(`
71
+ `);return e(i.length>0)}return e(!1)});else return e(!0)})})})}function s9(){return new Promise(e=>{process.nextTick(()=>{try{_e('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"',ye.execOptsWin,function(t,n){if(t)_e("echo %firmware_type%",ye.execOptsWin,function(r,i){if(r)return e(!1);{let s=i.toString()||"";return e(s.toLowerCase().indexOf("efi")>=0)}});else{let r=n.toString().split(`
72
+ \r`)[0];return e(r.toLowerCase().indexOf("efi")>=0)}})}catch{return e(!1)}})})}function o9(e,t){let n={kernel:bi.release(),openssl:"",systemOpenssl:"",systemOpensslLib:"",node:process.versions.node,v8:process.versions.v8,npm:"",yarn:"",pm2:"",gulp:"",grunt:"",git:"",tsc:"",mysql:"",redis:"",mongodb:"",apache:"",nginx:"",php:"",docker:"",postfix:"",postgresql:"",perl:"",python:"",python3:"",pip:"",pip3:"",java:"",gcc:"",virtualbox:"",bash:"",zsh:"",fish:"",powershell:"",dotnet:""};function r(i){if(i==="*")return{versions:n,counter:30};if(!Array.isArray(i)){i=i.trim().toLowerCase().replace(/,+/g,"|").replace(/ /g,"|"),i=i.split("|");let s={versions:{},counter:0};return i.forEach(o=>{if(o)for(let a in n)({}).hasOwnProperty.call(n,a)&&a.toLowerCase()===o.toLowerCase()&&!{}.hasOwnProperty.call(s.versions,a)&&(s.versions[a]=n[a],a==="openssl"&&(s.versions.systemOpenssl="",s.versions.systemOpensslLib=""),s.versions[a]||s.counter++)}),s}}return new Promise(i=>{process.nextTick(()=>{if(ye.isFunction(e)&&!t)t=e,e="*";else if(e=e||"*",typeof e!="string")return t&&t({}),i({});let s=r(e),o=s.counter,a=function(){return function(){--o===0&&(t&&t(s.versions),i(s.versions))}}(),l="";try{if({}.hasOwnProperty.call(s.versions,"openssl")&&(s.versions.openssl=process.versions.openssl,_e("openssl version",function(u,c){if(!u){let p=c.toString().split(`
73
+ `)[0].trim().split(" ");s.versions.systemOpenssl=p.length>0?p[1]:p[0],s.versions.systemOpensslLib=p.length>0?p[0]:"openssl"}a()})),{}.hasOwnProperty.call(s.versions,"npm")&&_e("npm -v",function(u,c){u||(s.versions.npm=c.toString().split(`
74
+ `)[0]),a()}),{}.hasOwnProperty.call(s.versions,"pm2")&&(l="pm2",Cr&&(l+=".cmd"),_e(`${l} -v`,function(u,c){if(!u){let f=c.toString().split(`
75
+ `)[0].trim();f.startsWith("[PM2]")||(s.versions.pm2=f)}a()})),{}.hasOwnProperty.call(s.versions,"yarn")&&_e("yarn --version",function(u,c){u||(s.versions.yarn=c.toString().split(`
76
+ `)[0]),a()}),{}.hasOwnProperty.call(s.versions,"gulp")&&(l="gulp",Cr&&(l+=".cmd"),_e(`${l} --version`,function(u,c){if(!u){let f=c.toString().split(`
77
+ `)[0]||"";s.versions.gulp=(f.toLowerCase().split("version")[1]||"").trim()}a()})),{}.hasOwnProperty.call(s.versions,"tsc")&&(l="tsc",Cr&&(l+=".cmd"),_e(`${l} --version`,function(u,c){if(!u){let f=c.toString().split(`
78
+ `)[0]||"";s.versions.tsc=(f.toLowerCase().split("version")[1]||"").trim()}a()})),{}.hasOwnProperty.call(s.versions,"grunt")&&(l="grunt",Cr&&(l+=".cmd"),_e(`${l} --version`,function(u,c){if(!u){let f=c.toString().split(`
79
+ `)[0]||"";s.versions.grunt=(f.toLowerCase().split("cli v")[1]||"").trim()}a()})),{}.hasOwnProperty.call(s.versions,"git"))if(Qr){let u=_r.existsSync("/usr/local/Cellar/git")||_r.existsSync("/opt/homebrew/bin/git");ye.darwinXcodeExists()||u?_e("git --version",function(c,f){if(!c){let p=f.toString().split(`
80
+ `)[0]||"";p=(p.toLowerCase().split("version")[1]||"").trim(),s.versions.git=(p.split(" ")[0]||"").trim()}a()}):a()}else _e("git --version",function(u,c){if(!u){let f=c.toString().split(`
81
+ `)[0]||"";f=(f.toLowerCase().split("version")[1]||"").trim(),s.versions.git=(f.split(" ")[0]||"").trim()}a()});if({}.hasOwnProperty.call(s.versions,"apache")&&_e("apachectl -v 2>&1",function(u,c){if(!u){let f=(c.toString().split(`
82
+ `)[0]||"").split(":");s.versions.apache=f.length>1?f[1].replace("Apache","").replace("/","").split("(")[0].trim():""}a()}),{}.hasOwnProperty.call(s.versions,"nginx")&&_e("nginx -v 2>&1",function(u,c){if(!u){let f=c.toString().split(`
83
+ `)[0]||"";s.versions.nginx=(f.toLowerCase().split("/")[1]||"").trim()}a()}),{}.hasOwnProperty.call(s.versions,"mysql")&&_e("mysql -V",function(u,c){if(!u){let f=c.toString().split(`
84
+ `)[0]||"";if(f=f.toLowerCase(),f.indexOf(",")>-1){f=(f.split(",")[0]||"").trim();let p=f.split(" ");s.versions.mysql=(p[p.length-1]||"").trim()}else f.indexOf(" ver ")>-1&&(f=f.split(" ver ")[1],s.versions.mysql=f.split(" ")[0])}a()}),{}.hasOwnProperty.call(s.versions,"php")&&_e("php -v",function(u,c){if(!u){let p=(c.toString().split(`
85
+ `)[0]||"").split("(");p[0].indexOf("-")&&(p=p[0].split("-")),s.versions.php=p[0].replace(/[^0-9.]/g,"")}a()}),{}.hasOwnProperty.call(s.versions,"redis")&&_e("redis-server --version",function(u,c){if(!u){let p=(c.toString().split(`
86
+ `)[0]||"").split(" ");s.versions.redis=ye.getValue(p,"v","=",!0)}a()}),{}.hasOwnProperty.call(s.versions,"docker")&&_e("docker --version",function(u,c){if(!u){let p=(c.toString().split(`
87
+ `)[0]||"").split(" ");s.versions.docker=p.length>2&&p[2].endsWith(",")?p[2].slice(0,-1):""}a()}),{}.hasOwnProperty.call(s.versions,"postfix")&&_e("postconf -d | grep mail_version",function(u,c){if(!u){let f=c.toString().split(`
88
+ `)||[];s.versions.postfix=ye.getValue(f,"mail_version","=",!0)}a()}),{}.hasOwnProperty.call(s.versions,"mongodb")&&_e("mongod --version",function(u,c){if(!u){let f=c.toString().split(`
89
+ `)[0]||"";s.versions.mongodb=(f.toLowerCase().split(",")[0]||"").replace(/[^0-9.]/g,"")}a()}),{}.hasOwnProperty.call(s.versions,"postgresql")&&(Vf?_e("locate bin/postgres",function(u,c){if(u)_e("psql -V",function(f,p){if(!f){let d=p.toString().split(`
90
+ `)[0].split(" ")||[];s.versions.postgresql=d.length?d[d.length-1]:"",s.versions.postgresql=s.versions.postgresql.split("-")[0]}a()});else{let f=c.toString().split(`
91
+ `).sort();f.length?_e(f[f.length-1]+" -V",function(p,d){if(!p){let m=d.toString().split(`
92
+ `)[0].split(" ")||[];s.versions.postgresql=m.length?m[m.length-1]:""}a()}):a()}}):Cr?ye.powerShell("Get-CimInstance Win32_Service | select caption | fl").then(u=>{u.split(/\n\s*\n/).forEach(f=>{if(f.trim()!==""){let p=f.trim().split(`\r
93
+ `),d=ye.getValue(p,"caption",":",!0).toLowerCase();if(d.indexOf("postgresql")>-1){let m=d.split(" server ");m.length>1&&(s.versions.postgresql=m[1])}}}),a()}):_e("postgres -V",function(u,c){if(!u){let f=c.toString().split(`
94
+ `)[0].split(" ")||[];s.versions.postgresql=f.length?f[f.length-1]:""}a()})),{}.hasOwnProperty.call(s.versions,"perl")&&_e("perl -v",function(u,c){if(!u){let f=c.toString().split(`
95
+ `)||"";for(;f.length>0&&f[0].trim()==="";)f.shift();f.length>0&&(s.versions.perl=f[0].split("(").pop().split(")")[0].replace("v",""))}a()}),{}.hasOwnProperty.call(s.versions,"python"))if(Qr)try{let c=Rf("sw_vers").toString().split(`
96
+ `),f=ye.getValue(c,"ProductVersion",":"),p=_r.existsSync("/usr/local/Cellar/python"),d=_r.existsSync("/opt/homebrew/bin/python");ye.darwinXcodeExists()&&ye.semverCompare("12.0.1",f)<0||p||d?_e(p?"/usr/local/Cellar/python -V 2>&1":d?"/opt/homebrew/bin/python -V 2>&1":"python -V 2>&1",function(y,v){if(!y){let h=v.toString().split(`
97
+ `)[0]||"";s.versions.python=h.toLowerCase().replace("python","").trim()}a()}):a()}catch{a()}else _e("python -V 2>&1",function(u,c){if(!u){let f=c.toString().split(`
98
+ `)[0]||"";s.versions.python=f.toLowerCase().replace("python","").trim()}a()});if({}.hasOwnProperty.call(s.versions,"python3"))if(Qr){let u=_r.existsSync("/usr/local/Cellar/python3")||_r.existsSync("/opt/homebrew/bin/python3");ye.darwinXcodeExists()||u?_e("python3 -V 2>&1",function(c,f){if(!c){let p=f.toString().split(`
99
+ `)[0]||"";s.versions.python3=p.toLowerCase().replace("python","").trim()}a()}):a()}else _e("python3 -V 2>&1",function(u,c){if(!u){let f=c.toString().split(`
100
+ `)[0]||"";s.versions.python3=f.toLowerCase().replace("python","").trim()}a()});if({}.hasOwnProperty.call(s.versions,"pip"))if(Qr){let u=_r.existsSync("/usr/local/Cellar/pip")||_r.existsSync("/opt/homebrew/bin/pip");ye.darwinXcodeExists()||u?_e("pip -V 2>&1",function(c,f){if(!c){let d=(f.toString().split(`
101
+ `)[0]||"").split(" ");s.versions.pip=d.length>=2?d[1]:""}a()}):a()}else _e("pip -V 2>&1",function(u,c){if(!u){let p=(c.toString().split(`
102
+ `)[0]||"").split(" ");s.versions.pip=p.length>=2?p[1]:""}a()});if({}.hasOwnProperty.call(s.versions,"pip3"))if(Qr){let u=_r.existsSync("/usr/local/Cellar/pip3")||_r.existsSync("/opt/homebrew/bin/pip3");ye.darwinXcodeExists()||u?_e("pip3 -V 2>&1",function(c,f){if(!c){let d=(f.toString().split(`
103
+ `)[0]||"").split(" ");s.versions.pip3=d.length>=2?d[1]:""}a()}):a()}else _e("pip3 -V 2>&1",function(u,c){if(!u){let p=(c.toString().split(`
104
+ `)[0]||"").split(" ");s.versions.pip3=p.length>=2?p[1]:""}a()});({}).hasOwnProperty.call(s.versions,"java")&&(Qr?_e("/usr/libexec/java_home -V 2>&1",function(u,c){!u&&c.toString().toLowerCase().indexOf("no java runtime")===-1?_e("java -version 2>&1",function(f,p){if(!f){let m=(p.toString().split(`
105
+ `)[0]||"").split('"');s.versions.java=m.length===3?m[1].trim():""}a()}):a()}):_e("java -version 2>&1",function(u,c){if(!u){let p=(c.toString().split(`
106
+ `)[0]||"").split('"');s.versions.java=p.length===3?p[1].trim():""}a()})),{}.hasOwnProperty.call(s.versions,"gcc")&&(Qr&&ye.darwinXcodeExists()||!Qr?_e("gcc -dumpversion",function(u,c){u||(s.versions.gcc=c.toString().split(`
107
+ `)[0].trim()||""),s.versions.gcc.indexOf(".")>-1?a():_e("gcc --version",function(f,p){if(!f){let d=p.toString().split(`
108
+ `)[0].trim();if(d.indexOf("gcc")>-1&&d.indexOf(")")>-1){let m=d.split(")");s.versions.gcc=m[1].trim()||s.versions.gcc}}a()})}):a()),{}.hasOwnProperty.call(s.versions,"virtualbox")&&_e(ye.getVboxmanage()+" -v 2>&1",function(u,c){if(!u){let p=(c.toString().split(`
109
+ `)[0]||"").split("r");s.versions.virtualbox=p[0]}a()}),{}.hasOwnProperty.call(s.versions,"bash")&&_e("bash --version",function(u,c){if(!u){let p=c.toString().split(`
110
+ `)[0].split(" version ");p.length>1&&(s.versions.bash=p[1].split(" ")[0].split("(")[0])}a()}),{}.hasOwnProperty.call(s.versions,"zsh")&&_e("zsh --version",function(u,c){if(!u){let p=c.toString().split(`
111
+ `)[0].split("zsh ");p.length>1&&(s.versions.zsh=p[1].split(" ")[0])}a()}),{}.hasOwnProperty.call(s.versions,"fish")&&_e("fish --version",function(u,c){if(!u){let p=c.toString().split(`
112
+ `)[0].split(" version ");p.length>1&&(s.versions.fish=p[1].split(" ")[0])}a()}),{}.hasOwnProperty.call(s.versions,"powershell")&&(Cr?ye.powerShell("$PSVersionTable").then(u=>{let c=u.toString().split(`
113
+ `).map(f=>f.replace(/ +/g," ").replace(/ +/g,":"));s.versions.powershell=ye.getValue(c,"psversion"),a()}):a()),{}.hasOwnProperty.call(s.versions,"dotnet")&&(Cr?ye.powerShell('gci "HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP" -recurse | gp -name Version,Release -EA 0 | where { $_.PSChildName -match "^(?!S)\\p{L}"} | select PSChildName, Version, Release').then(u=>{let c=u.toString().split(`\r
114
+ `),f="";c.forEach(p=>{p=p.replace(/ +/g," ");let d=p.split(" ");f=f||(d[0].toLowerCase().startsWith("client")&&d.length>2||d[0].toLowerCase().startsWith("full")&&d.length>2?d[1].trim():"")}),s.versions.dotnet=f.trim(),a()}):a())}catch{t&&t(s.versions),i(s.versions)}})})}wu.versions=o9;function a9(e){return new Promise(t=>{process.nextTick(()=>{if(Cr)t("cmd");else{let n="";_e("echo $SHELL",function(r,i){r||(n=i.toString().split(`
115
+ `)[0]),e&&e(n),t(n)})}})})}wu.shell=a9;function l9(){let e=[];try{let t=bi.networkInterfaces();for(let n in t)({}).hasOwnProperty.call(t,n)&&t[n].forEach(function(r){if(r&&r.mac&&r.mac!=="00:00:00:00:00:00"){let i=r.mac.toLowerCase();e.indexOf(i)===-1&&e.push(i)}});e=e.sort(function(n,r){return n<r?-1:n>r?1:0})}catch{e.push("00:00:00:00:00:00")}return e}function C3(e){return new Promise(t=>{process.nextTick(()=>{let n={os:"",hardware:"",macs:l9()},r;if(Qr&&_e("system_profiler SPHardwareDataType -json",function(i,s){if(!i)try{let o=JSON.parse(s.toString());if(o.SPHardwareDataType&&o.SPHardwareDataType.length>0){let a=o.SPHardwareDataType[0];n.os=a.platform_UUID.toLowerCase(),n.hardware=a.serial_number}}catch{ye.noop()}e&&e(n),t(n)}),Vf&&_e(`echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null ||
116
+ cat /etc/machine-id 2> /dev/null; echo;
117
+ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`,function(s,o){let a=o.toString().split(`
118
+ `);if(n.os=ye.getValue(a,"os").toLowerCase(),n.hardware=ye.getValue(a,"hardware").toLowerCase(),!n.hardware){let l=_r.readFileSync("/proc/cpuinfo",{encoding:"utf8"}).toString().split(`
119
+ `),u=ye.getValue(l,"serial");n.hardware=u||""}e&&e(n),t(n)}),(ix||sx||ox)&&_e("sysctl -i kern.hostid kern.hostuuid",function(i,s){let o=s.toString().split(`
120
+ `);n.os=ye.getValue(o,"kern.hostid",":").toLowerCase(),n.hardware=ye.getValue(o,"kern.hostuuid",":").toLowerCase(),n.os.indexOf("unknown")>=0&&(n.os=""),n.hardware.indexOf("unknown")>=0&&(n.hardware=""),e&&e(n),t(n)}),Cr){let i="%windir%\\System32";process.arch==="ia32"&&Object.prototype.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")&&(i="%windir%\\sysnative\\cmd.exe /c %windir%\\System32"),ye.powerShell("Get-CimInstance Win32_ComputerSystemProduct | select UUID | fl").then(s=>{let o=s.split(`\r
121
+ `);n.hardware=ye.getValue(o,"uuid",":").toLowerCase(),_e(`${i}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`,ye.execOptsWin,function(a,l){r=l.toString().split(`
122
+ \r`)[0].split("REG_SZ"),n.os=r.length>1?r[1].replace(/\r+|\n+|\s+/ig,"").toLowerCase():"",e&&e(n),t(n)})})}})})}wu.uuid=C3});var A3=oe(to=>{"use strict";var ti=K("os"),Sn=K("child_process").exec,px=K("child_process").execSync,kh=K("fs"),J=Pt(),eo=process.platform,jf=eo==="linux"||eo==="android",Mh=eo==="darwin",Rh=eo==="win32",Vh=eo==="freebsd",jh=eo==="openbsd",Bh=eo==="netbsd",Uh=eo==="sunos",xu=0,je={user:0,nice:0,system:0,idle:0,irq:0,steal:0,guest:0,load:0,tick:0,ms:0,currentLoad:0,currentLoadUser:0,currentLoadSystem:0,currentLoadNice:0,currentLoadIdle:0,currentLoadIrq:0,currentLoadSteal:0,currentLoadGuest:0,rawCurrentLoad:0,rawCurrentLoadUser:0,rawCurrentLoadSystem:0,rawCurrentLoadNice:0,rawCurrentLoadIdle:0,rawCurrentLoadIrq:0,rawCurrentLoadSteal:0,rawCurrentLoadGuest:0},R=[],ax=0,lx={8346:"1.8",8347:"1.9",8350:"2.0",8354:"2.2","8356|SE":"2.4",8356:"2.3",8360:"2.5",2372:"2.1",2373:"2.1",2374:"2.2",2376:"2.3",2377:"2.3",2378:"2.4",2379:"2.4",2380:"2.5",2381:"2.5",2382:"2.6",2384:"2.7",2386:"2.8",2387:"2.8",2389:"2.9",2393:"3.1",8374:"2.2",8376:"2.3",8378:"2.4",8379:"2.4",8380:"2.5",8381:"2.5",8382:"2.6",8384:"2.7",8386:"2.8",8387:"2.8",8389:"2.9",8393:"3.1","2419EE":"1.8","2423HE":"2.0","2425HE":"2.1",2427:"2.2",2431:"2.4",2435:"2.6","2439SE":"2.8","8425HE":"2.1",8431:"2.4",8435:"2.6","8439SE":"2.8",4122:"2.2",4130:"2.6","4162EE":"1.7","4164EE":"1.8","4170HE":"2.1","4174HE":"2.3","4176HE":"2.4",4180:"2.6",4184:"2.8","6124HE":"1.8","6128HE":"2.0","6132HE":"2.2",6128:"2.0",6134:"2.3",6136:"2.4",6140:"2.6","6164HE":"1.7","6166HE":"1.8",6168:"1.9",6172:"2.1",6174:"2.2",6176:"2.3","6176SE":"2.3","6180SE":"2.5",3250:"2.5",3260:"2.7",3280:"2.4",4226:"2.7",4228:"2.8",4230:"2.9",4234:"3.1",4238:"3.3",4240:"3.4",4256:"1.6",4274:"2.5",4276:"2.6",4280:"2.8",4284:"3.0",6204:"3.3",6212:"2.6",6220:"3.0",6234:"2.4",6238:"2.6","6262HE":"1.6",6272:"2.1",6274:"2.2",6276:"2.3",6278:"2.4","6282SE":"2.6","6284SE":"2.7",6308:"3.5",6320:"2.8",6328:"3.2","6338P":"2.3",6344:"2.6",6348:"2.8",6366:"1.8","6370P":"2.0",6376:"2.3",6378:"2.4",6380:"2.5",6386:"2.8","FX|4100":"3.6","FX|4120":"3.9","FX|4130":"3.8","FX|4150":"3.8","FX|4170":"4.2","FX|6100":"3.3","FX|6120":"3.6","FX|6130":"3.6","FX|6200":"3.8","FX|8100":"2.8","FX|8120":"3.1","FX|8140":"3.2","FX|8150":"3.6","FX|8170":"3.9","FX|4300":"3.8","FX|4320":"4.0","FX|4350":"4.2","FX|6300":"3.5","FX|6350":"3.9","FX|8300":"3.3","FX|8310":"3.4","FX|8320":"3.5","FX|8350":"4.0","FX|8370":"4.0","FX|9370":"4.4","FX|9590":"4.7","FX|8320E":"3.2","FX|8370E":"3.3",1200:"3.1","Pro 1200":"3.1","1300X":"3.5","Pro 1300":"3.5",1400:"3.2","1500X":"3.5","Pro 1500":"3.5",1600:"3.2","1600X":"3.6","Pro 1600":"3.2",1700:"3.0","Pro 1700":"3.0","1700X":"3.4","Pro 1700X":"3.4","1800X":"3.6","1900X":"3.8",1920:"3.2","1920X":"3.5","1950X":"3.4","200GE":"3.2","Pro 200GE":"3.2","220GE":"3.4","240GE":"3.5","3000G":"3.5","300GE":"3.4","3050GE":"3.4","2200G":"3.5","Pro 2200G":"3.5","2200GE":"3.2","Pro 2200GE":"3.2","2400G":"3.6","Pro 2400G":"3.6","2400GE":"3.2","Pro 2400GE":"3.2","Pro 200U":"2.3","300U":"2.4","2200U":"2.5","3200U":"2.6","2300U":"2.0","Pro 2300U":"2.0","2500U":"2.0","Pro 2500U":"2.2","2600H":"3.2","2700U":"2.0","Pro 2700U":"2.2","2800H":"3.3",7351:"2.4","7351P":"2.4",7401:"2.0","7401P":"2.0","7551P":"2.0",7551:"2.0",7251:"2.1",7261:"2.5",7281:"2.1",7301:"2.2",7371:"3.1",7451:"2.3",7501:"2.0",7571:"2.2",7601:"2.2",V1500B:"2.2",V1780B:"3.35",V1202B:"2.3",V1404I:"2.0",V1605B:"2.0",V1756B:"3.25",V1807B:"3.35",3101:"2.1",3151:"2.7",3201:"1.5",3251:"2.5",3255:"2.5",3301:"2.0",3351:"1.9",3401:"1.85",3451:"2.15","1200|AF":"3.1","2300X":"3.5","2500X":"3.6",2600:"3.4","2600E":"3.1","1600|AF":"3.2","2600X":"3.6",2700:"3.2","2700E":"2.8","Pro 2700":"3.2","2700X":"3.7","Pro 2700X":"3.6","2920X":"3.5","2950X":"3.5","2970WX":"3.0","2990WX":"3.0","Pro 300GE":"3.4","Pro 3125GE":"3.4","3150G":"3.5","Pro 3150G":"3.5","3150GE":"3.3","Pro 3150GE":"3.3","3200G":"3.6","Pro 3200G":"3.6","3200GE":"3.3","Pro 3200GE":"3.3","3350G":"3.6","Pro 3350G":"3.6","3350GE":"3.3","Pro 3350GE":"3.3","3400G":"3.7","Pro 3400G":"3.7","3400GE":"3.3","Pro 3400GE":"3.3","3300U":"2.1","PRO 3300U":"2.1","3450U":"2.1","3500U":"2.1","PRO 3500U":"2.1","3500C":"2.1","3550H":"2.1","3580U":"2.1","3700U":"2.3","PRO 3700U":"2.3","3700C":"2.3","3750H":"2.3","3780U":"2.3",3100:"3.6","3300X":"3.8",3500:"3.6","3500X":"3.6",3600:"3.6","Pro 3600":"3.6","3600X":"3.8","3600XT":"3.8","Pro 3700":"3.6","3700X":"3.6","3800X":"3.9","3800XT":"3.9",3900:"3.1","Pro 3900":"3.1","3900X":"3.8","3900XT":"3.8","3950X":"3.5","3960X":"3.8","3970X":"3.7","3990X":"2.9","3945WX":"4.0","3955WX":"3.9","3975WX":"3.5","3995WX":"2.7","4300GE":"3.5","Pro 4300GE":"3.5","4300G":"3.8","Pro 4300G":"3.8","4600GE":"3.3","Pro 4650GE":"3.3","4600G":"3.7","Pro 4650G":"3.7","4700GE":"3.1","Pro 4750GE":"3.1","4700G":"3.6","Pro 4750G":"3.6","4300U":"2.7","4450U":"2.5","Pro 4450U":"2.5","4500U":"2.3","4600U":"2.1","PRO 4650U":"2.1","4680U":"2.1","4600HS":"3.0","4600H":"3.0","4700U":"2.0","PRO 4750U":"1.7","4800U":"1.8","4800HS":"2.9","4800H":"2.9","4900HS":"3.0","4900H":"3.3","5300U":"2.6","5500U":"2.1","5700U":"1.8","7232P":"3.1","7302P":"3.0","7402P":"2.8","7502P":"2.5","7702P":"2.0",7252:"3.1",7262:"3.2",7272:"2.9",7282:"2.8",7302:"3.0",7352:"2.3",7402:"2.8",7452:"2.35",7502:"2.5",7532:"2.4",7542:"2.9",7552:"2.2",7642:"2.3",7662:"2.0",7702:"2.0",7742:"2.25","7H12":"2.6","7F32":"3.7","7F52":"3.5","7F72":"3.2","7773X":"2.2",7763:"2.45",7713:"2.0","7713P":"2.0",7663:"2.0",7643:"2.3","7573X":"2.8","75F3":"2.95",7543:"2.8","7543P":"2.8",7513:"2.6","7473X":"2.8",7453:"2.75","74F3":"3.2",7443:"2.85","7443P":"2.85",7413:"2.65","7373X":"3.05","73F3":"3.5",7343:"3.2",7313:"3.0","7313P":"3.0","72F3":"3.7","5600X":"3.7","5800X":"3.8","5900X":"3.7","5950X":"3.4","5945WX":"4.1","5955WX":"4.0","5965WX":"3.8","5975WX":"3.6","5995WX":"2.7","7960X":"4.2","7970X":"4.0","7980X":"3.2","7965WX":"4.2","7975WX":"4.0","7985WX":"3.2","7995WX":"2.5",9754:"2.25","9754S":"2.25",9734:"2.2","9684X":"2.55","9384X":"3.1","9184X":"3.55","9654P":"2.4",9654:"2.4",9634:"2.25","9554P":"3.1",9554:"3.1",9534:"2.45","9474F":"3.6","9454P":"2.75",9454:"2.75","9374F":"3.85","9354P":"3.25",9354:"3.25",9334:"2.7","9274F":"4.05",9254:"2.9",9224:"2.5","9174F":"4.1",9124:"3.0"},O3={1:"Other",2:"Unknown",3:"Daughter Board",4:"ZIF Socket",5:"Replacement/Piggy Back",6:"None",7:"LIF Socket",8:"Slot 1",9:"Slot 2",10:"370 Pin Socket",11:"Slot A",12:"Slot M",13:"423",14:"A (Socket 462)",15:"478",16:"754",17:"940",18:"939",19:"mPGA604",20:"LGA771",21:"LGA775",22:"S1",23:"AM2",24:"F (1207)",25:"LGA1366",26:"G34",27:"AM3",28:"C32",29:"LGA1156",30:"LGA1567",31:"PGA988A",32:"BGA1288",33:"rPGA988B",34:"BGA1023",35:"BGA1224",36:"LGA1155",37:"LGA1356",38:"LGA2011",39:"FS1",40:"FS2",41:"FM1",42:"FM2",43:"LGA2011-3",44:"LGA1356-3",45:"LGA1150",46:"BGA1168",47:"BGA1234",48:"BGA1364",49:"AM4",50:"LGA1151",51:"BGA1356",52:"BGA1440",53:"BGA1515",54:"LGA3647-1",55:"SP3",56:"SP3r2",57:"LGA2066",58:"BGA1392",59:"BGA1510",60:"BGA1528",61:"LGA4189",62:"LGA1200",63:"LGA4677",64:"LGA1700",65:"BGA1744",66:"BGA1781",67:"BGA1211",68:"BGA2422",69:"LGA1211",70:"LGA2422",71:"LGA5773",72:"BGA5773"},E3={LGA1150:"i7-5775C i3-4340 i3-4170 G3250 i3-4160T i3-4160 E3-1231 G3258 G3240 i7-4790S i7-4790K i7-4790 i5-4690K i5-4690 i5-4590T i5-4590S i5-4590 i5-4460 i3-4360 i3-4150 G1820 G3420 G3220 i7-4771 i5-4440 i3-4330 i3-4130T i3-4130 E3-1230 i7-4770S i7-4770K i7-4770 i5-4670K i5-4670 i5-4570T i5-4570S i5-4570 i5-4430",LGA1151:"i9-9900KS E-2288G E-2224 G5420 i9-9900T i9-9900 i7-9700T i7-9700F i7-9700E i7-9700 i5-9600 i5-9500T i5-9500F i5-9500 i5-9400T i3-9350K i3-9300 i3-9100T i3-9100F i3-9100 G4930 i9-9900KF i7-9700KF i5-9600KF i5-9400F i5-9400 i3-9350KF i9-9900K i7-9700K i5-9600K G5500 G5400 i7-8700T i7-8086K i5-8600 i5-8500T i5-8500 i5-8400T i3-8300 i3-8100T G4900 i7-8700K i7-8700 i5-8600K i5-8400 i3-8350K i3-8100 E3-1270 G4600 G4560 i7-7700T i7-7700K i7-7700 i5-7600K i5-7600 i5-7500T i5-7500 i5-7400 i3-7350K i3-7300 i3-7100T i3-7100 G3930 G3900 G4400 i7-6700T i7-6700K i7-6700 i5-6600K i5-6600 i5-6500T i5-6500 i5-6400T i5-6400 i3-6300 i3-6100T i3-6100 E3-1270 E3-1270 T4500 T4400",1155:"G440 G460 G465 G470 G530T G540T G550T G1610T G1620T G530 G540 G1610 G550 G1620 G555 G1630 i3-2100T i3-2120T i3-3220T i3-3240T i3-3250T i3-2100 i3-2105 i3-2102 i3-3210 i3-3220 i3-2125 i3-2120 i3-3225 i3-2130 i3-3245 i3-3240 i3-3250 i5-3570T i5-2500T i5-2400S i5-2405S i5-2390T i5-3330S i5-2500S i5-3335S i5-2300 i5-3450S i5-3340S i5-3470S i5-3475S i5-3470T i5-2310 i5-3550S i5-2320 i5-3330 i5-3350P i5-3450 i5-2400 i5-3340 i5-3570S i5-2380P i5-2450P i5-3470 i5-2500K i5-3550 i5-2500 i5-3570 i5-3570K i5-2550K i7-3770T i7-2600S i7-3770S i7-2600K i7-2600 i7-3770 i7-3770K i7-2700K G620T G630T G640T G2020T G645T G2100T G2030T G622 G860T G620 G632 G2120T G630 G640 G2010 G840 G2020 G850 G645 G2030 G860 G2120 G870 G2130 G2140 E3-1220L E3-1220L E3-1260L E3-1265L E3-1220 E3-1225 E3-1220 E3-1235 E3-1225 E3-1230 E3-1230 E3-1240 E3-1245 E3-1270 E3-1275 E3-1240 E3-1245 E3-1270 E3-1280 E3-1275 E3-1290 E3-1280 E3-1290"};function u9(e){let t="";for(let n in E3)E3[n].split(" ").forEach(i=>{e.indexOf(i)>=0&&(t=n)});return t}function cx(e){let t=e;return e=e.toLowerCase(),e.indexOf("intel")>=0&&(t="Intel"),e.indexOf("amd")>=0&&(t="AMD"),e.indexOf("qemu")>=0&&(t="QEMU"),e.indexOf("hygon")>=0&&(t="Hygon"),e.indexOf("centaur")>=0&&(t="WinChip/Via"),e.indexOf("vmware")>=0&&(t="VMware"),e.indexOf("Xen")>=0&&(t="Xen Hypervisor"),e.indexOf("tcg")>=0&&(t="QEMU"),e.indexOf("apple")>=0&&(t="Apple"),t}function Dh(e){e.brand=e.brand.replace(/\(R\)+/g,"\xAE").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/\(TM\)+/g,"\u2122").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/\(C\)+/g,"\xA9").replace(/\s+/g," ").trim(),e.brand=e.brand.replace(/CPU+/g,"").replace(/\s+/g," ").trim(),e.manufacturer=cx(e.brand);let t=e.brand.split(" ");return t.shift(),e.brand=t.join(" "),e}function ux(e){let t="0";for(let n in lx)if({}.hasOwnProperty.call(lx,n)){let r=n.split("|"),i=0;r.forEach(s=>{e.indexOf(s)>-1&&i++}),i===r.length&&(t=lx[n])}return parseFloat(t)}function c9(){return new Promise(e=>{process.nextTick(()=>{let t="unknown",n={manufacturer:t,brand:t,vendor:"",family:"",model:"",stepping:"",revision:"",voltage:"",speed:0,speedMin:0,speedMax:0,governor:"",cores:J.cores(),physicalCores:J.cores(),performanceCores:J.cores(),efficiencyCores:0,processors:1,socket:"",flags:"",virtualization:!1,cache:{}};I3().then(r=>{if(n.flags=r,n.virtualization=r.indexOf("vmx")>-1||r.indexOf("svm")>-1,Mh&&Sn("sysctl machdep.cpu hw.cpufrequency_max hw.cpufrequency_min hw.packages hw.physicalcpu_max hw.ncpu hw.tbfrequency hw.cpufamily hw.cpusubfamily",function(i,s){let o=s.toString().split(`
123
+ `),l=J.getValue(o,"machdep.cpu.brand_string").split("@");n.brand=l[0].trim();let u=l[1]?l[1].trim():"0";n.speed=parseFloat(u.replace(/GHz+/g,""));let c=J.getValue(o,"hw.tbfrequency")/1e9;c=c<.1?c*100:c,n.speed=n.speed===0?c:n.speed,xu=n.speed,n=Dh(n),n.speedMin=J.getValue(o,"hw.cpufrequency_min")?J.getValue(o,"hw.cpufrequency_min")/1e9:n.speed,n.speedMax=J.getValue(o,"hw.cpufrequency_max")?J.getValue(o,"hw.cpufrequency_max")/1e9:n.speed,n.vendor=J.getValue(o,"machdep.cpu.vendor")||"Apple",n.family=J.getValue(o,"machdep.cpu.family")||J.getValue(o,"hw.cpufamily"),n.model=J.getValue(o,"machdep.cpu.model"),n.stepping=J.getValue(o,"machdep.cpu.stepping")||J.getValue(o,"hw.cpusubfamily"),n.virtualization=!0;let f=J.getValue(o,"hw.packages"),p=J.getValue(o,"hw.physicalcpu_max"),d=J.getValue(o,"hw.ncpu");if(ti.arch()==="arm64"){n.socket="SOC";try{let m=px("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split(`
124
+ `),y=m.filter(h=>h.indexOf('"E"')>=0).length,v=m.filter(h=>h.indexOf('"P"')>=0).length;n.efficiencyCores=y,n.performanceCores=v}catch{J.noop()}}f&&(n.processors=parseInt(f)||1),p&&d&&(n.cores=parseInt(d)||J.cores(),n.physicalCores=parseInt(p)||J.cores()),P3().then(m=>{n.cache=m,e(n)})}),jf){let i="",s=[];ti.cpus()[0]&&ti.cpus()[0].model&&(i=ti.cpus()[0].model),Sn('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL',function(o,a){o||(s=a.toString().split(`
125
+ `)),i=J.getValue(s,"model name")||i,i=J.getValue(s,"bios model name")||i;let l=i.split("@");if(n.brand=l[0].trim(),n.speed=l[1]?parseFloat(l[1].trim()):0,n.speed===0&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=ux(n.brand)),n.speed===0){let y=fx();y.avg!==0&&(n.speed=y.avg)}xu=n.speed,n.speedMin=Math.round(parseFloat(J.getValue(s,"cpu min mhz").replace(/,/g,"."))/10)/100,n.speedMax=Math.round(parseFloat(J.getValue(s,"cpu max mhz").replace(/,/g,"."))/10)/100,n=Dh(n),n.vendor=cx(J.getValue(s,"vendor id")),n.family=J.getValue(s,"cpu family"),n.model=J.getValue(s,"model:"),n.stepping=J.getValue(s,"stepping"),n.revision=J.getValue(s,"cpu revision"),n.cache.l1d=J.getValue(s,"l1d cache"),n.cache.l1d&&(n.cache.l1d=parseInt(n.cache.l1d)*(n.cache.l1d.indexOf("M")!==-1?1024*1024:n.cache.l1d.indexOf("K")!==-1?1024:1)),n.cache.l1i=J.getValue(s,"l1i cache"),n.cache.l1i&&(n.cache.l1i=parseInt(n.cache.l1i)*(n.cache.l1i.indexOf("M")!==-1?1024*1024:n.cache.l1i.indexOf("K")!==-1?1024:1)),n.cache.l2=J.getValue(s,"l2 cache"),n.cache.l2&&(n.cache.l2=parseInt(n.cache.l2)*(n.cache.l2.indexOf("M")!==-1?1024*1024:n.cache.l2.indexOf("K")!==-1?1024:1)),n.cache.l3=J.getValue(s,"l3 cache"),n.cache.l3&&(n.cache.l3=parseInt(n.cache.l3)*(n.cache.l3.indexOf("M")!==-1?1024*1024:n.cache.l3.indexOf("K")!==-1?1024:1));let u=J.getValue(s,"thread(s) per core")||"1",c=J.getValue(s,"socket(s)")||"1",f=parseInt(u,10),p=parseInt(c,10)||1,d=parseInt(J.getValue(s,"core(s) per socket"),10);if(n.physicalCores=d?d*p:n.cores/f,n.performanceCores=f>1?n.cores-n.physicalCores:n.cores,n.efficiencyCores=f>1?n.cores-f*n.performanceCores:0,n.processors=p,n.governor=J.getValue(s,"governor")||"",n.vendor==="ARM"){let y=kh.readFileSync("/proc/cpuinfo").toString().split(`
126
+ `),v=J.decodePiCpuinfo(y);v.model.toLowerCase().indexOf("raspberry")>=0&&(n.family=n.manufacturer,n.manufacturer=v.manufacturer,n.brand=v.processor,n.revision=v.revisionCode,n.socket="SOC")}let m=[];Sn('export LC_ALL=C; dmidecode \u2013t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL',function(y,v){m=v.toString().split(`
127
+ `),m&&m.length&&(n.socket=J.getValue(m,"Upgrade").replace("Socket","").trim()||n.socket),e(n)})})}if(Vh||jh||Bh){let i="",s=[];ti.cpus()[0]&&ti.cpus()[0].model&&(i=ti.cpus()[0].model),Sn("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL",function(o,a){let l=[];if(!o){let d=a.toString().split("# dmidecode"),m=d.length>1?d[1]:"";l=d.length>2?d[2].split("Cache Information"):[],s=m.split(`
128
+ `)}if(n.brand=i.split("@")[0].trim(),n.speed=i.split("@")[1]?parseFloat(i.split("@")[1].trim()):0,n.speed===0&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=ux(n.brand)),n.speed===0){let d=fx();d.avg!==0&&(n.speed=d.avg)}xu=n.speed,n.speedMin=n.speed,n.speedMax=Math.round(parseFloat(J.getValue(s,"max speed").replace(/Mhz/g,""))/10)/100,n=Dh(n),n.vendor=cx(J.getValue(s,"manufacturer"));let u=J.getValue(s,"signature");u=u.split(",");for(let d=0;d<u.length;d++)u[d]=u[d].trim();n.family=J.getValue(u,"Family"," ",!0),n.model=J.getValue(u,"Model"," ",!0),n.stepping=J.getValue(u,"Stepping"," ",!0),n.revision="";let c=parseFloat(J.getValue(s,"voltage"));n.voltage=isNaN(c)?"":c.toFixed(2);for(let d=0;d<l.length;d++){s=l[d].split(`
129
+ `);let m=J.getValue(s,"Socket Designation").toLowerCase().replace(" ","-").split("-");m=m.length?m[0]:"";let y=J.getValue(s,"Installed Size").split(" "),v=parseInt(y[0],10),h=y.length>1?y[1]:"kb";v=v*(h==="kb"?1024:h==="mb"?1024*1024:h==="gb"?1024*1024*1024:1),m&&(m==="l1"?(n.cache[m+"d"]=v/2,n.cache[m+"i"]=v/2):n.cache[m]=v)}n.socket=J.getValue(s,"Upgrade").replace("Socket","").trim();let f=J.getValue(s,"thread count").trim(),p=J.getValue(s,"core count").trim();p&&f&&(n.cores=parseInt(f,10),n.physicalCores=parseInt(p,10)),e(n)})}if(Uh&&e(n),Rh)try{let i=[];i.push(J.powerShell("Get-CimInstance Win32_processor | select Name, Revision, L2CacheSize, L3CacheSize, Manufacturer, MaxClockSpeed, Description, UpgradeMethod, Caption, NumberOfLogicalProcessors, NumberOfCores | fl")),i.push(J.powerShell("Get-CimInstance Win32_CacheMemory | select CacheType,InstalledSize,Level | fl")),i.push(J.powerShell("(Get-CimInstance Win32_ComputerSystem).HypervisorPresent")),Promise.all(i).then(s=>{let o=s[0].split(`\r
130
+ `),a=J.getValue(o,"name",":")||"";a.indexOf("@")>=0?(n.brand=a.split("@")[0].trim(),n.speed=a.split("@")[1]?parseFloat(a.split("@")[1].trim()):0,xu=n.speed):(n.brand=a.trim(),n.speed=0),n=Dh(n),n.revision=J.getValue(o,"revision",":"),n.vendor=J.getValue(o,"manufacturer",":"),n.speedMax=Math.round(parseFloat(J.getValue(o,"maxclockspeed",":").replace(/,/g,"."))/10)/100,n.speed===0&&(n.brand.indexOf("AMD")>-1||n.brand.toLowerCase().indexOf("ryzen")>-1)&&(n.speed=ux(n.brand)),n.speed===0&&(n.speed=n.speedMax),n.speedMin=n.speed;let l=J.getValue(o,"description",":").split(" ");for(let y=0;y<l.length;y++)l[y].toLowerCase().startsWith("family")&&y+1<l.length&&l[y+1]&&(n.family=l[y+1]),l[y].toLowerCase().startsWith("model")&&y+1<l.length&&l[y+1]&&(n.model=l[y+1]),l[y].toLowerCase().startsWith("stepping")&&y+1<l.length&&l[y+1]&&(n.stepping=l[y+1]);let u=J.getValue(o,"UpgradeMethod",":");O3[u]&&(n.socket=O3[u]);let c=u9(a);c&&(n.socket=c);let f=J.countLines(o,"Caption"),p=J.getValue(o,"NumberOfLogicalProcessors",":"),d=J.getValue(o,"NumberOfCores",":");f&&(n.processors=parseInt(f)||1),d&&p&&(n.cores=parseInt(p)||J.cores(),n.physicalCores=parseInt(d)||J.cores()),f>1&&(n.cores=n.cores*f,n.physicalCores=n.physicalCores*f),n.cache=T3(s[0],s[1]);let m=s[2]?s[2].toString().toLowerCase():"";n.virtualization=m.indexOf("true")!==-1,e(n)})}catch{e(n)}})})})}function f9(e){return new Promise(t=>{process.nextTick(()=>{c9().then(n=>{e&&e(n),t(n)})})})}to.cpu=f9;function fx(){let e=ti.cpus(),t=999999999,n=0,r=0,i=[];if(e&&e.length){for(let s in e)if({}.hasOwnProperty.call(e,s)){let o=e[s].speed>100?(e[s].speed+1)/1e3:e[s].speed/10;r=r+o,o>n&&(n=o),o<t&&(t=o),i.push(parseFloat(o.toFixed(2)))}return r=r/e.length,{min:parseFloat(t.toFixed(2)),max:parseFloat(n.toFixed(2)),avg:parseFloat(r.toFixed(2)),cores:i}}else return{min:0,max:0,avg:0,cores:i}}function p9(e){return new Promise(t=>{process.nextTick(()=>{let n=fx();if(n.avg===0&&xu!==0){let r=parseFloat(xu);n={min:r,max:r,avg:r,cores:[]}}e&&e(n),t(n)})})}to.cpuCurrentSpeed=p9;function d9(e){return new Promise(t=>{process.nextTick(()=>{let n={main:null,cores:[],max:null,socket:[],chipset:null};if(jf){try{let s=px('cat /sys/class/thermal/thermal_zone*/type 2>/dev/null; echo "-----"; cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null;',J.execOptsLinux).toString().split(`-----
131
+ `);if(s.length===2){let o=s[0].split(`
132
+ `),a=s[1].split(`
133
+ `);for(let l=0;l<o.length;l++){let u=o[l].trim();u.startsWith("acpi")&&a[l]&&n.socket.push(Math.round(parseInt(a[l],10)/100)/10),u.startsWith("pch")&&a[l]&&(n.chipset=Math.round(parseInt(a[l],10)/100)/10)}}}catch{J.noop()}let r='for mon in /sys/class/hwmon/hwmon*; do for label in "$mon"/temp*_label; do if [ -f $label ]; then value=${label%_*}_input; echo $(cat "$label")___$(cat "$value"); fi; done; done;';try{Sn(r,function(i,s){s=s.toString();let o=s.toLowerCase().indexOf("tdie");o!==-1&&(s=s.substring(o));let a=s.split(`
134
+ `),l=0;if(a.forEach(u=>{let c=u.split("___"),f=c[0],p=c.length>1&&c[1]?c[1]:"0";p&&f&&f.toLowerCase()==="tctl"&&(l=n.main=Math.round(parseInt(p,10)/100)/10),p&&(f===void 0||f&&f.toLowerCase().startsWith("core"))?n.cores.push(Math.round(parseInt(p,10)/100)/10):p&&f&&n.main===null&&(f.toLowerCase().indexOf("package")>=0||f.toLowerCase().indexOf("physical")>=0||f.toLowerCase()==="tccd1")&&(n.main=Math.round(parseInt(p,10)/100)/10)}),l&&n.main===null&&(n.main=l),n.cores.length>0){n.main===null&&(n.main=Math.round(n.cores.reduce((c,f)=>c+f,0)/n.cores.length));let u=Math.max.apply(Math,n.cores);n.max=u>n.main?u:n.main}if(n.main!==null){n.max===null&&(n.max=n.main),e&&e(n),t(n);return}Sn("sensors",function(u,c){if(!u){let f=c.toString().split(`
135
+ `),p=null,d=!0,m="";if(f.forEach(function(y){y.trim()===""?d=!0:d&&(y.trim().toLowerCase().startsWith("acpi")&&(m="acpi"),y.trim().toLowerCase().startsWith("pch")&&(m="pch"),y.trim().toLowerCase().startsWith("core")&&(m="core"),d=!1);let v=/[+-]([^°]*)/g,h=y.match(v),g=y.split(":")[0].toUpperCase();m==="acpi"?g.indexOf("TEMP")!==-1&&n.socket.push(parseFloat(h)):m==="pch"&&g.indexOf("TEMP")!==-1&&!n.chipset&&(n.chipset=parseFloat(h)),(g.indexOf("PHYSICAL")!==-1||g.indexOf("PACKAGE")!==-1)&&(n.main=parseFloat(h)),g.indexOf("CORE ")!==-1&&n.cores.push(parseFloat(h)),g.indexOf("TDIE")!==-1&&p===null&&(p=parseFloat(h))}),n.cores.length>0){n.main=Math.round(n.cores.reduce((v,h)=>v+h,0)/n.cores.length);let y=Math.max.apply(Math,n.cores);n.max=y>n.main?y:n.main}else n.main===null&&p!==null&&(n.main=p,n.max=p);if(n.main!==null||n.max!==null){e&&e(n),t(n);return}}kh.stat("/sys/class/thermal/thermal_zone0/temp",function(f){f===null?kh.readFile("/sys/class/thermal/thermal_zone0/temp",function(p,d){if(!p){let m=d.toString().split(`
136
+ `);m.length>0&&(n.main=parseFloat(m[0])/1e3,n.max=n.main)}e&&e(n),t(n)}):Sn("/opt/vc/bin/vcgencmd measure_temp",function(p,d){if(!p){let m=d.toString().split(`
137
+ `);m.length>0&&m[0].indexOf("=")&&(n.main=parseFloat(m[0].split("=")[1]),n.max=n.main)}e&&e(n),t(n)})})})})}catch{e&&e(n),t(n)}}if((Vh||jh||Bh)&&Sn("sysctl dev.cpu | grep temp",function(r,i){if(!r){let s=i.toString().split(`
138
+ `),o=0;s.forEach(function(a){let l=a.split(":");if(l.length>1){let u=parseFloat(l[1].replace(",","."));u>n.max&&(n.max=u),o=o+u,n.cores.push(u)}}),n.cores.length&&(n.main=Math.round(o/n.cores.length*100)/100)}e&&e(n),t(n)}),Mh){let r=null;try{r=K("osx-temperature-sensor")}catch{r=null}if(r&&(n=r.cpuTemperature(),n.main&&(n.main=Math.round(n.main*100)/100),n.max&&(n.max=Math.round(n.max*100)/100),n.cores&&n.cores.length))for(let i=0;i<n.cores.length;i++)n.cores[i]=Math.round(n.cores[i]*100)/100;e&&e(n),t(n)}if(Uh&&(e&&e(n),t(n)),Rh)try{J.powerShell('Get-CimInstance MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" | Select CurrentTemperature').then((r,i)=>{if(!i){let s=0;r.split(`\r
139
+ `).filter(a=>a.trim()!=="").filter((a,l)=>l>0).forEach(function(a){let l=(parseInt(a,10)-2732)/10;isNaN(l)||(s=s+l,l>n.max&&(n.max=l),n.cores.push(l))}),n.cores.length&&(n.main=s/n.cores.length)}e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}to.cpuTemperature=d9;function I3(e){return new Promise(t=>{process.nextTick(()=>{let n="";if(Rh)try{Sn('reg query "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" /v FeatureSet',J.execOptsWin,function(r,i){if(!r){let s=i.split("0x").pop().trim(),o=parseInt(s,16).toString(2),a="0".repeat(32-o.length)+o,l=["fpu","vme","de","pse","tsc","msr","pae","mce","cx8","apic","","sep","mtrr","pge","mca","cmov","pat","pse-36","psn","clfsh","","ds","acpi","mmx","fxsr","sse","sse2","ss","htt","tm","ia64","pbe"];for(let u=0;u<l.length;u++)a[u]==="1"&&l[u]!==""&&(n+=" "+l[u]);n=n.trim().toLowerCase()}e&&e(n),t(n)})}catch{e&&e(n),t(n)}if(jf)try{Sn("export LC_ALL=C; lscpu; unset LC_ALL",function(r,i){r||i.toString().split(`
140
+ `).forEach(function(o){o.split(":")[0].toUpperCase().indexOf("FLAGS")!==-1&&(n=o.split(":")[1].trim().toLowerCase())}),n?(e&&e(n),t(n)):kh.readFile("/proc/cpuinfo",function(s,o){if(!s){let a=o.toString().split(`
141
+ `);n=J.getValue(a,"features",":",!0).toLowerCase()}e&&e(n),t(n)})})}catch{e&&e(n),t(n)}(Vh||jh||Bh)&&Sn("export LC_ALL=C; dmidecode -t 4 2>/dev/null; unset LC_ALL",function(r,i){let s=[];if(!r){let o=i.toString().split(" Flags:");(o.length>1?o[1].split(" Version:")[0].split(`
142
+ `):[]).forEach(function(l){let u=(l.indexOf("(")?l.split("(")[0].toLowerCase():"").trim().replace(/\t/g,"");u&&s.push(u)})}n=s.join(" ").trim().toLowerCase(),e&&e(n),t(n)}),Mh&&Sn("sysctl machdep.cpu.features",function(r,i){if(!r){let s=i.toString().split(`
143
+ `);s.length>0&&s[0].indexOf("machdep.cpu.features:")!==-1&&(n=s[0].split(":")[1].trim().toLowerCase())}e&&e(n),t(n)}),Uh&&(e&&e(n),t(n))})})}to.cpuFlags=I3;function P3(e){return new Promise(t=>{process.nextTick(()=>{let n={l1d:null,l1i:null,l2:null,l3:null};if(jf)try{Sn("export LC_ALL=C; lscpu; unset LC_ALL",function(r,i){r||i.toString().split(`
144
+ `).forEach(function(o){let a=o.split(":");a[0].toUpperCase().indexOf("L1D CACHE")!==-1&&(n.l1d=parseInt(a[1].trim())*(a[1].indexOf("M")!==-1?1024*1024:a[1].indexOf("K")!==-1?1024:1)),a[0].toUpperCase().indexOf("L1I CACHE")!==-1&&(n.l1i=parseInt(a[1].trim())*(a[1].indexOf("M")!==-1?1024*1024:a[1].indexOf("K")!==-1?1024:1)),a[0].toUpperCase().indexOf("L2 CACHE")!==-1&&(n.l2=parseInt(a[1].trim())*(a[1].indexOf("M")!==-1?1024*1024:a[1].indexOf("K")!==-1?1024:1)),a[0].toUpperCase().indexOf("L3 CACHE")!==-1&&(n.l3=parseInt(a[1].trim())*(a[1].indexOf("M")!==-1?1024*1024:a[1].indexOf("K")!==-1?1024:1))}),e&&e(n),t(n)})}catch{e&&e(n),t(n)}if((Vh||jh||Bh)&&Sn("export LC_ALL=C; dmidecode -t 7 2>/dev/null; unset LC_ALL",function(r,i){let s=[];r||(s=i.toString().split("Cache Information"),s.shift());for(let o=0;o<s.length;o++){let a=s[o].split(`
145
+ `),l=J.getValue(a,"Socket Designation").toLowerCase().replace(" ","-").split("-");l=l.length?l[0]:"";let u=J.getValue(a,"Installed Size").split(" "),c=parseInt(u[0],10),f=u.length>1?u[1]:"kb";c=c*(f==="kb"?1024:f==="mb"?1024*1024:f==="gb"?1024*1024*1024:1),l&&(l==="l1"?(n.cache[l+"d"]=c/2,n.cache[l+"i"]=c/2):n.cache[l]=c)}e&&e(n),t(n)}),Mh&&Sn("sysctl hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize",function(r,i){r||i.toString().split(`
146
+ `).forEach(function(o){let a=o.split(":");a[0].toLowerCase().indexOf("hw.l1icachesize")!==-1&&(n.l1d=parseInt(a[1].trim())*(a[1].indexOf("K")!==-1?1024:1)),a[0].toLowerCase().indexOf("hw.l1dcachesize")!==-1&&(n.l1i=parseInt(a[1].trim())*(a[1].indexOf("K")!==-1?1024:1)),a[0].toLowerCase().indexOf("hw.l2cachesize")!==-1&&(n.l2=parseInt(a[1].trim())*(a[1].indexOf("K")!==-1?1024:1)),a[0].toLowerCase().indexOf("hw.l3cachesize")!==-1&&(n.l3=parseInt(a[1].trim())*(a[1].indexOf("K")!==-1?1024:1))}),e&&e(n),t(n)}),Uh&&(e&&e(n),t(n)),Rh)try{let r=[];r.push(J.powerShell("Get-CimInstance Win32_processor | select L2CacheSize, L3CacheSize | fl")),r.push(J.powerShell("Get-CimInstance Win32_CacheMemory | select CacheType,InstalledSize,Level | fl")),Promise.all(r).then(i=>{n=T3(i[0],i[1]),e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}function T3(e,t){let n={l1d:null,l1i:null,l2:null,l3:null},r=e.split(`\r
147
+ `);n.l1d=0,n.l1i=0,n.l2=J.getValue(r,"l2cachesize",":"),n.l3=J.getValue(r,"l3cachesize",":"),n.l2?n.l2=parseInt(n.l2,10)*1024:n.l2=0,n.l3?n.l3=parseInt(n.l3,10)*1024:n.l3=0;let i=t.split(/\n\s*\n/),s=0,o=0,a=0;return i.forEach(function(l){let u=l.split(`\r
148
+ `),c=J.getValue(u,"CacheType"),f=J.getValue(u,"Level"),p=J.getValue(u,"InstalledSize");f==="3"&&c==="3"&&(n.l1i=n.l1i+parseInt(p,10)*1024),f==="3"&&c==="4"&&(n.l1d=n.l1d+parseInt(p,10)*1024),f==="3"&&c==="5"&&(s=parseInt(p,10)/2,o=parseInt(p,10)/2),f==="4"&&c==="5"&&(a=a+parseInt(p,10)*1024)}),!n.l1i&&!n.l1d&&(n.l1i=s,n.l1d=o),a&&(n.l2=a),n}to.cpuCache=P3;function m9(){return new Promise(e=>{process.nextTick(()=>{let t=ti.loadavg().map(function(s){return s/J.cores()}),n=parseFloat(Math.max.apply(Math,t).toFixed(2)),r={};if(Date.now()-je.ms>=200){je.ms=Date.now();let s=ti.cpus().map(function(h){return h.times.steal=0,h.times.guest=0,h}),o=0,a=0,l=0,u=0,c=0,f=0,p=0,d=[];if(ax=s&&s.length?s.length:0,jf)try{let h=px("cat /proc/stat 2>/dev/null | grep cpu",J.execOptsLinux).toString().split(`
149
+ `);if(h.length>1&&(h.shift(),h.length===s.length))for(let g=0;g<h.length;g++){let w=h[g].split(" ");if(w.length>=10){let x=parseFloat(w[8])||0,C=parseFloat(w[9])||0;s[g].times.steal=x,s[g].times.guest=C}}}catch{J.noop()}for(let h=0;h<ax;h++){let g=s[h].times;o+=g.user,a+=g.sys,l+=g.nice,c+=g.idle,u+=g.irq,f+=g.steal||0,p+=g.guest||0;let w=R&&R[h]&&R[h].totalTick?R[h].totalTick:0,x=R&&R[h]&&R[h].totalLoad?R[h].totalLoad:0,C=R&&R[h]&&R[h].user?R[h].user:0,A=R&&R[h]&&R[h].sys?R[h].sys:0,T=R&&R[h]&&R[h].nice?R[h].nice:0,z=R&&R[h]&&R[h].idle?R[h].idle:0,M=R&&R[h]&&R[h].irq?R[h].irq:0,U=R&&R[h]&&R[h].steal?R[h].steal:0,D=R&&R[h]&&R[h].guest?R[h].guest:0;R[h]=g,R[h].totalTick=R[h].user+R[h].sys+R[h].nice+R[h].irq+R[h].steal+R[h].guest+R[h].idle,R[h].totalLoad=R[h].user+R[h].sys+R[h].nice+R[h].irq+R[h].steal+R[h].guest,R[h].currentTick=R[h].totalTick-w,R[h].load=R[h].totalLoad-x,R[h].loadUser=R[h].user-C,R[h].loadSystem=R[h].sys-A,R[h].loadNice=R[h].nice-T,R[h].loadIdle=R[h].idle-z,R[h].loadIrq=R[h].irq-M,R[h].loadSteal=R[h].steal-U,R[h].loadGuest=R[h].guest-D,d[h]={},d[h].load=R[h].load/R[h].currentTick*100,d[h].loadUser=R[h].loadUser/R[h].currentTick*100,d[h].loadSystem=R[h].loadSystem/R[h].currentTick*100,d[h].loadNice=R[h].loadNice/R[h].currentTick*100,d[h].loadIdle=R[h].loadIdle/R[h].currentTick*100,d[h].loadIrq=R[h].loadIrq/R[h].currentTick*100,d[h].loadSteal=R[h].loadSteal/R[h].currentTick*100,d[h].loadGuest=R[h].loadGuest/R[h].currentTick*100,d[h].rawLoad=R[h].load,d[h].rawLoadUser=R[h].loadUser,d[h].rawLoadSystem=R[h].loadSystem,d[h].rawLoadNice=R[h].loadNice,d[h].rawLoadIdle=R[h].loadIdle,d[h].rawLoadIrq=R[h].loadIrq,d[h].rawLoadSteal=R[h].loadSteal,d[h].rawLoadGuest=R[h].loadGuest}let m=o+a+l+u+f+p+c,y=o+a+l+u+f+p,v=m-je.tick;r={avgLoad:n,currentLoad:(y-je.load)/v*100,currentLoadUser:(o-je.user)/v*100,currentLoadSystem:(a-je.system)/v*100,currentLoadNice:(l-je.nice)/v*100,currentLoadIdle:(c-je.idle)/v*100,currentLoadIrq:(u-je.irq)/v*100,currentLoadSteal:(f-je.steal)/v*100,currentLoadGuest:(p-je.guest)/v*100,rawCurrentLoad:y-je.load,rawCurrentLoadUser:o-je.user,rawCurrentLoadSystem:a-je.system,rawCurrentLoadNice:l-je.nice,rawCurrentLoadIdle:c-je.idle,rawCurrentLoadIrq:u-je.irq,rawCurrentLoadSteal:f-je.steal,rawCurrentLoadGuest:p-je.guest,cpus:d},je={user:o,nice:l,system:a,idle:c,irq:u,steal:f,guest:p,tick:m,load:y,ms:je.ms,currentLoad:r.currentLoad,currentLoadUser:r.currentLoadUser,currentLoadSystem:r.currentLoadSystem,currentLoadNice:r.currentLoadNice,currentLoadIdle:r.currentLoadIdle,currentLoadIrq:r.currentLoadIrq,currentLoadSteal:r.currentLoadSteal,currentLoadGuest:r.currentLoadGuest,rawCurrentLoad:r.rawCurrentLoad,rawCurrentLoadUser:r.rawCurrentLoadUser,rawCurrentLoadSystem:r.rawCurrentLoadSystem,rawCurrentLoadNice:r.rawCurrentLoadNice,rawCurrentLoadIdle:r.rawCurrentLoadIdle,rawCurrentLoadIrq:r.rawCurrentLoadIrq,rawCurrentLoadSteal:r.rawCurrentLoadSteal,rawCurrentLoadGuest:r.rawCurrentLoadGuest}}else{let s=[];for(let o=0;o<ax;o++)s[o]={},s[o].load=R[o].load/R[o].currentTick*100,s[o].loadUser=R[o].loadUser/R[o].currentTick*100,s[o].loadSystem=R[o].loadSystem/R[o].currentTick*100,s[o].loadNice=R[o].loadNice/R[o].currentTick*100,s[o].loadIdle=R[o].loadIdle/R[o].currentTick*100,s[o].loadIrq=R[o].loadIrq/R[o].currentTick*100,s[o].rawLoad=R[o].load,s[o].rawLoadUser=R[o].loadUser,s[o].rawLoadSystem=R[o].loadSystem,s[o].rawLoadNice=R[o].loadNice,s[o].rawLoadIdle=R[o].loadIdle,s[o].rawLoadIrq=R[o].loadIrq,s[o].rawLoadSteal=R[o].loadSteal,s[o].rawLoadGuest=R[o].loadGuest;r={avgLoad:n,currentLoad:je.currentLoad,currentLoadUser:je.currentLoadUser,currentLoadSystem:je.currentLoadSystem,currentLoadNice:je.currentLoadNice,currentLoadIdle:je.currentLoadIdle,currentLoadIrq:je.currentLoadIrq,currentLoadSteal:je.currentLoadSteal,currentLoadGuest:je.currentLoadGuest,rawCurrentLoad:je.rawCurrentLoad,rawCurrentLoadUser:je.rawCurrentLoadUser,rawCurrentLoadSystem:je.rawCurrentLoadSystem,rawCurrentLoadNice:je.rawCurrentLoadNice,rawCurrentLoadIdle:je.rawCurrentLoadIdle,rawCurrentLoadIrq:je.rawCurrentLoadIrq,rawCurrentLoadSteal:je.rawCurrentLoadSteal,rawCurrentLoadGuest:je.rawCurrentLoadGuest,cpus:s}}e(r)})})}function h9(e){return new Promise(t=>{process.nextTick(()=>{m9().then(n=>{e&&e(n),t(n)})})})}to.currentLoad=h9;function g9(){return new Promise(e=>{process.nextTick(()=>{let t=ti.cpus(),n=0,r=0,i=0,s=0,o=0,a=0;if(t&&t.length){for(let u=0,c=t.length;u<c;u++){let f=t[u].times;n+=f.user,r+=f.sys,i+=f.nice,s+=f.irq,o+=f.idle}let l=o+s+i+r+n;a=(l-o)/l*100}e(a)})})}function y9(e){return new Promise(t=>{process.nextTick(()=>{g9().then(n=>{e&&e(n),t(n)})})})}to.fullLoad=y9});var U3=oe(dx=>{"use strict";var Oi=K("os"),Bf=K("child_process").exec,Fh=K("child_process").execSync,Z=Pt(),v9=K("fs"),no=process.platform,D3=no==="linux"||no==="android",k3=no==="darwin",M3=no==="win32",R3=no==="freebsd",V3=no==="openbsd",j3=no==="netbsd",B3=no==="sunos",L3={"0x014F":"Transcend Information","0x2C00":"Micron Technology Inc.","0x802C":"Micron Technology Inc.","0x80AD":"Hynix Semiconductor Inc.","0x80CE":"Samsung Electronics Inc.","0xAD00":"Hynix Semiconductor Inc.","0xCE00":"Samsung Electronics Inc.","0x02FE":"Elpida","0x5105":"Qimonda AG i. In.","0x8551":"Qimonda AG i. In.","0x859B":"Crucial","0x04CD":"G-Skill"},N3={"017A":"Apacer","0198":"HyperX","029E":"Corsair","04CB":"A-DATA","04CD":"G-Skill","059B":"Crucial","00CE":"Samsung",1315:"Crucial","014F":"Transcend Information","2C00":"Micron Technology Inc.","802C":"Micron Technology Inc.","80AD":"Hynix Semiconductor Inc.","80CE":"Samsung Electronics Inc.",AD00:"Hynix Semiconductor Inc.",CE00:"Samsung Electronics Inc.","02FE":"Elpida",5105:"Qimonda AG i. In.",8551:"Qimonda AG i. In.","859B":"Crucial"};function w9(e){return new Promise(t=>{process.nextTick(()=>{let n={total:Oi.totalmem(),free:Oi.freemem(),used:Oi.totalmem()-Oi.freemem(),active:Oi.totalmem()-Oi.freemem(),available:Oi.freemem(),buffers:0,cached:0,slab:0,buffcache:0,swaptotal:0,swapused:0,swapfree:0,writeback:null,dirty:null};if(D3)try{v9.readFile("/proc/meminfo",function(r,i){if(!r){let s=i.toString().split(`
150
+ `);n.total=parseInt(Z.getValue(s,"memtotal"),10),n.total=n.total?n.total*1024:Oi.totalmem(),n.free=parseInt(Z.getValue(s,"memfree"),10),n.free=n.free?n.free*1024:Oi.freemem(),n.used=n.total-n.free,n.buffers=parseInt(Z.getValue(s,"buffers"),10),n.buffers=n.buffers?n.buffers*1024:0,n.cached=parseInt(Z.getValue(s,"cached"),10),n.cached=n.cached?n.cached*1024:0,n.slab=parseInt(Z.getValue(s,"slab"),10),n.slab=n.slab?n.slab*1024:0,n.buffcache=n.buffers+n.cached+n.slab;let o=parseInt(Z.getValue(s,"memavailable"),10);n.available=o?o*1024:n.free+n.buffcache,n.active=n.total-n.available,n.swaptotal=parseInt(Z.getValue(s,"swaptotal"),10),n.swaptotal=n.swaptotal?n.swaptotal*1024:0,n.swapfree=parseInt(Z.getValue(s,"swapfree"),10),n.swapfree=n.swapfree?n.swapfree*1024:0,n.swapused=n.swaptotal-n.swapfree,n.writeback=parseInt(Z.getValue(s,"writeback"),10),n.writeback=n.writeback?n.writeback*1024:0,n.dirty=parseInt(Z.getValue(s,"dirty"),10),n.dirty=n.dirty?n.dirty*1024:0}e&&e(n),t(n)})}catch{e&&e(n),t(n)}if(R3||V3||j3)try{Bf("/sbin/sysctl hw.realmem hw.physmem vm.stats.vm.v_page_count vm.stats.vm.v_wire_count vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count vm.stats.vm.v_page_size",function(r,i){if(!r){let s=i.toString().split(`
151
+ `),o=parseInt(Z.getValue(s,"vm.stats.vm.v_page_size"),10),a=parseInt(Z.getValue(s,"vm.stats.vm.v_inactive_count"),10)*o,l=parseInt(Z.getValue(s,"vm.stats.vm.v_cache_count"),10)*o;n.total=parseInt(Z.getValue(s,"hw.realmem"),10),isNaN(n.total)&&(n.total=parseInt(Z.getValue(s,"hw.physmem"),10)),n.free=parseInt(Z.getValue(s,"vm.stats.vm.v_free_count"),10)*o,n.buffcache=a+l,n.available=n.buffcache+n.free,n.active=n.total-n.free-n.buffcache,n.swaptotal=0,n.swapfree=0,n.swapused=0}e&&e(n),t(n)})}catch{e&&e(n),t(n)}if(B3&&(e&&e(n),t(n)),k3){let r=4096;try{r=Z.toInt(Fh("sysctl -n vm.pagesize").toString())||r}catch{Z.noop()}try{Bf('vm_stat 2>/dev/null | grep "Pages active"',function(i,s){if(!i){let o=s.toString().split(`
152
+ `);n.active=parseInt(o[0].split(":")[1],10)*r,n.buffcache=n.used-n.active,n.available=n.free+n.buffcache}Bf("sysctl -n vm.swapusage 2>/dev/null",function(o,a){if(!o){let l=a.toString().split(`
153
+ `);l.length>0&&l[0].replace(/,/g,".").replace(/M/g,"").trim().split(" ").forEach(f=>{f.toLowerCase().indexOf("total")!==-1&&(n.swaptotal=parseFloat(f.split("=")[1].trim())*1024*1024),f.toLowerCase().indexOf("used")!==-1&&(n.swapused=parseFloat(f.split("=")[1].trim())*1024*1024),f.toLowerCase().indexOf("free")!==-1&&(n.swapfree=parseFloat(f.split("=")[1].trim())*1024*1024)})}e&&e(n),t(n)})})}catch{e&&e(n),t(n)}}if(M3){let r=0,i=0;try{Z.powerShell("Get-CimInstance Win32_PageFileUsage | Select AllocatedBaseSize, CurrentUsage").then((s,o)=>{o||s.split(`\r
154
+ `).filter(l=>l.trim()!=="").filter((l,u)=>u>0).forEach(function(l){l!==""&&(l=l.trim().split(/\s\s+/),r=r+(parseInt(l[0],10)||0),i=i+(parseInt(l[1],10)||0))}),n.swaptotal=r*1024*1024,n.swapused=i*1024*1024,n.swapfree=n.swaptotal-n.swapused,e&&e(n),t(n)})}catch{e&&e(n),t(n)}}})})}dx.mem=w9;function x9(e){function t(r){return{}.hasOwnProperty.call(L3,r)?L3[r]:r}function n(r){let i=r.replace("0x","").toUpperCase();return i.length===4&&{}.hasOwnProperty.call(N3,i)?N3[i]:r}return new Promise(r=>{process.nextTick(()=>{let i=[];if((D3||R3||V3||j3)&&Bf('export LC_ALL=C; dmidecode -t memory 2>/dev/null | grep -iE "Size:|Type|Speed|Manufacturer|Form Factor|Locator|Memory Device|Serial Number|Voltage|Part Number"; unset LC_ALL',function(s,o){if(!s){let a=o.toString().split("Memory Device");a.shift(),a.forEach(function(l){let u=l.split(`
155
+ `),c=Z.getValue(u,"Size"),f=c.indexOf("GB")>=0?parseInt(c,10)*1024*1024*1024:parseInt(c,10)*1024*1024,p=Z.getValue(u,"Bank Locator");if(p.toLowerCase().indexOf("bad")>=0&&(p=""),parseInt(Z.getValue(u,"Size"),10)>0){let d=Z.toInt(Z.getValue(u,"Total Width")),m=Z.toInt(Z.getValue(u,"Data Width"));i.push({size:f,bank:p,type:Z.getValue(u,"Type:"),ecc:m&&d?d>m:!1,clockSpeed:Z.getValue(u,"Configured Clock Speed:")?parseInt(Z.getValue(u,"Configured Clock Speed:"),10):Z.getValue(u,"Speed:")?parseInt(Z.getValue(u,"Speed:"),10):null,formFactor:Z.getValue(u,"Form Factor:"),manufacturer:n(Z.getValue(u,"Manufacturer:")),partNum:Z.getValue(u,"Part Number:"),serialNum:Z.getValue(u,"Serial Number:"),voltageConfigured:parseFloat(Z.getValue(u,"Configured Voltage:"))||null,voltageMin:parseFloat(Z.getValue(u,"Minimum Voltage:"))||null,voltageMax:parseFloat(Z.getValue(u,"Maximum Voltage:"))||null})}else i.push({size:0,bank:p,type:"Empty",ecc:null,clockSpeed:0,formFactor:Z.getValue(u,"Form Factor:"),partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})})}if(!i.length){i.push({size:Oi.totalmem(),bank:"",type:"",ecc:null,clockSpeed:0,formFactor:"",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null});try{let a=Fh("cat /proc/cpuinfo 2>/dev/null",Z.execOptsLinux),l=a.toString().split(`
156
+ `),u=Z.getValue(l,"hardware",":",!0).toUpperCase(),c=Z.getValue(l,"revision",":",!0).toLowerCase();if(u==="BCM2835"||u==="BCM2708"||u==="BCM2709"||u==="BCM2835"||u==="BCM2837"){let f={0:400,1:450,2:450,3:3200};i[0].type="LPDDR2",i[0].type=c&&c[2]&&c[2]==="3"?"LPDDR4":i[0].type,i[0].ecc=!1,i[0].clockSpeed=c&&c[2]&&f[c[2]]||400,i[0].clockSpeed=c&&c[4]&&c[4]==="d"?500:i[0].clockSpeed,i[0].formFactor="SoC",a=Fh("vcgencmd get_config sdram_freq 2>/dev/null",Z.execOptsLinux),l=a.toString().split(`
157
+ `);let p=parseInt(Z.getValue(l,"sdram_freq","=",!0),10)||0;p&&(i[0].clockSpeed=p),a=Fh("vcgencmd measure_volts sdram_p 2>/dev/null",Z.execOptsLinux),l=a.toString().split(`
158
+ `);let d=parseFloat(Z.getValue(l,"volt","=",!0))||0;d&&(i[0].voltageConfigured=d,i[0].voltageMin=d,i[0].voltageMax=d)}}catch{Z.noop()}}e&&e(i),r(i)}),k3&&Bf("system_profiler SPMemoryDataType",function(s,o){if(!s){let a=o.toString().split(`
159
+ `),l=Z.getValue(a,"ecc",":",!0).toLowerCase(),u=o.toString().split(" BANK "),c=!0;u.length===1&&(u=o.toString().split(" DIMM"),c=!1),u.shift(),u.forEach(function(f){let p=f.split(`
160
+ `),d=(c?"BANK ":"DIMM")+p[0].trim().split("/")[0],m=parseInt(Z.getValue(p," Size"));m?i.push({size:m*1024*1024*1024,bank:d,type:Z.getValue(p," Type:"),ecc:l?l==="enabled":null,clockSpeed:parseInt(Z.getValue(p," Speed:"),10),formFactor:"",manufacturer:t(Z.getValue(p," Manufacturer:")),partNum:Z.getValue(p," Part Number:"),serialNum:Z.getValue(p," Serial Number:"),voltageConfigured:null,voltageMin:null,voltageMax:null}):i.push({size:0,bank:d,type:"Empty",ecc:null,clockSpeed:0,formFactor:"",manufacturer:"",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})})}if(!i.length){let a=o.toString().split(`
161
+ `),l=parseInt(Z.getValue(a," Memory:")),u=Z.getValue(a," Type:");l&&u&&i.push({size:l*1024*1024*1024,bank:"0",type:u,ecc:!1,clockSpeed:0,formFactor:"",manufacturer:"Apple",partNum:"",serialNum:"",voltageConfigured:null,voltageMin:null,voltageMax:null})}e&&e(i),r(i)}),B3&&(e&&e(i),r(i)),M3){let s="Unknown|Other|DRAM|Synchronous DRAM|Cache DRAM|EDO|EDRAM|VRAM|SRAM|RAM|ROM|FLASH|EEPROM|FEPROM|EPROM|CDRAM|3DRAM|SDRAM|SGRAM|RDRAM|DDR|DDR2|DDR2 FB-DIMM|Reserved|DDR3|FBD2|DDR4|LPDDR|LPDDR2|LPDDR3|LPDDR4|Logical non-volatile device|HBM|HBM2|DDR5|LPDDR5".split("|"),o="Unknown|Other|SIP|DIP|ZIP|SOJ|Proprietary|SIMM|DIMM|TSOP|PGA|RIMM|SODIMM|SRIMM|SMD|SSMP|QFP|TQFP|SOIC|LCC|PLCC|BGA|FPBGA|LGA".split("|");try{Z.powerShell("Get-CimInstance Win32_PhysicalMemory | select DataWidth,TotalWidth,Capacity,BankLabel,MemoryType,SMBIOSMemoryType,ConfiguredClockSpeed,FormFactor,Manufacturer,PartNumber,SerialNumber,ConfiguredVoltage,MinVoltage,MaxVoltage,Tag | fl").then((a,l)=>{if(!l){let u=a.toString().split(/\n\s*\n/);u.shift(),u.forEach(function(c){let f=c.split(`\r
162
+ `),p=Z.toInt(Z.getValue(f,"DataWidth",":")),d=Z.toInt(Z.getValue(f,"TotalWidth",":")),m=parseInt(Z.getValue(f,"Capacity",":"),10)||0,y=Z.getValue(f,"Tag",":"),v=Z.splitByNumber(y);m&&i.push({size:m,bank:Z.getValue(f,"BankLabel",":")+(v[1]?"/"+v[1]:""),type:s[parseInt(Z.getValue(f,"MemoryType",":"),10)||parseInt(Z.getValue(f,"SMBIOSMemoryType",":"),10)],ecc:p&&d?d>p:!1,clockSpeed:parseInt(Z.getValue(f,"ConfiguredClockSpeed",":"),10)||parseInt(Z.getValue(f,"Speed",":"),10)||0,formFactor:o[parseInt(Z.getValue(f,"FormFactor",":"),10)||0],manufacturer:Z.getValue(f,"Manufacturer",":"),partNum:Z.getValue(f,"PartNumber",":"),serialNum:Z.getValue(f,"SerialNumber",":"),voltageConfigured:(parseInt(Z.getValue(f,"ConfiguredVoltage",":"),10)||0)/1e3,voltageMin:(parseInt(Z.getValue(f,"MinVoltage",":"),10)||0)/1e3,voltageMax:(parseInt(Z.getValue(f,"MaxVoltage",":"),10)||0)/1e3})})}e&&e(i),r(i)})}catch{e&&e(i),r(i)}}})})}dx.memLayout=x9});var z3=oe((Zse,W3)=>{"use strict";var F3=K("child_process").exec,Su=K("fs"),Ne=Pt(),ro=process.platform,S9=ro==="linux"||ro==="android",_9=ro==="darwin",C9=ro==="win32",b9=ro==="freebsd",O9=ro==="openbsd",E9=ro==="netbsd",I9=ro==="sunos";function P9(e,t,n){let r={},i=Ne.getValue(e,"BatteryStatus",":").trim();if(i>=0){let s=i?parseInt(i):0;r.status=s,r.hasBattery=!0,r.maxCapacity=n||parseInt(Ne.getValue(e,"DesignCapacity",":")||0),r.designedCapacity=parseInt(Ne.getValue(e,"DesignCapacity",":")||t),r.voltage=parseInt(Ne.getValue(e,"DesignVoltage",":")||0)/1e3,r.capacityUnit="mWh",r.percent=parseInt(Ne.getValue(e,"EstimatedChargeRemaining",":")||0),r.currentCapacity=parseInt(r.maxCapacity*r.percent/100),r.isCharging=s>=6&&s<=9||s===11||s!==3&&s!==1&&r.percent<100,r.acConnected=r.isCharging||s===2,r.model=Ne.getValue(e,"DeviceID",":")}else r.status=-1;return r}W3.exports=function(e){return new Promise(t=>{process.nextTick(()=>{let n={hasBattery:!1,cycleCount:0,isCharging:!1,designedCapacity:0,maxCapacity:0,currentCapacity:0,voltage:0,capacityUnit:"",percent:0,timeRemaining:null,acConnected:!0,type:"",model:"",manufacturer:"",serial:""};if(S9){let r="";Su.existsSync("/sys/class/power_supply/BAT1/uevent")?r="/sys/class/power_supply/BAT1/":Su.existsSync("/sys/class/power_supply/BAT0/uevent")&&(r="/sys/class/power_supply/BAT0/");let i=!1,s="";Su.existsSync("/sys/class/power_supply/AC/online")?s="/sys/class/power_supply/AC/online":Su.existsSync("/sys/class/power_supply/AC0/online")&&(s="/sys/class/power_supply/AC0/online"),s&&(i=Su.readFileSync(s).toString().trim()==="1"),r?Su.readFile(r+"uevent",function(o,a){if(o)e&&e(n),t(n);else{let l=a.toString().split(`
163
+ `);n.isCharging=Ne.getValue(l,"POWER_SUPPLY_STATUS","=").toLowerCase()==="charging",n.acConnected=i||n.isCharging,n.voltage=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_VOLTAGE_NOW","="),10)/1e6,n.capacityUnit=n.voltage?"mWh":"mAh",n.cycleCount=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CYCLE_COUNT","="),10),n.maxCapacity=Math.round(parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CHARGE_FULL","=",!0,!0),10)/1e3*(n.voltage||1));let u=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_VOLTAGE_MIN_DESIGN","="),10)/1e6;n.designedCapacity=Math.round(parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CHARGE_FULL_DESIGN","=",!0,!0),10)/1e3*(u||n.voltage||1)),n.currentCapacity=Math.round(parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CHARGE_NOW","="),10)/1e3*(n.voltage||1)),n.maxCapacity||(n.maxCapacity=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_ENERGY_FULL","=",!0,!0),10)/1e3,n.designedCapacity=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_ENERGY_FULL_DESIGN","=",!0,!0),10)/1e3|n.maxCapacity,n.currentCapacity=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_ENERGY_NOW","="),10)/1e3);let c=Ne.getValue(l,"POWER_SUPPLY_CAPACITY","="),f=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_ENERGY_NOW","="),10),p=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_POWER_NOW","="),10),d=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CURRENT_NOW","="),10),m=parseInt("0"+Ne.getValue(l,"POWER_SUPPLY_CHARGE_NOW","="),10);n.percent=parseInt("0"+c,10),n.maxCapacity&&n.currentCapacity&&(n.hasBattery=!0,c||(n.percent=100*n.currentCapacity/n.maxCapacity)),n.isCharging&&(n.hasBattery=!0),f&&p?n.timeRemaining=Math.floor(f/p*60):d&&m?n.timeRemaining=Math.floor(m/d*60):d&&n.currentCapacity&&(n.timeRemaining=Math.floor(n.currentCapacity/d*60)),n.type=Ne.getValue(l,"POWER_SUPPLY_TECHNOLOGY","="),n.model=Ne.getValue(l,"POWER_SUPPLY_MODEL_NAME","="),n.manufacturer=Ne.getValue(l,"POWER_SUPPLY_MANUFACTURER","="),n.serial=Ne.getValue(l,"POWER_SUPPLY_SERIAL_NUMBER","="),e&&e(n),t(n)}}):(e&&e(n),t(n))}if((b9||O9||E9)&&F3("sysctl -i hw.acpi.battery hw.acpi.acline",function(r,i){let s=i.toString().split(`
164
+ `),o=parseInt("0"+Ne.getValue(s,"hw.acpi.battery.units"),10),a=parseInt("0"+Ne.getValue(s,"hw.acpi.battery.life"),10);n.hasBattery=o>0,n.cycleCount=null,n.isCharging=Ne.getValue(s,"hw.acpi.acline")!=="1",n.acConnected=n.isCharging,n.maxCapacity=null,n.currentCapacity=null,n.capacityUnit="unknown",n.percent=o?a:null,e&&e(n),t(n)}),_9&&F3('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|BatterySerialNumber|TimeRemaining|Voltage"; pmset -g batt | grep %',function(r,i){if(i){let s=i.toString().replace(/ +/g,"").replace(/"+/g,"").replace(/-/g,"").split(`
165
+ `);n.cycleCount=parseInt("0"+Ne.getValue(s,"cyclecount","="),10),n.voltage=parseInt("0"+Ne.getValue(s,"voltage","="),10)/1e3,n.capacityUnit=n.voltage?"mWh":"mAh",n.maxCapacity=Math.round(parseInt("0"+Ne.getValue(s,"applerawmaxcapacity","="),10)*(n.voltage||1)),n.currentCapacity=Math.round(parseInt("0"+Ne.getValue(s,"applerawcurrentcapacity","="),10)*(n.voltage||1)),n.designedCapacity=Math.round(parseInt("0"+Ne.getValue(s,"DesignCapacity","="),10)*(n.voltage||1)),n.manufacturer="Apple",n.serial=Ne.getValue(s,"BatterySerialNumber","=");let o=null,l=Ne.getValue(s,"internal","Battery").split(";");if(l&&l[0]){let u=l[0].split(" ");u&&u[1]&&(o=parseFloat(u[1].trim().replace(/%/g,"")))}l&&l[1]?(n.isCharging=l[1].trim()==="charging",n.acConnected=l[1].trim()!=="discharging"):(n.isCharging=Ne.getValue(s,"ischarging","=").toLowerCase()==="yes",n.acConnected=n.isCharging),n.maxCapacity&&n.currentCapacity&&(n.hasBattery=!0,n.type="Li-ion",n.percent=o!==null?o:Math.round(100*n.currentCapacity/n.maxCapacity),n.isCharging||(n.timeRemaining=parseInt("0"+Ne.getValue(s,"TimeRemaining","="),10)))}e&&e(n),t(n)}),I9&&(e&&e(n),t(n)),C9)try{let r=[];r.push(Ne.powerShell("Get-CimInstance Win32_Battery | select BatteryStatus, DesignCapacity, DesignVoltage, EstimatedChargeRemaining, DeviceID | fl")),r.push(Ne.powerShell("(Get-WmiObject -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity")),r.push(Ne.powerShell("(Get-CimInstance -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity")),Ne.promiseAll(r).then(i=>{if(i){let s=i.results[0].split(/\n\s*\n/),o=[],a=c=>/\S/.test(c);for(let c=0;c<s.length;c++)a(s[c])&&(!o.length||!a(s[c-1]))&&o.push([]),a(s[c])&&o[o.length-1].push(s[c]);let l=i.results[1].split(`\r
166
+ `).filter(c=>c),u=i.results[2].split(`\r
167
+ `).filter(c=>c);if(o.length){let c=!1,f=[];for(let p=0;p<o.length;p++){let d=o[p][0].split(`\r
168
+ `),m=l&&l.length>=p+1&&l[p]?Ne.toInt(l[p]):0,y=u&&u.length>=p+1&&u[p]?Ne.toInt(u[p]):0,v=P9(d,m,y);!c&&v.status>0&&v.status!==10?(n.hasBattery=v.hasBattery,n.maxCapacity=v.maxCapacity,n.designedCapacity=v.designedCapacity,n.voltage=v.voltage,n.capacityUnit=v.capacityUnit,n.percent=v.percent,n.currentCapacity=v.currentCapacity,n.isCharging=v.isCharging,n.acConnected=v.acConnected,n.model=v.model,c=!0):v.status!==-1&&f.push({hasBattery:v.hasBattery,maxCapacity:v.maxCapacity,designedCapacity:v.designedCapacity,voltage:v.voltage,capacityUnit:v.capacityUnit,percent:v.percent,currentCapacity:v.currentCapacity,isCharging:v.isCharging,timeRemaining:null,acConnected:v.acConnected,model:v.model,type:"",manufacturer:"",serial:""})}!c&&f.length&&(n=f[0],f.shift()),f.length&&(n.additionalBatteries=f)}}e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}});var K3=oe(q3=>{"use strict";var Wh=K("fs"),_u=K("child_process").exec,mx=K("child_process").execSync,ne=Pt(),io=process.platform,Uf="",zh=io==="linux"||io==="android",T9=io==="darwin",G3=io==="win32",A9=io==="freebsd",L9=io==="openbsd",N9=io==="netbsd",D9=io==="sunos",Ff=0,Wf=0,Gh=0,$h=0,$3={"-2":"UNINITIALIZED","-1":"OTHER",0:"HD15",1:"SVIDEO",2:"Composite video",3:"Component video",4:"DVI",5:"HDMI",6:"LVDS",8:"D_JPN",9:"SDI",10:"DP",11:"DP embedded",12:"UDI",13:"UDI embedded",14:"SDTVDONGLE",15:"MIRACAST","2147483648":"INTERNAL"};function H3(e){let t=[{pattern:"^LG.+",manufacturer:"LG"},{pattern:"^BENQ.+",manufacturer:"BenQ"},{pattern:"^ASUS.+",manufacturer:"Asus"},{pattern:"^DELL.+",manufacturer:"Dell"},{pattern:"^SAMSUNG.+",manufacturer:"Samsung"},{pattern:"^VIEWSON.+",manufacturer:"ViewSonic"},{pattern:"^SONY.+",manufacturer:"Sony"},{pattern:"^ACER.+",manufacturer:"Acer"},{pattern:"^AOC.+",manufacturer:"AOC Monitors"},{pattern:"^HP.+",manufacturer:"HP"},{pattern:"^EIZO.?",manufacturer:"Eizo"},{pattern:"^PHILIPS.?",manufacturer:"Philips"},{pattern:"^IIYAMA.?",manufacturer:"Iiyama"},{pattern:"^SHARP.?",manufacturer:"Sharp"},{pattern:"^NEC.?",manufacturer:"NEC"},{pattern:"^LENOVO.?",manufacturer:"Lenovo"},{pattern:"COMPAQ.?",manufacturer:"Compaq"},{pattern:"APPLE.?",manufacturer:"Apple"},{pattern:"INTEL.?",manufacturer:"Intel"},{pattern:"AMD.?",manufacturer:"AMD"},{pattern:"NVIDIA.?",manufacturer:"NVDIA"}],n="";return e&&(e=e.toUpperCase(),t.forEach(r=>{RegExp(r.pattern).test(e)&&(n=r.manufacturer)})),n}function k9(e){return{610:"Apple","1e6d":"LG","10ac":"DELL","4dd9":"Sony","38a3":"NEC"}[e]||""}function M9(e){let t="";return e=(e||"").toLowerCase(),e.indexOf("apple")>=0?t="0x05ac":e.indexOf("nvidia")>=0?t="0x10de":e.indexOf("intel")>=0?t="0x8086":(e.indexOf("ati")>=0||e.indexOf("amd")>=0)&&(t="0x1002"),t}function R9(e){return{spdisplays_mtlgpufamilymac1:"mac1",spdisplays_mtlgpufamilymac2:"mac2",spdisplays_mtlgpufamilyapple1:"apple1",spdisplays_mtlgpufamilyapple2:"apple2",spdisplays_mtlgpufamilyapple3:"apple3",spdisplays_mtlgpufamilyapple4:"apple4",spdisplays_mtlgpufamilyapple5:"apple5",spdisplays_mtlgpufamilyapple6:"apple6",spdisplays_mtlgpufamilyapple7:"apple7",spdisplays_metalfeaturesetfamily11:"family1_v1",spdisplays_metalfeaturesetfamily12:"family1_v2",spdisplays_metalfeaturesetfamily13:"family1_v3",spdisplays_metalfeaturesetfamily14:"family1_v4",spdisplays_metalfeaturesetfamily21:"family2_v1"}[e]||""}function V9(e){function t(p){let d={controllers:[],displays:[]};try{return p.forEach(function(m){let y=(m.sppci_bus||"").indexOf("builtin")>-1?"Built-In":(m.sppci_bus||"").indexOf("pcie")>-1?"PCIe":"",v=(parseInt(m.spdisplays_vram||"",10)||0)*((m.spdisplays_vram||"").indexOf("GB")>-1?1024:1),h=(parseInt(m.spdisplays_vram_shared||"",10)||0)*((m.spdisplays_vram_shared||"").indexOf("GB")>-1?1024:1),g=R9(m.spdisplays_metal||m.spdisplays_metalfamily||"");d.controllers.push({vendor:H3(m.spdisplays_vendor||"")||m.spdisplays_vendor||"",model:m.sppci_model||"",bus:y,vramDynamic:y==="Built-In",vram:v||h||null,deviceId:m["spdisplays_device-id"]||"",vendorId:m["spdisplays_vendor-id"]||M9((m.spdisplays_vendor||"")+(m.sppci_model||"")),external:m.sppci_device_type==="spdisplays_egpu",cores:m.sppci_cores||null,metalVersion:g}),m.spdisplays_ndrvs&&m.spdisplays_ndrvs.length&&m.spdisplays_ndrvs.forEach(function(w){let x=w.spdisplays_connection_type||"",C=(w._spdisplays_resolution||"").split("@"),A=C[0].split("x"),T=(w._spdisplays_pixels||"").split("x"),z=w.spdisplays_depth||"",M=w["_spdisplays_display-serial-number"]||w["_spdisplays_display-serial-number2"]||null;d.displays.push({vendor:k9(w["_spdisplays_display-vendor-id"]||"")||H3(w._name||""),vendorId:w["_spdisplays_display-vendor-id"]||"",model:w._name||"",productionYear:w["_spdisplays_display-year"]||null,serial:M!=="0"?M:null,displayId:w._spdisplays_displayID||null,main:w.spdisplays_main?w.spdisplays_main==="spdisplays_yes":!1,builtin:(w.spdisplays_display_type||"").indexOf("built-in")>-1,connection:x.indexOf("_internal")>-1?"Internal":x.indexOf("_displayport")>-1?"Display Port":x.indexOf("_hdmi")>-1?"HDMI":null,sizeX:null,sizeY:null,pixelDepth:z==="CGSThirtyBitColor"?30:z==="CGSThirtytwoBitColor"?32:z==="CGSTwentyfourBitColor"?24:null,resolutionX:T.length>1?parseInt(T[0],10):null,resolutionY:T.length>1?parseInt(T[1],10):null,currentResX:A.length>1?parseInt(A[0],10):null,currentResY:A.length>1?parseInt(A[1],10):null,positionX:0,positionY:0,currentRefreshRate:C.length>1?parseInt(C[1],10):null})})}),d}catch{return d}}function n(p){let d=[],m={vendor:"",subVendor:"",model:"",bus:"",busAddress:"",vram:null,vramDynamic:!1,pciID:""},y=!1,v=[];try{v=mx('export LC_ALL=C; dmidecode -t 9 2>/dev/null; unset LC_ALL | grep "Bus Address: "',ne.execOptsLinux).toString().split(`
169
+ `);for(let g=0;g<v.length;g++)v[g]=v[g].replace("Bus Address:","").replace("0000:","").trim();v=v.filter(function(g){return g!=null&&g})}catch{ne.noop()}let h=1;return p.forEach(g=>{let w="";if(h<p.length&&p[h]&&(w=p[h],w.indexOf(":")>0&&(w=w.split(":")[1])),g.trim()!==""){if(g[0]!==" "&&g[0]!==" "){let x=v.indexOf(g.split(" ")[0])>=0,C=g.toLowerCase().indexOf(" vga "),A=g.toLowerCase().indexOf("3d controller");if(C!==-1||A!==-1){A!==-1&&C===-1&&(C=A),(m.vendor||m.model||m.bus||m.vram!==null||m.vramDynamic)&&(d.push(m),m={vendor:"",model:"",bus:"",busAddress:"",vram:null,vramDynamic:!1});let T=g.split(" ")[0];/[\da-fA-F]{2}:[\da-fA-F]{2}\.[\da-fA-F]/.test(T)&&(m.busAddress=T),y=!0;let z=g.search(/\[[0-9a-f]{4}:[0-9a-f]{4}]|$/),M=g.substr(C,z-C).split(":");if(m.busAddress=g.substr(0,C).trim(),M.length>1&&(M[1]=M[1].trim(),M[1].toLowerCase().indexOf("corporation")>=0?(m.vendor=M[1].substr(0,M[1].toLowerCase().indexOf("corporation")+11).trim(),m.model=M[1].substr(M[1].toLowerCase().indexOf("corporation")+11,200).split("(")[0].trim(),m.bus=v.length>0&&x?"PCIe":"Onboard",m.vram=null,m.vramDynamic=!1):M[1].toLowerCase().indexOf(" inc.")>=0?((M[1].match(/]/g)||[]).length>1?(m.vendor=M[1].substr(0,M[1].toLowerCase().indexOf("]")+1).trim(),m.model=M[1].substr(M[1].toLowerCase().indexOf("]")+1,200).trim().split("(")[0].trim()):(m.vendor=M[1].substr(0,M[1].toLowerCase().indexOf(" inc.")+5).trim(),m.model=M[1].substr(M[1].toLowerCase().indexOf(" inc.")+5,200).trim().split("(")[0].trim()),m.bus=v.length>0&&x?"PCIe":"Onboard",m.vram=null,m.vramDynamic=!1):M[1].toLowerCase().indexOf(" ltd.")>=0&&((M[1].match(/]/g)||[]).length>1?(m.vendor=M[1].substr(0,M[1].toLowerCase().indexOf("]")+1).trim(),m.model=M[1].substr(M[1].toLowerCase().indexOf("]")+1,200).trim().split("(")[0].trim()):(m.vendor=M[1].substr(0,M[1].toLowerCase().indexOf(" ltd.")+5).trim(),m.model=M[1].substr(M[1].toLowerCase().indexOf(" ltd.")+5,200).trim().split("(")[0].trim())),m.model&&w.indexOf(m.model)!==-1)){let U=w.split(m.model)[0].trim();U&&(m.subVendor=U)}}else y=!1}if(y){let x=g.split(":");if(x.length>1&&x[0].replace(/ +/g,"").toLowerCase().indexOf("devicename")!==-1&&x[1].toLowerCase().indexOf("onboard")!==-1&&(m.bus="Onboard"),x.length>1&&x[0].replace(/ +/g,"").toLowerCase().indexOf("region")!==-1&&x[1].toLowerCase().indexOf("memory")!==-1){let C=x[1].split("=");C.length>1&&(m.vram=parseInt(C[1]))}}}h++}),(m.vendor||m.model||m.bus||m.busAddress||m.vram!==null||m.vramDynamic)&&d.push(m),d}function r(p,d){let m=/\[([^\]]+)\]\s+(\w+)\s+(.*)/,y=d.reduce((v,h)=>{let g=m.exec(h.trim());return g&&(v[g[1]]||(v[g[1]]={}),v[g[1]][g[2]]=g[3]),v},{});for(let v in y){let h=y[v];if(h.CL_DEVICE_TYPE==="CL_DEVICE_TYPE_GPU"){let g;if(h.CL_DEVICE_TOPOLOGY_AMD){let w=h.CL_DEVICE_TOPOLOGY_AMD.match(/[a-zA-Z0-9]+:\d+\.\d+/);w&&(g=w[0])}else if(h.CL_DEVICE_PCI_BUS_ID_NV&&h.CL_DEVICE_PCI_SLOT_ID_NV){let w=parseInt(h.CL_DEVICE_PCI_BUS_ID_NV),x=parseInt(h.CL_DEVICE_PCI_SLOT_ID_NV);if(!isNaN(w)&&!isNaN(x)){let C=w&255,A=x>>3&255,T=x&7;g=`${C.toString().padStart(2,"0")}:${A.toString().padStart(2,"0")}.${T}`}}if(g){let w=p.find(C=>C.busAddress===g);w||(w={vendor:"",model:"",bus:"",busAddress:g,vram:null,vramDynamic:!1},p.push(w)),w.vendor=h.CL_DEVICE_VENDOR,h.CL_DEVICE_BOARD_NAME_AMD?w.model=h.CL_DEVICE_BOARD_NAME_AMD:w.model=h.CL_DEVICE_NAME;let x=parseInt(h.CL_DEVICE_GLOBAL_MEM_SIZE);isNaN(x)||(w.vram=Math.round(x/1024/1024))}}}return p}function i(){if(Uf)return Uf;if(G3)try{let p=ne.WINDIR+"\\System32\\DriverStore\\FileRepository",m=Wh.readdirSync(p).filter(y=>Wh.readdirSync([p,y].join("/")).includes("nvidia-smi.exe")).reduce((y,v)=>{let h=Wh.statSync([p,y,"nvidia-smi.exe"].join("/")),g=Wh.statSync([p,v,"nvidia-smi.exe"].join("/"));return h.ctimeMs>g.ctimeMs?y:v});m&&(Uf=[p,m,"nvidia-smi.exe"].join("/"))}catch{ne.noop()}else zh&&(Uf="nvidia-smi");return Uf}function s(p){let d=i();if(p=p||ne.execOptsWin,d){let y=d+" "+"--query-gpu=driver_version,pci.sub_device_id,name,pci.bus_id,fan.speed,memory.total,memory.used,memory.free,utilization.gpu,utilization.memory,temperature.gpu,temperature.memory,power.draw,power.limit,clocks.gr,clocks.mem --format=csv,noheader,nounits"+(zh?" 2>/dev/null":"");zh&&(p.stdio=["pipe","pipe","ignore"]);try{return mx(y,p).toString()}catch{ne.noop()}}return""}function o(){function p(v){return[null,void 0].includes(v)?v:parseFloat(v)}let d=s();if(!d)return[];let y=d.split(`
170
+ `).filter(Boolean).map(v=>{let h=v.split(", ").map(g=>g.includes("N/A")?void 0:g);return h.length===16?{driverVersion:h[0],subDeviceId:h[1],name:h[2],pciBus:h[3],fanSpeed:p(h[4]),memoryTotal:p(h[5]),memoryUsed:p(h[6]),memoryFree:p(h[7]),utilizationGpu:p(h[8]),utilizationMemory:p(h[9]),temperatureGpu:p(h[10]),temperatureMemory:p(h[11]),powerDraw:p(h[12]),powerLimit:p(h[13]),clockCore:p(h[14]),clockMemory:p(h[15])}:{}});return y=y.filter(v=>"pciBus"in v),y}function a(p,d){return d.driverVersion&&(p.driverVersion=d.driverVersion),d.subDeviceId&&(p.subDeviceId=d.subDeviceId),d.name&&(p.name=d.name),d.pciBus&&(p.pciBus=d.pciBus),d.fanSpeed&&(p.fanSpeed=d.fanSpeed),d.memoryTotal&&(p.memoryTotal=d.memoryTotal,p.vram=d.memoryTotal,p.vramDynamic=!1),d.memoryUsed&&(p.memoryUsed=d.memoryUsed),d.memoryFree&&(p.memoryFree=d.memoryFree),d.utilizationGpu&&(p.utilizationGpu=d.utilizationGpu),d.utilizationMemory&&(p.utilizationMemory=d.utilizationMemory),d.temperatureGpu&&(p.temperatureGpu=d.temperatureGpu),d.temperatureMemory&&(p.temperatureMemory=d.temperatureMemory),d.powerDraw&&(p.powerDraw=d.powerDraw),d.powerLimit&&(p.powerLimit=d.powerLimit),d.clockCore&&(p.clockCore=d.clockCore),d.clockMemory&&(p.clockMemory=d.clockMemory),p}function l(p){let d={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null},m=108;if(p.substr(m,6)==="000000"&&(m+=36),p.substr(m,6)==="000000"&&(m+=36),p.substr(m,6)==="000000"&&(m+=36),p.substr(m,6)==="000000"&&(m+=36),d.resolutionX=parseInt("0x0"+p.substr(m+8,1)+p.substr(m+4,2)),d.resolutionY=parseInt("0x0"+p.substr(m+14,1)+p.substr(m+10,2)),d.sizeX=parseInt("0x0"+p.substr(m+28,1)+p.substr(m+24,2)),d.sizeY=parseInt("0x0"+p.substr(m+29,1)+p.substr(m+26,2)),m=p.indexOf("000000fc00"),m>=0){let y=p.substr(m+10,26);y.indexOf("0a")!==-1&&(y=y.substr(0,y.indexOf("0a")));try{y.length>2&&(d.model=y.match(/.{1,2}/g).map(function(v){return String.fromCharCode(parseInt(v,16))}).join(""))}catch{ne.noop()}}else d.model="";return d}function u(p,d){let m=[],y={vendor:"",model:"",deviceName:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null},v=!1,h=!1,g="",w=0;for(let x=1;x<p.length;x++)if(p[x].trim()!==""){if(p[x][0]!==" "&&p[x][0]!==" "&&p[x].toLowerCase().indexOf(" connected ")!==-1){(y.model||y.main||y.builtin||y.connection||y.sizeX!==null||y.pixelDepth!==null||y.resolutionX!==null)&&(m.push(y),y={vendor:"",model:"",main:!1,builtin:!1,connection:"",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:null,resolutionY:null,currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null});let C=p[x].split(" ");y.connection=C[0],y.main=p[x].toLowerCase().indexOf(" primary ")>=0,y.builtin=C[0].toLowerCase().indexOf("edp")>=0}if(v)if(p[x].search(/\S|$/)>w)g+=p[x].toLowerCase().trim();else{let C=l(g);y.vendor=C.vendor,y.model=C.model,y.resolutionX=C.resolutionX,y.resolutionY=C.resolutionY,y.sizeX=C.sizeX,y.sizeY=C.sizeY,y.pixelDepth=d,v=!1}if(p[x].toLowerCase().indexOf("edid:")>=0&&(v=!0,w=p[x].search(/\S|$/)),p[x].toLowerCase().indexOf("*current")>=0){let C=p[x].split("(");if(C&&C.length>1&&C[0].indexOf("x")>=0){let A=C[0].trim().split("x");y.currentResX=ne.toInt(A[0]),y.currentResY=ne.toInt(A[1])}h=!0}if(h&&p[x].toLowerCase().indexOf("clock")>=0&&p[x].toLowerCase().indexOf("hz")>=0&&p[x].toLowerCase().indexOf("v: height")>=0){let C=p[x].split("clock");C&&C.length>1&&C[1].toLowerCase().indexOf("hz")>=0&&(y.currentRefreshRate=ne.toInt(C[1])),h=!1}}return(y.model||y.main||y.builtin||y.connection||y.sizeX!==null||y.pixelDepth!==null||y.resolutionX!==null)&&m.push(y),m}return new Promise(p=>{process.nextTick(()=>{let d={controllers:[],displays:[]};if(T9&&_u("system_profiler -xml -detailLevel full SPDisplaysDataType",function(y,v){if(!y){try{let h=v.toString();d=t(ne.plistParser(h)[0]._items)}catch{ne.noop()}try{v=mx('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""',{maxBuffer:1024*2e4});let h=(v||"").toString(),g=ne.plistReader(h);if(g.DisplayAnyUserSets&&g.DisplayAnyUserSets.Configs&&g.DisplayAnyUserSets.Configs[0]&&g.DisplayAnyUserSets.Configs[0].DisplayConfig){let w=g.DisplayAnyUserSets.Configs[0].DisplayConfig,x=0;w.forEach(C=>{C.CurrentInfo&&C.CurrentInfo.OriginX!==void 0&&d.displays&&d.displays[x]&&(d.displays[x].positionX=C.CurrentInfo.OriginX),C.CurrentInfo&&C.CurrentInfo.OriginY!==void 0&&d.displays&&d.displays[x]&&(d.displays[x].positionY=C.CurrentInfo.OriginY),x++})}if(g.DisplayAnyUserSets&&g.DisplayAnyUserSets.length>0&&g.DisplayAnyUserSets[0].length>0&&g.DisplayAnyUserSets[0][0].DisplayID){let w=g.DisplayAnyUserSets[0],x=0;w.forEach(C=>{"OriginX"in C&&d.displays&&d.displays[x]&&(d.displays[x].positionX=C.OriginX),"OriginY"in C&&d.displays&&d.displays[x]&&(d.displays[x].positionY=C.OriginY),C.Mode&&C.Mode.BitsPerPixel!==void 0&&d.displays&&d.displays[x]&&(d.displays[x].pixelDepth=C.Mode.BitsPerPixel),x++})}}catch{ne.noop()}}e&&e(d),p(d)}),zh&&(ne.isRaspberry()&&ne.isRaspbian()?_u(`fbset -s | grep 'mode "'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;`,function(y,v){let h=v.toString().split(`
171
+ `);if(h.length>3&&h[0].indexOf('mode "')>=-1&&h[2].indexOf("0x12000a")>-1){let g=h[0].replace("mode","").replace(/"/g,"").trim().split("x");g.length===2&&d.displays.push({vendor:"",model:ne.getValue(h,"device_name","="),main:!0,builtin:!1,connection:"HDMI",sizeX:null,sizeY:null,pixelDepth:null,resolutionX:parseInt(g[0],10),resolutionY:parseInt(g[1],10),currentResX:null,currentResY:null,positionX:0,positionY:0,currentRefreshRate:null})}h.length>1&&v.toString().indexOf("gpu=")>=-1&&d.controllers.push({vendor:"Broadcom",model:ne.getRpiGpu(),bus:"",vram:ne.getValue(h,"gpu","=").replace("M",""),vramDynamic:!0}),e&&e(d),p(d)}):_u("lspci -vvv 2>/dev/null",function(y,v){if(!y){let g=v.toString().split(`
172
+ `);d.controllers=n(g);let w=o();d.controllers=d.controllers.map(x=>a(x,w.find(C=>C.pciBus.toLowerCase().endsWith(x.busAddress.toLowerCase()))||{}))}_u("clinfo --raw",function(g,w){if(!g){let C=w.toString().split(`
173
+ `);d.controllers=r(d.controllers,C)}_u("xdpyinfo 2>/dev/null | grep 'depth of root window' | awk '{ print $5 }'",function(C,A){let T=0;if(!C){let M=A.toString().split(`
174
+ `);T=parseInt(M[0])||0}_u("xrandr --verbose 2>/dev/null",function(M,U){if(!M){let D=U.toString().split(`
175
+ `);d.displays=u(D,T)}e&&e(d),p(d)})})})})),(A9||L9||N9)&&(e&&e(null),p(null)),D9&&(e&&e(null),p(null)),G3)try{let m=[];m.push(ne.powerShell("Get-CimInstance win32_VideoController | fl *")),m.push(ne.powerShell('gp "HKLM:\\SYSTEM\\ControlSet001\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}\\*" -ErrorAction SilentlyContinue | where MatchingDeviceId $null -NE | select MatchingDeviceId,HardwareInformation.qwMemorySize | fl')),m.push(ne.powerShell("Get-CimInstance win32_desktopmonitor | fl *")),m.push(ne.powerShell("Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorBasicDisplayParams | fl")),m.push(ne.powerShell("Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens")),m.push(ne.powerShell("Get-CimInstance -Namespace root\\wmi -ClassName WmiMonitorConnectionParams | fl")),m.push(ne.powerShell('gwmi WmiMonitorID -Namespace root\\wmi | ForEach-Object {(($_.ManufacturerName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.ProductCodeID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.UserFriendlyName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.SerialNumberID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + $_.InstanceName}'));let y=o();Promise.all(m).then(v=>{let h=v[0].replace(/\r/g,"").split(/\n\s*\n/),g=v[1].replace(/\r/g,"").split(/\n\s*\n/);d.controllers=c(h,g),d.controllers=d.controllers.map(M=>M.vendor.toLowerCase()==="nvidia"?a(M,y.find(U=>{let D=(M.subDeviceId||"").toLowerCase(),F=U.subDeviceId.split("x"),V=F.length>1?F[1].toLowerCase():F[0].toLowerCase(),se=Math.abs(D.length-V.length);if(D.length>V.length)for(let X=0;X<se;X++)V="0"+V;else if(D.length<V.length)for(let X=0;X<se;X++)D="0"+D;return D===V})||{}):M);let w=v[2].replace(/\r/g,"").split(/\n\s*\n/);w[0].trim()===""&&w.shift(),w.length&&w[w.length-1].trim()===""&&w.pop();let x=v[3].replace(/\r/g,"").split("Active ");x.shift();let C=v[4].replace(/\r/g,"").split("BitsPerPixel ");C.shift();let A=v[5].replace(/\r/g,"").split(/\n\s*\n/);A.shift();let T=v[6].replace(/\r/g,"").split(/\n/),z=[];T.forEach(M=>{let U=M.split("|");U.length===5&&z.push({vendor:U[0],code:U[1],model:U[2],serial:U[3],instanceId:U[4]})}),d.displays=f(C,x,w,A,z),d.displays.length===1&&(Ff&&(d.displays[0].resolutionX=Ff,d.displays[0].currentResX||(d.displays[0].currentResX=Ff)),Wf&&(d.displays[0].resolutionY=Wf,d.displays[0].currentResY===0&&(d.displays[0].currentResY=Wf)),Gh&&(d.displays[0].pixelDepth=Gh)),d.displays=d.displays.map(M=>($h&&!M.currentRefreshRate&&(M.currentRefreshRate=$h),M)),e&&e(d),p(d)}).catch(()=>{e&&e(d),p(d)})}catch{e&&e(d),p(d)}})});function c(p,d){let m={};for(let v in d)if({}.hasOwnProperty.call(d,v)&&d[v].trim()!==""){let h=d[v].trim().split(`
176
+ `),g=ne.getValue(h,"MatchingDeviceId").match(/PCI\\(VEN_[0-9A-F]{4})&(DEV_[0-9A-F]{4})(?:&(SUBSYS_[0-9A-F]{8}))?(?:&(REV_[0-9A-F]{2}))?/i);if(g){let w=parseInt(ne.getValue(h,"HardwareInformation.qwMemorySize"));if(!isNaN(w)){let x=g[1].toUpperCase()+"&"+g[2].toUpperCase();g[3]&&(x+="&"+g[3].toUpperCase()),g[4]&&(x+="&"+g[4].toUpperCase()),m[x]=w}}}let y=[];for(let v in p)if({}.hasOwnProperty.call(p,v)&&p[v].trim()!==""){let h=p[v].trim().split(`
177
+ `),g=ne.getValue(h,"PNPDeviceID",":").match(/PCI\\(VEN_[0-9A-F]{4})&(DEV_[0-9A-F]{4})(?:&(SUBSYS_[0-9A-F]{8}))?(?:&(REV_[0-9A-F]{2}))?/i),w=null,x=null;if(g){if(w=g[3]||"",w&&(w=w.split("_")[1]),x==null&&g[3]&&g[4]){let C=g[1].toUpperCase()+"&"+g[2].toUpperCase()+"&"+g[3].toUpperCase()+"&"+g[4].toUpperCase();({}).hasOwnProperty.call(m,C)&&(x=m[C])}if(x==null&&g[3]){let C=g[1].toUpperCase()+"&"+g[2].toUpperCase()+"&"+g[3].toUpperCase();({}).hasOwnProperty.call(m,C)&&(x=m[C])}if(x==null&&g[4]){let C=g[1].toUpperCase()+"&"+g[2].toUpperCase()+"&"+g[4].toUpperCase();({}).hasOwnProperty.call(m,C)&&(x=m[C])}if(x==null){let C=g[1].toUpperCase()+"&"+g[2].toUpperCase();({}).hasOwnProperty.call(m,C)&&(x=m[C])}}y.push({vendor:ne.getValue(h,"AdapterCompatibility",":"),model:ne.getValue(h,"name",":"),bus:ne.getValue(h,"PNPDeviceID",":").startsWith("PCI")?"PCI":"",vram:(x??ne.toInt(ne.getValue(h,"AdapterRAM",":")))/1024/1024,vramDynamic:ne.getValue(h,"VideoMemoryType",":")==="2",subDeviceId:w}),Ff=ne.toInt(ne.getValue(h,"CurrentHorizontalResolution",":"))||Ff,Wf=ne.toInt(ne.getValue(h,"CurrentVerticalResolution",":"))||Wf,$h=ne.toInt(ne.getValue(h,"CurrentRefreshRate",":"))||$h,Gh=ne.toInt(ne.getValue(h,"CurrentBitsPerPixel",":"))||Gh}return y}function f(p,d,m,y,v){let h=[],g="",w="",x="",C=0,A=0;if(m&&m.length){let T=m[0].split(`
178
+ `);g=ne.getValue(T,"MonitorManufacturer",":"),w=ne.getValue(T,"Name",":"),x=ne.getValue(T,"PNPDeviceID",":").replace(/&amp;/g,"&").toLowerCase(),C=ne.toInt(ne.getValue(T,"ScreenWidth",":")),A=ne.toInt(ne.getValue(T,"ScreenHeight",":"))}for(let T=0;T<p.length;T++)if(p[T].trim()!==""){p[T]="BitsPerPixel "+p[T],d[T]="Active "+d[T],(y.length===0||y[T]===void 0)&&(y[T]="Unknown");let z=p[T].split(`
179
+ `),M=d[T].split(`
180
+ `),U=y[T].split(`
181
+ `),D=ne.getValue(z,"BitsPerPixel"),F=ne.getValue(z,"Bounds").replace("{","").replace("}","").replace(/=/g,":").split(","),V=ne.getValue(z,"Primary"),se=ne.getValue(M,"MaxHorizontalImageSize"),X=ne.getValue(M,"MaxVerticalImageSize"),Ve=ne.getValue(M,"InstanceName").toLowerCase(),we=ne.getValue(U,"VideoOutputTechnology"),Te=ne.getValue(z,"DeviceName"),Je="",ve="";v.forEach(Me=>{Me.instanceId.toLowerCase().startsWith(Ve)&&g.startsWith("(")&&w.startsWith("PnP")&&(Je=Me.vendor,ve=Me.model)}),h.push({vendor:Ve.startsWith(x)&&Je===""?g:Je,model:Ve.startsWith(x)&&ve===""?w:ve,deviceName:Te,main:V.toLowerCase()==="true",builtin:we==="2147483648",connection:we&&$3[we]?$3[we]:"",resolutionX:ne.toInt(ne.getValue(F,"Width",":")),resolutionY:ne.toInt(ne.getValue(F,"Height",":")),sizeX:se?parseInt(se,10):null,sizeY:X?parseInt(X,10):null,pixelDepth:D,currentResX:ne.toInt(ne.getValue(F,"Width",":")),currentResY:ne.toInt(ne.getValue(F,"Height",":")),positionX:ne.toInt(ne.getValue(F,"X",":")),positionY:ne.toInt(ne.getValue(F,"Y",":"))})}return p.length===0&&h.push({vendor:g,model:w,main:!0,sizeX:null,sizeY:null,resolutionX:C,resolutionY:A,pixelDepth:null,currentResX:C,currentResY:A,positionX:0,positionY:0}),h}}q3.graphics=V9});var Q3=oe(Va=>{"use strict";var j=Pt(),Y3=K("fs"),cn=K("child_process").exec,so=K("child_process").execSync,j9=j.promisifySave(K("child_process").exec),ao=process.platform,br=ao==="linux"||ao==="android",oo=ao==="darwin",Cu=ao==="win32",Or=ao==="freebsd",Er=ao==="openbsd",Ir=ao==="netbsd",bu=ao==="sunos",Ge={},xe={};function B9(e,t){j.isFunction(e)&&(t=e,e="");let n=[],r=[];function i(l){if(!l.startsWith("/"))return"NFS";let u=l.split("/"),c=u[u.length-1],f=n.filter(p=>p.indexOf(c)>=0);return f.length===1&&f[0].indexOf("APFS")>=0?"APFS":"HFS"}function s(l){let u=["rootfs","unionfs","squashfs","cramfs","initrd","initramfs","devtmpfs","tmpfs","udev","devfs","specfs","type","appimaged"],c=!1;return u.forEach(f=>{l.toLowerCase().indexOf(f)>=0&&(c=!0)}),c}function o(l){let u=l.toString().split(`
182
+ `);if(u.shift(),l.toString().toLowerCase().indexOf("filesystem")){let c=0;for(let f=0;f<u.length;f++)u[f]&&u[f].toLowerCase().startsWith("filesystem")&&(c=f);for(let f=0;f<c;f++)u.shift()}return u}function a(l){let u=[];return l.forEach(function(c){if(c!==""&&(c=c.replace(/ +/g," ").split(" "),c&&(c[0].startsWith("/")||c[6]&&c[6]==="/"||c[0].indexOf("/")>0||c[0].indexOf(":")===1||!oo&&!s(c[1])))){let f=c[0],p=br||Or||Er||Ir?c[1]:i(c[0]),d=parseInt(br||Or||Er||Ir?c[2]:c[1])*1024,m=parseInt(br||Or||Er||Ir?c[3]:c[2])*1024,y=parseInt(br||Or||Er||Ir?c[4]:c[3])*1024,v=parseFloat((100*(m/(m+y))).toFixed(2)),h=r&&Object.keys(r).length>0?r[f]||!1:null;c.splice(0,br||Or||Er||Ir?6:5);let g=c.join(" ");u.find(w=>w.fs===f&&w.type===p)||u.push({fs:f,type:p,size:d,used:m,available:y,use:v,mount:g,rw:h})}}),u}return new Promise(l=>{process.nextTick(()=>{let u=[];if(br||Or||Er||Ir||oo){let c="";if(n=[],r={},oo){c="df -kP";try{n=so("diskutil list").toString().split(`
183
+ `).filter(f=>!f.startsWith("/")&&f.indexOf(":")>0),so("mount").toString().split(`
184
+ `).filter(f=>f.startsWith("/")).forEach(f=>{r[f.split(" ")[0]]=f.toLowerCase().indexOf("read-only")===-1})}catch{j.noop()}}if(br)try{c="export LC_ALL=C; df -lkPTx squashfs; unset LC_ALL",so("cat /proc/mounts 2>/dev/null",j.execOptsLinux).toString().split(`
185
+ `).filter(f=>f.startsWith("/")).forEach(f=>{r[f.split(" ")[0]]=r[f.split(" ")[0]]||!1,f.toLowerCase().indexOf("/snap/")===-1&&(r[f.split(" ")[0]]=f.toLowerCase().indexOf("rw,")>=0||f.toLowerCase().indexOf(" rw ")>=0)})}catch{j.noop()}if(Or||Er||Ir)try{c="df -lkPT",so("mount").toString().split(`
186
+ `).forEach(f=>{r[f.split(" ")[0]]=f.toLowerCase().indexOf("read-only")===-1})}catch{j.noop()}cn(c,{maxBuffer:1024*1024},function(f,p){let d=o(p);u=a(d),e&&(u=u.filter(m=>m.fs.toLowerCase().indexOf(e.toLowerCase())>=0||m.mount.toLowerCase().indexOf(e.toLowerCase())>=0)),(!f||u.length)&&p.toString().trim()!==""?(t&&t(u),l(u)):cn("df -kPT",{maxBuffer:1024*1024},function(m,y){if(!m){let v=o(y);u=a(v)}t&&t(u),l(u)})})}if(bu&&(t&&t(u),l(u)),Cu)try{let c=`Get-WmiObject Win32_logicaldisk | select Access,Caption,FileSystem,FreeSpace,Size ${e?"| where -property Caption -eq "+e:""} | fl`;j.powerShell(c).then((f,p)=>{p||f.toString().split(/\n\s*\n/).forEach(function(m){let y=m.split(`\r
187
+ `),v=j.toInt(j.getValue(y,"size",":")),h=j.toInt(j.getValue(y,"freespace",":")),g=j.getValue(y,"caption",":"),w=j.getValue(y,"access",":"),x=w?j.toInt(w)!==1:null;v&&u.push({fs:g,type:j.getValue(y,"filesystem",":"),size:v,used:v-h,available:h,use:parseFloat((100*(v-h)/v).toFixed(2)),mount:g,rw:x})}),t&&t(u),l(u)})}catch{t&&t(u),l(u)}})})}Va.fsSize=B9;function U9(e){return new Promise(t=>{process.nextTick(()=>{let n={max:null,allocated:null,available:null};(Or||Er||Ir||oo)&&cn("sysctl -i kern.maxfiles kern.num_files kern.open_files",{maxBuffer:1024*1024},function(i,s){if(!i){let o=s.toString().split(`
188
+ `);n.max=parseInt(j.getValue(o,"kern.maxfiles",":"),10),n.allocated=parseInt(j.getValue(o,"kern.num_files",":"),10)||parseInt(j.getValue(o,"kern.open_files",":"),10),n.available=n.max-n.allocated}e&&e(n),t(n)}),br&&Y3.readFile("/proc/sys/fs/file-nr",function(r,i){if(r)Y3.readFile("/proc/sys/fs/file-max",function(s,o){if(!s){let a=o.toString().split(`
189
+ `);a[0]&&(n.max=parseInt(a[0],10))}e&&e(n),t(n)});else{let s=i.toString().split(`
190
+ `);if(s[0]){let o=s[0].replace(/\s+/g," ").split(" ");o.length===3&&(n.allocated=parseInt(o[0],10),n.available=parseInt(o[1],10),n.max=parseInt(o[2],10),n.available||(n.available=n.max-n.allocated))}e&&e(n),t(n)}}),bu&&(e&&e(null),t(null)),Cu&&(e&&e(null),t(null))})})}Va.fsOpenFiles=U9;function F9(e){return parseInt(e.substr(e.indexOf(" (")+2,e.indexOf(" Bytes)")-10))}function W9(e){let t=[],n=0;return e.forEach(r=>{if(r.length>0)if(r[0]==="*")n++;else{let i=r.split(":");i.length>1&&(t[n]||(t[n]={name:"",identifier:"",type:"disk",fsType:"",mount:"",size:0,physical:"HDD",uuid:"",label:"",model:"",serial:"",removable:!1,protocol:"",group:"",device:""}),i[0]=i[0].trim().toUpperCase().replace(/ +/g,""),i[1]=i[1].trim(),i[0]==="DEVICEIDENTIFIER"&&(t[n].identifier=i[1]),i[0]==="DEVICENODE"&&(t[n].name=i[1]),i[0]==="VOLUMENAME"&&i[1].indexOf("Not applicable")===-1&&(t[n].label=i[1]),i[0]==="PROTOCOL"&&(t[n].protocol=i[1]),i[0]==="DISKSIZE"&&(t[n].size=F9(i[1])),i[0]==="FILESYSTEMPERSONALITY"&&(t[n].fsType=i[1]),i[0]==="MOUNTPOINT"&&(t[n].mount=i[1]),i[0]==="VOLUMEUUID"&&(t[n].uuid=i[1]),i[0]==="READ-ONLYMEDIA"&&i[1]==="Yes"&&(t[n].physical="CD/DVD"),i[0]==="SOLIDSTATE"&&i[1]==="Yes"&&(t[n].physical="SSD"),i[0]==="VIRTUAL"&&(t[n].type="virtual"),i[0]==="REMOVABLEMEDIA"&&(t[n].removable=i[1]==="Removable"),i[0]==="PARTITIONTYPE"&&(t[n].type="part"),i[0]==="DEVICE/MEDIANAME"&&(t[n].model=i[1]))}}),t}function hx(e){let t=[];return e.filter(n=>n!=="").forEach(n=>{try{n=decodeURIComponent(n.replace(/\\x/g,"%")),n=n.replace(/\\/g,"\\\\");let r=JSON.parse(n);t.push({name:r.name,type:r.type,fsType:r.fsType,mount:r.mountpoint,size:parseInt(r.size),physical:r.type==="disk"?r.rota==="0"?"SSD":"HDD":r.type==="rom"?"CD/DVD":"",uuid:r.uuid,label:r.label,model:(r.model||"").trim(),serial:r.serial,removable:r.rm==="1",protocol:r.tran,group:r.group||""})}catch{j.noop()}}),t=j.unique(t),t=j.sortByKey(t,["type","name"]),t}function z9(e){let t=j.getValue(e,"md_level","="),n=j.getValue(e,"md_name","="),r=j.getValue(e,"md_uuid","="),i=[];return e.forEach(s=>{s.toLowerCase().startsWith("md_device_dev")&&s.toLowerCase().indexOf("/dev/")>0&&i.push(s.split("/dev/")[1])}),{raid:t,label:n,uuid:r,members:i}}function X3(e){let t=e;try{e.forEach(n=>{if(n.type.startsWith("raid")){let r=so(`mdadm --export --detail /dev/${n.name}`,j.execOptsLinux).toString().split(`
191
+ `),i=z9(r);n.label=i.label,n.uuid=i.uuid,i.members&&i.members.length&&i.raid===n.type&&(t=t.map(s=>(s.fsType==="linux_raid_member"&&i.members.indexOf(s.name)>=0&&(s.group=n.name),s)))}})}catch{j.noop()}return t}function G9(e){let t=[];return e.forEach(n=>{n.type.startsWith("disk")&&t.push(n.name)}),t}function $9(e){let t=e;try{let n=G9(e);t=t.map(r=>((r.type.startsWith("part")||r.type.startsWith("disk"))&&n.forEach(i=>{r.name.startsWith(i)&&(r.device="/dev/"+i)}),r))}catch{j.noop()}return t}function H9(e){let t=[];return e.forEach(n=>{if(n.type.startsWith("disk")&&t.push({name:n.name,model:n.model,device:n.name}),n.type.startsWith("virtual")){let r="";t.forEach(i=>{i.model===n.model&&(r=i.device)}),r&&t.push({name:n.name,model:n.model,device:r})}}),t}function q9(e){let t=e;try{let n=H9(e);t=t.map(r=>((r.type.startsWith("part")||r.type.startsWith("disk")||r.type.startsWith("virtual"))&&n.forEach(i=>{r.name.startsWith(i.name)&&(r.device=i.device)}),r))}catch{j.noop()}return t}function K9(e){let t=[];return e.forEach(n=>{let r=n.split(`\r
192
+ `),i=j.getValue(r,"DeviceID",":"),s=n.split("@{DeviceID=");s.length>1&&(s=s.slice(1),s.forEach(o=>{t.push({name:o.split(";")[0].toUpperCase(),device:i})}))}),t}function Y9(e,t){let n=K9(t);return e.map(r=>{let i=n.filter(s=>s.name===r.name.toUpperCase());return i.length>0&&(r.device=i[0].device),r}),e}function gx(e){return e.toString().replace(/NAME=/g,'{"name":').replace(/FSTYPE=/g,',"fsType":').replace(/TYPE=/g,',"type":').replace(/SIZE=/g,',"size":').replace(/MOUNTPOINT=/g,',"mountpoint":').replace(/UUID=/g,',"uuid":').replace(/ROTA=/g,',"rota":').replace(/RO=/g,',"ro":').replace(/RM=/g,',"rm":').replace(/TRAN=/g,',"tran":').replace(/SERIAL=/g,',"serial":').replace(/LABEL=/g,',"label":').replace(/MODEL=/g,',"model":').replace(/OWNER=/g,',"owner":').replace(/GROUP=/g,',"group":').replace(/\n/g,`}
193
+ `)}function X9(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(br&&cn("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,TRAN,SERIAL,LABEL,MODEL,OWNER 2>/dev/null",{maxBuffer:1024*1024},function(r,i){if(r)cn("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER 2>/dev/null",{maxBuffer:1024*1024},function(s,o){if(!s){let a=gx(o).split(`
194
+ `);n=hx(a),n=X3(n)}e&&e(n),t(n)});else{let s=gx(i).split(`
195
+ `);n=hx(s),n=X3(n),n=$9(n),e&&e(n),t(n)}}),oo&&cn("diskutil info -all",{maxBuffer:1024*1024},function(r,i){if(!r){let s=i.toString().split(`
196
+ `);n=W9(s),n=q9(n)}e&&e(n),t(n)}),bu&&(e&&e(n),t(n)),Cu){let r=["Unknown","NoRoot","Removable","Local","Network","CD/DVD","RAM"];try{let i=[];i.push(j.powerShell("Get-CimInstance -ClassName Win32_LogicalDisk | select Caption,DriveType,Name,FileSystem,Size,VolumeSerialNumber,VolumeName | fl")),i.push(j.powerShell("Get-WmiObject -Class Win32_diskdrive | Select-Object -Property PNPDeviceId,DeviceID, Model, Size, @{L='Partitions'; E={$_.GetRelated('Win32_DiskPartition').GetRelated('Win32_LogicalDisk') | Select-Object -Property DeviceID, VolumeName, Size, FreeSpace}} | fl")),j.promiseAll(i).then(s=>{let o=s.results[0].toString().split(/\n\s*\n/),a=s.results[1].toString().split(/\n\s*\n/);o.forEach(function(l){let u=l.split(`\r
197
+ `),c=j.getValue(u,"drivetype",":");c&&n.push({name:j.getValue(u,"name",":"),identifier:j.getValue(u,"caption",":"),type:"disk",fsType:j.getValue(u,"filesystem",":").toLowerCase(),mount:j.getValue(u,"caption",":"),size:j.getValue(u,"size",":"),physical:c>=0&&c<=6?r[c]:r[0],uuid:j.getValue(u,"volumeserialnumber",":"),label:j.getValue(u,"volumename",":"),model:"",serial:j.getValue(u,"volumeserialnumber",":"),removable:c==="2",protocol:"",group:"",device:""})}),n=Y9(n,a),e&&e(n),t(n)})}catch{e&&e(n),t(n)}}(Or||Er||Ir)&&(e&&e(null),t(null))})})}Va.blockDevices=X9;function J3(e,t){let n={rx:0,wx:0,tx:0,rx_sec:null,wx_sec:null,tx_sec:null,ms:0};return Ge&&Ge.ms?(n.rx=e,n.wx=t,n.tx=n.rx+n.wx,n.ms=Date.now()-Ge.ms,n.rx_sec=(n.rx-Ge.bytes_read)/(n.ms/1e3),n.wx_sec=(n.wx-Ge.bytes_write)/(n.ms/1e3),n.tx_sec=n.rx_sec+n.wx_sec,Ge.rx_sec=n.rx_sec,Ge.wx_sec=n.wx_sec,Ge.tx_sec=n.tx_sec,Ge.bytes_read=n.rx,Ge.bytes_write=n.wx,Ge.bytes_overall=n.rx+n.wx,Ge.ms=Date.now(),Ge.last_ms=n.ms):(n.rx=e,n.wx=t,n.tx=n.rx+n.wx,Ge.rx_sec=null,Ge.wx_sec=null,Ge.tx_sec=null,Ge.bytes_read=n.rx,Ge.bytes_write=n.wx,Ge.bytes_overall=n.rx+n.wx,Ge.ms=Date.now(),Ge.last_ms=0),n}function J9(e){return new Promise(t=>{process.nextTick(()=>{if(Cu||Or||Er||Ir||bu)return t(null);let n={rx:0,wx:0,tx:0,rx_sec:null,wx_sec:null,tx_sec:null,ms:0},r=0,i=0;Ge&&!Ge.ms||Ge&&Ge.ms&&Date.now()-Ge.ms>=500?(br&&cn("lsblk -r 2>/dev/null | grep /",{maxBuffer:1024*1024},function(s,o){if(s)e&&e(n),t(n);else{let a=o.toString().split(`
198
+ `),l=[];a.forEach(function(c){c!==""&&(c=c.trim().split(" "),l.indexOf(c[0])===-1&&l.push(c[0]))});let u=l.join("|");cn('cat /proc/diskstats | egrep "'+u+'"',{maxBuffer:1024*1024},function(c,f){c||(f.toString().split(`
199
+ `).forEach(function(d){d=d.trim(),d!==""&&(d=d.replace(/ +/g," ").split(" "),r+=parseInt(d[5])*512,i+=parseInt(d[9])*512)}),n=J3(r,i)),e&&e(n),t(n)})}}),oo&&cn(`ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,
200
+ "`,{maxBuffer:1024*1024},function(s,o){s||(o.toString().split(`
201
+ `).forEach(function(l){l=l.trim(),l!==""&&(l=l.split(","),r+=parseInt(l[2]),i+=parseInt(l[9]))}),n=J3(r,i)),e&&e(n),t(n)})):(n.ms=Ge.last_ms,n.rx=Ge.bytes_read,n.wx=Ge.bytes_write,n.tx=Ge.bytes_read+Ge.bytes_write,n.rx_sec=Ge.rx_sec,n.wx_sec=Ge.wx_sec,n.tx_sec=Ge.tx_sec,e&&e(n),t(n))})})}Va.fsStats=J9;function Z3(e,t,n,r,i){let s={rIO:0,wIO:0,tIO:0,rIO_sec:null,wIO_sec:null,tIO_sec:null,rWaitTime:0,wWaitTime:0,tWaitTime:0,rWaitPercent:null,wWaitPercent:null,tWaitPercent:null,ms:0};return xe&&xe.ms?(s.rIO=e,s.wIO=t,s.tIO=e+t,s.ms=Date.now()-xe.ms,s.rIO_sec=(s.rIO-xe.rIO)/(s.ms/1e3),s.wIO_sec=(s.wIO-xe.wIO)/(s.ms/1e3),s.tIO_sec=s.rIO_sec+s.wIO_sec,s.rWaitTime=n,s.wWaitTime=r,s.tWaitTime=i,s.rWaitPercent=(s.rWaitTime-xe.rWaitTime)*100/s.ms,s.wWaitPercent=(s.wWaitTime-xe.wWaitTime)*100/s.ms,s.tWaitPercent=(s.tWaitTime-xe.tWaitTime)*100/s.ms,xe.rIO=e,xe.wIO=t,xe.rIO_sec=s.rIO_sec,xe.wIO_sec=s.wIO_sec,xe.tIO_sec=s.tIO_sec,xe.rWaitTime=n,xe.wWaitTime=r,xe.tWaitTime=i,xe.rWaitPercent=s.rWaitPercent,xe.wWaitPercent=s.wWaitPercent,xe.tWaitPercent=s.tWaitPercent,xe.last_ms=s.ms,xe.ms=Date.now()):(s.rIO=e,s.wIO=t,s.tIO=e+t,s.rWaitTime=n,s.wWaitTime=r,s.tWaitTime=i,xe.rIO=e,xe.wIO=t,xe.rIO_sec=null,xe.wIO_sec=null,xe.tIO_sec=null,xe.rWaitTime=n,xe.wWaitTime=r,xe.tWaitTime=i,xe.rWaitPercent=null,xe.wWaitPercent=null,xe.tWaitPercent=null,xe.last_ms=0,xe.ms=Date.now()),s}function Z9(e){return new Promise(t=>{process.nextTick(()=>{if(Cu||bu)return t(null);let n={rIO:0,wIO:0,tIO:0,rIO_sec:null,wIO_sec:null,tIO_sec:null,rWaitTime:0,wWaitTime:0,tWaitTime:0,rWaitPercent:null,wWaitPercent:null,tWaitPercent:null,ms:0},r=0,i=0,s=0,o=0,a=0;xe&&!xe.ms||xe&&xe.ms&&Date.now()-xe.ms>=500?((br||Or||Er||Ir)&&cn('for mount in `lsblk 2>/dev/null | grep " disk " | sed "s/[\u2502\u2514\u2500\u251C]//g" | awk \'{$1=$1};1\' | cut -d " " -f 1 | sort -u`; do cat /sys/block/$mount/stat | sed -r "s/ +/;/g" | sed -r "s/^;//"; done',{maxBuffer:1024*1024},function(u,c){u?(e&&e(n),t(n)):(c.split(`
202
+ `).forEach(function(p){if(!p)return;let d=p.split(";");r+=parseInt(d[0]),i+=parseInt(d[4]),s+=parseInt(d[3]),o+=parseInt(d[7]),a+=parseInt(d[10])}),n=Z3(r,i,s,o,a),e&&e(n),t(n))}),oo&&cn(`ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,
203
+ "`,{maxBuffer:1024*1024},function(l,u){l||(u.toString().split(`
204
+ `).forEach(function(f){f=f.trim(),f!==""&&(f=f.split(","),r+=parseInt(f[10]),i+=parseInt(f[0]))}),n=Z3(r,i,s,o,a)),e&&e(n),t(n)})):(n.rIO=xe.rIO,n.wIO=xe.wIO,n.tIO=xe.rIO+xe.wIO,n.ms=xe.last_ms,n.rIO_sec=xe.rIO_sec,n.wIO_sec=xe.wIO_sec,n.tIO_sec=xe.tIO_sec,n.rWaitTime=xe.rWaitTime,n.wWaitTime=xe.wWaitTime,n.tWaitTime=xe.tWaitTime,n.rWaitPercent=xe.rWaitPercent,n.wWaitPercent=xe.wWaitPercent,n.tWaitPercent=xe.tWaitPercent,e&&e(n),t(n))})})}Va.disksIO=Z9;function Q9(e){function t(n){let r=[{pattern:"WESTERN.*",manufacturer:"Western Digital"},{pattern:"^WDC.*",manufacturer:"Western Digital"},{pattern:"WD.*",manufacturer:"Western Digital"},{pattern:"TOSHIBA.*",manufacturer:"Toshiba"},{pattern:"HITACHI.*",manufacturer:"Hitachi"},{pattern:"^IC.*",manufacturer:"Hitachi"},{pattern:"^HTS.*",manufacturer:"Hitachi"},{pattern:"SANDISK.*",manufacturer:"SanDisk"},{pattern:"KINGSTON.*",manufacturer:"Kingston Technology"},{pattern:"^SONY.*",manufacturer:"Sony"},{pattern:"TRANSCEND.*",manufacturer:"Transcend"},{pattern:"SAMSUNG.*",manufacturer:"Samsung"},{pattern:"^ST(?!I\\ ).*",manufacturer:"Seagate"},{pattern:"^STI\\ .*",manufacturer:"SimpleTech"},{pattern:"^D...-.*",manufacturer:"IBM"},{pattern:"^IBM.*",manufacturer:"IBM"},{pattern:"^FUJITSU.*",manufacturer:"Fujitsu"},{pattern:"^MP.*",manufacturer:"Fujitsu"},{pattern:"^MK.*",manufacturer:"Toshiba"},{pattern:"MAXTO.*",manufacturer:"Maxtor"},{pattern:"PIONEER.*",manufacturer:"Pioneer"},{pattern:"PHILIPS.*",manufacturer:"Philips"},{pattern:"QUANTUM.*",manufacturer:"Quantum Technology"},{pattern:"FIREBALL.*",manufacturer:"Quantum Technology"},{pattern:"^VBOX.*",manufacturer:"VirtualBox"},{pattern:"CORSAIR.*",manufacturer:"Corsair Components"},{pattern:"CRUCIAL.*",manufacturer:"Crucial"},{pattern:"ECM.*",manufacturer:"ECM"},{pattern:"INTEL.*",manufacturer:"INTEL"},{pattern:"EVO.*",manufacturer:"Samsung"},{pattern:"APPLE.*",manufacturer:"Apple"}],i="";return n&&(n=n.toUpperCase(),r.forEach(s=>{RegExp(s.pattern).test(n)&&(i=s.manufacturer)})),i}return new Promise(n=>{process.nextTick(()=>{let r=o=>{for(let a=0;a<o.length;a++)delete o[a].BSDName;e&&e(o),n(o)},i=[],s="";if(br){let o="";cn("export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL",{maxBuffer:1024*1024},function(a,l){if(!a)try{let u=l.toString().trim(),c=[];try{let f=JSON.parse(u);f&&{}.hasOwnProperty.call(f,"blockdevices")&&(c=f.blockdevices.filter(p=>p.type==="disk"&&p.size>0&&(p.model!==null||p.mountpoint===null&&p.label===null&&p.fstype===null&&p.parttype===null&&p.path&&p.path.indexOf("/ram")!==0&&p.path.indexOf("/loop")!==0&&p["disc-max"]&&p["disc-max"]!==0)))}catch{try{let p=so("export LC_ALL=C; lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER,GROUP 2>/dev/null; unset LC_ALL",j.execOptsLinux).toString(),d=gx(p).split(`
205
+ `);c=hx(d).filter(y=>y.type==="disk"&&y.size>0&&(y.model!==null&&y.model!==""||y.mount===""&&y.label===""&&y.fsType===""))}catch{j.noop()}}c.forEach(f=>{let p="",d="/dev/"+f.name,m=f.name;try{p=so("cat /sys/block/"+m+"/queue/rotational 2>/dev/null",j.execOptsLinux).toString().split(`
206
+ `)[0]}catch{j.noop()}let y=f.tran?f.tran.toUpperCase().trim():"";y==="NVME"&&(p="2",y="PCIe"),i.push({device:d,type:p==="0"?"SSD":p==="1"?"HD":p==="2"?"NVMe":f.model&&f.model.indexOf("SSD")>-1?"SSD":f.model&&f.model.indexOf("NVM")>-1?"NVMe":"HD",name:f.model||"",vendor:t(f.model)||(f.vendor?f.vendor.trim():""),size:f.size||0,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:f.rev?f.rev.trim():"",serialNum:f.serial?f.serial.trim():"",interfaceType:y,smartStatus:"unknown",temperature:null,BSDName:d}),s+=`printf "
207
+ ${d}|"; smartctl -H ${d} | grep overall;`,o+=`${o?'printf ",";':""}smartctl -a -j ${d};`})}catch{j.noop()}o?cn(o,{maxBuffer:1024*1024},function(u,c){try{JSON.parse(`[${c}]`).forEach(p=>{let d=p.smartctl.argv[p.smartctl.argv.length-1];for(let m=0;m<i.length;m++)i[m].BSDName===d&&(i[m].smartStatus=p.smart_status.passed?"Ok":p.smart_status.passed===!1?"Predicted Failure":"unknown",p.temperature&&p.temperature.current&&(i[m].temperature=p.temperature.current),i[m].smartData=p)}),r(i)}catch{s?(s=s+`printf "
208
+ "`,cn(s,{maxBuffer:1024*1024},function(p,d){d.toString().split(`
209
+ `).forEach(y=>{if(y){let v=y.split("|");if(v.length===2){let h=v[0];v[1]=v[1].trim();let g=v[1].split(":");if(g.length===2){g[1]=g[1].trim();let w=g[1].toLowerCase();for(let x=0;x<i.length;x++)i[x].BSDName===h&&(i[x].smartStatus=w==="passed"?"Ok":w==="failed!"?"Predicted Failure":"unknown")}}}}),r(i)})):r(i)}}):r(i)})}if((Or||Er||Ir)&&(e&&e(i),n(i)),bu&&(e&&e(i),n(i)),oo&&cn("system_profiler SPSerialATADataType SPNVMeDataType SPUSBDataType",{maxBuffer:1024*1024},function(o,a){if(!o){let l=a.toString().split(`
210
+ `),u=[],c=[],f=[],p="SATA";l.forEach(d=>{d==="NVMExpress:"?p="NVMe":d==="USB:"?p="USB":d==="SATA/SATA Express:"?p="SATA":p==="SATA"?u.push(d):p==="NVMe"?c.push(d):p==="USB"&&f.push(d)});try{let d=u.join(`
211
+ `).split(" Physical Interconnect: ");d.shift(),d.forEach(function(m){m="InterfaceType: "+m;let y=m.split(`
212
+ `),v=j.getValue(y,"Medium Type",":",!0).trim(),h=j.getValue(y,"capacity",":",!0).trim(),g=j.getValue(y,"BSD Name",":",!0).trim();if(h){let w=0;if(h.indexOf("(")>=0&&(w=parseInt(h.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,"").replace(/\s/g,""))),w||(w=parseInt(h)),w){let x=j.getValue(y,"S.M.A.R.T. status",":",!0).trim().toLowerCase();i.push({device:g,type:v.startsWith("Solid")?"SSD":"HD",name:j.getValue(y,"Model",":",!0).trim(),vendor:t(j.getValue(y,"Model",":",!0).trim())||j.getValue(y,"Manufacturer",":",!0),size:w,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:j.getValue(y,"Revision",":",!0).trim(),serialNum:j.getValue(y,"Serial Number",":",!0).trim(),interfaceType:j.getValue(y,"InterfaceType",":",!0).trim(),smartStatus:x==="verified"?"OK":x||"unknown",temperature:null,BSDName:g}),s=s+`printf "
213
+ `+g+'|"; diskutil info /dev/'+g+" | grep SMART;"}}})}catch{j.noop()}try{let d=c.join(`
214
+ `).split(`
215
+
216
+ Capacity:`);d.shift(),d.forEach(function(m){m="!Capacity: "+m;let y=m.split(`
217
+ `),v=j.getValue(y,"link width",":",!0).trim(),h=j.getValue(y,"!capacity",":",!0).trim(),g=j.getValue(y,"BSD Name",":",!0).trim();if(h){let w=0;if(h.indexOf("(")>=0&&(w=parseInt(h.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,"").replace(/\s/g,""))),w||(w=parseInt(h)),w){let x=j.getValue(y,"S.M.A.R.T. status",":",!0).trim().toLowerCase();i.push({device:g,type:"NVMe",name:j.getValue(y,"Model",":",!0).trim(),vendor:t(j.getValue(y,"Model",":",!0).trim()),size:w,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:j.getValue(y,"Revision",":",!0).trim(),serialNum:j.getValue(y,"Serial Number",":",!0).trim(),interfaceType:("PCIe "+v).trim(),smartStatus:x==="verified"?"OK":x||"unknown",temperature:null,BSDName:g}),s=s+`printf "
218
+ `+g+'|"; diskutil info /dev/'+g+" | grep SMART;"}}})}catch{j.noop()}try{let d=f.join(`
219
+ `).replaceAll(`Media:
220
+ `,"Model:").split(`
221
+
222
+ Product ID:`);d.shift(),d.forEach(function(m){let y=m.split(`
223
+ `),v=j.getValue(y,"Capacity",":",!0).trim(),h=j.getValue(y,"BSD Name",":",!0).trim();if(v){let g=0;if(v.indexOf("(")>=0&&(g=parseInt(v.match(/\(([^)]+)\)/)[1].replace(/\./g,"").replace(/,/g,"").replace(/\s/g,""))),g||(g=parseInt(v)),g){let w=j.getValue(y,"S.M.A.R.T. status",":",!0).trim().toLowerCase();i.push({device:h,type:"USB",name:j.getValue(y,"Model",":",!0).trim().replaceAll(":",""),vendor:t(j.getValue(y,"Model",":",!0).trim()),size:g,bytesPerSector:null,totalCylinders:null,totalHeads:null,totalSectors:null,totalTracks:null,tracksPerCylinder:null,sectorsPerTrack:null,firmwareRevision:j.getValue(y,"Revision",":",!0).trim(),serialNum:j.getValue(y,"Serial Number",":",!0).trim(),interfaceType:"USB",smartStatus:w==="verified"?"OK":w||"unknown",temperature:null,BSDName:h}),s=s+`printf "
224
+ `+h+'|"; diskutil info /dev/'+h+" | grep SMART;"}}})}catch{j.noop()}if(s)s=s+`printf "
225
+ "`,cn(s,{maxBuffer:1024*1024},function(d,m){m.toString().split(`
226
+ `).forEach(v=>{if(v){let h=v.split("|");if(h.length===2){let g=h[0];h[1]=h[1].trim();let w=h[1].split(":");if(w.length===2){w[1]=w[1].trim();let x=w[1].toLowerCase();for(let C=0;C<i.length;C++)i[C].BSDName===g&&(i[C].smartStatus=x==="not supported"?"not supported":x==="verified"?"Ok":x==="failing"?"Predicted Failure":"unknown")}}}});for(let v=0;v<i.length;v++)delete i[v].BSDName;e&&e(i),n(i)});else{for(let d=0;d<i.length;d++)delete i[d].BSDName;e&&e(i),n(i)}}}),Cu)try{let o=[];if(o.push(j.powerShell("Get-CimInstance Win32_DiskDrive | select Caption,Size,Status,PNPDeviceId,DeviceId,BytesPerSector,TotalCylinders,TotalHeads,TotalSectors,TotalTracks,TracksPerCylinder,SectorsPerTrack,FirmwareRevision,SerialNumber,InterfaceType | fl")),o.push(j.powerShell("Get-PhysicalDisk | select BusType,MediaType,FriendlyName,Model,SerialNumber,Size | fl")),j.smartMonToolsInstalled())try{let a=JSON.parse(so("smartctl --scan -j").toString());a&&a.devices&&a.devices.length>0&&a.devices.forEach(l=>{o.push(j9(`smartctl -j -a ${l.name}`,j.execOptsWin))})}catch{j.noop()}j.promiseAll(o).then(a=>{let l=a.results[0].toString().split(/\n\s*\n/);l.forEach(function(u){let c=u.split(`\r
227
+ `),f=j.getValue(c,"Size",":").trim(),p=j.getValue(c,"Status",":").trim().toLowerCase();f&&i.push({device:j.getValue(c,"DeviceId",":"),type:u.indexOf("SSD")>-1?"SSD":"HD",name:j.getValue(c,"Caption",":"),vendor:t(j.getValue(c,"Caption",":",!0).trim()),size:parseInt(f),bytesPerSector:parseInt(j.getValue(c,"BytesPerSector",":")),totalCylinders:parseInt(j.getValue(c,"TotalCylinders",":")),totalHeads:parseInt(j.getValue(c,"TotalHeads",":")),totalSectors:parseInt(j.getValue(c,"TotalSectors",":")),totalTracks:parseInt(j.getValue(c,"TotalTracks",":")),tracksPerCylinder:parseInt(j.getValue(c,"TracksPerCylinder",":")),sectorsPerTrack:parseInt(j.getValue(c,"SectorsPerTrack",":")),firmwareRevision:j.getValue(c,"FirmwareRevision",":").trim(),serialNum:j.getValue(c,"SerialNumber",":").trim(),interfaceType:j.getValue(c,"InterfaceType",":").trim(),smartStatus:p==="ok"?"Ok":p==="degraded"?"Degraded":p==="pred fail"?"Predicted Failure":"Unknown",temperature:null})}),l=a.results[1].split(/\n\s*\n/),l.forEach(function(u){let c=u.split(`\r
228
+ `),f=j.getValue(c,"SerialNumber",":").trim(),p=j.getValue(c,"FriendlyName",":").trim().replace("Msft ","Microsoft"),d=j.getValue(c,"Size",":").trim(),m=j.getValue(c,"Model",":").trim(),y=j.getValue(c,"BusType",":").trim(),v=j.getValue(c,"MediaType",":").trim();if((v==="3"||v==="HDD")&&(v="HD"),v==="4"&&(v="SSD"),v==="5"&&(v="SCM"),v==="Unspecified"&&(m.toLowerCase().indexOf("virtual")>-1||m.toLowerCase().indexOf("vbox")>-1)&&(v="Virtual"),d){let h=j.findObjectByKey(i,"serialNum",f);(h===-1||f==="")&&(h=j.findObjectByKey(i,"name",p)),h!=-1&&(i[h].type=v,i[h].interfaceType=y)}}),a.results.shift(),a.results.shift(),a.results.length&&a.results.forEach(u=>{try{let c=JSON.parse(u);if(c.serial_number){let f=c.serial_number,p=j.findObjectByKey(i,"serialNum",f);p!=-1&&(i[p].smartStatus=c.smart_status&&c.smart_status.passed?"Ok":c.smart_status&&c.smart_status.passed===!1?"Predicted Failure":"unknown",c.temperature&&c.temperature.current&&(i[p].temperature=c.temperature.current),i[p].smartData=c)}}catch{j.noop()}}),e&&e(i),n(i)})}catch{e&&e(i),n(i)}})})}Va.diskLayout=Q9});var aN=oe(Ua=>{"use strict";var qh=K("os"),tr=K("child_process").exec,Tt=K("child_process").execSync,eW=K("fs"),Q=Pt(),lo=process.platform,ts=lo==="linux"||lo==="android",ns=lo==="darwin",zf=lo==="win32",uo=lo==="freebsd",co=lo==="openbsd",fo=lo==="netbsd",eN=lo==="sunos",Fe={},tN="",Ou={},nN=[],Eu=[],Iu={},ja;function Ba(){let e="",t="";try{let n=qh.networkInterfaces(),r=9999;for(let i in n)({}).hasOwnProperty.call(n,i)&&n[i].forEach(function(s){s&&s.internal===!1&&(t=t||i,s.scopeid&&s.scopeid<r&&(e=i,r=s.scopeid))});if(e=e||t||"",zf){let i="";if(Tt("netstat -r",Q.execOptsWin).toString().split(qh.EOL).forEach(l=>{if(l=l.replace(/\s+/g," ").trim(),l.indexOf("0.0.0.0 0.0.0.0")>-1&&!/[a-zA-Z]/.test(l)){let u=l.split(" ");u.length>=5&&(i=u[u.length-2])}}),i)for(let l in n)({}).hasOwnProperty.call(n,l)&&n[l].forEach(function(u){u&&u.address&&u.address===i&&(e=l)})}if(ts){let o=Tt("ip route 2> /dev/null | grep default",Q.execOptsLinux).toString().split(`
229
+ `)[0].split(/\s+/);o[0]==="none"&&o[5]?e=o[5]:o[4]&&(e=o[4]),e.indexOf(":")>-1&&(e=e.split(":")[1].trim())}if(ns||uo||co||fo||eN){let i="";ts&&(i="ip route 2> /dev/null | grep default | awk '{print $5}'"),ns&&(i="route -n get default 2>/dev/null | grep interface: | awk '{print $2}'"),(uo||co||fo||eN)&&(i="route get 0.0.0.0 | grep interface:"),e=Tt(i).toString().split(`
230
+ `)[0],e.indexOf(":")>-1&&(e=e.split(":")[1].trim())}}catch{Q.noop()}return e&&(tN=e),tN}Ua.getDefaultNetworkInterface=Ba;function rN(){let e="",t="",n={};if(ts||uo||co||fo){if(typeof ja>"u")try{let r=Tt("which ip",Q.execOptsLinux).toString().split(`
231
+ `);r.length&&r[0].indexOf(":")===-1&&r[0].indexOf("/")===0?ja=r[0]:ja=""}catch{ja=""}try{let r="export LC_ALL=C; "+(ja?ja+" link show up":"/sbin/ifconfig")+"; unset LC_ALL",s=Tt(r,Q.execOptsLinux).toString().split(`
232
+ `);for(let o=0;o<s.length;o++)if(s[o]&&s[o][0]!==" "){if(ja){let a=s[o+1].trim().split(" ");a[0]==="link/ether"&&(e=s[o].split(" ")[1],e=e.slice(0,e.length-1),t=a[1])}else e=s[o].split(" ")[0],t=s[o].split("HWaddr ")[1];e&&t&&(n[e]=t.trim(),e="",t="")}}catch{Q.noop()}}if(ns)try{let s=Tt("/sbin/ifconfig").toString().split(`
233
+ `);for(let o=0;o<s.length;o++)s[o]&&s[o][0]!==" "&&s[o].indexOf(":")>0?e=s[o].split(":")[0]:s[o].indexOf(" ether ")===0&&(t=s[o].split(" ether ")[1],e&&t&&(n[e]=t.trim(),e="",t=""))}catch{Q.noop()}return n}function tW(e){return new Promise(t=>{process.nextTick(()=>{let n=Ba();e&&e(n),t(n)})})}Ua.networkInterfaceDefault=tW;function nW(e,t){let n=[];for(let r in e)if({}.hasOwnProperty.call(e,r)&&e[r].trim()!==""){let i=e[r].trim().split(`\r
234
+ `),s=t&&t[r]?t[r].trim().split(`\r
235
+ `):[],o=Q.getValue(i,"NetEnabled",":"),a=Q.getValue(i,"AdapterTypeID",":")==="9"?"wireless":"wired",l=Q.getValue(i,"Name",":").replace(/\]/g,")").replace(/\[/g,"("),u=Q.getValue(i,"NetConnectionID",":").replace(/\]/g,")").replace(/\[/g,"(");if((l.toLowerCase().indexOf("wi-fi")>=0||l.toLowerCase().indexOf("wireless")>=0)&&(a="wireless"),o!==""){let c=parseInt(Q.getValue(i,"speed",":").trim(),10)/1e6;n.push({mac:Q.getValue(i,"MACAddress",":").toLowerCase(),dhcp:Q.getValue(s,"dhcpEnabled",":").toLowerCase()==="true",name:l,iface:u,netEnabled:o==="TRUE",speed:isNaN(c)?null:c,operstate:Q.getValue(i,"NetConnectionStatus",":")==="2"?"up":"down",type:a})}}return n}function rW(){return new Promise(e=>{process.nextTick(()=>{let t="Get-CimInstance Win32_NetworkAdapter | fl *; echo '#-#-#-#';";t+="Get-CimInstance Win32_NetworkAdapterConfiguration | fl DHCPEnabled";try{Q.powerShell(t).then(n=>{n=n.split("#-#-#-#");let r=(n[0]||"").split(/\n\s*\n/),i=(n[1]||"").split(/\n\s*\n/);e(nW(r,i))})}catch{e([])}})})}function iW(){let e={},t={primaryDNS:"",exitCode:0,ifaces:[]};try{return Tt("ipconfig /all",Q.execOptsWin).split(`\r
236
+ \r
237
+ `).forEach((i,s)=>{if(s==1){let o=i.split(`\r
238
+ `).filter(l=>l.toUpperCase().includes("DNS")),a=o[0].substring(o[0].lastIndexOf(":")+1);t.primaryDNS=a.trim(),t.primaryDNS||(t.primaryDNS="Not defined")}if(s>1)if(s%2==0){let o=i.substring(i.lastIndexOf(" ")+1).replace(":","");e.name=o}else{let o=i.split(`\r
239
+ `).filter(l=>l.toUpperCase().includes("DNS")),a=o[0].substring(o[0].lastIndexOf(":")+1);e.dnsSuffix=a.trim(),t.ifaces.push(e),e={}}}),t}catch{return{primaryDNS:"",exitCode:0,ifaces:[]}}}function sW(e,t){let n="",r=t+".";try{let i=e.filter(s=>r.includes(s.name+".")).map(s=>s.dnsSuffix);return i[0]&&(n=i[0]),n||(n=""),n}catch{return"Unknown"}}function oW(){try{return Tt("netsh lan show profiles",Q.execOptsWin).split(`\r
240
+ Profile on interface`)}catch(e){return e.status===1&&e.stdout.includes("AutoConfig")?"Disabled":[]}}function aW(e){try{return Tt(`netsh wlan show interface name="${e}" | findstr "SSID"`,Q.execOptsWin).split(`\r
241
+ `).shift().split(":").pop()}catch{return"Unknown"}}function lW(e,t,n){let r={state:"Unknown",protocol:"Unknown"};if(n==="Disabled")return r.state="Disabled",r.protocol="Not defined",r;if(e=="wired"&&n.length>0)try{let s=n.find(a=>a.includes(t+`\r
242
+ `)).split(`\r
243
+ `),o=s.find(a=>a.includes("802.1x"));if(o.includes("Disabled"))r.state="Disabled",r.protocol="Not defined";else if(o.includes("Enabled")){let a=s.find(l=>l.includes("EAP"));r.protocol=a.split(":").pop(),r.state="Enabled"}}catch{return r}else if(e=="wireless"){let i="",s="";try{let o=aW(t);o!=="Unknown"&&(i=Tt(`netsh wlan show profiles "${o}" | findstr "802.1X"`,Q.execOptsWin),s=Tt(`netsh wlan show profiles "${o}" | findstr "EAP"`,Q.execOptsWin)),i.includes(":")&&s.includes(":")&&(r.state=i.split(":").pop(),r.protocol=s.split(":").pop())}catch(o){return o.status===1&&o.stdout.includes("AutoConfig")&&(r.state="Disabled",r.protocol="Not defined"),r}}return r}function iN(e){let t=[],n=[];return e.forEach(function(r){!r.startsWith(" ")&&!r.startsWith(" ")&&n.length&&(t.push(n),n=[]),n.push(r)}),n.length&&t.push(n),t}function uW(e){let t=[];return e.forEach(n=>{let r={iface:"",mtu:null,mac:"",ip6:"",ip4:"",speed:null,type:"",operstate:"",duplex:"",internal:!1},i=n[0];r.iface=i.split(":")[0].trim();let s=i.split("> mtu");r.mtu=s.length>1?parseInt(s[1],10):null,isNaN(r.mtu)&&(r.mtu=null),r.internal=s[0].toLowerCase().indexOf("loopback")>-1,n.forEach(l=>{l.trim().startsWith("ether ")&&(r.mac=l.split("ether ")[1].toLowerCase().trim()),l.trim().startsWith("inet6 ")&&!r.ip6&&(r.ip6=l.split("inet6 ")[1].toLowerCase().split("%")[0].split(" ")[0]),l.trim().startsWith("inet ")&&!r.ip4&&(r.ip4=l.split("inet ")[1].toLowerCase().split(" ")[0])});let o=Q.getValue(n,"link rate");r.speed=o?parseFloat(o):null,r.speed===null?(o=Q.getValue(n,"uplink rate"),r.speed=o?parseFloat(o):null,r.speed!==null&&o.toLowerCase().indexOf("gbps")>=0&&(r.speed=r.speed*1e3)):o.toLowerCase().indexOf("gbps")>=0&&(r.speed=r.speed*1e3),r.type=Q.getValue(n,"type").toLowerCase().indexOf("wi-fi")>-1?"wireless":"wired";let a=Q.getValue(n,"status").toLowerCase();r.operstate=a==="active"?"up":a==="inactive"?"down":"unknown",r.duplex=Q.getValue(n,"media").toLowerCase().indexOf("half-duplex")>-1?"half":"full",(r.ip6||r.ip4||r.mac)&&t.push(r)}),t}function cW(){let e="/sbin/ifconfig -v";try{let t=Tt(e,{maxBuffer:2048e4}).toString().split(`
244
+ `),n=iN(t);return uW(n)}catch{return[]}}function fW(e){let t=`nmcli device status 2>/dev/null | grep ${e}`;try{let s=Tt(t,Q.execOptsLinux).toString().replace(/\s+/g," ").trim().split(" ").slice(3).join(" ");return s!="--"?s:""}catch{return""}}function sN(e){let t=[];try{let n=`cat ${e} 2> /dev/null | grep 'iface\\|source'`;Tt(n,Q.execOptsLinux).toString().split(`
245
+ `).forEach(i=>{let s=i.replace(/\s+/g," ").trim().split(" ");if(s.length>=4&&i.toLowerCase().indexOf(" inet ")>=0&&i.toLowerCase().indexOf("dhcp")>=0&&t.push(s[1]),i.toLowerCase().includes("source")){let o=i.split(" ")[1];t=t.concat(sN(o))}})}catch{Q.noop()}return t}function pW(){let e="ip a 2> /dev/null",t=[];try{let n=Tt(e,Q.execOptsLinux).toString().split(`
246
+ `),r=iN(n);t=dW(r)}catch{Q.noop()}try{t=sN("/etc/network/interfaces")}catch{Q.noop()}return t}function dW(e){let t=[];return e&&e.length&&e.forEach(n=>{if(n&&n.length&&n[0].split(":").length>2){for(let i of n)if(i.indexOf(" inet ")>=0&&i.indexOf(" dynamic ")>=0){let s=i.split(" "),o=s[s.length-1].trim();t.push(o);break}}}),t}function mW(e,t,n){let r=!1;if(t){let i=`nmcli connection show "${t}" 2>/dev/null | grep ipv4.method;`;try{switch(Tt(i,Q.execOptsLinux).toString().replace(/\s+/g," ").trim().split(" ").slice(1).toString()){case"auto":r=!0;break;default:r=!1;break}return r}catch{return n.indexOf(e)>=0}}else return n.indexOf(e)>=0}function hW(e){let t=!1,n=`ipconfig getpacket "${e}" 2>/dev/null | grep lease_time;`;try{let r=Tt(n).toString().split(`
247
+ `);r.length&&r[0].startsWith("lease_time")&&(t=!0)}catch{Q.noop()}return t}function gW(e){if(e){let t=`nmcli connection show "${e}" 2>/dev/null | grep ipv4.dns-search;`;try{let i=Tt(t,Q.execOptsLinux).toString().replace(/\s+/g," ").trim().split(" ").slice(1).toString();return i=="--"?"Not defined":i}catch{return"Unknown"}}else return"Unknown"}function yW(e){if(e){let t=`nmcli connection show "${e}" 2>/dev/null | grep 802-1x.eap;`;try{let i=Tt(t,Q.execOptsLinux).toString().replace(/\s+/g," ").trim().split(" ").slice(1).toString();return i=="--"?"":i}catch{return"Not defined"}}else return"Not defined"}function vW(e){return e?e=="Not defined"?"Disabled":"Enabled":"Unknown"}function yx(e,t,n){let r=["00:00:00:00:00:00","00:03:FF","00:05:69","00:0C:29","00:0F:4B","00:13:07","00:13:BE","00:15:5d","00:16:3E","00:1C:42","00:21:F6","00:24:0B","00:50:56","00:A0:B1","00:E0:C8","08:00:27","0A:00:27","18:92:2C","16:DF:49","3C:F3:92","54:52:00","FC:15:97"];return n?r.filter(i=>n.toUpperCase().toUpperCase().startsWith(i.substring(0,n.length))).length>0||e.toLowerCase().indexOf(" virtual ")>-1||t.toLowerCase().indexOf(" virtual ")>-1||e.toLowerCase().indexOf("vethernet ")>-1||t.toLowerCase().indexOf("vethernet ")>-1||e.toLowerCase().startsWith("veth")||t.toLowerCase().startsWith("veth")||e.toLowerCase().startsWith("vboxnet")||t.toLowerCase().startsWith("vboxnet"):!1}function vx(e,t,n){return typeof e=="string"&&(n=e,t=!0,e=null),typeof e=="boolean"&&(t=e,e=null,n=""),typeof t>"u"&&(t=!0),n=n||"",n=""+n,new Promise(r=>{process.nextTick(()=>{let i=qh.networkInterfaces(),s=[],o=[],a=[],l=[];if(ns||uo||co||fo)if(JSON.stringify(i)===JSON.stringify(Ou)&&!t)s=Eu,e&&e(s),r(s);else{let u=Ba();Ou=JSON.parse(JSON.stringify(i)),o=cW(),o.forEach(c=>{({}).hasOwnProperty.call(i,c.iface)&&i[c.iface].forEach(function(m){(m.family==="IPv4"||m.family===4)&&(c.ip4subnet=m.netmask),(m.family==="IPv6"||m.family===6)&&(c.ip6subnet=m.netmask)});let f="",p=Q.isPrototypePolluted()?"---":Q.sanitizeShellString(c.iface),d=Q.mathMin(p.length,2e3);for(let m=0;m<=d;m++)p[m]!==void 0&&(f=f+p[m]);s.push({iface:c.iface,ifaceName:c.iface,default:c.iface===u,ip4:c.ip4,ip4subnet:c.ip4subnet||"",ip6:c.ip6,ip6subnet:c.ip6subnet||"",mac:c.mac,internal:c.internal,virtual:c.internal?!1:yx(c.iface,c.iface,c.mac),operstate:c.operstate,type:c.type,duplex:c.duplex,mtu:c.mtu,speed:c.speed,dhcp:hW(f),dnsSuffix:"",ieee8021xAuth:"",ieee8021xState:"",carrierChanges:0})}),Eu=s,n.toLowerCase().indexOf("default")>=0&&(s=s.filter(c=>c.default),s.length>0?s=s[0]:s=[]),e&&e(s),r(s)}if(ts)if(JSON.stringify(i)===JSON.stringify(Ou)&&!t)s=Eu,e&&e(s),r(s);else{Ou=JSON.parse(JSON.stringify(i)),nN=pW();let u=Ba();for(let c in i){let f="",p="",d="",m="",y="",v="",h="",g=null,w=0,x=!1,C="",A="",T="",z="";if({}.hasOwnProperty.call(i,c)){let M=c;i[c].forEach(function(Me){(Me.family==="IPv4"||Me.family===4)&&(f=Me.address,p=Me.netmask),(Me.family==="IPv6"||Me.family===6)&&(!d||d.match(/^fe80::/i))&&(d=Me.address,m=Me.netmask),y=Me.mac;let pt=parseInt(process.versions.node.split("."),10);y.indexOf("00:00:0")>-1&&(ts||ns)&&!Me.internal&&pt>=8&&pt<=11&&(Object.keys(Iu).length===0&&(Iu=rN()),y=Iu[c]||"")});let U=c.split(":")[0].trim().toLowerCase(),D="",F=Q.isPrototypePolluted()?"---":Q.sanitizeShellString(U),V=Q.mathMin(F.length,2e3);for(let Me=0;Me<=V;Me++)F[Me]!==void 0&&(D=D+F[Me]);let se=`echo -n "addr_assign_type: "; cat /sys/class/net/${D}/addr_assign_type 2>/dev/null; echo;
248
+ echo -n "address: "; cat /sys/class/net/${D}/address 2>/dev/null; echo;
249
+ echo -n "addr_len: "; cat /sys/class/net/${D}/addr_len 2>/dev/null; echo;
250
+ echo -n "broadcast: "; cat /sys/class/net/${D}/broadcast 2>/dev/null; echo;
251
+ echo -n "carrier: "; cat /sys/class/net/${D}/carrier 2>/dev/null; echo;
252
+ echo -n "carrier_changes: "; cat /sys/class/net/${D}/carrier_changes 2>/dev/null; echo;
253
+ echo -n "dev_id: "; cat /sys/class/net/${D}/dev_id 2>/dev/null; echo;
254
+ echo -n "dev_port: "; cat /sys/class/net/${D}/dev_port 2>/dev/null; echo;
255
+ echo -n "dormant: "; cat /sys/class/net/${D}/dormant 2>/dev/null; echo;
256
+ echo -n "duplex: "; cat /sys/class/net/${D}/duplex 2>/dev/null; echo;
257
+ echo -n "flags: "; cat /sys/class/net/${D}/flags 2>/dev/null; echo;
258
+ echo -n "gro_flush_timeout: "; cat /sys/class/net/${D}/gro_flush_timeout 2>/dev/null; echo;
259
+ echo -n "ifalias: "; cat /sys/class/net/${D}/ifalias 2>/dev/null; echo;
260
+ echo -n "ifindex: "; cat /sys/class/net/${D}/ifindex 2>/dev/null; echo;
261
+ echo -n "iflink: "; cat /sys/class/net/${D}/iflink 2>/dev/null; echo;
262
+ echo -n "link_mode: "; cat /sys/class/net/${D}/link_mode 2>/dev/null; echo;
263
+ echo -n "mtu: "; cat /sys/class/net/${D}/mtu 2>/dev/null; echo;
264
+ echo -n "netdev_group: "; cat /sys/class/net/${D}/netdev_group 2>/dev/null; echo;
265
+ echo -n "operstate: "; cat /sys/class/net/${D}/operstate 2>/dev/null; echo;
266
+ echo -n "proto_down: "; cat /sys/class/net/${D}/proto_down 2>/dev/null; echo;
267
+ echo -n "speed: "; cat /sys/class/net/${D}/speed 2>/dev/null; echo;
268
+ echo -n "tx_queue_len: "; cat /sys/class/net/${D}/tx_queue_len 2>/dev/null; echo;
269
+ echo -n "type: "; cat /sys/class/net/${D}/type 2>/dev/null; echo;
270
+ echo -n "wireless: "; cat /proc/net/wireless 2>/dev/null | grep ${D}; echo;
271
+ echo -n "wirelessspeed: "; iw dev ${D} link 2>&1 | grep bitrate; echo;`,X=[];try{X=Tt(se,Q.execOptsLinux).toString().split(`
272
+ `);let Me=fW(D);x=mW(D,Me,nN),C=gW(Me),A=yW(Me),T=vW(A)}catch{Q.noop()}v=Q.getValue(X,"duplex"),v=v.startsWith("cat")?"":v,h=parseInt(Q.getValue(X,"mtu"),10);let Ve=parseInt(Q.getValue(X,"speed"),10);g=isNaN(Ve)?null:Ve;let we=Q.getValue(X,"wirelessspeed").split("tx bitrate: ");g===null&&we.length===2&&(Ve=parseFloat(we[1]),g=isNaN(Ve)?null:Ve),w=parseInt(Q.getValue(X,"carrier_changes"),10);let Te=Q.getValue(X,"operstate");z=Te==="up"?Q.getValue(X,"wireless").trim()?"wireless":"wired":"unknown",(D==="lo"||D.startsWith("bond"))&&(z="virtual");let Je=i[c]&&i[c][0]?i[c][0].internal:!1;(c.toLowerCase().indexOf("loopback")>-1||M.toLowerCase().indexOf("loopback")>-1)&&(Je=!0);let ve=Je?!1:yx(c,M,y);s.push({iface:D,ifaceName:M,default:U===u,ip4:f,ip4subnet:p,ip6:d,ip6subnet:m,mac:y,internal:Je,virtual:ve,operstate:Te,type:z,duplex:v,mtu:h,speed:g,dhcp:x,dnsSuffix:C,ieee8021xAuth:A,ieee8021xState:T,carrierChanges:w})}}Eu=s,n.toLowerCase().indexOf("default")>=0&&(s=s.filter(c=>c.default),s.length>0?s=s[0]:s=[]),e&&e(s),r(s)}if(zf)if(JSON.stringify(i)===JSON.stringify(Ou)&&!t)s=Eu,e&&e(s),r(s);else{Ou=JSON.parse(JSON.stringify(i));let u=Ba();rW().then(function(c){c.forEach(f=>{let p=!1;Object.keys(i).forEach(d=>{p||i[d].forEach(m=>{Object.keys(m).indexOf("mac")>=0&&(p=m.mac===f.mac)})}),p||(i[f.name]=[{mac:f.mac}])}),l=oW(),a=iW();for(let f in i){let p="",d=Q.isPrototypePolluted()?"---":Q.sanitizeShellString(f),m=Q.mathMin(d.length,2e3);for(let X=0;X<=m;X++)d[X]!==void 0&&(p=p+d[X]);let y=f,v="",h="",g="",w="",x="",C="",A="",T=null,z=0,M="down",U=!1,D="",F="",V="",se="";if({}.hasOwnProperty.call(i,f)){let X=f;i[f].forEach(function(ve){(ve.family==="IPv4"||ve.family===4)&&(v=ve.address,h=ve.netmask),(ve.family==="IPv6"||ve.family===6)&&(!g||g.match(/^fe80::/i))&&(g=ve.address,w=ve.netmask),x=ve.mac;let Me=parseInt(process.versions.node.split("."),10);x.indexOf("00:00:0")>-1&&(ts||ns)&&!ve.internal&&Me>=8&&Me<=11&&(Object.keys(Iu).length===0&&(Iu=rN()),x=Iu[f]||"")}),D=sW(a.ifaces,p);let Ve=!1;c.forEach(ve=>{ve.mac===x&&!Ve&&(y=ve.iface||y,X=ve.name,U=ve.dhcp,M=ve.operstate,T=M==="up"?ve.speed:0,se=ve.type,Ve=!0)}),(f.toLowerCase().indexOf("wlan")>=0||X.toLowerCase().indexOf("wlan")>=0||X.toLowerCase().indexOf("802.11n")>=0||X.toLowerCase().indexOf("wireless")>=0||X.toLowerCase().indexOf("wi-fi")>=0||X.toLowerCase().indexOf("wifi")>=0)&&(se="wireless");let we=lW(se,p,l);F=we.protocol,V=we.state;let Te=i[f]&&i[f][0]?i[f][0].internal:!1;(f.toLowerCase().indexOf("loopback")>-1||X.toLowerCase().indexOf("loopback")>-1)&&(Te=!0);let Je=Te?!1:yx(f,X,x);s.push({iface:y,ifaceName:X,default:y===u,ip4:v,ip4subnet:h,ip6:g,ip6subnet:w,mac:x,internal:Te,virtual:Je,operstate:M,type:se,duplex:C,mtu:A,speed:T,dhcp:U,dnsSuffix:D,ieee8021xAuth:F,ieee8021xState:V,carrierChanges:z})}}Eu=s,n.toLowerCase().indexOf("default")>=0&&(s=s.filter(f=>f.default),s.length>0?s=s[0]:s=[]),e&&e(s),r(s)})}})})}Ua.networkInterfaces=vx;function Hh(e,t,n,r,i,s,o,a){let l={iface:e,operstate:r,rx_bytes:t,rx_dropped:i,rx_errors:s,tx_bytes:n,tx_dropped:o,tx_errors:a,rx_sec:null,tx_sec:null,ms:0};return Fe[e]&&Fe[e].ms?(l.ms=Date.now()-Fe[e].ms,l.rx_sec=t-Fe[e].rx_bytes>=0?(t-Fe[e].rx_bytes)/(l.ms/1e3):0,l.tx_sec=n-Fe[e].tx_bytes>=0?(n-Fe[e].tx_bytes)/(l.ms/1e3):0,Fe[e].rx_bytes=t,Fe[e].tx_bytes=n,Fe[e].rx_sec=l.rx_sec,Fe[e].tx_sec=l.tx_sec,Fe[e].ms=Date.now(),Fe[e].last_ms=l.ms,Fe[e].operstate=r):(Fe[e]||(Fe[e]={}),Fe[e].rx_bytes=t,Fe[e].tx_bytes=n,Fe[e].rx_sec=null,Fe[e].tx_sec=null,Fe[e].ms=Date.now(),Fe[e].last_ms=0,Fe[e].operstate=r),l}function oN(e,t){let n=[];return new Promise(r=>{process.nextTick(()=>{if(Q.isFunction(e)&&!t)t=e,n=[Ba()];else{if(typeof e!="string"&&e!==void 0)return t&&t([]),r([]);e=e||Ba(),e.__proto__.toLowerCase=Q.stringToLower,e.__proto__.replace=Q.stringReplace,e.__proto__.trim=Q.stringTrim,e=e.trim().toLowerCase().replace(/,+/g,"|"),n=e.split("|")}let i=[],s=[];if(n.length&&n[0].trim()==="*")n=[],vx(!1).then(o=>{for(let a of o)n.push(a.iface);oN(n.join(",")).then(a=>{t&&t(a),r(a)})});else{for(let o of n)s.push(wW(o.trim()));s.length?Promise.all(s).then(o=>{t&&t(o),r(o)}):(t&&t(i),r(i))}})})}function wW(e){function t(n){let r=[];for(let i in n)if({}.hasOwnProperty.call(n,i)&&n[i].trim()!==""){let s=n[i].trim().split(`\r
273
+ `);r.push({name:Q.getValue(s,"Name",":").replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase(),rx_bytes:parseInt(Q.getValue(s,"BytesReceivedPersec",":"),10),rx_errors:parseInt(Q.getValue(s,"PacketsReceivedErrors",":"),10),rx_dropped:parseInt(Q.getValue(s,"PacketsReceivedDiscarded",":"),10),tx_bytes:parseInt(Q.getValue(s,"BytesSentPersec",":"),10),tx_errors:parseInt(Q.getValue(s,"PacketsOutboundErrors",":"),10),tx_dropped:parseInt(Q.getValue(s,"PacketsOutboundDiscarded",":"),10)})}return r}return new Promise(n=>{process.nextTick(()=>{let r="",i=Q.isPrototypePolluted()?"---":Q.sanitizeShellString(e),s=Q.mathMin(i.length,2e3);for(let h=0;h<=s;h++)i[h]!==void 0&&(r=r+i[h]);let o={iface:r,operstate:"unknown",rx_bytes:0,rx_dropped:0,rx_errors:0,tx_bytes:0,tx_dropped:0,tx_errors:0,rx_sec:null,tx_sec:null,ms:0},a="unknown",l=0,u=0,c=0,f=0,p=0,d=0,m,y,v;if(!Fe[r]||Fe[r]&&!Fe[r].ms||Fe[r]&&Fe[r].ms&&Date.now()-Fe[r].ms>=500){if(ts&&(eW.existsSync("/sys/class/net/"+r)?(m="cat /sys/class/net/"+r+"/operstate; cat /sys/class/net/"+r+"/statistics/rx_bytes; cat /sys/class/net/"+r+"/statistics/tx_bytes; cat /sys/class/net/"+r+"/statistics/rx_dropped; cat /sys/class/net/"+r+"/statistics/rx_errors; cat /sys/class/net/"+r+"/statistics/tx_dropped; cat /sys/class/net/"+r+"/statistics/tx_errors; ",tr(m,function(h,g){h||(y=g.toString().split(`
274
+ `),a=y[0].trim(),l=parseInt(y[1],10),u=parseInt(y[2],10),c=parseInt(y[3],10),f=parseInt(y[4],10),p=parseInt(y[5],10),d=parseInt(y[6],10),o=Hh(r,l,u,a,c,f,p,d)),n(o)})):n(o)),(uo||co||fo)&&(m="netstat -ibndI "+r,tr(m,function(h,g){if(!h){y=g.toString().split(`
275
+ `);for(let w=1;w<y.length;w++){let x=y[w].replace(/ +/g," ").split(" ");x&&x[0]&&x[7]&&x[10]&&(l=l+parseInt(x[7]),x[6].trim()!=="-"&&(c=c+parseInt(x[6])),x[5].trim()!=="-"&&(f=f+parseInt(x[5])),u=u+parseInt(x[10]),x[12].trim()!=="-"&&(p=p+parseInt(x[12])),x[9].trim()!=="-"&&(d=d+parseInt(x[9])),a="up")}o=Hh(r,l,u,a,c,f,p,d)}n(o)})),ns&&(m="ifconfig "+r+' | grep "status"',tr(m,function(h,g){o.operstate=(g.toString().split(":")[1]||"").trim(),o.operstate=(o.operstate||"").toLowerCase(),o.operstate=o.operstate==="active"?"up":o.operstate==="inactive"?"down":"unknown",m="netstat -bdI "+r,tr(m,function(w,x){if(!w&&(y=x.toString().split(`
276
+ `),y.length>1&&y[1].trim()!=="")){v=y[1].replace(/ +/g," ").split(" ");let C=v.length>11?1:0;l=parseInt(v[C+5]),c=parseInt(v[C+10]),f=parseInt(v[C+4]),u=parseInt(v[C+8]),p=parseInt(v[C+10]),d=parseInt(v[C+7]),o=Hh(r,l,u,o.operstate,c,f,p,d)}n(o)})})),zf){let h=[],g=r;Q.powerShell("Get-CimInstance Win32_PerfRawData_Tcpip_NetworkInterface | select Name,BytesReceivedPersec,PacketsReceivedErrors,PacketsReceivedDiscarded,BytesSentPersec,PacketsOutboundErrors,PacketsOutboundDiscarded | fl").then((w,x)=>{if(!x){let C=w.toString().split(/\n\s*\n/);h=t(C)}vx(!1).then(C=>{l=0,u=0,h.forEach(A=>{C.forEach(T=>{(T.iface.toLowerCase()===r.toLowerCase()||T.mac.toLowerCase()===r.toLowerCase()||T.ip4.toLowerCase()===r.toLowerCase()||T.ip6.toLowerCase()===r.toLowerCase()||T.ifaceName.replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase()===r.replace(/[()[\] ]+/g,"").replace("#","_").toLowerCase())&&T.ifaceName.replace(/[()[\] ]+/g,"").replace(/#|\//g,"_").toLowerCase()===A.name&&(g=T.iface,l=A.rx_bytes,c=A.rx_dropped,f=A.rx_errors,u=A.tx_bytes,p=A.tx_dropped,d=A.tx_errors,a=T.operstate)})}),l&&u&&(o=Hh(g,parseInt(l),parseInt(u),a,c,f,p,d)),n(o)})})}}else o.rx_bytes=Fe[r].rx_bytes,o.tx_bytes=Fe[r].tx_bytes,o.rx_sec=Fe[r].rx_sec,o.tx_sec=Fe[r].tx_sec,o.ms=Fe[r].last_ms,o.operstate=Fe[r].operstate,n(o)})})}Ua.networkStats=oN;function xW(e,t){let n="";e.forEach(i=>{let s=i.split(" ");(parseInt(s[0],10)||-1)===t&&(s.shift(),n=s.join(" ").split(":")[0])}),n=n.split(" -")[0];let r=n.split("/");return r[r.length-1]}function SW(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(ts||uo||co||fo){let r='export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';(uo||co||fo)&&(r='export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL'),tr(r,{maxBuffer:1024*2e4},function(i,s){let o=s.toString().split(`
277
+ `);!i&&(o.length>1||o[0]!="")?(o.forEach(function(a){if(a=a.replace(/ +/g," ").split(" "),a.length>=7){let l=a[3],u="",c=a[3].split(":");c.length>1&&(u=c[c.length-1],c.pop(),l=c.join(":"));let f=a[4],p="",d=a[4].split(":");d.length>1&&(p=d[d.length-1],d.pop(),f=d.join(":"));let m=a[5],y=a[6].split("/");m&&n.push({protocol:a[0],localAddress:l,localPort:u,peerAddress:f,peerPort:p,state:m,pid:y[0]&&y[0]!=="-"?parseInt(y[0],10):null,process:y[1]?y[1].split(" ")[0].split(":")[0]:""})}}),e&&e(n),t(n)):(r='ss -tunap | grep "ESTAB\\|SYN-SENT\\|SYN-RECV\\|FIN-WAIT1\\|FIN-WAIT2\\|TIME-WAIT\\|CLOSE\\|CLOSE-WAIT\\|LAST-ACK\\|LISTEN\\|CLOSING"',tr(r,{maxBuffer:1024*2e4},function(a,l){a||l.toString().split(`
278
+ `).forEach(function(c){if(c=c.replace(/ +/g," ").split(" "),c.length>=6){let f=c[4],p="",d=c[4].split(":");d.length>1&&(p=d[d.length-1],d.pop(),f=d.join(":"));let m=c[5],y="",v=c[5].split(":");v.length>1&&(y=v[v.length-1],v.pop(),m=v.join(":"));let h=c[1];h==="ESTAB"&&(h="ESTABLISHED"),h==="TIME-WAIT"&&(h="TIME_WAIT");let g=null,w="";if(c.length>=7&&c[6].indexOf("users:")>-1){let x=c[6].replace('users:(("',"").replace(/"/g,"").split(",");x.length>2&&(w=x[0].split(" ")[0].split(":")[0],g=parseInt(x[1],10))}h&&n.push({protocol:c[0],localAddress:f,localPort:p,peerAddress:m,peerPort:y,state:h,pid:g,process:w})}}),e&&e(n),t(n)}))})}if(ns){let r='netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"',i="ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN";tr(r,{maxBuffer:1024*2e4},function(s,o){s||tr("ps -axo pid,command",{maxBuffer:1024*2e4},function(a,l){let u=l.toString().split(`
279
+ `);u=u.map(f=>f.trim().replace(/ +/g," ")),o.toString().split(`
280
+ `).forEach(function(f){if(f=f.replace(/ +/g," ").split(" "),f.length>=8){let p=f[3],d="",m=f[3].split(".");m.length>1&&(d=m[m.length-1],m.pop(),p=m.join("."));let y=f[4],v="",h=f[4].split(".");h.length>1&&(v=h[h.length-1],h.pop(),y=h.join("."));let g=i.indexOf(f[5])>=0,w=g?f[5]:"UNKNOWN",x=parseInt(f[8+(g?0:-1)],10);w&&n.push({protocol:f[0],localAddress:p,localPort:d,peerAddress:y,peerPort:v,state:w,pid:x,process:xW(u,x)})}}),e&&e(n),t(n)})})}if(zf){let r="netstat -nao";try{tr(r,Q.execOptsWin,function(i,s){i||(s.toString().split(`\r
281
+ `).forEach(function(a){if(a=a.trim().replace(/ +/g," ").split(" "),a.length>=4){let l=a[1],u="",c=a[1].split(":");c.length>1&&(u=c[c.length-1],c.pop(),l=c.join(":")),l=l.replace(/\[/g,"").replace(/\]/g,"");let f=a[2],p="",d=a[2].split(":");d.length>1&&(p=d[d.length-1],d.pop(),f=d.join(":")),f=f.replace(/\[/g,"").replace(/\]/g,"");let m=Q.toInt(a[4]),y=a[3];y==="HERGESTELLT"&&(y="ESTABLISHED"),y.startsWith("ABH")&&(y="LISTEN"),y==="SCHLIESSEN_WARTEN"&&(y="CLOSE_WAIT"),y==="WARTEND"&&(y="TIME_WAIT"),y==="SYN_GESENDET"&&(y="SYN_SENT"),y==="LISTENING"&&(y="LISTEN"),y==="SYN_RECEIVED"&&(y="SYN_RECV"),y==="FIN_WAIT_1"&&(y="FIN_WAIT1"),y==="FIN_WAIT_2"&&(y="FIN_WAIT2"),a[0].toLowerCase()!=="udp"&&y?n.push({protocol:a[0].toLowerCase(),localAddress:l,localPort:u,peerAddress:f,peerPort:p,state:y,pid:m,process:""}):a[0].toLowerCase()==="udp"&&n.push({protocol:a[0].toLowerCase(),localAddress:l,localPort:u,peerAddress:f,peerPort:p,state:"",pid:parseInt(a[3],10),process:""})}}),e&&e(n),t(n))})}catch{e&&e(n),t(n)}}})})}Ua.networkConnections=SW;function _W(e){return new Promise(t=>{process.nextTick(()=>{let n="";if(ts||uo||co||fo){let r="ip route get 1";try{tr(r,{maxBuffer:1024*2e4},function(i,s){if(i)e&&e(n),t(n);else{let o=s.toString().split(`
282
+ `),l=(o&&o[0]?o[0]:"").split(" via ");l&&l[1]&&(l=l[1].split(" "),n=l[0]),e&&e(n),t(n)}})}catch{e&&e(n),t(n)}}if(ns){let r="route -n get default";try{tr(r,{maxBuffer:1024*2e4},function(i,s){if(!i){let o=s.toString().split(`
283
+ `).map(a=>a.trim());n=Q.getValue(o,"gateway")}n?(e&&e(n),t(n)):(r="netstat -rn | awk '/default/ {print $2}'",tr(r,{maxBuffer:1024*2e4},function(o,a){n=a.toString().split(`
284
+ `).map(u=>u.trim()).find(u=>/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(u)),e&&e(n),t(n)}))})}catch{e&&e(n),t(n)}}if(zf)try{tr("netstat -r",Q.execOptsWin,function(r,i){i.toString().split(qh.EOL).forEach(o=>{if(o=o.replace(/\s+/g," ").trim(),o.indexOf("0.0.0.0 0.0.0.0")>-1&&!/[a-zA-Z]/.test(o)){let a=o.split(" ");a.length>=5&&a[a.length-3].indexOf(".")>-1&&(n=a[a.length-3])}}),n?(e&&e(n),t(n)):Q.powerShell("Get-CimInstance -ClassName Win32_IP4RouteTable | Where-Object { $_.Destination -eq '0.0.0.0' -and $_.Mask -eq '0.0.0.0' }").then(o=>{let a=o.toString().split(`\r
285
+ `);a.length>1&&!n&&(n=Q.getValue(a,"NextHop"),e&&e(n),t(n))})})}catch{e&&e(n),t(n)}})})}Ua.networkGatewayDefault=_W});var dN=oe(Jh=>{"use strict";var Gf=K("os"),Kh=K("child_process").exec,po=K("child_process").execSync,W=Pt(),Yh=process.platform,wx=Yh==="linux"||Yh==="android",xx=Yh==="darwin",Sx=Yh==="win32";function _x(e){let t=parseFloat(e);return t<0?0:t>=100?-50:t/2-100}function Xh(e){let t=2*(parseFloat(e)+100);return t<=100?t:100}var $f={1:2412,2:2417,3:2422,4:2427,5:2432,6:2437,7:2442,8:2447,9:2452,10:2457,11:2462,12:2467,13:2472,14:2484,32:5160,34:5170,36:5180,38:5190,40:5200,42:5210,44:5220,46:5230,48:5240,50:5250,52:5260,54:5270,56:5280,58:5290,60:5300,62:5310,64:5320,68:5340,96:5480,100:5500,102:5510,104:5520,106:5530,108:5540,110:5550,112:5560,114:5570,116:5580,118:5590,120:5600,122:5610,124:5620,126:5630,128:5640,132:5660,134:5670,136:5680,138:5690,140:5700,142:5710,144:5720,149:5745,151:5755,153:5765,155:5775,157:5785,159:5795,161:5805,165:5825,169:5845,173:5865,183:4915,184:4920,185:4925,187:4935,188:4940,189:4945,192:4960,196:4980};function Pu(e){return{}.hasOwnProperty.call($f,e)?$f[e]:null}function CW(e){let t=0;for(let n in $f)({}).hasOwnProperty.call($f,n)&&$f[n]===e&&(t=W.toInt(n));return t}function cN(){let e=[],t="iw dev 2>/dev/null";try{let r=po(t,W.execOptsLinux).toString().split(`
286
+ `).map(i=>i.trim()).join(`
287
+ `).split(`
288
+ Interface `);return r.shift(),r.forEach(i=>{let s=i.split(`
289
+ `),o=s[0],a=W.toInt(W.getValue(s,"ifindex"," ")),l=W.getValue(s,"addr"," "),u=W.toInt(W.getValue(s,"channel"," "));e.push({id:a,iface:o,mac:l,channel:u})}),e}catch{try{let i=po("nmcli -t -f general,wifi-properties,wired-properties,interface-flags,capabilities,nsp device show 2>/dev/null",W.execOptsLinux).toString().split(`
290
+
291
+ `),s=1;return i.forEach(o=>{let a=o.split(`
292
+ `),l=W.getValue(a,"GENERAL.DEVICE"),u=W.getValue(a,"GENERAL.TYPE"),c=s++,f=W.getValue(a,"GENERAL.HWADDR");u.toLowerCase()==="wifi"&&e.push({id:c,iface:l,mac:f,channel:""})}),e}catch{return[]}}}function fN(e){let t=`nmcli -t -f general,wifi-properties,capabilities,ip4,ip6 device show ${e} 2>/dev/null`;try{let n=po(t,W.execOptsLinux).toString().split(`
293
+ `),r=W.getValue(n,"GENERAL.CONNECTION");return{iface:e,type:W.getValue(n,"GENERAL.TYPE"),vendor:W.getValue(n,"GENERAL.VENDOR"),product:W.getValue(n,"GENERAL.PRODUCT"),mac:W.getValue(n,"GENERAL.HWADDR").toLowerCase(),ssid:r!=="--"?r:null}}catch{return{}}}function bW(e){let t=`nmcli -t --show-secrets connection show ${e} 2>/dev/null`;try{let n=po(t,W.execOptsLinux).toString().split(`
294
+ `),r=W.getValue(n,"802-11-wireless.seen-bssids").toLowerCase();return{ssid:e!=="--"?e:null,uuid:W.getValue(n,"connection.uuid"),type:W.getValue(n,"connection.type"),autoconnect:W.getValue(n,"connection.autoconnect")==="yes",security:W.getValue(n,"802-11-wireless-security.key-mgmt"),bssid:r!=="--"?r:null}}catch{return{}}}function OW(e){if(!e)return{};let t=`wpa_cli -i ${e} status 2>&1`;try{let n=po(t,W.execOptsLinux).toString().split(`
295
+ `),r=W.toInt(W.getValue(n,"freq","="));return{ssid:W.getValue(n,"ssid","="),uuid:W.getValue(n,"uuid","="),security:W.getValue(n,"key_mgmt","="),freq:r,channel:CW(r),bssid:W.getValue(n,"bssid","=").toLowerCase()}}catch{return{}}}function pN(){let e=[],t="nmcli -t -m multiline --fields active,ssid,bssid,mode,chan,freq,signal,security,wpa-flags,rsn-flags device wifi list 2>/dev/null";try{let r=po(t,W.execOptsLinux).toString().split("ACTIVE:");return r.shift(),r.forEach(i=>{i="ACTIVE:"+i;let s=i.split(Gf.EOL),o=W.getValue(s,"CHAN"),a=W.getValue(s,"FREQ").toLowerCase().replace("mhz","").trim(),l=W.getValue(s,"SECURITY").replace("(","").replace(")",""),u=W.getValue(s,"WPA-FLAGS").replace("(","").replace(")",""),c=W.getValue(s,"RSN-FLAGS").replace("(","").replace(")",""),f=W.getValue(s,"SIGNAL");e.push({ssid:W.getValue(s,"SSID"),bssid:W.getValue(s,"BSSID").toLowerCase(),mode:W.getValue(s,"MODE"),channel:o?parseInt(o,10):null,frequency:a?parseInt(a,10):null,signalLevel:_x(f),quality:f?parseInt(f,10):null,security:l&&l!=="none"?l.split(" "):[],wpaFlags:u&&u!=="none"?u.split(" "):[],rsnFlags:c&&c!=="none"?c.split(" "):[]})}),e}catch{return[]}}function lN(e){let t=[];try{let n=po(`export LC_ALL=C; iwlist ${e} scan 2>&1; unset LC_ALL`,W.execOptsLinux).toString().split(" Cell ");return n[0].indexOf("resource busy")>=0?-1:(n.length>1&&(n.shift(),n.forEach(r=>{let i=r.split(`
296
+ `),s=W.getValue(i,"channel",":",!0),o=i&&i.length&&i[0].indexOf("Address:")>=0?i[0].split("Address:")[1].trim().toLowerCase():"",a=W.getValue(i,"mode",":",!0),l=W.getValue(i,"frequency",":",!0),c=W.getValue(i,"Quality","=",!0).toLowerCase().split("signal level="),f=c.length>1?W.toInt(c[1]):0,p=f?Xh(f):0,d=W.getValue(i,"essid",":",!0),m=r.indexOf(" WPA ")>=0,y=r.indexOf("WPA2 ")>=0,v=[];m&&v.push("WPA"),y&&v.push("WPA2");let h=[],g="";i.forEach(function(w){let x=w.trim().toLowerCase();if(x.indexOf("group cipher")>=0){g&&h.push(g);let C=x.split(":");C.length>1&&(g=C[1].trim().toUpperCase())}if(x.indexOf("pairwise cipher")>=0){let C=x.split(":");C.length>1&&(C[1].indexOf("tkip")?g=g?"TKIP/"+g:"TKIP":C[1].indexOf("ccmp")?g=g?"CCMP/"+g:"CCMP":C[1].indexOf("proprietary")&&(g=g?"PROP/"+g:"PROP"))}if(x.indexOf("authentication suites")>=0){let C=x.split(":");C.length>1&&(C[1].indexOf("802.1x")?g=g?"802.1x/"+g:"802.1x":C[1].indexOf("psk")&&(g=g?"PSK/"+g:"PSK"))}}),g&&h.push(g),t.push({ssid:d,bssid:o,mode:a,channel:s?W.toInt(s):null,frequency:l?W.toInt(l.replace(".","")):null,signalLevel:f,quality:p,security:v,wpaFlags:h,rsnFlags:[]})})),t)}catch{return-1}}function EW(e){let t=[];return e&&e.forEach(function(n){let r=n.RSSI,i=[],s=[],o=n.SSID_STR||"";if(n.WPA_IE&&(i.push("WPA"),n.WPA_IE.IE_KEY_WPA_UCIPHERS&&n.WPA_IE.IE_KEY_WPA_UCIPHERS.forEach(function(a){a===0&&s.indexOf("unknown/TKIP")===-1&&s.push("unknown/TKIP"),a===2&&s.indexOf("PSK/TKIP")===-1&&s.push("PSK/TKIP"),a===4&&s.indexOf("PSK/AES")===-1&&s.push("PSK/AES")})),n.RSN_IE&&(i.push("WPA2"),n.RSN_IE.IE_KEY_RSN_UCIPHERS&&n.RSN_IE.IE_KEY_RSN_UCIPHERS.forEach(function(a){a===0&&s.indexOf("unknown/TKIP")===-1&&s.push("unknown/TKIP"),a===2&&s.indexOf("TKIP/TKIP")===-1&&s.push("TKIP/TKIP"),a===4&&s.indexOf("PSK/AES")===-1&&s.push("PSK/AES")})),n.SSID&&o==="")try{o=Buffer.from(n.SSID,"base64").toString("utf8")}catch{W.noop()}t.push({ssid:o,bssid:n.BSSID||"",mode:"",channel:n.CHANNEL,frequency:Pu(n.CHANNEL),signalLevel:r?parseInt(r,10):null,quality:Xh(r),security:i,wpaFlags:s,rsnFlags:[]})}),t}function IW(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(wx)if(n=pN(),n.length===0)try{let r=po("export LC_ALL=C; iwconfig 2>/dev/null; unset LC_ALL",W.execOptsLinux).toString().split(`
297
+
298
+ `),i="";if(r.forEach(s=>{s.indexOf("no wireless")===-1&&s.trim()!==""&&(i=s.split(" ")[0])}),i){let s="",o=W.isPrototypePolluted()?"---":W.sanitizeShellString(i,!0),a=W.mathMin(o.length,2e3);for(let u=0;u<=a;u++)o[u]!==void 0&&(s=s+o[u]);let l=lN(s);l===-1?setTimeout(function(u){let c=lN(u);c!=-1&&(n=c),e&&e(n),t(n)},4e3):(n=l,e&&e(n),t(n))}else e&&e(n),t(n)}catch{e&&e(n),t(n)}else e&&e(n),t(n);else xx?Kh("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x",{maxBuffer:1024*4e4},function(i,s){let o=s.toString();n=EW(W.plistParser(o)),e&&e(n),t(n)}):Sx?W.powerShell("netsh wlan show networks mode=Bssid").then(i=>{let s=i.toString("utf8").split(Gf.EOL+Gf.EOL+"SSID ");s.shift(),s.forEach(o=>{let a=o.split(Gf.EOL);if(a&&a.length>=8&&a[0].indexOf(":")>=0){let l=o.split(" BSSID");l.shift(),l.forEach(u=>{let c=u.split(Gf.EOL),f=c[0].split(":");f.shift();let p=f.join(":").trim().toLowerCase(),d=c[3].split(":").pop().trim(),m=c[1].split(":").pop().trim();n.push({ssid:a[0].split(":").pop().trim(),bssid:p,mode:"",channel:d?parseInt(d,10):null,frequency:Pu(d),signalLevel:_x(m),quality:m?parseInt(m,10):null,security:[a[2].split(":").pop().trim()],wpaFlags:[a[3].split(":").pop().trim()],rsnFlags:[]})})}}),e&&e(n),t(n)}):(e&&e(n),t(n))})})}Jh.wifiNetworks=IW;function PW(e){e=e.toLowerCase();let t="";return e.indexOf("intel")>=0?t="Intel":e.indexOf("realtek")>=0?t="Realtek":e.indexOf("qualcom")>=0?t="Qualcom":e.indexOf("broadcom")>=0?t="Broadcom":e.indexOf("cavium")>=0?t="Cavium":e.indexOf("cisco")>=0?t="Cisco":e.indexOf("marvel")>=0?t="Marvel":e.indexOf("zyxel")>=0?t="Zyxel":e.indexOf("melanox")>=0?t="Melanox":e.indexOf("d-link")>=0?t="D-Link":e.indexOf("tp-link")>=0?t="TP-Link":e.indexOf("asus")>=0?t="Asus":e.indexOf("linksys")>=0&&(t="Linksys"),t}function uN(e){return e=e.replace(/</g,"").replace(/>/g,"").match(/.{1,2}/g)||[],e.join(":")}function TW(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(wx){let r=cN(),i=pN();r.forEach(s=>{let o="",a=W.isPrototypePolluted()?"---":W.sanitizeShellString(s.iface,!0),l=W.mathMin(a.length,2e3);for(let x=0;x<=l;x++)a[x]!==void 0&&(o=o+a[x]);let u=fN(o),c=OW(o),f=u.ssid||c.ssid,p=i.filter(x=>x.ssid===f),d="",m=W.isPrototypePolluted()?"---":W.sanitizeShellString(f,!0),y=W.mathMin(m.length,2e3);for(let x=0;x<=y;x++)m[x]!==void 0&&(d=d+m[x]);let v=bW(d),h=p&&p.length&&p[0].channel?p[0].channel:c.channel?c.channel:null,g=p&&p.length&&p[0].bssid?p[0].bssid:c.bssid?c.bssid:null,w=p&&p.length&&p[0].signalLevel?p[0].signalLevel:null;f&&g&&n.push({id:s.id,iface:s.iface,model:u.product,ssid:f,bssid:p&&p.length&&p[0].bssid?p[0].bssid:c.bssid?c.bssid:null,channel:h,frequency:h?Pu(h):null,type:v.type?v.type:"802.11",security:v.security?v.security:c.security?c.security:null,signalLevel:w,quality:Xh(w),txRate:null})}),e&&e(n),t(n)}else if(xx){let r="system_profiler SPNetworkDataType";Kh(r,function(i,s){let o=s.toString().split(`
299
+
300
+ Wi-Fi:
301
+
302
+ `);if(o.length>1){let a=o[1].split(`
303
+
304
+ `)[0].split(`
305
+ `),l=W.getValue(a,"BSD Device Name",":",!0),u=W.getValue(a,"hardware",":",!0);r='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I 2>/dev/null; echo "######" ; ioreg -n AppleBCMWLANSkywalkInterface -r 2>/dev/null',Kh(r,function(c,f){let p=f.toString().split("######"),d=p[0].split(`
306
+ `),m=[];if(p[1].indexOf(" | {")>0&&p[1].indexOf(" | }")>p[1].indexOf(" | {")&&(m=p[1].split(" | {")[1].split(" | }")[0].replace(/ \| /g,"").replace(/"/g,"").split(`
307
+ `)),d.length>10){let y=W.getValue(d,"ssid",":",!0),v=W.getValue(d,"bssid",":",!0)||uN(W.getValue(m,"IO80211BSSID","=",!0)),h=W.getValue(d,"link auth",":",!0),g=W.getValue(d,"lastTxRate",":",!0),w=W.getValue(d,"channel",":",!0).split(",")[0],x="802.11",A=W.toInt(W.getValue(d,"agrCtlRSSI",":",!0));(y||v)&&n.push({id:"Wi-Fi",iface:l,model:u,ssid:y,bssid:v,channel:W.toInt(w),frequency:w?Pu(w):null,type:x,security:h,signalLevel:A,quality:Xh(A),txRate:g})}if(m.length>10){let y=W.getValue(m,"IO80211SSID","=",!0),v=uN(W.getValue(m,"IO80211BSSID","=",!0)),h="",g=-1,w=-1,x=-1,C=W.getValue(m,"IO80211Channel","=",!0);(y||v)&&!n.length&&n.push({id:"Wi-Fi",iface:l,model:u,ssid:y,bssid:v,channel:W.toInt(C),frequency:C?Pu(C):null,type:"802.11",security:h,signalLevel:w,quality:x,txRate:g})}e&&e(n),t(n)})}else e&&e(n),t(n)})}else Sx?W.powerShell("netsh wlan show interfaces").then(function(i){let s=i.toString().split(`\r
308
+ `);for(let a=0;a<s.length;a++)s[a]=s[a].trim();let o=s.join(`\r
309
+ `).split(`:\r
310
+ \r
311
+ `);o.shift(),o.forEach(a=>{let l=a.split(`\r
312
+ `);if(l.length>=5){let u=l[0].indexOf(":")>=0?l[0].split(":")[1].trim():"",c=l[1].indexOf(":")>=0?l[1].split(":")[1].trim():"",f=l[2].indexOf(":")>=0?l[2].split(":")[1].trim():"",p=W.getValue(l,"SSID",":",!0),d=W.getValue(l,"BSSID",":",!0),m=W.getValue(l,"Signal",":",!0),y=_x(m),v=W.getValue(l,"Radio type",":",!0)||W.getValue(l,"Type de radio",":",!0)||W.getValue(l,"Funktyp",":",!0)||null,h=W.getValue(l,"authentication",":",!0)||W.getValue(l,"Authentification",":",!0)||W.getValue(l,"Authentifizierung",":",!0)||null,g=W.getValue(l,"Channel",":",!0)||W.getValue(l,"Canal",":",!0)||W.getValue(l,"Kanal",":",!0)||null,w=W.getValue(l,"Transmit rate (mbps)",":",!0)||W.getValue(l,"Transmission (mbit/s)",":",!0)||W.getValue(l,"Empfangsrate (MBit/s)",":",!0)||null;c&&f&&p&&d&&n.push({id:f,iface:u,model:c,ssid:p,bssid:d,channel:W.toInt(g),frequency:g?Pu(g):null,type:v,security:h,signalLevel:y,quality:m?parseInt(m,10):null,txRate:W.toInt(w)||null})}}),e&&e(n),t(n)}):(e&&e(n),t(n))})})}Jh.wifiConnections=TW;function AW(e){return new Promise(t=>{process.nextTick(()=>{let n=[];wx?(cN().forEach(i=>{let s=fN(i.iface);n.push({id:i.id,iface:i.iface,model:s.product?s.product:null,vendor:s.vendor?s.vendor:null,mac:i.mac})}),e&&e(n),t(n)):xx?Kh("system_profiler SPNetworkDataType",function(i,s){let o=s.toString().split(`
313
+
314
+ Wi-Fi:
315
+
316
+ `);if(o.length>1){let a=o[1].split(`
317
+
318
+ `)[0].split(`
319
+ `),l=W.getValue(a,"BSD Device Name",":",!0),u=W.getValue(a,"MAC Address",":",!0),c=W.getValue(a,"hardware",":",!0);n.push({id:"Wi-Fi",iface:l,model:c,vendor:"",mac:u})}e&&e(n),t(n)}):Sx?W.powerShell("netsh wlan show interfaces").then(function(i){let s=i.toString().split(`\r
320
+ `);for(let a=0;a<s.length;a++)s[a]=s[a].trim();let o=s.join(`\r
321
+ `).split(`:\r
322
+ \r
323
+ `);o.shift(),o.forEach(a=>{let l=a.split(`\r
324
+ `);if(l.length>=5){let u=l[0].indexOf(":")>=0?l[0].split(":")[1].trim():"",c=l[1].indexOf(":")>=0?l[1].split(":")[1].trim():"",f=l[2].indexOf(":")>=0?l[2].split(":")[1].trim():"",p=l[3].indexOf(":")>=0?l[3].split(":"):[];p.shift();let d=p.join(":").trim(),m=PW(c);u&&c&&f&&d&&n.push({id:f,iface:u,model:c,vendor:m,mac:d})}}),e&&e(n),t(n)}):(e&&e(n),t(n))})})}Jh.wifiInterfaces=AW});var gN=oe(eg=>{"use strict";var Qh=K("os"),LW=K("fs"),NW=K("path"),Hf=K("child_process").exec,Cx=K("child_process").execSync,be=Pt(),mo=process.platform,Ei=mo==="linux"||mo==="android",Fa=mo==="darwin",bx=mo==="win32",qf=mo==="freebsd",Kf=mo==="openbsd",Yf=mo==="netbsd",Zh=mo==="sunos",jt={all:0,all_utime:0,all_stime:0,list:{},ms:0,result:{}},Tu={all:0,all_utime:0,all_stime:0,list:{},ms:0,result:{}},kn={all:0,all_utime:0,all_stime:0,list:{},ms:0,result:{}},mN={0:"unknown",1:"other",2:"ready",3:"running",4:"blocked",5:"suspended blocked",6:"suspended ready",7:"terminated",8:"stopped",9:"growing"};function DW(e){let t=e,n=e.replace(/ +/g," ").split(" ");return n.length===5&&(t=n[4]+"-"+("0"+("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".indexOf(n[1].toUpperCase())/3+1)).slice(-2)+"-"+("0"+n[2]).slice(-2)+" "+n[3]),t}function kW(e){let t=new Date;t=new Date(t.getTime()-t.getTimezoneOffset()*6e4);let n=e.split("-"),r=n.length-1,i=r>0?parseInt(n[r-1]):0,s=n[r].split(":"),o=s.length===3?parseInt(s[0]||0):0,a=parseInt(s[s.length===3?1:0]||0),l=parseInt(s[s.length===3?2:1]||0),u=(((i*24+o)*60+a)*60+l)*1e3,c=new Date(t.getTime()),f=c.toISOString().substring(0,10)+" "+c.toISOString().substring(11,19);try{c=new Date(t.getTime()-u),f=c.toISOString().substring(0,10)+" "+c.toISOString().substring(11,19)}catch{be.noop()}return f}function MW(e,t){return be.isFunction(e)&&!t&&(t=e,e=""),new Promise(n=>{process.nextTick(()=>{if(typeof e!="string")return t&&t([]),n([]);if(e){let r="";r.__proto__.toLowerCase=be.stringToLower,r.__proto__.replace=be.stringReplace,r.__proto__.trim=be.stringTrim;let i=be.sanitizeShellString(e),s=be.mathMin(i.length,2e3);for(let u=0;u<=s;u++)i[u]!==void 0&&(r=r+i[u]);r=r.trim().toLowerCase().replace(/, /g,"|").replace(/,+/g,"|"),r===""&&(r="*"),be.isPrototypePolluted()&&r!=="*"&&(r="------");let o=r.split("|"),a=[],l=[];if(Ei||qf||Kf||Yf||Fa){if((Ei||qf||Kf||Yf)&&r==="*")try{let c=Cx("systemctl --all --type=service --no-legend 2> /dev/null",be.execOptsLinux).toString().split(`
325
+ `);o=[];for(let f of c){let p=f.split(".service")[0];p&&f.indexOf(" not-found ")===-1&&o.push(p.trim())}r=o.join("|")}catch{try{r="";let f=Cx("service --status-all 2> /dev/null",be.execOptsLinux).toString().split(`
326
+ `);for(let p of f){let d=p.split("]");d.length===2&&(r+=(r!==""?"|":"")+d[1].trim())}o=r.split("|")}catch{try{let p=Cx("ls /etc/init.d/ -m 2> /dev/null",be.execOptsLinux).toString().split(`
327
+ `).join("");if(r="",p){let d=p.split(",");for(let m of d){let y=m.trim();y&&(r+=(r!==""?"|":"")+y)}o=r.split("|")}}catch{r="",o=[]}}}Fa&&r==="*"&&(t&&t(a),n(a));let u=Fa?["-caxo","pcpu,pmem,pid,command"]:["-axo","pcpu,pmem,pid,command"];r!==""&&o.length>0?be.execSafe("ps",u).then(c=>{if(c){let f=c.replace(/ +/g," ").replace(/,+/g,".").split(`
328
+ `);if(o.forEach(function(p){let d;Fa?d=f.filter(function(y){return y.toLowerCase().indexOf(p)!==-1}):d=f.filter(function(y){return y.toLowerCase().indexOf(" "+p.toLowerCase()+":")!==-1||y.toLowerCase().indexOf("/"+p.toLowerCase())!==-1});let m=[];for(let y of d){let v=y.trim().split(" ")[2];v&&m.push(parseInt(v,10))}a.push({name:p,running:d.length>0,startmode:"",pids:m,cpu:parseFloat(d.reduce(function(y,v){return y+parseFloat(v.trim().split(" ")[0])},0).toFixed(2)),mem:parseFloat(d.reduce(function(y,v){return y+parseFloat(v.trim().split(" ")[1])},0).toFixed(2))})}),Ei){let p='cat /proc/stat | grep "cpu "';for(let d in a)for(let m in a[d].pids)p+=";cat /proc/"+a[d].pids[m]+"/stat";Hf(p,{maxBuffer:1024*2e4},function(d,m){let y=m.toString().split(`
329
+ `),v=Ox(y.shift()),h={},g={};y.forEach(w=>{if(g=Ex(w,v,Tu),g.pid){let x=-1;for(let C in a)for(let A in a[C].pids)parseInt(a[C].pids[A])===parseInt(g.pid)&&(x=C);x>=0&&(a[x].cpu+=g.cpuu+g.cpus),h[g.pid]={cpuu:g.cpuu,cpus:g.cpus,utime:g.utime,stime:g.stime,cutime:g.cutime,cstime:g.cstime}}}),Tu.all=v,Tu.list=Object.assign({},h),Tu.ms=Date.now()-Tu.ms,Tu.result=Object.assign({},a),t&&t(a),n(a)})}else t&&t(a),n(a)}else u=["-o","comm"],be.execSafe("ps",u).then(f=>{if(f){let p=f.replace(/ +/g," ").replace(/,+/g,".").split(`
330
+ `);o.forEach(function(d){let m=p.filter(function(y){return y.indexOf(d)!==-1});a.push({name:d,running:m.length>0,startmode:"",cpu:0,mem:0})}),t&&t(a),n(a)}else o.forEach(function(p){a.push({name:p,running:!1,startmode:"",cpu:0,mem:0})}),t&&t(a),n(a)})}):(t&&t(a),n(a))}if(bx)try{let u="Get-CimInstance Win32_Service";o[0]!=="*"&&(u+=' -Filter "',o.forEach(c=>{u+=`Name='${c}' or `}),u=`${u.slice(0,-4)}"`),u+=" | select Name,Caption,Started,StartMode,ProcessId | fl",be.powerShell(u).then((c,f)=>{f?(o.forEach(function(p){a.push({name:p,running:!1,startmode:"",cpu:0,mem:0})}),t&&t(a),n(a)):(c.split(/\n\s*\n/).forEach(d=>{if(d.trim()!==""){let m=d.trim().split(`\r
331
+ `),y=be.getValue(m,"Name",":",!0).toLowerCase(),v=be.getValue(m,"Caption",":",!0).toLowerCase(),h=be.getValue(m,"Started",":",!0),g=be.getValue(m,"StartMode",":",!0),w=be.getValue(m,"ProcessId",":",!0);(r==="*"||o.indexOf(y)>=0||o.indexOf(v)>=0)&&(a.push({name:y,running:h.toLowerCase()==="true",startmode:g,pids:[w],cpu:0,mem:0}),l.push(y),l.push(v))}}),r!=="*"&&o.filter(function(m){return l.indexOf(m)===-1}).forEach(function(m){a.push({name:m,running:!1,startmode:"",pids:[],cpu:0,mem:0})}),t&&t(a),n(a))})}catch{t&&t(a),n(a)}}else t&&t([]),n([])})})}eg.services=MW;function Ox(e){let t=e.replace(/ +/g," ").split(" "),n=t.length>=2?parseInt(t[1]):0,r=t.length>=3?parseInt(t[2]):0,i=t.length>=4?parseInt(t[3]):0,s=t.length>=5?parseInt(t[4]):0,o=t.length>=6?parseInt(t[5]):0,a=t.length>=7?parseInt(t[6]):0,l=t.length>=8?parseInt(t[7]):0,u=t.length>=9?parseInt(t[8]):0,c=t.length>=10?parseInt(t[9]):0,f=t.length>=11?parseInt(t[10]):0;return n+r+i+s+o+a+l+u+c+f}function Ex(e,t,n){let r=e.replace(/ +/g," ").split(")");if(r.length>=2){let i=r[1].split(" ");if(i.length>=16){let s=parseInt(r[0].split(" ")[0]),o=parseInt(i[12]),a=parseInt(i[13]),l=parseInt(i[14]),u=parseInt(i[15]),c=0,f=0;return n.all>0&&n.list[s]?(c=(o+l-n.list[s].utime-n.list[s].cutime)/(t-n.all)*100,f=(a+u-n.list[s].stime-n.list[s].cstime)/(t-n.all)*100):(c=(o+l)/t*100,f=(a+u)/t*100),{pid:s,utime:o,stime:a,cutime:l,cstime:u,cpuu:c,cpus:f}}else return{pid:0,utime:0,stime:0,cutime:0,cstime:0,cpuu:0,cpus:0}}else return{pid:0,utime:0,stime:0,cutime:0,cstime:0,cpuu:0,cpus:0}}function hN(e,t,n){let r=0,i=0;return n.all>0&&n.list[e.pid]?(r=(e.utime-n.list[e.pid].utime)/(t-n.all)*100,i=(e.stime-n.list[e.pid].stime)/(t-n.all)*100):(r=e.utime/t*100,i=e.stime/t*100),{pid:e.pid,utime:e.utime,stime:e.stime,cpuu:r>0?r:0,cpus:i>0?i:0}}function RW(e){let t=[];function n(o){o=o||"";let a=o.split(" ")[0];if(a.substr(-1)===":"&&(a=a.substr(0,a.length-1)),a.substr(0,1)!=="["){let l=a.split("/");isNaN(parseInt(l[l.length-1]))?a=l[l.length-1]:a=l[0]}return a}function r(o){let a=0,l=0;function u(U){a=l,t[U]?l=o.substring(t[U].to+a,1e4).indexOf(" "):l=1e4}u(0);let c=parseInt(o.substring(t[0].from+a,t[0].to+l));u(1);let f=parseInt(o.substring(t[1].from+a,t[1].to+l));u(2);let p=parseFloat(o.substring(t[2].from+a,t[2].to+l).replace(/,/g,"."));u(3);let d=parseFloat(o.substring(t[3].from+a,t[3].to+l).replace(/,/g,"."));u(4);let m=parseInt(o.substring(t[4].from+a,t[4].to+l));u(5);let y=parseInt(o.substring(t[5].from+a,t[5].to+l));u(6);let v=parseInt(o.substring(t[6].from+a,t[6].to+l));u(7);let h=parseInt(o.substring(t[7].from+a,t[7].to+l))||0;u(8);let g=Zh?DW(o.substring(t[8].from+a,t[8].to+l).trim()):kW(o.substring(t[8].from+a,t[8].to+l).trim());u(9);let w=o.substring(t[9].from+a,t[9].to+l).trim();w=w[0]==="R"?"running":w[0]==="S"?"sleeping":w[0]==="T"?"stopped":w[0]==="W"?"paging":w[0]==="X"?"dead":w[0]==="Z"?"zombie":w[0]==="D"||w[0]==="U"?"blocked":"unknown",u(10);let x=o.substring(t[10].from+a,t[10].to+l).trim();(x==="?"||x==="??")&&(x=""),u(11);let C=o.substring(t[11].from+a,t[11].to+l).trim();u(12);let A="",T="",z="",M=o.substring(t[12].from+a,t[12].to+l).trim();if(M.substr(M.length-1)==="]"&&(M=M.slice(0,-1)),M.substr(0,1)==="[")T=M.substring(1);else{let U=M.indexOf("("),D=M.indexOf(")"),F=M.indexOf("/"),V=M.indexOf(":");if(U<D&&U<F&&F<D)T=M.split(" ")[0],T=T.replace(/:/g,"");else if(V>0&&(F===-1||F>3))T=M.split(" ")[0],T=T.replace(/:/g,"");else{let se=M.indexOf(" -"),X=M.indexOf(" /");se=se>=0?se:1e4,X=X>=0?X:1e4;let Ve=Math.min(se,X),we=M.substr(0,Ve),Te=M.substr(Ve),Je=we.lastIndexOf("/");if(Je>=0&&(A=we.substr(0,Je),we=we.substr(Je+1)),Ve===1e4&&we.indexOf(" ")>-1){let ve=we.split(" ");LW.existsSync(NW.join(A,ve[0]))?(T=ve.shift(),z=(ve.join(" ")+" "+Te).trim()):(T=we.trim(),z=Te.trim())}else T=we.trim(),z=Te.trim()}}return{pid:c,parentPid:f,name:Ei?n(T):T,cpu:p,cpuu:0,cpus:0,mem:d,priority:m,memVsz:y,memRss:v,nice:h,started:g,state:w,tty:x,user:C,command:T,params:z,path:A}}function i(o){let a=[];if(o.length>1){let l=o[0];t=be.parseHead(l,8),o.shift(),o.forEach(function(u){u.trim()!==""&&a.push(r(u))})}return a}function s(o){function a(c){let f=("0"+(c.getMonth()+1).toString()).slice(-2),p=c.getFullYear().toString(),d=("0"+c.getDate().toString()).slice(-2),m=("0"+c.getHours().toString()).slice(-2),y=("0"+c.getMinutes().toString()).slice(-2),v=("0"+c.getSeconds().toString()).slice(-2);return p+"-"+f+"-"+d+" "+m+":"+y+":"+v}function l(c){let f="";if(c.indexOf("d")>=0){let p=c.split("d");f=a(new Date(Date.now()-(p[0]*24+p[1]*1)*60*60*1e3))}else if(c.indexOf("h")>=0){let p=c.split("h");f=a(new Date(Date.now()-(p[0]*60+p[1]*1)*60*1e3))}else if(c.indexOf(":")>=0){let p=c.split(":");f=a(new Date(Date.now()-(p.length>1?(p[0]*60+p[1])*1e3:p[0]*1e3)))}return f}let u=[];return o.forEach(function(c){if(c.trim()!==""){c=c.trim().replace(/ +/g," ").replace(/,+/g,".");let f=c.split(" "),p=f.slice(9).join(" "),d=parseFloat((1*parseInt(f[3])*1024/Qh.totalmem()).toFixed(1)),m=l(f[5]);u.push({pid:parseInt(f[0]),parentPid:parseInt(f[1]),name:n(p),cpu:0,cpuu:0,cpus:0,mem:d,priority:0,memVsz:parseInt(f[2]),memRss:parseInt(f[3]),nice:parseInt(f[4]),started:m,state:f[6]==="R"?"running":f[6]==="S"?"sleeping":f[6]==="T"?"stopped":f[6]==="W"?"paging":f[6]==="X"?"dead":f[6]==="Z"?"zombie":f[6]==="D"||f[6]==="U"?"blocked":"unknown",tty:f[7],user:f[8],command:p})}}),u}return new Promise(o=>{process.nextTick(()=>{let a={all:0,running:0,blocked:0,sleeping:0,unknown:0,list:[]},l="";if(jt.ms&&Date.now()-jt.ms>=500||jt.ms===0)if(Ei||qf||Kf||Yf||Fa||Zh)Ei&&(l="export LC_ALL=C; ps -axo pid:11,ppid:11,pcpu:6,pmem:6,pri:5,vsz:11,rss:11,ni:5,etime:30,state:5,tty:15,user:20,command; unset LC_ALL"),(qf||Kf||Yf)&&(l="export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,ni,etime,state,tty,user,command; unset LC_ALL"),Fa&&(l="ps -axo pid,ppid,pcpu,pmem,pri,vsz=temp_title_1,rss=temp_title_2,nice,etime=temp_title_3,state,tty,user,command -r"),Zh&&(l="ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm"),Hf(l,{maxBuffer:1024*2e4},function(u,c){!u&&c.toString().trim()?(a.list=i(c.toString().split(`
332
+ `)).slice(),a.all=a.list.length,a.running=a.list.filter(function(f){return f.state==="running"}).length,a.blocked=a.list.filter(function(f){return f.state==="blocked"}).length,a.sleeping=a.list.filter(function(f){return f.state==="sleeping"}).length,Ei?(l='cat /proc/stat | grep "cpu "',a.list.forEach(f=>{l+=";cat /proc/"+f.pid+"/stat"}),Hf(l,{maxBuffer:1024*2e4},function(f,p){let d=p.toString().split(`
333
+ `),m=Ox(d.shift()),y={},v={};d.forEach(h=>{if(v=Ex(h,m,jt),v.pid){let g=a.list.map(function(w){return w.pid}).indexOf(v.pid);g>=0&&(a.list[g].cpu=v.cpuu+v.cpus,a.list[g].cpuu=v.cpuu,a.list[g].cpus=v.cpus),y[v.pid]={cpuu:v.cpuu,cpus:v.cpus,utime:v.utime,stime:v.stime,cutime:v.cutime,cstime:v.cstime}}}),jt.all=m,jt.list=Object.assign({},y),jt.ms=Date.now()-jt.ms,jt.result=Object.assign({},a),e&&e(a),o(a)})):(e&&e(a),o(a))):(l="ps -o pid,ppid,vsz,rss,nice,etime,stat,tty,user,comm",Zh&&(l="ps -o pid,ppid,vsz,rss,nice,etime,s,tty,user,comm"),Hf(l,{maxBuffer:1024*2e4},function(f,p){if(f)e&&e(a),o(a);else{let d=p.toString().split(`
334
+ `);d.shift(),a.list=s(d).slice(),a.all=a.list.length,a.running=a.list.filter(function(m){return m.state==="running"}).length,a.blocked=a.list.filter(function(m){return m.state==="blocked"}).length,a.sleeping=a.list.filter(function(m){return m.state==="sleeping"}).length,e&&e(a),o(a)}}))});else if(bx)try{be.powerShell('Get-CimInstance Win32_Process | select-Object ProcessId,ParentProcessId,ExecutionState,Caption,CommandLine,ExecutablePath,UserModeTime,KernelModeTime,WorkingSetSize,Priority,PageFileUsage, @{n="CreationDate";e={$_.CreationDate.ToString("yyyy-MM-dd HH:mm:ss")}} | fl').then((u,c)=>{if(!c){let f=u.split(/\n\s*\n/),p=[],d=[],m={},y=0,v=0;f.forEach(h=>{if(h.trim()!==""){let g=h.trim().split(`\r
335
+ `),w=parseInt(be.getValue(g,"ProcessId",":",!0),10),x=parseInt(be.getValue(g,"ParentProcessId",":",!0),10),C=be.getValue(g,"ExecutionState",":"),A=be.getValue(g,"Caption",":",!0),T=be.getValue(g,"CommandLine",":",!0),z=!1;g.forEach(V=>{z&&V.toLowerCase().startsWith(" ")?T+=" "+V.trim():z=!1,V.toLowerCase().startsWith("commandline")&&(z=!0)});let M=be.getValue(g,"ExecutablePath",":",!0),U=parseInt(be.getValue(g,"UserModeTime",":",!0),10),D=parseInt(be.getValue(g,"KernelModeTime",":",!0),10),F=parseInt(be.getValue(g,"WorkingSetSize",":",!0),10);y=y+U,v=v+D,a.all++,C||a.unknown++,C==="3"&&a.running++,(C==="4"||C==="5")&&a.blocked++,d.push({pid:w,utime:U,stime:D,cpu:0,cpuu:0,cpus:0}),p.push({pid:w,parentPid:x,name:A,cpu:0,cpuu:0,cpus:0,mem:F/Qh.totalmem()*100,priority:parseInt(be.getValue(g,"Priority",":",!0),10),memVsz:parseInt(be.getValue(g,"PageFileUsage",":",!0),10),memRss:Math.floor(parseInt(be.getValue(g,"WorkingSetSize",":",!0),10)/1024),nice:0,started:be.getValue(g,"CreationDate",":",!0),state:C?mN[C]:mN[0],tty:"",user:"",command:T||A,path:M,params:""})}}),a.sleeping=a.all-a.running-a.blocked-a.unknown,a.list=p,d.forEach(h=>{let g=hN(h,y+v,jt),w=a.list.map(function(x){return x.pid}).indexOf(g.pid);w>=0&&(a.list[w].cpu=g.cpuu+g.cpus,a.list[w].cpuu=g.cpuu,a.list[w].cpus=g.cpus),m[g.pid]={cpuu:g.cpuu,cpus:g.cpus,utime:g.utime,stime:g.stime}}),jt.all=y+v,jt.all_utime=y,jt.all_stime=v,jt.list=Object.assign({},m),jt.ms=Date.now()-jt.ms,jt.result=Object.assign({},a)}e&&e(a),o(a)})}catch{e&&e(a),o(a)}else e&&e(a),o(a);else e&&e(jt.result),o(jt.result)})})}eg.processes=RW;function VW(e,t){return be.isFunction(e)&&!t&&(t=e,e=""),new Promise(n=>{process.nextTick(()=>{if(e=e||"",typeof e!="string")return t&&t([]),n([]);let r="";r.__proto__.toLowerCase=be.stringToLower,r.__proto__.replace=be.stringReplace,r.__proto__.trim=be.stringTrim;let i=be.sanitizeShellString(e),s=be.mathMin(i.length,2e3);for(let u=0;u<=s;u++)i[u]!==void 0&&(r=r+i[u]);r=r.trim().toLowerCase().replace(/, /g,"|").replace(/,+/g,"|"),r===""&&(r="*"),be.isPrototypePolluted()&&r!=="*"&&(r="------");let o=r.split("|"),a=[];if((be.isPrototypePolluted()?"":be.sanitizeShellString(e)||"*")&&o.length&&o[0]!=="------"){if(bx)try{be.powerShell("Get-CimInstance Win32_Process | select ProcessId,Caption,UserModeTime,KernelModeTime,WorkingSetSize | fl").then((u,c)=>{if(!c){let f=u.split(/\n\s*\n/),p=[],d={},m=0,y=0;f.forEach(v=>{if(v.trim()!==""){let h=v.trim().split(`\r
336
+ `),g=parseInt(be.getValue(h,"ProcessId",":",!0),10),w=be.getValue(h,"Caption",":",!0),x=parseInt(be.getValue(h,"UserModeTime",":",!0),10),C=parseInt(be.getValue(h,"KernelModeTime",":",!0),10),A=parseInt(be.getValue(h,"WorkingSetSize",":",!0),10);m=m+x,y=y+C,p.push({pid:g,name:w,utime:x,stime:C,cpu:0,cpuu:0,cpus:0,mem:A});let T="",z=!1;if(o.forEach(function(M){w.toLowerCase().indexOf(M.toLowerCase())>=0&&!z&&(z=!0,T=M)}),r==="*"||z){let M=!1;a.forEach(function(U){U.proc.toLowerCase()===T.toLowerCase()&&(U.pids.push(g),U.mem+=A/Qh.totalmem()*100,M=!0)}),M||a.push({proc:T,pid:g,pids:[g],cpu:0,mem:A/Qh.totalmem()*100})}}}),r!=="*"&&o.filter(function(h){return p.filter(function(g){return g.name.toLowerCase().indexOf(h)>=0}).length===0}).forEach(function(h){a.push({proc:h,pid:null,pids:[],cpu:0,mem:0})}),p.forEach(v=>{let h=hN(v,m+y,kn),g=-1;for(let w=0;w<a.length;w++)(a[w].pid===h.pid||a[w].pids.indexOf(h.pid)>=0)&&(g=w);g>=0&&(a[g].cpu+=h.cpuu+h.cpus),d[h.pid]={cpuu:h.cpuu,cpus:h.cpus,utime:h.utime,stime:h.stime}}),kn.all=m+y,kn.all_utime=m,kn.all_stime=y,kn.list=Object.assign({},d),kn.ms=Date.now()-kn.ms,kn.result=JSON.parse(JSON.stringify(a)),t&&t(a),n(a)}})}catch{t&&t(a),n(a)}if(Fa||Ei||qf||Kf||Yf){let u=["-axo","pid,ppid,pcpu,pmem,comm"];be.execSafe("ps",u).then(c=>{if(c){let f=[],p=c.toString().split(`
337
+ `).filter(function(d){if(r==="*")return!0;if(d.toLowerCase().indexOf("grep")!==-1)return!1;let m=!1;return o.forEach(function(y){m=m||d.toLowerCase().indexOf(y.toLowerCase())>=0}),m});if(p.shift(),p.forEach(function(d){let m=d.trim().replace(/ +/g," ").split(" ");if(m.length>4){let y=m[4].indexOf("/")>=0?m[4].substring(0,m[4].indexOf("/")):m[4],v=Ei?y:m[4].substring(m[4].lastIndexOf("/")+1);f.push({name:v,pid:parseInt(m[0])||0,ppid:parseInt(m[1])||0,cpu:parseFloat(m[2].replace(",",".")),mem:parseFloat(m[3].replace(",","."))})}}),f.forEach(function(d){let m=-1,y=!1,v=d.name;for(let h=0;h<a.length;h++)d.name.toLowerCase().indexOf(a[h].proc.toLowerCase())>=0&&(m=h);o.forEach(function(h){d.name.toLowerCase().indexOf(h.toLowerCase())>=0&&!y&&(y=!0,v=h)}),(r==="*"||y)&&(m<0?v&&a.push({proc:v,pid:d.pid,pids:[d.pid],cpu:d.cpu,mem:d.mem}):(d.ppid<10&&(a[m].pid=d.pid),a[m].pids.push(d.pid),a[m].cpu+=d.cpu,a[m].mem+=d.mem))}),r!=="*"&&o.filter(function(m){return f.filter(function(y){return y.name.toLowerCase().indexOf(m)>=0}).length===0}).forEach(function(m){a.push({proc:m,pid:null,pids:[],cpu:0,mem:0})}),Ei){a.forEach(function(m){m.cpu=0});let d='cat /proc/stat | grep "cpu "';for(let m in a)for(let y in a[m].pids)d+=";cat /proc/"+a[m].pids[y]+"/stat";Hf(d,{maxBuffer:1024*2e4},function(m,y){let v=y.toString().split(`
338
+ `),h=Ox(v.shift()),g={},w={};v.forEach(x=>{if(w=Ex(x,h,kn),w.pid){let C=-1;for(let A in a)a[A].pids.indexOf(w.pid)>=0&&(C=A);C>=0&&(a[C].cpu+=w.cpuu+w.cpus),g[w.pid]={cpuu:w.cpuu,cpus:w.cpus,utime:w.utime,stime:w.stime,cutime:w.cutime,cstime:w.cstime}}}),a.forEach(function(x){x.cpu=Math.round(x.cpu*100)/100}),kn.all=h,kn.list=Object.assign({},g),kn.ms=Date.now()-kn.ms,kn.result=Object.assign({},a),t&&t(a),n(a)})}else t&&t(a),n(a)}else t&&t(a),n(a)})}}})})}eg.processLoad=VW});var wN=oe(vN=>{"use strict";var Xf=K("child_process").exec,ho=Pt(),go=process.platform,jW=go==="linux"||go==="android",BW=go==="darwin",UW=go==="win32",FW=go==="freebsd",WW=go==="openbsd",zW=go==="netbsd",GW=go==="sunos";function yN(e,t){let n=[],r=[],i={},s=!0,o=[],a=[],l={},u=!0;return e.forEach(function(c){if(c==="---")u=!1;else{let f=c.replace(/ +/g," ").split(" ");u?r.push({user:f[0],tty:f[1],date:f[2],time:f[3],ip:f&&f.length>4?f[4].replace(/\(/g,"").replace(/\)/g,""):""}):s?(o=f,o.forEach(function(p){a.push(c.indexOf(p))}),s=!1):(i.user=c.substring(a[0],a[1]-1).trim(),i.tty=c.substring(a[1],a[2]-1).trim(),i.ip=c.substring(a[2],a[3]-1).replace(/\(/g,"").replace(/\)/g,"").trim(),i.command=c.substring(a[7],1e3).trim(),l=r.filter(function(p){return p.user.substring(0,8).trim()===i.user&&p.tty===i.tty}),l.length===1&&n.push({user:l[0].user,tty:l[0].tty,date:l[0].date,time:l[0].time,ip:l[0].ip,command:i.command}))}}),n.length===0&&t===2?r:n}function Ix(e){let t=[],n=[],r={},i={},s=!0;return e.forEach(function(o){if(o==="---")s=!1;else{let a=o.replace(/ +/g," ").split(" ");s?n.push({user:a[0],tty:a[1],date:""+new Date().getFullYear()+"-"+("0"+("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".indexOf(a[2].toUpperCase())/3+1)).slice(-2)+"-"+("0"+a[3]).slice(-2),time:a[4]}):(r.user=a[0],r.tty=a[1],r.ip=a[2]!=="-"?a[2]:"",r.command=a.slice(5,1e3).join(" "),i=n.filter(function(l){return l.user===r.user&&(l.tty.substring(3,1e3)===r.tty||l.tty===r.tty)}),i.length===1&&t.push({user:i[0].user,tty:i[0].tty,date:i[0].date,time:i[0].time,ip:r.ip,command:r.command}))}}),t}function $W(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(jW&&Xf('who --ips; echo "---"; w | tail -n +2',function(r,i){if(r)e&&e(n),t(n);else{let s=i.toString().split(`
339
+ `);n=yN(s,1),n.length===0?Xf('who; echo "---"; w | tail -n +2',function(o,a){o||(s=a.toString().split(`
340
+ `),n=yN(s,2)),e&&e(n),t(n)}):(e&&e(n),t(n))}}),(FW||WW||zW)&&Xf('who; echo "---"; w -ih',function(r,i){if(!r){let s=i.toString().split(`
341
+ `);n=Ix(s)}e&&e(n),t(n)}),GW&&Xf('who; echo "---"; w -h',function(r,i){if(!r){let s=i.toString().split(`
342
+ `);n=Ix(s)}e&&e(n),t(n)}),BW&&Xf('who; echo "---"; w -ih',function(r,i){if(!r){let s=i.toString().split(`
343
+ `);n=Ix(s)}e&&e(n),t(n)}),UW)try{let r=`Get-CimInstance Win32_LogonSession | select LogonId,@{n="StartTime";e={$_.StartTime.ToString("yyyy-MM-dd HH:mm:ss")}} | fl; echo '#-#-#-#';`;r+="Get-CimInstance Win32_LoggedOnUser | select antecedent,dependent | fl ; echo '#-#-#-#';",r+=`$process = (Get-CimInstance Win32_Process -Filter "name = 'explorer.exe'"); Invoke-CimMethod -InputObject $process[0] -MethodName GetOwner | select user, domain | fl; get-process -name explorer | select-object sessionid | fl; echo '#-#-#-#';`,r+="query user",ho.powerShell(r).then(i=>{if(i){i=i.split("#-#-#-#");let s=HW((i[0]||"").split(/\n\s*\n/)),o=YW((i[1]||"").split(/\n\s*\n/)),a=XW((i[3]||"").split(`\r
344
+ `)),l=KW((i[2]||"").split(/\n\s*\n/),a);for(let u in o)({}).hasOwnProperty.call(o,u)&&(o[u].dateTime={}.hasOwnProperty.call(s,u)?s[u]:"");l.forEach(u=>{let c="";for(let f in o)({}).hasOwnProperty.call(o,f)&&o[f].user===u.user&&(!c||c<o[f].dateTime)&&(c=o[f].dateTime);n.push({user:u.user,tty:u.tty,date:`${c.substring(0,10)}`,time:`${c.substring(11,19)}`,ip:"",command:""})})}e&&e(n),t(n)})}catch{e&&e(n),t(n)}})})}function HW(e){let t={};return e.forEach(n=>{let r=n.split(`\r
345
+ `),i=ho.getValue(r,"LogonId"),s=ho.getValue(r,"starttime");i&&(t[i]=s)}),t}function qW(e,t){e=e.toLowerCase(),t=t.toLowerCase();let n=0,r=e.length;t.length>r&&(r=t.length);for(let i=0;i<r;i++){let s=e[i]||"",o=t[i]||"";s===o&&n++}return r>10?n/r>.9:r>0?n/r>.8:!1}function KW(e,t){let n=[];return e.forEach(r=>{let i=r.split(`\r
346
+ `),s=ho.getValue(i,"domain",":",!0),o=ho.getValue(i,"user",":",!0),a=ho.getValue(i,"sessionid",":",!0);if(o){let l=t.filter(u=>qW(u.user,o));n.push({domain:s,user:o,tty:l&&l[0]&&l[0].tty?l[0].tty:a})}}),n}function YW(e){let t={};return e.forEach(n=>{let r=n.split(`\r
347
+ `),s=ho.getValue(r,"antecedent",":",!0).split("="),o=s.length>2?s[1].split(",")[0].replace(/"/g,"").trim():"",a=s.length>2?s[2].replace(/"/g,"").replace(/\)/g,"").trim():"";s=ho.getValue(r,"dependent",":",!0).split("=");let u=s.length>1?s[1].replace(/"/g,"").replace(/\)/g,"").trim():"";u&&(t[u]={domain:a,user:o})}),t}function XW(e){e=e.filter(i=>i);let t=[],n=e[0],r=[];if(n){let i=n[0]===" "?1:0;r.push(i-1);let s=0;for(let o=i+1;o<n.length;o++)n[o]===" "&&(n[o-1]===" "||n[o-1]===".")?s=o:s&&(r.push(s),s=0);for(let o=1;o<e.length;o++)if(e[o].trim()){let a=e[o].substring(r[0]+1,r[1]).trim()||"",l=e[o].substring(r[1]+1,r[2]-2).trim()||"";t.push({user:a,tty:l})}}return t}vN.users=$W});var _N=oe(Dx=>{"use strict";var fn=Pt(),yo=process.platform,Px=yo==="linux"||yo==="android",Tx=yo==="darwin",xN=yo==="win32",Ax=yo==="freebsd",Lx=yo==="openbsd",Nx=yo==="netbsd",SN=yo==="sunos";function JW(e,t){return new Promise(n=>{process.nextTick(()=>{let r={url:e,ok:!1,status:404,ms:null};if(typeof e!="string")return t&&t(r),n(r);let i="",s=fn.sanitizeShellString(e,!0),o=fn.mathMin(s.length,2e3);for(let a=0;a<=o;a++)if(s[a]!==void 0){s[a].__proto__.toLowerCase=fn.stringToLower;let l=s[a].toLowerCase();l&&l[0]&&!l[1]&&l[0].length===1&&(i=i+l[0])}r.url=i;try{if(i&&!fn.isPrototypePolluted()){if(i.__proto__.startsWith=fn.stringStartWith,i.startsWith("file:")||i.startsWith("gopher:")||i.startsWith("telnet:")||i.startsWith("mailto:")||i.startsWith("news:")||i.startsWith("nntp:"))return t&&t(r),n(r);let a=Date.now();if(Px||Ax||Lx||Nx||Tx||SN){let l=["-I","--connect-timeout","5","-m","5"];l.push(i),fn.execSafe("curl",l).then(c=>{let f=c.split(`
348
+ `),p=f[0]&&f[0].indexOf(" ")>=0?parseInt(f[0].split(" ")[1],10):404;r.status=p||404,r.ok=p===200||p===301||p===302||p===304,r.ms=r.ok?Date.now()-a:null,t&&t(r),n(r)})}if(xN){let l=i.startsWith("https:")?K("https"):K("http");try{l.get(i,u=>{let c=u.statusCode;r.status=c||404,r.ok=c===200||c===301||c===302||c===304,c!==200?(u.resume(),r.ms=r.ok?Date.now()-a:null,t&&t(r),n(r)):(u.on("data",()=>{}),u.on("end",()=>{r.ms=r.ok?Date.now()-a:null,t&&t(r),n(r)}))}).on("error",()=>{t&&t(r),n(r)})}catch{t&&t(r),n(r)}}}else t&&t(r),n(r)}catch{t&&t(r),n(r)}})})}Dx.inetChecksite=JW;function ZW(e,t){return fn.isFunction(e)&&!t&&(t=e,e=""),e=e||"8.8.8.8",new Promise(n=>{process.nextTick(()=>{if(typeof e!="string")return t&&t(null),n(null);let r="",i=(fn.isPrototypePolluted()?"8.8.8.8":fn.sanitizeShellString(e,!0)).trim(),s=fn.mathMin(i.length,2e3);for(let a=0;a<=s;a++)if(i[a]!==void 0){i[a].__proto__.toLowerCase=fn.stringToLower;let l=i[a].toLowerCase();l&&l[0]&&!l[1]&&(r=r+l[0])}if(r.__proto__.startsWith=fn.stringStartWith,r.startsWith("file:")||r.startsWith("gopher:")||r.startsWith("telnet:")||r.startsWith("mailto:")||r.startsWith("news:")||r.startsWith("nntp:"))return t&&t(null),n(null);let o;if((Px||Ax||Lx||Nx||Tx)&&(Px&&(o=["-c","2","-w","3",r]),(Ax||Lx||Nx)&&(o=["-c","2","-t","3",r]),Tx&&(o=["-c2","-t3",r]),fn.execSafe("ping",o).then(a=>{let l=null;if(a){let c=a.split(`
349
+ `).filter(f=>f.indexOf("rtt")>=0||f.indexOf("round-trip")>=0||f.indexOf("avg")>=0).join(`
350
+ `).split("=");if(c.length>1){let f=c[1].split("/");f.length>1&&(l=parseFloat(f[1]))}}t&&t(l),n(l)})),SN){let a=["-s","-a",r,"56","2"],l="avg";fn.execSafe("ping",a,{timeout:3e3}).then(u=>{let c=null;if(u){let p=u.split(`
351
+ `).filter(d=>d.indexOf(l)>=0).join(`
352
+ `).split("=");if(p.length>1){let d=p[1].split("/");d.length>1&&(c=parseFloat(d[1].replace(",",".")))}}t&&t(c),n(c)})}if(xN){let a=null;try{let l=[r,"-n","1"];fn.execSafe("ping",l,fn.execOptsWin).then(u=>{if(u){let c=u.split(`\r
353
+ `);c.shift(),c.forEach(function(f){if((f.toLowerCase().match(/ms/g)||[]).length===3){let p=f.replace(/ +/g," ").split(" ");p.length>6&&(a=parseFloat(p[p.length-1]))}})}t&&t(a),n(a)})}catch{t&&t(a),n(a)}}})})}Dx.inetLatency=ZW});var bN=oe((ooe,CN)=>{"use strict";var vo=K("net"),QW=K("os").type()==="Windows_NT",wo=QW?"//./pipe/docker_engine":"/var/run/docker.sock",kx=class{getInfo(t){try{let n=vo.createConnection({path:wo}),r="",i;n.on("connect",()=>{n.write(`GET http:/info HTTP/1.0\r
354
+ \r
355
+ `)}),n.on("data",s=>{r=r+s.toString()}),n.on("error",()=>{n=!1,t({})}),n.on("end",()=>{let s=r.indexOf(`\r
356
+ \r
357
+ `);r=r.substring(s+4),n=!1;try{i=JSON.parse(r),t(i)}catch{t({})}})}catch{t({})}}listImages(t,n){try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/images/json"+(t?"?all=1":"")+` HTTP/1.0\r
358
+ \r
359
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
360
+ \r
361
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}}inspectImage(t,n){if(t=t||"",t)try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/images/"+t+`/json?stream=0 HTTP/1.0\r
362
+ \r
363
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
364
+ \r
365
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}else n({})}listContainers(t,n){try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/containers/json"+(t?"?all=1":"")+` HTTP/1.0\r
366
+ \r
367
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
368
+ \r
369
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}}getStats(t,n){if(t=t||"",t)try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/containers/"+t+`/stats?stream=0 HTTP/1.0\r
370
+ \r
371
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
372
+ \r
373
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}else n({})}getInspect(t,n){if(t=t||"",t)try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/containers/"+t+`/json?stream=0 HTTP/1.0\r
374
+ \r
375
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
376
+ \r
377
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}else n({})}getProcesses(t,n){if(t=t||"",t)try{let r=vo.createConnection({path:wo}),i="",s;r.on("connect",()=>{r.write("GET http:/containers/"+t+`/top?ps_args=-opid,ppid,pgid,vsz,time,etime,nice,ruser,user,rgroup,group,stat,rss,args HTTP/1.0\r
378
+ \r
379
+ `)}),r.on("data",o=>{i=i+o.toString()}),r.on("error",()=>{r=!1,n({})}),r.on("end",()=>{let o=i.indexOf(`\r
380
+ \r
381
+ `);i=i.substring(o+4),r=!1;try{s=JSON.parse(i),n(s)}catch{n({})}})}catch{n({})}else n({})}listVolumes(t){try{let n=vo.createConnection({path:wo}),r="",i;n.on("connect",()=>{n.write(`GET http:/volumes HTTP/1.0\r
382
+ \r
383
+ `)}),n.on("data",s=>{r=r+s.toString()}),n.on("error",()=>{n=!1,t({})}),n.on("end",()=>{let s=r.indexOf(`\r
384
+ \r
385
+ `);r=r.substring(s+4),n=!1;try{i=JSON.parse(r),t(i)}catch{t({})}})}catch{t({})}}};CN.exports=kx});var EN=oe(So=>{"use strict";var At=Pt(),xo=bN(),ez=process.platform,tz=ez==="win32",Au={},ft,Mx=0;function nz(e){return new Promise(t=>{process.nextTick(()=>{ft||(ft=new xo);let n={};ft.getInfo(r=>{n.id=r.ID,n.containers=r.Containers,n.containersRunning=r.ContainersRunning,n.containersPaused=r.ContainersPaused,n.containersStopped=r.ContainersStopped,n.images=r.Images,n.driver=r.Driver,n.memoryLimit=r.MemoryLimit,n.swapLimit=r.SwapLimit,n.kernelMemory=r.KernelMemory,n.cpuCfsPeriod=r.CpuCfsPeriod,n.cpuCfsQuota=r.CpuCfsQuota,n.cpuShares=r.CPUShares,n.cpuSet=r.CPUSet,n.ipv4Forwarding=r.IPv4Forwarding,n.bridgeNfIptables=r.BridgeNfIptables,n.bridgeNfIp6tables=r.BridgeNfIp6tables,n.debug=r.Debug,n.nfd=r.NFd,n.oomKillDisable=r.OomKillDisable,n.ngoroutines=r.NGoroutines,n.systemTime=r.SystemTime,n.loggingDriver=r.LoggingDriver,n.cgroupDriver=r.CgroupDriver,n.nEventsListener=r.NEventsListener,n.kernelVersion=r.KernelVersion,n.operatingSystem=r.OperatingSystem,n.osType=r.OSType,n.architecture=r.Architecture,n.ncpu=r.NCPU,n.memTotal=r.MemTotal,n.dockerRootDir=r.DockerRootDir,n.httpProxy=r.HttpProxy,n.httpsProxy=r.HttpsProxy,n.noProxy=r.NoProxy,n.name=r.Name,n.labels=r.Labels,n.experimentalBuild=r.ExperimentalBuild,n.serverVersion=r.ServerVersion,n.clusterStore=r.ClusterStore,n.clusterAdvertise=r.ClusterAdvertise,n.defaultRuntime=r.DefaultRuntime,n.liveRestoreEnabled=r.LiveRestoreEnabled,n.isolation=r.Isolation,n.initBinary=r.InitBinary,n.productLicense=r.ProductLicense,e&&e(n),t(n)})})})}So.dockerInfo=nz;function rz(e,t){At.isFunction(e)&&!t&&(t=e,e=!1),typeof e=="string"&&e==="true"&&(e=!0),typeof e!="boolean"&&e!==void 0&&(e=!1),e=e||!1;let n=[];return new Promise(r=>{process.nextTick(()=>{ft||(ft=new xo);let i=[];ft.listImages(e,s=>{let o={};try{o=s,o&&Object.prototype.toString.call(o)==="[object Array]"&&o.length>0?(o.forEach(function(a){a.Names&&Object.prototype.toString.call(a.Names)==="[object Array]"&&a.Names.length>0&&(a.Name=a.Names[0].replace(/^\/|\/$/g,"")),i.push(iz(a.Id.trim(),a))}),i.length?Promise.all(i).then(a=>{t&&t(a),r(a)}):(t&&t(n),r(n))):(t&&t(n),r(n))}catch{t&&t(n),r(n)}})})})}function iz(e,t){return new Promise(n=>{process.nextTick(()=>{if(e=e||"",typeof e!="string")return n();let r=(At.isPrototypePolluted()?"":At.sanitizeShellString(e,!0)).trim();r?(ft||(ft=new xo),ft.inspectImage(r.trim(),i=>{try{n({id:t.Id,container:i.Container,comment:i.Comment,os:i.Os,architecture:i.Architecture,parent:i.Parent,dockerVersion:i.DockerVersion,size:i.Size,sharedSize:t.SharedSize,virtualSize:i.VirtualSize,author:i.Author,created:i.Created?Math.round(new Date(i.Created).getTime()/1e3):0,containerConfig:i.ContainerConfig?i.ContainerConfig:{},graphDriver:i.GraphDriver?i.GraphDriver:{},repoDigests:i.RepoDigests?i.RepoDigests:{},repoTags:i.RepoTags?i.RepoTags:{},config:i.Config?i.Config:{},rootFS:i.RootFS?i.RootFS:{}})}catch{n()}})):n()})})}So.dockerImages=rz;function Rx(e,t){function n(i,s){return i.filter(a=>a.Id&&a.Id===s).length>0}At.isFunction(e)&&!t&&(t=e,e=!1),typeof e=="string"&&e==="true"&&(e=!0),typeof e!="boolean"&&e!==void 0&&(e=!1),e=e||!1;let r=[];return new Promise(i=>{process.nextTick(()=>{ft||(ft=new xo);let s=[];ft.listContainers(e,o=>{let a={};try{if(a=o,a&&Object.prototype.toString.call(a)==="[object Array]"&&a.length>0){for(let l in Au)({}).hasOwnProperty.call(Au,l)&&(n(a,l)||delete Au[l]);a.forEach(function(l){l.Names&&Object.prototype.toString.call(l.Names)==="[object Array]"&&l.Names.length>0&&(l.Name=l.Names[0].replace(/^\/|\/$/g,"")),s.push(sz(l.Id.trim(),l))}),s.length?Promise.all(s).then(l=>{t&&t(l),i(l)}):(t&&t(r),i(r))}else t&&t(r),i(r)}catch{for(let u in Au)({}).hasOwnProperty.call(Au,u)&&(n(a,u)||delete Au[u]);t&&t(r),i(r)}})})})}function sz(e,t){return new Promise(n=>{process.nextTick(()=>{if(e=e||"",typeof e!="string")return n();let r=(At.isPrototypePolluted()?"":At.sanitizeShellString(e,!0)).trim();r?(ft||(ft=new xo),ft.getInspect(r.trim(),i=>{try{n({id:t.Id,name:t.Name,image:t.Image,imageID:t.ImageID,command:t.Command,created:t.Created,started:i.State&&i.State.StartedAt?Math.round(new Date(i.State.StartedAt).getTime()/1e3):0,finished:i.State&&i.State.FinishedAt&&!i.State.FinishedAt.startsWith("0001-01-01")?Math.round(new Date(i.State.FinishedAt).getTime()/1e3):0,createdAt:i.Created?i.Created:"",startedAt:i.State&&i.State.StartedAt?i.State.StartedAt:"",finishedAt:i.State&&i.State.FinishedAt&&!i.State.FinishedAt.startsWith("0001-01-01")?i.State.FinishedAt:"",state:t.State,restartCount:i.RestartCount||0,platform:i.Platform||"",driver:i.Driver||"",ports:t.Ports,mounts:t.Mounts})}catch{n()}})):n()})})}So.dockerContainers=Rx;function oz(e,t){if(tz){let n=At.nanoSeconds(),r=0;if(Mx>0){let i=n-Mx,s=e.cpu_usage.total_usage-t.cpu_usage.total_usage;i>0&&(r=100*s/i)}return Mx=n,r}else{let n=0,r=e.cpu_usage.total_usage-t.cpu_usage.total_usage,i=e.system_cpu_usage-t.system_cpu_usage;return i>0&&r>0&&(t.online_cpus?n=r/i*t.online_cpus*100:n=r/i*e.cpu_usage.percpu_usage.length*100),n}}function az(e){let t,n;for(let r in e){if(!{}.hasOwnProperty.call(e,r))continue;let i=e[r];t=+i.rx_bytes,n=+i.tx_bytes}return{rx:t,wx:n}}function lz(e){let t={r:0,w:0};return e&&e.io_service_bytes_recursive&&Object.prototype.toString.call(e.io_service_bytes_recursive)==="[object Array]"&&e.io_service_bytes_recursive.length>0&&e.io_service_bytes_recursive.forEach(function(n){n.op&&n.op.toLowerCase()==="read"&&n.value&&(t.r+=n.value),n.op&&n.op.toLowerCase()==="write"&&n.value&&(t.w+=n.value)}),t}function Vx(e,t){let n=[];return new Promise(r=>{process.nextTick(()=>{if(At.isFunction(e)&&!t)t=e,n=["*"];else{if(e=e||"*",typeof e!="string")return t&&t([]),r([]);let o="";if(o.__proto__.toLowerCase=At.stringToLower,o.__proto__.replace=At.stringReplace,o.__proto__.trim=At.stringTrim,o=e,o=o.trim(),o!=="*"){o="";let a=(At.isPrototypePolluted()?"":At.sanitizeShellString(e,!0)).trim(),l=At.mathMin(a.length,2e3);for(let u=0;u<=l;u++)if(a[u]!==void 0){a[u].__proto__.toLowerCase=At.stringToLower;let c=a[u].toLowerCase();c&&c[0]&&!c[1]&&(o=o+c[0])}}o=o.trim().toLowerCase().replace(/,+/g,"|"),n=o.split("|")}let i=[],s=[];if(n.length&&n[0].trim()==="*")n=[],Rx().then(o=>{for(let a of o)n.push(a.id.substring(0,12));n.length?Vx(n.join(",")).then(a=>{t&&t(a),r(a)}):(t&&t(i),r(i))});else{for(let o of n)s.push(uz(o.trim()));s.length?Promise.all(s).then(o=>{t&&t(o),r(o)}):(t&&t(i),r(i))}})})}function uz(e){e=e||"";let t={id:e,memUsage:0,memLimit:0,memPercent:0,cpuPercent:0,pids:0,netIO:{rx:0,wx:0},blockIO:{r:0,w:0},restartCount:0,cpuStats:{},precpuStats:{},memoryStats:{},networks:{}};return new Promise(n=>{process.nextTick(()=>{e?(ft||(ft=new xo),ft.getInspect(e,r=>{try{ft.getStats(e,i=>{try{let s=i;s.message||(i.id&&(t.id=i.id),t.memUsage=s.memory_stats&&s.memory_stats.usage?s.memory_stats.usage:0,t.memLimit=s.memory_stats&&s.memory_stats.limit?s.memory_stats.limit:0,t.memPercent=s.memory_stats&&s.memory_stats.usage&&s.memory_stats.limit?s.memory_stats.usage/s.memory_stats.limit*100:0,t.cpuPercent=s.cpu_stats&&s.precpu_stats?oz(s.cpu_stats,s.precpu_stats):0,t.pids=s.pids_stats&&s.pids_stats.current?s.pids_stats.current:0,t.restartCount=r.RestartCount?r.RestartCount:0,s.networks&&(t.netIO=az(s.networks)),s.blkio_stats&&(t.blockIO=lz(s.blkio_stats)),t.cpuStats=s.cpu_stats?s.cpu_stats:{},t.precpuStats=s.precpu_stats?s.precpu_stats:{},t.memoryStats=s.memory_stats?s.memory_stats:{},t.networks=s.networks?s.networks:{})}catch{At.noop()}n(t)})}catch{At.noop()}})):n(t)})})}So.dockerContainerStats=Vx;function ON(e,t){let n=[];return new Promise(r=>{process.nextTick(()=>{if(e=e||"",typeof e!="string")return r(n);let i=(At.isPrototypePolluted()?"":At.sanitizeShellString(e,!0)).trim();i?(ft||(ft=new xo),ft.getProcesses(i,s=>{try{if(s&&s.Titles&&s.Processes){let o=s.Titles.map(function(C){return C.toUpperCase()}),a=o.indexOf("PID"),l=o.indexOf("PPID"),u=o.indexOf("PGID"),c=o.indexOf("VSZ"),f=o.indexOf("TIME"),p=o.indexOf("ELAPSED"),d=o.indexOf("NI"),m=o.indexOf("RUSER"),y=o.indexOf("USER"),v=o.indexOf("RGROUP"),h=o.indexOf("GROUP"),g=o.indexOf("STAT"),w=o.indexOf("RSS"),x=o.indexOf("COMMAND");s.Processes.forEach(C=>{n.push({pidHost:a>=0?C[a]:"",ppid:l>=0?C[l]:"",pgid:u>=0?C[u]:"",user:y>=0?C[y]:"",ruser:m>=0?C[m]:"",group:h>=0?C[h]:"",rgroup:v>=0?C[v]:"",stat:g>=0?C[g]:"",time:f>=0?C[f]:"",elapsed:p>=0?C[p]:"",nice:d>=0?C[d]:"",rss:w>=0?C[w]:"",vsz:c>=0?C[c]:"",command:x>=0?C[x]:""})})}}catch{At.noop()}t&&t(n),r(n)})):(t&&t(n),r(n))})})}So.dockerContainerProcesses=ON;function cz(e){let t=[];return new Promise(n=>{process.nextTick(()=>{ft||(ft=new xo),ft.listVolumes(r=>{let i={};try{i=r,i&&i.Volumes&&Object.prototype.toString.call(i.Volumes)==="[object Array]"&&i.Volumes.length>0?(i.Volumes.forEach(function(s){t.push({name:s.Name,driver:s.Driver,labels:s.Labels,mountpoint:s.Mountpoint,options:s.Options,scope:s.Scope,created:s.CreatedAt?Math.round(new Date(s.CreatedAt).getTime()/1e3):0})}),e&&e(t),n(t)):(e&&e(t),n(t))}catch{e&&e(t),n(t)}})})})}So.dockerVolumes=cz;function fz(e){return new Promise(t=>{process.nextTick(()=>{Rx(!0).then(n=>{if(n&&Object.prototype.toString.call(n)==="[object Array]"&&n.length>0){let r=n.length;n.forEach(function(i){Vx(i.id).then(s=>{i.memUsage=s[0].memUsage,i.memLimit=s[0].memLimit,i.memPercent=s[0].memPercent,i.cpuPercent=s[0].cpuPercent,i.pids=s[0].pids,i.netIO=s[0].netIO,i.blockIO=s[0].blockIO,i.cpuStats=s[0].cpuStats,i.precpuStats=s[0].precpuStats,i.memoryStats=s[0].memoryStats,i.networks=s[0].networks,ON(i.id).then(o=>{i.processes=o,r-=1,r===0&&(e&&e(n),t(n))})})})}else e&&e(n),t(n)})})})}So.dockerAll=fz});var PN=oe(IN=>{"use strict";var jx=K("os"),pz=K("child_process").exec,We=Pt();function dz(e){let t=[];return new Promise(n=>{process.nextTick(()=>{try{pz(We.getVboxmanage()+" list vms --long",function(r,i){let s=(jx.EOL+i.toString()).split(jx.EOL+"Name:");s.shift(),s.forEach(o=>{let a=("Name:"+o).split(jx.EOL),l=We.getValue(a,"State"),u=l.startsWith("running"),c=u?l.replace("running (since ","").replace(")","").trim():"",f=0;try{if(u){let m=new Date(c),y=m.getTimezoneOffset();f=Math.round((Date.now()-Date.parse(m))/1e3)+y*60}}catch{We.noop()}let p=u?"":l.replace("powered off (since","").replace(")","").trim(),d=0;try{if(!u){let m=new Date(p),y=m.getTimezoneOffset();d=Math.round((Date.now()-Date.parse(m))/1e3)+y*60}}catch{We.noop()}t.push({id:We.getValue(a,"UUID"),name:We.getValue(a,"Name"),running:u,started:c,runningSince:f,stopped:p,stoppedSince:d,guestOS:We.getValue(a,"Guest OS"),hardwareUUID:We.getValue(a,"Hardware UUID"),memory:parseInt(We.getValue(a,"Memory size"," "),10),vram:parseInt(We.getValue(a,"VRAM size"),10),cpus:parseInt(We.getValue(a,"Number of CPUs"),10),cpuExepCap:We.getValue(a,"CPU exec cap"),cpuProfile:We.getValue(a,"CPUProfile"),chipset:We.getValue(a,"Chipset"),firmware:We.getValue(a,"Firmware"),pageFusion:We.getValue(a,"Page Fusion")==="enabled",configFile:We.getValue(a,"Config file"),snapshotFolder:We.getValue(a,"Snapshot folder"),logFolder:We.getValue(a,"Log folder"),hpet:We.getValue(a,"HPET")==="enabled",pae:We.getValue(a,"PAE")==="enabled",longMode:We.getValue(a,"Long Mode")==="enabled",tripleFaultReset:We.getValue(a,"Triple Fault Reset")==="enabled",apic:We.getValue(a,"APIC")==="enabled",x2Apic:We.getValue(a,"X2APIC")==="enabled",acpi:We.getValue(a,"ACPI")==="enabled",ioApic:We.getValue(a,"IOAPIC")==="enabled",biosApicMode:We.getValue(a,"BIOS APIC mode"),bootMenuMode:We.getValue(a,"Boot menu mode"),bootDevice1:We.getValue(a,"Boot Device 1"),bootDevice2:We.getValue(a,"Boot Device 2"),bootDevice3:We.getValue(a,"Boot Device 3"),bootDevice4:We.getValue(a,"Boot Device 4"),timeOffset:We.getValue(a,"Time offset"),rtc:We.getValue(a,"RTC")})}),e&&e(t),n(t)})}catch{e&&e(t),n(t)}})})}IN.vboxInfo=dz});var NN=oe(LN=>{"use strict";var Bx=K("child_process").exec,Ht=Pt(),_o=process.platform,TN=_o==="linux"||_o==="android",mz=_o==="darwin",hz=_o==="win32",gz=_o==="freebsd",yz=_o==="openbsd",vz=_o==="netbsd",wz=_o==="sunos",AN={1:"Other",2:"Unknown",3:"Idle",4:"Printing",5:"Warmup",6:"Stopped Printing",7:"Offline"};function xz(e){let t={};if(e&&e.length&&e[0].indexOf(" CUPS v")>0){let n=e[0].split(" CUPS v");t.cupsVersion=n[1]}return t}function Sz(e){let t={},n=Ht.getValue(e,"PrinterId"," ");return t.id=n?parseInt(n,10):null,t.name=Ht.getValue(e,"Info"," "),t.model=e.length>0&&e[0]?e[0].split(" ")[0]:"",t.uri=Ht.getValue(e,"DeviceURI"," "),t.uuid=Ht.getValue(e,"UUID"," "),t.status=Ht.getValue(e,"State"," "),t.local=Ht.getValue(e,"Location"," ").toLowerCase().startsWith("local"),t.default=null,t.shared=Ht.getValue(e,"Shared"," ").toLowerCase().startsWith("yes"),t}function _z(e,t){let n={};return n.id=t,n.name=Ht.getValue(e,"Description",":",!0),n.model=e.length>0&&e[0]?e[0].split(" ")[0]:"",n.uri=null,n.uuid=null,n.status=e.length>0&&e[0]?e[0].indexOf(" idle")>0?"idle":e[0].indexOf(" printing")>0?"printing":"unknown":null,n.local=Ht.getValue(e,"Location",":",!0).toLowerCase().startsWith("local"),n.default=null,n.shared=Ht.getValue(e,"Shared"," ").toLowerCase().startsWith("yes"),n}function Cz(e,t){let n={},r=e.uri.split("/");return n.id=t,n.name=e._name,n.model=r.length?r[r.length-1]:"",n.uri=e.uri,n.uuid=null,n.status=e.status,n.local=e.printserver==="local",n.default=e.default==="yes",n.shared=e.shared==="yes",n}function bz(e,t){let n={},r=parseInt(Ht.getValue(e,"PrinterStatus",":"),10);return n.id=t,n.name=Ht.getValue(e,"name",":"),n.model=Ht.getValue(e,"DriverName",":"),n.uri=null,n.uuid=null,n.status=AN[r]?AN[r]:null,n.local=Ht.getValue(e,"Local",":").toUpperCase()==="TRUE",n.default=Ht.getValue(e,"Default",":").toUpperCase()==="TRUE",n.shared=Ht.getValue(e,"Shared",":").toUpperCase()==="TRUE",n}function Oz(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(TN||gz||yz||vz){let r="cat /etc/cups/printers.conf 2>/dev/null";Bx(r,function(i,s){if(!i){let o=s.toString().split("<Printer "),a=xz(o[0]);for(let l=1;l<o.length;l++){let u=Sz(o[l].split(`
386
+ `));u.name&&(u.engine="CUPS",u.engineVersion=a.cupsVersion,n.push(u))}}n.length===0&&TN?(r="export LC_ALL=C; lpstat -lp 2>/dev/null; unset LC_ALL",Bx(r,function(o,a){let l=(`
387
+ `+a.toString()).split(`
388
+ printer `);for(let u=1;u<l.length;u++){let c=_z(l[u].split(`
389
+ `),u);n.push(c)}}),e&&e(n),t(n)):(e&&e(n),t(n))})}mz&&Bx("system_profiler SPPrintersDataType -json",function(i,s){if(!i)try{let o=JSON.parse(s.toString());if(o.SPPrintersDataType&&o.SPPrintersDataType.length)for(let a=0;a<o.SPPrintersDataType.length;a++){let l=Cz(o.SPPrintersDataType[a],a);n.push(l)}}catch{Ht.noop()}e&&e(n),t(n)}),hz&&Ht.powerShell("Get-CimInstance Win32_Printer | select PrinterStatus,Name,DriverName,Local,Default,Shared | fl").then((r,i)=>{if(!i){let s=r.toString().split(/\n\s*\n/);for(let o=0;o<s.length;o++){let a=bz(s[o].split(`
390
+ `),o);(a.name||a.model)&&n.push(a)}}e&&e(n),t(n)}),wz&&t(null)})})}LN.printer=Oz});var MN=oe(kN=>{"use strict";var DN=K("child_process").exec,Pr=Pt(),Co=process.platform,Ez=Co==="linux"||Co==="android",Iz=Co==="darwin",Pz=Co==="win32",Tz=Co==="freebsd",Az=Co==="openbsd",Lz=Co==="netbsd",Nz=Co==="sunos";function Dz(e,t){let n=e,r=(t+" "+e).toLowerCase();return r.indexOf("camera")>=0?n="Camera":r.indexOf("hub")>=0?n="Hub":r.indexOf("keybrd")>=0||r.indexOf("keyboard")>=0?n="Keyboard":r.indexOf("mouse")>=0?n="Mouse":r.indexOf("stora")>=0?n="Storage":r.indexOf("microp")>=0?n="Microphone":(r.indexOf("headset")>=0||r.indexOf("audio")>=0)&&(n="Audio"),n}function kz(e){let t={},n=e.split(`
391
+ `);if(n&&n.length&&n[0].indexOf("Device")>=0){let g=n[0].split(" ");t.bus=parseInt(g[0],10),g[2]?t.deviceId=parseInt(g[2],10):t.deviceId=null}else t.bus=null,t.deviceId=null;let r=Pr.getValue(n,"idVendor"," ",!0).trim(),i=r.split(" ");i.shift();let s=i.join(" "),o=Pr.getValue(n,"idProduct"," ",!0).trim(),a=o.split(" ");a.shift();let l=a.join(" "),c=Pr.getValue(n,"bInterfaceClass"," ",!0).trim().split(" ");c.shift();let f=c.join(" "),d=Pr.getValue(n,"iManufacturer"," ",!0).trim().split(" ");d.shift();let m=d.join(" "),v=Pr.getValue(n,"iSerial"," ",!0).trim().split(" ");v.shift();let h=v.join(" ");return t.id=(r.startsWith("0x")?r.split(" ")[0].substr(2,10):"")+":"+(o.startsWith("0x")?o.split(" ")[0].substr(2,10):""),t.name=l,t.type=Dz(f,l),t.removable=null,t.vendor=s,t.manufacturer=m,t.maxPower=Pr.getValue(n,"MaxPower"," ",!0),t.serialNumber=h,t}function Mz(e){let t="";return e.indexOf("camera")>=0?t="Camera":e.indexOf("touch bar")>=0?t="Touch Bar":e.indexOf("controller")>=0?t="Controller":e.indexOf("headset")>=0?t="Audio":e.indexOf("keyboard")>=0?t="Keyboard":e.indexOf("trackpad")>=0?t="Trackpad":e.indexOf("sensor")>=0?t="Sensor":e.indexOf("bthusb")>=0||e.indexOf("bth")>=0||e.indexOf("rfcomm")>=0?t="Bluetooth":e.indexOf("usbhub")>=0||e.indexOf(" hub")>=0?t="Hub":e.indexOf("mouse")>=0?t="Mouse":e.indexOf("microp")>=0?t="Microphone":e.indexOf("removable")>=0&&(t="Storage"),t}function Rz(e,t){let n={};n.id=t,e=e.replace(/ \|/g,""),e=e.trim();let r=e.split(`
392
+ `);r.shift();try{for(let o=0;o<r.length;o++){r[o]=r[o].trim(),r[o]=r[o].replace(/=/g,":"),r[o]!=="{"&&r[o]!=="}"&&r[o+1]&&r[o+1].trim()!=="}"&&(r[o]=r[o]+","),r[o]=r[o].replace(":Yes,",':"Yes",'),r[o]=r[o].replace(": Yes,",': "Yes",'),r[o]=r[o].replace(": Yes",': "Yes"'),r[o]=r[o].replace(":No,",':"No",'),r[o]=r[o].replace(": No,",': "No",'),r[o]=r[o].replace(": No",': "No"'),r[o]=r[o].replace("((","").replace("))","");let a=/<(\w+)>/.exec(r[o]);if(a){let l=a[0];r[o]=r[o].replace(l,`"${l}"`)}}let i=JSON.parse(r.join(`
393
+ `)),s=(i["Built-In"]?i["Built-In"].toLowerCase()!=="yes":!0)&&(i["non-removable"]?i["non-removable"].toLowerCase()==="no":!0);return n.bus=null,n.deviceId=null,n.id=i["USB Address"]||null,n.name=i.kUSBProductString||i["USB Product Name"]||null,n.type=Mz((i.kUSBProductString||i["USB Product Name"]||"").toLowerCase()+(s?" removable":"")),n.removable=i["non-removable"]?i["non-removable"].toLowerCase()||!1:!0,n.vendor=i.kUSBVendorString||i["USB Vendor Name"]||null,n.manufacturer=i.kUSBVendorString||i["USB Vendor Name"]||null,n.maxPower=null,n.serialNumber=i.kUSBSerialNumberString||null,n.name?n:null}catch{return null}}function Vz(e,t){let n="";return t.indexOf("storage")>=0||t.indexOf("speicher")>=0?n="Storage":e.indexOf("usbhub")>=0?n="Hub":e.indexOf("storage")>=0?n="Storage":e.indexOf("usbcontroller")>=0?n="Controller":e.indexOf("keyboard")>=0?n="Keyboard":e.indexOf("pointing")>=0?n="Mouse":e.indexOf("microp")>=0?n="Microphone":e.indexOf("disk")>=0&&(n="Storage"),n}function jz(e,t){let n=Vz(Pr.getValue(e,"CreationClassName",":").toLowerCase(),Pr.getValue(e,"name",":").toLowerCase());if(n){let r={};return r.bus=null,r.deviceId=Pr.getValue(e,"deviceid",":"),r.id=t,r.name=Pr.getValue(e,"name",":"),r.type=n,r.removable=null,r.vendor=null,r.manufacturer=Pr.getValue(e,"Manufacturer",":"),r.maxPower=null,r.serialNumber=null,r}else return null}function Bz(e){return new Promise(t=>{process.nextTick(()=>{let n=[];Ez&&DN("export LC_ALL=C; lsusb -v 2>/dev/null; unset LC_ALL",{maxBuffer:1024*1024*128},function(i,s){if(!i){let o=(`
394
+
395
+ `+s.toString()).split(`
396
+
397
+ Bus `);for(let a=1;a<o.length;a++){let l=kz(o[a]);n.push(l)}}e&&e(n),t(n)}),Iz&&DN("ioreg -p IOUSB -c AppleUSBRootHubDevice -w0 -l",{maxBuffer:1024*1024*128},function(i,s){if(!i){let o=s.toString().split(" +-o ");for(let a=1;a<o.length;a++){let l=Rz(o[a]);l&&n.push(l)}e&&e(n),t(n)}e&&e(n),t(n)}),Pz&&Pr.powerShell('Get-CimInstance CIM_LogicalDevice | where { $_.Description -match "USB"} | select Name,CreationClassName,DeviceId,Manufacturer | fl').then((r,i)=>{if(!i){let s=r.toString().split(/\n\s*\n/);for(let o=0;o<s.length;o++){let a=jz(s[o].split(`
398
+ `),o);a&&n.filter(l=>l.deviceId===a.deviceId).length===0&&n.push(a)}}e&&e(n),t(n)}),(Nz||Tz||Az||Lz)&&t(null)})})}kN.usb=Bz});var jN=oe(VN=>{"use strict";var RN=K("child_process").exec,Uz=K("child_process").execSync,_n=Pt(),bo=process.platform,Fz=bo==="linux"||bo==="android",Wz=bo==="darwin",zz=bo==="win32",Gz=bo==="freebsd",$z=bo==="openbsd",Hz=bo==="netbsd",qz=bo==="sunos";function Ux(e,t,n){e=e.toLowerCase();let r="";return e.indexOf("input")>=0&&(r="Microphone"),e.indexOf("display audio")>=0&&(r="Speaker"),e.indexOf("speak")>=0&&(r="Speaker"),e.indexOf("laut")>=0&&(r="Speaker"),e.indexOf("loud")>=0&&(r="Speaker"),e.indexOf("head")>=0&&(r="Headset"),e.indexOf("mic")>=0&&(r="Microphone"),e.indexOf("mikr")>=0&&(r="Microphone"),e.indexOf("phone")>=0&&(r="Phone"),e.indexOf("controll")>=0&&(r="Controller"),e.indexOf("line o")>=0&&(r="Line Out"),e.indexOf("digital o")>=0&&(r="Digital Out"),e.indexOf("smart sound technology")>=0&&(r="Digital Signal Processor"),e.indexOf("high definition audio")>=0&&(r="Sound Driver"),!r&&n?r="Speaker":!r&&t&&(r="Microphone"),r}function Kz(){let e="lspci -v 2>/dev/null",t=[];try{return Uz(e,_n.execOptsLinux).toString().split(`
399
+
400
+ `).forEach(r=>{let i=r.split(`
401
+ `);if(i&&i.length&&i[0].toLowerCase().indexOf("audio")>=0){let s={};s.slotId=i[0].split(" ")[0],s.driver=_n.getValue(i,"Kernel driver in use",":",!0)||_n.getValue(i,"Kernel modules",":",!0),t.push(s)}}),t}catch{return t}}function Yz(e,t){let n={},r=_n.getValue(e,"Slot"),i=t.filter(function(s){return s.slotId===r});return n.id=r,n.name=_n.getValue(e,"SDevice"),n.manufacturer=_n.getValue(e,"SVendor"),n.revision=_n.getValue(e,"Rev"),n.driver=i&&i.length===1&&i[0].driver?i[0].driver:"",n.default=null,n.channel="PCIe",n.type=Ux(n.name,null,null),n.in=null,n.out=null,n.status="online",n}function Xz(e){let t="";return e.indexOf("builtin")>=0&&(t="Built-In"),e.indexOf("extern")>=0&&(t="Audio-Jack"),e.indexOf("hdmi")>=0&&(t="HDMI"),e.indexOf("displayport")>=0&&(t="Display-Port"),e.indexOf("usb")>=0&&(t="USB"),e.indexOf("pci")>=0&&(t="PCIe"),t}function Jz(e,t){let n={},r=((e.coreaudio_device_transport||"")+" "+(e._name||"")).toLowerCase();return n.id=t,n.name=e._name,n.manufacturer=e.coreaudio_device_manufacturer,n.revision=null,n.driver=null,n.default=!!e.coreaudio_default_audio_input_device||!!e.coreaudio_default_audio_output_device,n.channel=Xz(r),n.type=Ux(n.name,!!e.coreaudio_device_input,!!e.coreaudio_device_output),n.in=!!e.coreaudio_device_input,n.out=!!e.coreaudio_device_output,n.status="online",n}function Zz(e){let t={},n=_n.getValue(e,"StatusInfo",":");return t.id=_n.getValue(e,"DeviceID",":"),t.name=_n.getValue(e,"name",":"),t.manufacturer=_n.getValue(e,"manufacturer",":"),t.revision=null,t.driver=null,t.default=null,t.channel=null,t.type=Ux(t.name,null,null),t.in=null,t.out=null,t.status=n,t}function Qz(e){return new Promise(t=>{process.nextTick(()=>{let n=[];(Fz||Gz||$z||Hz)&&RN("lspci -vmm 2>/dev/null",function(i,s){if(!i){let o=Kz();s.toString().split(`
402
+
403
+ `).forEach(l=>{let u=l.split(`
404
+ `);if(_n.getValue(u,"class",":",!0).toLowerCase().indexOf("audio")>=0){let c=Yz(u,o);n.push(c)}})}e&&e(n),t(n)}),Wz&&RN("system_profiler SPAudioDataType -json",function(i,s){if(!i)try{let o=JSON.parse(s.toString());if(o.SPAudioDataType&&o.SPAudioDataType.length&&o.SPAudioDataType[0]&&o.SPAudioDataType[0]._items&&o.SPAudioDataType[0]._items.length)for(let a=0;a<o.SPAudioDataType[0]._items.length;a++){let l=Jz(o.SPAudioDataType[0]._items[a],a);n.push(l)}}catch{_n.noop()}e&&e(n),t(n)}),zz&&_n.powerShell("Get-CimInstance Win32_SoundDevice | select DeviceID,StatusInfo,Name,Manufacturer | fl").then((r,i)=>{i||r.toString().split(/\n\s*\n/).forEach(o=>{let a=o.split(`
405
+ `);_n.getValue(a,"name",":")&&n.push(Zz(a))}),e&&e(n),t(n)}),qz&&t(null)})})}VN.audio=Qz});var UN=oe(BN=>{"use strict";var e7=K("child_process").exec,t7=K("child_process").execSync,n7=K("path"),rs=Pt(),r7=K("fs"),Oo=process.platform,i7=Oo==="linux"||Oo==="android",s7=Oo==="darwin",o7=Oo==="win32",a7=Oo==="freebsd",l7=Oo==="openbsd",u7=Oo==="netbsd",c7=Oo==="sunos";function Wx(e){let t="";return e.indexOf("keyboard")>=0&&(t="Keyboard"),e.indexOf("mouse")>=0&&(t="Mouse"),e.indexOf("trackpad")>=0&&(t="Trackpad"),e.indexOf("speaker")>=0&&(t="Speaker"),e.indexOf("headset")>=0&&(t="Headset"),e.indexOf("phone")>=0&&(t="Phone"),e.indexOf("macbook")>=0&&(t="Computer"),e.indexOf("imac")>=0&&(t="Computer"),e.indexOf("ipad")>=0&&(t="Tablet"),e.indexOf("watch")>=0&&(t="Watch"),e.indexOf("headphone")>=0&&(t="Headset"),t}function f7(e){let t=e.split(" ")[0];return e=e.toLowerCase(),e.indexOf("apple")>=0&&(t="Apple"),e.indexOf("ipad")>=0&&(t="Apple"),e.indexOf("imac")>=0&&(t="Apple"),e.indexOf("iphone")>=0&&(t="Apple"),e.indexOf("magic mouse")>=0&&(t="Apple"),e.indexOf("magic track")>=0&&(t="Apple"),e.indexOf("macbook")>=0&&(t="Apple"),t}function p7(e,t,n){let r={};return r.device=null,r.name=rs.getValue(e,"name","="),r.manufacturer=null,r.macDevice=t,r.macHost=n,r.batteryPercent=null,r.type=Wx(r.name.toLowerCase()),r.connected=!1,r}function Fx(e,t){let n={},r=((e.device_minorClassOfDevice_string||e.device_majorClassOfDevice_string||e.device_minorType||"")+(e.device_name||"")).toLowerCase();return n.device=e.device_services||"",n.name=e.device_name||"",n.manufacturer=e.device_manufacturer||f7(e.device_name||"")||"",n.macDevice=(e.device_addr||e.device_address||"").toLowerCase().replace(/-/g,":"),n.macHost=t,n.batteryPercent=e.device_batteryPercent||null,n.type=Wx(r),n.connected=e.device_isconnected==="attrib_Yes"||!1,n}function d7(e){let t={};return t.device=null,t.name=rs.getValue(e,"name",":"),t.manufacturer=rs.getValue(e,"manufacturer",":"),t.macDevice=null,t.macHost=null,t.batteryPercent=null,t.type=Wx(t.name.toLowerCase()),t.connected=null,t}function m7(e){return new Promise(t=>{process.nextTick(()=>{let n=[];if(i7){rs.getFilesInPath("/var/lib/bluetooth/").forEach(i=>{let s=n7.basename(i),o=i.split("/"),a=o.length>=6?o[o.length-2]:null,l=o.length>=7?o[o.length-3]:null;if(s==="info"){let u=r7.readFileSync(i,{encoding:"utf8"}).split(`
406
+ `);n.push(p7(u,a,l))}});try{let i=t7("hcitool con",rs.execOptsLinux).toString().toLowerCase();for(let s=0;s<n.length;s++)n[s].macDevice&&n[s].macDevice.length>10&&i.indexOf(n[s].macDevice.toLowerCase())>=0&&(n[s].connected=!0)}catch{rs.noop()}e&&e(n),t(n)}s7&&e7("system_profiler SPBluetoothDataType -json",function(i,s){if(!i)try{let o=JSON.parse(s.toString());if(o.SPBluetoothDataType&&o.SPBluetoothDataType.length&&o.SPBluetoothDataType[0]&&o.SPBluetoothDataType[0].device_title&&o.SPBluetoothDataType[0].device_title.length){let a=null;o.SPBluetoothDataType[0].local_device_title&&o.SPBluetoothDataType[0].local_device_title.general_address&&(a=o.SPBluetoothDataType[0].local_device_title.general_address.toLowerCase().replace(/-/g,":")),o.SPBluetoothDataType[0].device_title.forEach(l=>{let u=l,c=Object.keys(u);if(c&&c.length===1){let f=u[c[0]];f.device_name=c[0];let p=Fx(f,a);n.push(p)}})}if(o.SPBluetoothDataType&&o.SPBluetoothDataType.length&&o.SPBluetoothDataType[0]&&o.SPBluetoothDataType[0].device_connected&&o.SPBluetoothDataType[0].device_connected.length){let a=o.SPBluetoothDataType[0].controller_properties&&o.SPBluetoothDataType[0].controller_properties.controller_address?o.SPBluetoothDataType[0].controller_properties.controller_address.toLowerCase().replace(/-/g,":"):null;o.SPBluetoothDataType[0].device_connected.forEach(l=>{let u=l,c=Object.keys(u);if(c&&c.length===1){let f=u[c[0]];f.device_name=c[0],f.device_isconnected="attrib_Yes";let p=Fx(f,a);n.push(p)}})}if(o.SPBluetoothDataType&&o.SPBluetoothDataType.length&&o.SPBluetoothDataType[0]&&o.SPBluetoothDataType[0].device_not_connected&&o.SPBluetoothDataType[0].device_not_connected.length){let a=o.SPBluetoothDataType[0].controller_properties&&o.SPBluetoothDataType[0].controller_properties.controller_address?o.SPBluetoothDataType[0].controller_properties.controller_address.toLowerCase().replace(/-/g,":"):null;o.SPBluetoothDataType[0].device_not_connected.forEach(l=>{let u=l,c=Object.keys(u);if(c&&c.length===1){let f=u[c[0]];f.device_name=c[0],f.device_isconnected="attrib_No";let p=Fx(f,a);n.push(p)}})}}catch{rs.noop()}e&&e(n),t(n)}),o7&&rs.powerShell("Get-CimInstance Win32_PNPEntity | select PNPClass, Name, Manufacturer | fl").then((r,i)=>{i||r.toString().split(/\n\s*\n/).forEach(o=>{rs.getValue(o.split(`
407
+ `),"PNPClass",":")==="Bluetooth"&&n.push(d7(o.split(`
408
+ `)))}),e&&e(n),t(n)}),(a7||u7||l7||c7)&&t(null)})})}BN.bluetoothDevices=m7});var KN=oe(ue=>{"use strict";var h7=o3().version,Wa=Pt(),Eo=_3(),is=b3(),Tr=A3(),ng=U3(),FN=z3(),WN=K3(),Pi=Q3(),ss=aN(),rg=dN(),ep=gN(),zN=wN(),zx=_N(),za=EN(),g7=PN(),y7=NN(),v7=MN(),w7=jN(),x7=UN(),tp=process.platform,tg=tp==="win32",Jf=tp==="freebsd",Zf=tp==="openbsd",Qf=tp==="netbsd",Ii=tp==="sunos";tg&&Wa.getCodepage();function GN(){return h7}function $N(e){return new Promise(t=>{process.nextTick(()=>{let n={};n.version=GN(),Promise.all([Eo.system(),Eo.bios(),Eo.baseboard(),Eo.chassis(),is.osInfo(),is.uuid(),is.versions(),Tr.cpu(),Tr.cpuFlags(),WN.graphics(),ss.networkInterfaces(),ng.memLayout(),Pi.diskLayout()]).then(r=>{n.system=r[0],n.bios=r[1],n.baseboard=r[2],n.chassis=r[3],n.os=r[4],n.uuid=r[5],n.versions=r[6],n.cpu=r[7],n.cpu.flags=r[8],n.graphics=r[9],n.net=r[10],n.memLayout=r[11],n.diskLayout=r[12],e&&e(n),t(n)})})})}function HN(e,t,n){return Wa.isFunction(t)&&(n=t,t=""),Wa.isFunction(e)&&(n=e,e=""),new Promise(r=>{process.nextTick(()=>{t=t||ss.getDefaultNetworkInterface(),e=e||"";let i=function(){let o=15;return tg&&(o=13),(Jf||Zf||Qf)&&(o=11),Ii&&(o=6),function(){--o===0&&(n&&n(s),r(s))}}(),s={};s.time=is.time(),s.node=process.versions.node,s.v8=process.versions.v8,Tr.cpuCurrentSpeed().then(o=>{s.cpuCurrentSpeed=o,i()}),zN.users().then(o=>{s.users=o,i()}),ep.processes().then(o=>{s.processes=o,i()}),Tr.currentLoad().then(o=>{s.currentLoad=o,i()}),Ii||Tr.cpuTemperature().then(o=>{s.temp=o,i()}),!Zf&&!Jf&&!Qf&&!Ii&&ss.networkStats(t).then(o=>{s.networkStats=o,i()}),Ii||ss.networkConnections().then(o=>{s.networkConnections=o,i()}),ng.mem().then(o=>{s.mem=o,i()}),Ii||FN().then(o=>{s.battery=o,i()}),Ii||ep.services(e).then(o=>{s.services=o,i()}),Ii||Pi.fsSize().then(o=>{s.fsSize=o,i()}),!tg&&!Zf&&!Jf&&!Qf&&!Ii&&Pi.fsStats().then(o=>{s.fsStats=o,i()}),!tg&&!Zf&&!Jf&&!Qf&&!Ii&&Pi.disksIO().then(o=>{s.disksIO=o,i()}),!Zf&&!Jf&&!Qf&&!Ii&&rg.wifiNetworks().then(o=>{s.wifiNetworks=o,i()}),zx.inetLatency().then(o=>{s.inetLatency=o,i()})})})}function S7(e,t,n){return new Promise(r=>{process.nextTick(()=>{let i={};t&&Wa.isFunction(t)&&!n&&(n=t,t=""),e&&Wa.isFunction(e)&&!t&&!n&&(n=e,e="",t=""),$N().then(s=>{i=s,HN(e,t).then(o=>{for(let a in o)({}).hasOwnProperty.call(o,a)&&(i[a]=o[a]);n&&n(i),r(i)})})})})}function qN(e,t){return new Promise(n=>{process.nextTick(()=>{let r=Object.keys(e).filter(i=>({}).hasOwnProperty.call(ue,i)).map(i=>{let s=e[i].substring(e[i].lastIndexOf("(")+1,e[i].lastIndexOf(")")),o=i.indexOf(")")>=0?i.split(")")[1].trim():i;return o=i.indexOf("|")>=0?i.split("|")[0].trim():o,s?ue[o](s):ue[o]("")});Promise.all(r).then(i=>{let s={},o=0;for(let a in e)if({}.hasOwnProperty.call(e,a)&&{}.hasOwnProperty.call(ue,a)&&i.length>o){if(e[a]==="*"||e[a]==="all")s[a]=i[o];else{let l=e[a],u="",c=[];if(l.indexOf(")")>=0&&(l=l.split(")")[1].trim()),l.indexOf("|")>=0&&(u=l.split("|")[1].trim(),c=u.split(":"),l=l.split("|")[0].trim()),l=l.replace(/,/g," ").replace(/ +/g," ").split(" "),i[o])if(Array.isArray(i[o])){let f=[];i[o].forEach(p=>{let d={};if(l.length===1&&(l[0]==="*"||l[0]==="all")?d=p:l.forEach(m=>{({}).hasOwnProperty.call(p,m)&&(d[m]=p[m])}),u&&c.length===2){if({}.hasOwnProperty.call(d,c[0].trim())){let m=d[c[0].trim()];typeof m=="number"?m===parseFloat(c[1].trim())&&f.push(d):typeof m=="string"&&m.toLowerCase()===c[1].trim().toLowerCase()&&f.push(d)}}else f.push(d)}),s[a]=f}else{let f={};l.forEach(p=>{({}).hasOwnProperty.call(i[o],p)&&(f[p]=i[o][p])}),s[a]=f}else s[a]={}}o++}t&&t(s),n(s)})})})}function _7(e,t,n){let r=null;return setInterval(()=>{qN(e).then(s=>{JSON.stringify(r)!==JSON.stringify(s)&&(r=Object.assign({},s),n(s))})},t)}ue.version=GN;ue.system=Eo.system;ue.bios=Eo.bios;ue.baseboard=Eo.baseboard;ue.chassis=Eo.chassis;ue.time=is.time;ue.osInfo=is.osInfo;ue.versions=is.versions;ue.shell=is.shell;ue.uuid=is.uuid;ue.cpu=Tr.cpu;ue.cpuFlags=Tr.cpuFlags;ue.cpuCache=Tr.cpuCache;ue.cpuCurrentSpeed=Tr.cpuCurrentSpeed;ue.cpuTemperature=Tr.cpuTemperature;ue.currentLoad=Tr.currentLoad;ue.fullLoad=Tr.fullLoad;ue.mem=ng.mem;ue.memLayout=ng.memLayout;ue.battery=FN;ue.graphics=WN.graphics;ue.fsSize=Pi.fsSize;ue.fsOpenFiles=Pi.fsOpenFiles;ue.blockDevices=Pi.blockDevices;ue.fsStats=Pi.fsStats;ue.disksIO=Pi.disksIO;ue.diskLayout=Pi.diskLayout;ue.networkInterfaceDefault=ss.networkInterfaceDefault;ue.networkGatewayDefault=ss.networkGatewayDefault;ue.networkInterfaces=ss.networkInterfaces;ue.networkStats=ss.networkStats;ue.networkConnections=ss.networkConnections;ue.wifiNetworks=rg.wifiNetworks;ue.wifiInterfaces=rg.wifiInterfaces;ue.wifiConnections=rg.wifiConnections;ue.services=ep.services;ue.processes=ep.processes;ue.processLoad=ep.processLoad;ue.users=zN.users;ue.inetChecksite=zx.inetChecksite;ue.inetLatency=zx.inetLatency;ue.dockerInfo=za.dockerInfo;ue.dockerImages=za.dockerImages;ue.dockerContainers=za.dockerContainers;ue.dockerContainerStats=za.dockerContainerStats;ue.dockerContainerProcesses=za.dockerContainerProcesses;ue.dockerVolumes=za.dockerVolumes;ue.dockerAll=za.dockerAll;ue.vboxInfo=g7.vboxInfo;ue.printer=y7.printer;ue.usb=v7.usb;ue.audio=w7.audio;ue.bluetoothDevices=x7.bluetoothDevices;ue.getStaticData=$N;ue.getDynamicData=HN;ue.getAllData=S7;ue.get=qN;ue.observe=_7;ue.powerShellStart=Wa.powerShellStart;ue.powerShellRelease=Wa.powerShellRelease});import{notStrictEqual as DD,strictEqual as kD}from"assert";var uD={right:mD,center:hD},cD=0,rp=1,fD=2,ip=3,fg=class{constructor(t){var n;this.width=t.width,this.wrap=(n=t.wrap)!==null&&n!==void 0?n:!0,this.rows=[]}span(...t){let n=this.div(...t);n.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let n=t.map(r=>typeof r=="string"?this.colFromString(r):r);return this.rows.push(n),n}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let n=t.split(`
409
+ `).map(i=>i.split(" ")),r=0;return n.forEach(i=>{i.length>1&&Mn.stringWidth(i[0])>r&&(r=Math.min(Math.floor(this.width*.5),Mn.stringWidth(i[0])))}),n.forEach(i=>{this.div(...i.map((s,o)=>({text:s.trim(),padding:this.measurePadding(s),width:o===0&&i.length>1?r:void 0})))}),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){let n=Mn.stripAnsi(t);return[0,n.match(/\s*$/)[0].length,0,n.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(n=>{this.rowToString(n,t)}),t.filter(n=>!n.hidden).map(n=>n.text).join(`
410
+ `)}rowToString(t,n){return this.rasterize(t).forEach((r,i)=>{let s="";r.forEach((o,a)=>{let{width:l}=t[a],u=this.negatePadding(t[a]),c=o;if(u>Mn.stringWidth(o)&&(c+=" ".repeat(u-Mn.stringWidth(o))),t[a].align&&t[a].align!=="left"&&this.wrap){let p=uD[t[a].align];c=p(c,u),Mn.stringWidth(c)<u&&(c+=" ".repeat((l||0)-Mn.stringWidth(c)-1))}let f=t[a].padding||[0,0,0,0];f[ip]&&(s+=" ".repeat(f[ip])),s+=nS(t[a],c,"| "),s+=c,s+=nS(t[a],c," |"),f[rp]&&(s+=" ".repeat(f[rp])),i===0&&n.length>0&&(s=this.renderInline(s,n[n.length-1]))}),n.push({text:s.replace(/ +$/,""),span:t.span})}),n}renderInline(t,n){let r=t.match(/^ */),i=r?r[0].length:0,s=n.text,o=Mn.stringWidth(s.trimRight());return n.span?this.wrap?i<o?t:(n.hidden=!0,s.trimRight()+" ".repeat(i-o)+t.trimLeft()):(n.hidden=!0,s+t):t}rasterize(t){let n=[],r=this.columnWidths(t),i;return t.forEach((s,o)=>{s.width=r[o],this.wrap?i=Mn.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
411
+ `):i=s.text.split(`
412
+ `),s.border&&(i.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(i.unshift(...new Array(s.padding[cD]||0).fill("")),i.push(...new Array(s.padding[fD]||0).fill(""))),i.forEach((a,l)=>{n[l]||n.push([]);let u=n[l];for(let c=0;c<o;c++)u[c]===void 0&&u.push("");u.push(a)})}),n}negatePadding(t){let n=t.width||0;return t.padding&&(n-=(t.padding[ip]||0)+(t.padding[rp]||0)),t.border&&(n-=4),n}columnWidths(t){if(!this.wrap)return t.map(o=>o.width||Mn.stringWidth(o.text));let n=t.length,r=this.width,i=t.map(o=>{if(o.width)return n--,r-=o.width,o.width}),s=n?Math.floor(r/n):0;return i.map((o,a)=>o===void 0?Math.max(s,pD(t[a])):o)}};function nS(e,t,n){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?n:" ":""}function pD(e){let t=e.padding||[],n=1+(t[ip]||0)+(t[rp]||0);return e.border?n+4:n}function dD(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function mD(e,t){e=e.trim();let n=Mn.stringWidth(e);return n<t?" ".repeat(t-n)+e:e}function hD(e,t){e=e.trim();let n=Mn.stringWidth(e);return n>=t?e:" ".repeat(t-n>>1)+e}var Mn;function rS(e,t){return Mn=t,new fg({width:e?.width||dD(),wrap:e?.wrap})}var iS=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function pg(e){return e.replace(iS,"")}function sS(e,t){let[n,r]=e.match(iS)||["",""];e=pg(e);let i="";for(let s=0;s<e.length;s++)s!==0&&s%t===0&&(i+=`
413
+ `),i+=e.charAt(s);return n&&r&&(i=`${n}${i}${r}`),i}function dg(e){return rS(e,{stringWidth:t=>[...t].length,stripAnsi:pg,wrap:sS})}import{dirname as oS,resolve as aS}from"path";import{readdirSync as gD,statSync as yD}from"fs";function lS(e,t){let n=aS(".",e),r;for(yD(n).isDirectory()||(n=oS(n));;){if(r=t(n,gD(n)),r)return aS(n,r);if(n=oS(r=n),r===n)break}}import{inspect as MD}from"util";import{readFileSync as RD}from"fs";import{fileURLToPath as VD}from"url";import{format as xD}from"util";import{normalize as SD,resolve as _D}from"path";function Po(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let n="",r=!1,i=e.match(/^-+/);for(let s=i?i[0].length:0;s<e.length;s++){let o=e.charAt(s);r&&(r=!1,o=o.toUpperCase()),s!==0&&(o==="-"||o==="_")?r=!0:o!=="-"&&o!=="_"&&(n+=o)}return n}}function sp(e,t){let n=e.toLowerCase();t=t||"-";let r="";for(let i=0;i<e.length;i++){let s=n.charAt(i),o=e.charAt(i);s!==o&&i>0?r+=`${t}${n.charAt(i)}`:r+=o}return r}function op(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function uS(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let t=0,n=null,r=null,i=null,s=[];for(let o=0;o<e.length;o++){if(n=r,r=e.charAt(o),r===" "&&!i){n!==" "&&t++;continue}r===i?i=null:(r==="'"||r==='"')&&!i&&(i=r),s[t]||(s[t]=""),s[t]+=r}return s}var nr;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(nr||(nr={}));var Ai,ap=class{constructor(t){Ai=t}parse(t,n){let r=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},n),i=uS(t),s=typeof t=="string",o=vD(Object.assign(Object.create(null),r.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},r.configuration),l=Object.assign(Object.create(null),r.default),u=r.configObjects||[],c=r.envPrefix,f=a["populate--"],p=f?"--":"_",d=Object.create(null),m=Object.create(null),y=r.__||Ai.format,v={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},h=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,g=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(r.array||[]).filter(Boolean).forEach(function(E){let I=typeof E=="object"?E.key:E,$=Object.keys(E).map(function(k){return{boolean:"bools",string:"strings",number:"numbers"}[k]}).filter(Boolean).pop();$&&(v[$][I]=!0),v.arrays[I]=!0,v.keys.push(I)}),[].concat(r.boolean||[]).filter(Boolean).forEach(function(E){v.bools[E]=!0,v.keys.push(E)}),[].concat(r.string||[]).filter(Boolean).forEach(function(E){v.strings[E]=!0,v.keys.push(E)}),[].concat(r.number||[]).filter(Boolean).forEach(function(E){v.numbers[E]=!0,v.keys.push(E)}),[].concat(r.count||[]).filter(Boolean).forEach(function(E){v.counts[E]=!0,v.keys.push(E)}),[].concat(r.normalize||[]).filter(Boolean).forEach(function(E){v.normalize[E]=!0,v.keys.push(E)}),typeof r.narg=="object"&&Object.entries(r.narg).forEach(([E,I])=>{typeof I=="number"&&(v.nargs[E]=I,v.keys.push(E))}),typeof r.coerce=="object"&&Object.entries(r.coerce).forEach(([E,I])=>{typeof I=="function"&&(v.coercions[E]=I,v.keys.push(E))}),typeof r.config<"u"&&(Array.isArray(r.config)||typeof r.config=="string"?[].concat(r.config).filter(Boolean).forEach(function(E){v.configs[E]=!0}):typeof r.config=="object"&&Object.entries(r.config).forEach(([E,I])=>{(typeof I=="boolean"||typeof I=="function")&&(v.configs[E]=I)})),qt(r.key,o,r.default,v.arrays),Object.keys(l).forEach(function(E){(v.aliases[E]||[]).forEach(function(I){l[I]=l[E]})});let w=null;et();let x=[],C=Object.assign(Object.create(null),{_:[]}),A={};for(let E=0;E<i.length;E++){let I=i[E],$=I.replace(/^-{3,}/,"---"),k,P,fe,re,ge,Bt;if(I!=="--"&&/^-/.test(I)&&b(I))T(I);else if($.match(/^---+(=|$)/)){T(I);continue}else if(I.match(/^--.+=/)||!a["short-option-groups"]&&I.match(/^-.+=/))re=I.match(/^--?([^=]+)=([\s\S]*)$/),re!==null&&Array.isArray(re)&&re.length>=3&&(Ce(re[1],v.arrays)?E=M(E,re[1],i,re[2]):Ce(re[1],v.nargs)!==!1?E=z(E,re[1],i,re[2]):U(re[1],re[2],!0));else if(I.match(g)&&a["boolean-negation"])re=I.match(g),re!==null&&Array.isArray(re)&&re.length>=2&&(P=re[1],U(P,Ce(P,v.arrays)?[!1]:!1));else if(I.match(/^--.+/)||!a["short-option-groups"]&&I.match(/^-[^-]+/))re=I.match(/^--?(.+)/),re!==null&&Array.isArray(re)&&re.length>=2&&(P=re[1],Ce(P,v.arrays)?E=M(E,P,i):Ce(P,v.nargs)!==!1?E=z(E,P,i):(ge=i[E+1],ge!==void 0&&(!ge.match(/^-/)||ge.match(h))&&!Ce(P,v.bools)&&!Ce(P,v.counts)||/^(true|false)$/.test(ge)?(U(P,ge),E++):U(P,G(P))));else if(I.match(/^-.\..+=/))re=I.match(/^-([^=]+)=([\s\S]*)$/),re!==null&&Array.isArray(re)&&re.length>=3&&U(re[1],re[2]);else if(I.match(/^-.\..+/)&&!I.match(h))ge=i[E+1],re=I.match(/^-(.\..+)/),re!==null&&Array.isArray(re)&&re.length>=2&&(P=re[1],ge!==void 0&&!ge.match(/^-/)&&!Ce(P,v.bools)&&!Ce(P,v.counts)?(U(P,ge),E++):U(P,G(P)));else if(I.match(/^-[^-]+/)&&!I.match(h)){fe=I.slice(1,-1).split(""),k=!1;for(let pn=0;pn<fe.length;pn++){if(ge=I.slice(pn+2),fe[pn+1]&&fe[pn+1]==="="){Bt=I.slice(pn+3),P=fe[pn],Ce(P,v.arrays)?E=M(E,P,i,Bt):Ce(P,v.nargs)!==!1?E=z(E,P,i,Bt):U(P,Bt),k=!0;break}if(ge==="-"){U(fe[pn],ge);continue}if(/[A-Za-z]/.test(fe[pn])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ge)&&Ce(ge,v.bools)===!1){U(fe[pn],ge),k=!0;break}if(fe[pn+1]&&fe[pn+1].match(/\W/)){U(fe[pn],ge),k=!0;break}else U(fe[pn],G(fe[pn]))}P=I.slice(-1)[0],!k&&P!=="-"&&(Ce(P,v.arrays)?E=M(E,P,i):Ce(P,v.nargs)!==!1?E=z(E,P,i):(ge=i[E+1],ge!==void 0&&(!/^(-|--)[^-]/.test(ge)||ge.match(h))&&!Ce(P,v.bools)&&!Ce(P,v.counts)||/^(true|false)$/.test(ge)?(U(P,ge),E++):U(P,G(P))))}else if(I.match(/^-[0-9]$/)&&I.match(h)&&Ce(I.slice(1),v.bools))P=I.slice(1),U(P,G(P));else if(I==="--"){x=i.slice(E+1);break}else if(a["halt-at-non-option"]){x=i.slice(E);break}else T(I)}we(C,!0),we(C,!1),se(C),Ve(),ve(C,v.aliases,l,!0),Te(C),a["set-placeholder-key"]&&Je(C),Object.keys(v.counts).forEach(function(E){Me(C,E.split("."))||U(E,0)}),f&&x.length&&(C[p]=[]),x.forEach(function(E){C[p].push(E)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(C).filter(E=>E!=="--"&&E.includes("-")).forEach(E=>{delete C[E]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(E=>o[E])).forEach(E=>{a["camel-case-expansion"]&&E.includes("-")&&delete C[E.split(".").map(I=>Po(I)).join(".")],delete C[E]});function T(E){let I=V("_",E);(typeof I=="string"||typeof I=="number")&&C._.push(I)}function z(E,I,$,k){let P,fe=Ce(I,v.nargs);if(fe=typeof fe!="number"||isNaN(fe)?1:fe,fe===0)return Re(k)||(w=Error(y("Argument unexpected for: %s",I))),U(I,G(I)),E;let re=Re(k)?0:1;if(a["nargs-eats-options"])$.length-(E+1)+re<fe&&(w=Error(y("Not enough arguments following: %s",I))),re=fe;else{for(P=E+1;P<$.length&&(!$[P].match(/^-[^0-9]/)||$[P].match(h)||b($[P]));P++)re++;re<fe&&(w=Error(y("Not enough arguments following: %s",I)))}let ge=Math.min(re,fe);for(!Re(k)&&ge>0&&(U(I,k),ge--),P=E+1;P<ge+E+1;P++)U(I,$[P]);return E+ge}function M(E,I,$,k){let P=[],fe=k||$[E+1],re=Ce(I,v.nargs);if(Ce(I,v.bools)&&!/^(true|false)$/.test(fe))P.push(!0);else if(Re(fe)||Re(k)&&/^-/.test(fe)&&!h.test(fe)&&!b(fe)){if(l[I]!==void 0){let ge=l[I];P=Array.isArray(ge)?ge:[ge]}}else{Re(k)||P.push(F(I,k,!0));for(let ge=E+1;ge<$.length&&!(!a["greedy-arrays"]&&P.length>0||re&&typeof re=="number"&&P.length>=re||(fe=$[ge],/^-/.test(fe)&&!h.test(fe)&&!b(fe)));ge++)E=ge,P.push(F(I,fe,s))}return typeof re=="number"&&(re&&P.length<re||isNaN(re)&&P.length===0)&&(w=Error(y("Not enough arguments following: %s",I))),U(I,P),E}function U(E,I,$=s){if(/-/.test(E)&&a["camel-case-expansion"]){let fe=E.split(".").map(function(re){return Po(re)}).join(".");D(E,fe)}let k=F(E,I,$),P=E.split(".");pt(C,P,k),v.aliases[E]&&v.aliases[E].forEach(function(fe){let re=fe.split(".");pt(C,re,k)}),P.length>1&&a["dot-notation"]&&(v.aliases[P[0]]||[]).forEach(function(fe){let re=fe.split("."),ge=[].concat(P);ge.shift(),re=re.concat(ge),(v.aliases[E]||[]).includes(re.join("."))||pt(C,re,k)}),Ce(E,v.normalize)&&!Ce(E,v.arrays)&&[E].concat(v.aliases[E]||[]).forEach(function(re){Object.defineProperty(A,re,{enumerable:!0,get(){return I},set(ge){I=typeof ge=="string"?Ai.normalize(ge):ge}})})}function D(E,I){v.aliases[E]&&v.aliases[E].length||(v.aliases[E]=[I],d[I]=!0),v.aliases[I]&&v.aliases[I].length||D(I,E)}function F(E,I,$){$&&(I=wD(I)),(Ce(E,v.bools)||Ce(E,v.counts))&&typeof I=="string"&&(I=I==="true");let k=Array.isArray(I)?I.map(function(P){return V(E,P)}):V(E,I);return Ce(E,v.counts)&&(Re(k)||typeof k=="boolean")&&(k=mg()),Ce(E,v.normalize)&&Ce(E,v.arrays)&&(Array.isArray(I)?k=I.map(P=>Ai.normalize(P)):k=Ai.normalize(I)),k}function V(E,I){return!a["parse-positional-numbers"]&&E==="_"||!Ce(E,v.strings)&&!Ce(E,v.bools)&&!Array.isArray(I)&&(op(I)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${I}`)))||!Re(I)&&Ce(E,v.numbers))&&(I=Number(I)),I}function se(E){let I=Object.create(null);ve(I,v.aliases,l),Object.keys(v.configs).forEach(function($){let k=E[$]||I[$];if(k)try{let P=null,fe=Ai.resolve(Ai.cwd(),k),re=v.configs[$];if(typeof re=="function"){try{P=re(fe)}catch(ge){P=ge}if(P instanceof Error){w=P;return}}else P=Ai.require(fe);X(P)}catch(P){P.name==="PermissionDenied"?w=P:E[$]&&(w=Error(y("Invalid JSON config file: %s",k)))}})}function X(E,I){Object.keys(E).forEach(function($){let k=E[$],P=I?I+"."+$:$;typeof k=="object"&&k!==null&&!Array.isArray(k)&&a["dot-notation"]?X(k,P):(!Me(C,P.split("."))||Ce(P,v.arrays)&&a["combine-arrays"])&&U(P,k)})}function Ve(){typeof u<"u"&&u.forEach(function(E){X(E)})}function we(E,I){if(typeof c>"u")return;let $=typeof c=="string"?c:"",k=Ai.env();Object.keys(k).forEach(function(P){if($===""||P.lastIndexOf($,0)===0){let fe=P.split("__").map(function(re,ge){return ge===0&&(re=re.substring($.length)),Po(re)});(I&&v.configs[fe.join(".")]||!I)&&!Me(E,fe)&&U(fe.join("."),k[P])}})}function Te(E){let I,$=new Set;Object.keys(E).forEach(function(k){if(!$.has(k)&&(I=Ce(k,v.coercions),typeof I=="function"))try{let P=V(k,I(E[k]));[].concat(v.aliases[k]||[],k).forEach(fe=>{$.add(fe),E[fe]=P})}catch(P){w=P}})}function Je(E){return v.keys.forEach(I=>{~I.indexOf(".")||typeof E[I]>"u"&&(E[I]=void 0)}),E}function ve(E,I,$,k=!1){Object.keys($).forEach(function(P){Me(E,P.split("."))||(pt(E,P.split("."),$[P]),k&&(m[P]=!0),(I[P]||[]).forEach(function(fe){Me(E,fe.split("."))||pt(E,fe.split("."),$[P])}))})}function Me(E,I){let $=E;a["dot-notation"]||(I=[I.join(".")]),I.slice(0,-1).forEach(function(P){$=$[P]||{}});let k=I[I.length-1];return typeof $!="object"?!1:k in $}function pt(E,I,$){let k=E;a["dot-notation"]||(I=[I.join(".")]),I.slice(0,-1).forEach(function(Bt){Bt=cS(Bt),typeof k=="object"&&k[Bt]===void 0&&(k[Bt]={}),typeof k[Bt]!="object"||Array.isArray(k[Bt])?(Array.isArray(k[Bt])?k[Bt].push({}):k[Bt]=[k[Bt],{}],k=k[Bt][k[Bt].length-1]):k=k[Bt]});let P=cS(I[I.length-1]),fe=Ce(I.join("."),v.arrays),re=Array.isArray($),ge=a["duplicate-arguments-array"];!ge&&Ce(P,v.nargs)&&(ge=!0,(!Re(k[P])&&v.nargs[P]===1||Array.isArray(k[P])&&k[P].length===v.nargs[P])&&(k[P]=void 0)),$===mg()?k[P]=mg(k[P]):Array.isArray(k[P])?ge&&fe&&re?k[P]=a["flatten-duplicate-arrays"]?k[P].concat($):(Array.isArray(k[P][0])?k[P]:[k[P]]).concat([$]):!ge&&!!fe==!!re?k[P]=$:k[P]=k[P].concat([$]):k[P]===void 0&&fe?k[P]=re?$:[$]:ge&&!(k[P]===void 0||Ce(P,v.counts)||Ce(P,v.bools))?k[P]=[k[P],$]:k[P]=$}function qt(...E){E.forEach(function(I){Object.keys(I||{}).forEach(function($){v.aliases[$]||(v.aliases[$]=[].concat(o[$]||[]),v.aliases[$].concat($).forEach(function(k){if(/-/.test(k)&&a["camel-case-expansion"]){let P=Po(k);P!==$&&v.aliases[$].indexOf(P)===-1&&(v.aliases[$].push(P),d[P]=!0)}}),v.aliases[$].concat($).forEach(function(k){if(k.length>1&&/[A-Z]/.test(k)&&a["camel-case-expansion"]){let P=sp(k,"-");P!==$&&v.aliases[$].indexOf(P)===-1&&(v.aliases[$].push(P),d[P]=!0)}}),v.aliases[$].forEach(function(k){v.aliases[k]=[$].concat(v.aliases[$].filter(function(P){return k!==P}))}))})})}function Ce(E,I){let $=[].concat(v.aliases[E]||[],E),k=Object.keys(I),P=$.find(fe=>k.includes(fe));return P?I[P]:!1}function Lu(E){let I=Object.keys(v);return[].concat(I.map(k=>v[k])).some(function(k){return Array.isArray(k)?k.includes(E):k[E]})}function _(E,...I){return[].concat(...I).some(function(k){let P=E.match(k);return P&&Lu(P[1])})}function O(E){if(E.match(h)||!E.match(/^-[^-]+/))return!1;let I=!0,$,k=E.slice(1).split("");for(let P=0;P<k.length;P++){if($=E.slice(P+2),!Lu(k[P])){I=!1;break}if(k[P+1]&&k[P+1]==="="||$==="-"||/[A-Za-z]/.test(k[P])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test($)||k[P+1]&&k[P+1].match(/\W/))break}return I}function b(E){return a["unknown-options-as-args"]&&L(E)}function L(E){return E=E.replace(/^-{3,}/,"--"),E.match(h)||O(E)?!1:!_(E,/^-+([^=]+?)=[\s\S]*$/,g,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function G(E){return!Ce(E,v.bools)&&!Ce(E,v.counts)&&`${E}`in l?l[E]:B(Le(E))}function B(E){return{[nr.BOOLEAN]:!0,[nr.STRING]:"",[nr.NUMBER]:void 0,[nr.ARRAY]:[]}[E]}function Le(E){let I=nr.BOOLEAN;return Ce(E,v.strings)?I=nr.STRING:Ce(E,v.numbers)?I=nr.NUMBER:Ce(E,v.bools)?I=nr.BOOLEAN:Ce(E,v.arrays)&&(I=nr.ARRAY),I}function Re(E){return E===void 0}function et(){Object.keys(v.counts).find(E=>Ce(E,v.arrays)?(w=Error(y("Invalid configuration: %s, opts.count excludes opts.array.",E)),!0):Ce(E,v.nargs)?(w=Error(y("Invalid configuration: %s, opts.count excludes opts.narg.",E)),!0):!1)}return{aliases:Object.assign({},v.aliases),argv:Object.assign(A,C),configuration:a,defaulted:Object.assign({},m),error:w,newAliases:Object.assign({},d)}}};function vD(e){let t=[],n=Object.create(null),r=!0;for(Object.keys(e).forEach(function(i){t.push([].concat(e[i],i))});r;){r=!1;for(let i=0;i<t.length;i++)for(let s=i+1;s<t.length;s++)if(t[i].filter(function(a){return t[s].indexOf(a)!==-1}).length){t[i]=t[i].concat(t[s]),t.splice(s,1),r=!0;break}}return t.forEach(function(i){i=i.filter(function(o,a,l){return l.indexOf(o)===a});let s=i.pop();s!==void 0&&typeof s=="string"&&(n[s]=i)}),n}function mg(e){return e!==void 0?e+1:1}function cS(e){return e==="__proto__"?"___proto___":e}function wD(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}import{readFileSync as CD}from"fs";var hg,gg,yg,fS=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,pS=(gg=(hg=process==null?void 0:process.versions)===null||hg===void 0?void 0:hg.node)!==null&&gg!==void 0?gg:(yg=process==null?void 0:process.version)===null||yg===void 0?void 0:yg.slice(1);if(pS&&Number(pS.match(/^([^.]+)/)[1])<fS)throw Error(`yargs parser supports a minimum Node.js version of ${fS}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var bD=process?process.env:{},dS=new ap({cwd:process.cwd,env:()=>bD,format:xD,normalize:SD,resolve:_D,require:e=>{if(typeof K<"u")return K(e);if(e.match(/\.json$/))return JSON.parse(CD(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),Du=function(t,n){return dS.parse(t.slice(),n).argv};Du.detailed=function(e,t){return dS.parse(e.slice(),t)};Du.camelCase=Po;Du.decamelize=sp;Du.looksLikeNumber=op;var vg=Du;import{basename as jD,dirname as BD,extname as UD,relative as FD,resolve as wS}from"path";function mS(){return OD()?0:1}function OD(){return ED()&&!process.defaultApp}function ED(){return!!process.versions.electron}function wg(e){return e.slice(mS()+1)}function hS(){return process.argv[mS()]}var ot=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};import{readFileSync as ID,statSync as PD,writeFile as TD}from"fs";import{format as AD}from"util";import{resolve as LD}from"path";var gS={fs:{readFileSync:ID,writeFile:TD},format:AD,resolve:LD,exists:e=>{try{return PD(e).isFile()}catch{return!1}}};var Nr,xg=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let n=t.shift(),r=function(){};return typeof t[t.length-1]=="function"&&(r=t.pop()),r=r||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]=n,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:r})):r(),Nr.format.apply(Nr.format,[this.cache[this.locale][n]||n].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),n=t.shift(),r=t.shift(),i=t.shift(),s=function(){};typeof t[t.length-1]=="function"&&(s=t.pop()),this.cache[this.locale]||this._readLocaleFile();let o=i===1?n:r;this.cache[this.locale][n]&&(o=this.cache[this.locale][n][i===1?"one":"other"]),!this.cache[this.locale][n]&&this.updateFiles?(this.cache[this.locale][n]={one:n,other:r},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:s})):s();let a=[o];return~o.indexOf("%d")&&a.push(i),Nr.format.apply(Nr.format,a.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this.cache[this.locale][n]=t[n])}_taggedLiteral(t,...n){let r="";return t.forEach(function(i,s){let o=n[s+1];r+=i,typeof o<"u"&&(r+="%s")}),this.__.apply(this,[r].concat([].slice.call(n,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,n=this.writeQueue[0],r=n.directory,i=n.locale,s=n.cb,o=this._resolveLocaleFile(r,i),a=JSON.stringify(this.cache[i],null,2);Nr.fs.writeFile(o,a,"utf-8",function(l){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),s(l)})}_readLocaleFile(){let t={},n=this._resolveLocaleFile(this.directory,this.locale);try{Nr.fs.readFileSync&&(t=JSON.parse(Nr.fs.readFileSync(n,"utf-8")))}catch(r){if(r instanceof SyntaxError&&(r.message="syntax error in "+n),r.code==="ENOENT")t={};else throw r}this.cache[this.locale]=t}_resolveLocaleFile(t,n){let r=Nr.resolve(t,"./",n+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(r)&&~n.lastIndexOf("_")){let i=Nr.resolve(t,"./",n.split("_")[0]+".json");this._fileExistsSync(i)&&(r=i)}return r}_fileExistsSync(t){return Nr.exists(t)}};function yS(e,t){Nr=t;let n=new xg(e);return{__:n.__.bind(n),__n:n.__n.bind(n),setLocale:n.setLocale.bind(n),getLocale:n.getLocale.bind(n),updateLocale:n.updateLocale.bind(n),locale:n.locale}}var ND=e=>yS(e,gS),vS=ND;var WD="require is not supported by ESM",xS="loading a directory of commands is not supported yet for ESM",ku;try{ku=VD(import.meta.url)}catch{ku=process.cwd()}var zD=ku.substring(0,ku.lastIndexOf("node_modules")),Sg={assert:{notStrictEqual:DD,strictEqual:kD},cliui:dg,findUp:lS,getEnv:e=>process.env[e],inspect:MD,getCallerFile:()=>{throw new ot(xS)},getProcessArgvBin:hS,mainFilename:zD||process.cwd(),Parser:vg,path:{basename:jD,dirname:BD,extname:UD,relative:FD,resolve:wS},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:RD,require:()=>{throw new ot(WD)},requireDirectory:()=>{throw new ot(xS)},stringWidth:e=>[...e].length,y18n:vS({directory:wS(ku,"../../../locales"),updateFiles:!1})};function dn(e,t,n,r){n.assert.notStrictEqual(e,t,r)}function _g(e,t){t.assert.strictEqual(typeof e,"string")}function qa(e){return Object.keys(e)}function at(e){return!!e&&!!e.then&&typeof e.then=="function"}function os(e){let n=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),r=/\.*[\][<>]/g,i=n.shift();if(!i)throw new Error(`No command found in: ${e}`);let s={cmd:i.replace(r,""),demanded:[],optional:[]};return n.forEach((o,a)=>{let l=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===n.length-1&&(l=!0),/^\[/.test(o)?s.optional.push({cmd:o.replace(r,"").split("|"),variadic:l}):s.demanded.push({cmd:o.replace(r,"").split("|"),variadic:l})}),s}var GD=["first","second","third","fourth","fifth","sixth"];function le(e,t,n){function r(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[os(`cmd ${e}`),t,n]}try{let i=0,[s,o,a]=r(),l=[].slice.call(o);for(;l.length&&l[l.length-1]===void 0;)l.pop();let u=a||l.length;if(u<s.demanded.length)throw new ot(`Not enough arguments provided. Expected ${s.demanded.length} but received ${l.length}.`);let c=s.demanded.length+s.optional.length;if(u>c)throw new ot(`Too many arguments provided. Expected max ${c} but received ${u}.`);s.demanded.forEach(f=>{let p=l.shift(),d=SS(p);f.cmd.filter(y=>y===d||y==="*").length===0&&_S(d,f.cmd,i),i+=1}),s.optional.forEach(f=>{if(l.length===0)return;let p=l.shift(),d=SS(p);f.cmd.filter(y=>y===d||y==="*").length===0&&_S(d,f.cmd,i),i+=1})}catch(i){console.warn(i.stack)}}function SS(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function _S(e,t,n){throw new ot(`Invalid ${GD[n]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var lp=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,n,r=!0,i=!1){if(le("<array|function> [boolean] [boolean] [boolean]",[t,n,r],arguments.length),Array.isArray(t)){for(let s=0;s<t.length;s++){if(typeof t[s]!="function")throw Error("middleware must be a function");let o=t[s];o.applyBeforeValidation=n,o.global=r}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let s=t;s.applyBeforeValidation=n,s.global=r,s.mutates=i,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,n){let r=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(i=>{let s=[...r[n]||[],n];return i.option?!s.includes(i.option):!0}),t.option=n,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function CS(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function To(e,t,n,r){return n.reduce((i,s)=>{if(s.applyBeforeValidation!==r)return i;if(s.mutates){if(s.applied)return i;s.applied=!0}if(at(i))return i.then(o=>Promise.all([o,s(o,t)])).then(([o,a])=>Object.assign(o,a));{let o=s(i,t);return at(o)?o.then(a=>Object.assign(i,a)):Object.assign(i,o)}},e)}function Ao(e,t,n=r=>{throw r}){try{let r=$D(e)?e():e;return at(r)?r.then(i=>t(i)):t(r)}catch(r){return n(r)}}function $D(e){return typeof e=="function"}function Cg(e){if(typeof K>"u")return null;for(let t=0,n=Object.keys(K.cache),r;t<n.length;t++)if(r=K.cache[n[t]],r.exports===e)return r;return null}var Ka=/(^\*)|(^\$0)/,bg=class{constructor(t,n,r,i){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=i,this.usage=t,this.globalMiddleware=r,this.validation=n}addDirectory(t,n,r,i){i=i||{},typeof i.recurse!="boolean"&&(i.recurse=!1),Array.isArray(i.extensions)||(i.extensions=["js"]);let s=typeof i.visit=="function"?i.visit:o=>o;i.visit=(o,a,l)=>{let u=s(o,a,l);if(u){if(this.requireCache.has(a))return u;this.requireCache.add(a),this.addHandler(u)}return u},this.shim.requireDirectory({require:n,filename:r},t,i)}addHandler(t,n,r,i,s,o){let a=[],l=CS(s);if(i=i||(()=>{}),Array.isArray(t))if(HD(t))[t,...a]=t;else for(let u of t)this.addHandler(u);else if(KD(t)){let u=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(u=[].concat(u).concat(t.aliases)),this.addHandler(u,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(bS(r)){this.addHandler([t].concat(a),n,r.builder,r.handler,r.middlewares,r.deprecated);return}if(typeof t=="string"){let u=os(t);a=a.map(p=>os(p).cmd);let c=!1,f=[u.cmd].concat(a).filter(p=>Ka.test(p)?(c=!0,!1):!0);f.length===0&&c&&f.push("$0"),c&&(u.cmd=f[0],a=f.slice(1),t=t.replace(Ka,u.cmd)),a.forEach(p=>{this.aliasMap[p]=u.cmd}),n!==!1&&this.usage.command(t,n,c,a,o),this.handlers[u.cmd]={original:t,description:n,handler:i,builder:r||{},middlewares:l,deprecated:o,demanded:u.demanded,optional:u.optional},c&&(this.defaultCommand=this.handlers[u.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,n,r,i,s,o){let a=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,l=n.getInternalMethods().getContext(),u=l.commands.slice(),c=!t;t&&(l.commands.push(t),l.fullCommands.push(a.original));let f=this.applyBuilderUpdateUsageAndParse(c,a,n,r.aliases,u,i,s,o);return at(f)?f.then(p=>this.applyMiddlewareAndGetResult(c,a,p.innerArgv,l,s,p.aliases,n)):this.applyMiddlewareAndGetResult(c,a,f.innerArgv,l,s,f.aliases,n)}applyBuilderUpdateUsageAndParse(t,n,r,i,s,o,a,l){let u=n.builder,c=r;if(up(u)){r.getInternalMethods().getUsageInstance().freeze();let f=u(r.getInternalMethods().reset(i),l);if(at(f))return f.then(p=>(c=ES(p)?p:r,this.parseAndUpdateUsage(t,n,c,s,o,a)))}else qD(u)&&(r.getInternalMethods().getUsageInstance().freeze(),c=r.getInternalMethods().reset(i),Object.keys(n.builder).forEach(f=>{c.option(f,u[f])}));return this.parseAndUpdateUsage(t,n,c,s,o,a)}parseAndUpdateUsage(t,n,r,i,s,o){t&&r.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(r)&&r.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i,n),n.description);let a=r.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,s,o);return at(a)?a.then(l=>({aliases:r.parsed.aliases,innerArgv:l})):{aliases:r.parsed.aliases,innerArgv:a}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,n){let r=Ka.test(n.original)?n.original.replace(Ka,"").trim():n.original,i=t.filter(s=>!Ka.test(s));return i.push(r),`$0 ${i.join(" ")}`}handleValidationAndGetResult(t,n,r,i,s,o,a,l){if(!o.getInternalMethods().getHasOutput()){let u=o.getInternalMethods().runValidation(s,l,o.parsed.error,t);r=Ao(r,c=>(u(c),c))}if(n.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();let u=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(r,u,!1,!1),r=To(r,o,a,!1),r=Ao(r,c=>{let f=n.handler(c);return at(f)?f.then(()=>c):c}),t||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),at(r)&&!o.getInternalMethods().hasParseCallback()&&r.catch(c=>{try{o.getInternalMethods().getUsageInstance().fail(null,c)}catch{}})}return t||(i.commands.pop(),i.fullCommands.pop()),r}applyMiddlewareAndGetResult(t,n,r,i,s,o,a){let l={};if(s)return r;a.getInternalMethods().getHasOutput()||(l=this.populatePositionals(n,r,i,a));let u=this.globalMiddleware.getMiddleware().slice(0).concat(n.middlewares),c=To(r,a,u,!0);return at(c)?c.then(f=>this.handleValidationAndGetResult(t,n,f,i,o,a,u,l)):this.handleValidationAndGetResult(t,n,c,i,o,a,u,l)}populatePositionals(t,n,r,i){n._=n._.slice(r.commands.length);let s=t.demanded.slice(0),o=t.optional.slice(0),a={};for(this.validation.positionalCount(s.length,n._.length);s.length;){let l=s.shift();this.populatePositional(l,n,a)}for(;o.length;){let l=o.shift();this.populatePositional(l,n,a)}return n._=r.commands.concat(n._.map(l=>""+l)),this.postProcessPositionals(n,a,this.cmdToParseOptions(t.original),i),a}populatePositional(t,n,r){let i=t.cmd[0];t.variadic?r[i]=n._.splice(0).map(String):n._.length&&(r[i]=[String(n._.shift())])}cmdToParseOptions(t){let n={array:[],default:{},alias:{},demand:{}},r=os(t);return r.demanded.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o,n.demand[s]=!0}),r.optional.forEach(i=>{let[s,...o]=i.cmd;i.variadic&&(n.array.push(s),n.default[s]=[]),n.alias[s]=o}),n}postProcessPositionals(t,n,r,i){let s=Object.assign({},i.getOptions());s.default=Object.assign(r.default,s.default);for(let u of Object.keys(r.alias))s.alias[u]=(s.alias[u]||[]).concat(r.alias[u]);s.array=s.array.concat(r.array),s.config={};let o=[];if(Object.keys(n).forEach(u=>{n[u].map(c=>{s.configuration["unknown-options-as-args"]&&(s.key[u]=!0),o.push(`--${u}`),o.push(c)})}),!o.length)return;let a=Object.assign({},s.configuration,{"populate--":!1}),l=this.shim.Parser.detailed(o,Object.assign({},s,{configuration:a}));if(l.error)i.getInternalMethods().getUsageInstance().fail(l.error.message,l.error);else{let u=Object.keys(n);Object.keys(n).forEach(c=>{u.push(...l.aliases[c])}),Object.keys(l.argv).forEach(c=>{u.includes(c)&&(n[c]||(n[c]=l.argv[c]),!this.isInConfigs(i,c)&&!this.isDefaulted(i,c)&&Object.prototype.hasOwnProperty.call(t,c)&&Object.prototype.hasOwnProperty.call(l.argv,c)&&(Array.isArray(t[c])||Array.isArray(l.argv[c]))?t[c]=[].concat(t[c],l.argv[c]):t[c]=l.argv[c])})}}isDefaulted(t,n){let{default:r}=t.getOptions();return Object.prototype.hasOwnProperty.call(r,n)||Object.prototype.hasOwnProperty.call(r,this.shim.Parser.camelCase(n))}isInConfigs(t,n){let{configObjects:r}=t.getOptions();return r.some(i=>Object.prototype.hasOwnProperty.call(i,n))||r.some(i=>Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(n)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let r=Ka.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(r,this.defaultCommand.description)}let n=this.defaultCommand.builder;if(up(n))return n(t,!0);bS(n)||Object.keys(n).forEach(r=>{t.option(r,n[r])})}moduleName(t){let n=Cg(t);if(!n)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(n.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:n,desc:r}){for(let i of[t,n,r]){if(typeof i=="string"||i===!1)return i;dn(i,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();dn(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function OS(e,t,n,r){return new bg(e,t,n,r)}function bS(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function HD(e){return e.every(t=>typeof t=="string")}function up(e){return typeof e=="function"}function qD(e){return typeof e=="object"}function KD(e){return typeof e=="object"&&!Array.isArray(e)}function as(e={},t=()=>!0){let n={};return qa(e).forEach(r=>{t(r,e[r])&&(n[r]=e[r])}),n}function ls(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let n=t;n._handle&&n.isTTY&&typeof n._handle.setBlocking=="function"&&n._handle.setBlocking(e)})}function YD(e){return typeof e=="boolean"}function PS(e,t){let n=t.y18n.__,r={},i=[];r.failFn=function(F){i.push(F)};let s=null,o=null,a=!0;r.showHelpOnFail=function(F=!0,V){let[se,X]=typeof F=="string"?[!0,F]:[F,V];return e.getInternalMethods().isGlobalContext()&&(o=X),s=X,a=se,r};let l=!1;r.fail=function(F,V){let se=e.getInternalMethods().getLoggerInstance();if(i.length)for(let X=i.length-1;X>=0;--X){let Ve=i[X];if(YD(Ve)){if(V)throw V;if(F)throw Error(F)}else Ve(F,V,r)}else{if(e.getExitProcess()&&ls(!0),!l){l=!0,a&&(e.showHelp("error"),se.error()),(F||V)&&se.error(F||V);let X=s||o;X&&((F||V)&&se.error(""),se.error(X))}if(V=V||new ot(F),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,V);throw V}};let u=[],c=!1;r.usage=(D,F)=>D===null?(c=!0,u=[],r):(c=!1,u.push([D,F||""]),r),r.getUsage=()=>u,r.getUsageDisabled=()=>c,r.getPositionalGroupName=()=>n("Positionals:");let f=[];r.example=(D,F)=>{f.push([D,F||""])};let p=[];r.command=function(F,V,se,X,Ve=!1){se&&(p=p.map(we=>(we[2]=!1,we))),p.push([F,V||"",se,X,Ve])},r.getCommands=()=>p;let d={};r.describe=function(F,V){Array.isArray(F)?F.forEach(se=>{r.describe(se,V)}):typeof F=="object"?Object.keys(F).forEach(se=>{r.describe(se,F[se])}):d[F]=V},r.getDescriptions=()=>d;let m=[];r.epilog=D=>{m.push(D)};let y=!1,v;r.wrap=D=>{y=!0,v=D},r.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(y||(v=z(),y=!0),v);let h="__yargsString__:";r.deferY18nLookup=D=>h+D,r.help=function(){if(x)return x;w();let F=e.customScriptName?e.$0:t.path.basename(e.$0),V=e.getDemandedOptions(),se=e.getDemandedCommands(),X=e.getDeprecatedOptions(),Ve=e.getGroups(),we=e.getOptions(),Te=[];Te=Te.concat(Object.keys(d)),Te=Te.concat(Object.keys(V)),Te=Te.concat(Object.keys(se)),Te=Te.concat(Object.keys(we.default)),Te=Te.filter(A),Te=Object.keys(Te.reduce((_,O)=>(O!=="_"&&(_[O]=!0),_),{}));let Je=r.getWrap(),ve=t.cliui({width:Je,wrap:!!Je});if(!c){if(u.length)u.forEach(_=>{ve.div({text:`${_[0].replace(/\$0/g,F)}`}),_[1]&&ve.div({text:`${_[1]}`,padding:[1,0,0,0]})}),ve.div();else if(p.length){let _=null;se._?_=`${F} <${n("command")}>
414
+ `:_=`${F} [${n("command")}]
415
+ `,ve.div(`${_}`)}}if(p.length>1||p.length===1&&!p[0][2]){ve.div(n("Commands:"));let _=e.getInternalMethods().getContext(),O=_.commands.length?`${_.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((L,G)=>L[0].localeCompare(G[0])));let b=F?`${F} `:"";p.forEach(L=>{let G=`${b}${O}${L[0].replace(/^\$0 ?/,"")}`;ve.span({text:G,padding:[0,2,0,2],width:g(p,Je,`${F}${O}`)+4},{text:L[1]});let B=[];L[2]&&B.push(`[${n("default")}]`),L[3]&&L[3].length&&B.push(`[${n("aliases:")} ${L[3].join(", ")}]`),L[4]&&(typeof L[4]=="string"?B.push(`[${n("deprecated: %s",L[4])}]`):B.push(`[${n("deprecated")}]`)),B.length?ve.div({text:B.join(" "),padding:[0,0,0,2],align:"right"}):ve.div()}),ve.div()}let Me=(Object.keys(we.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);Te=Te.filter(_=>!e.parsed.newAliases[_]&&Me.every(O=>(we.alias[O]||[]).indexOf(_)===-1));let pt=n("Options:");Ve[pt]||(Ve[pt]=[]),C(Te,we.alias,Ve,pt);let qt=_=>/^--/.test(cp(_)),Ce=Object.keys(Ve).filter(_=>Ve[_].length>0).map(_=>{let O=Ve[_].filter(A).map(b=>{if(Me.includes(b))return b;for(let L=0,G;(G=Me[L])!==void 0;L++)if((we.alias[G]||[]).includes(b))return G;return b});return{groupName:_,normalizedKeys:O}}).filter(({normalizedKeys:_})=>_.length>0).map(({groupName:_,normalizedKeys:O})=>{let b=O.reduce((L,G)=>(L[G]=[G].concat(we.alias[G]||[]).map(B=>_===r.getPositionalGroupName()?B:(/^[0-9]$/.test(B)?we.boolean.includes(G)?"-":"--":B.length>1?"--":"-")+B).sort((B,Le)=>qt(B)===qt(Le)?0:qt(B)?1:-1).join(", "),L),{});return{groupName:_,normalizedKeys:O,switches:b}});if(Ce.filter(({groupName:_})=>_!==r.getPositionalGroupName()).some(({normalizedKeys:_,switches:O})=>!_.every(b=>qt(O[b])))&&Ce.filter(({groupName:_})=>_!==r.getPositionalGroupName()).forEach(({normalizedKeys:_,switches:O})=>{_.forEach(b=>{qt(O[b])&&(O[b]=XD(O[b],4))})}),Ce.forEach(({groupName:_,normalizedKeys:O,switches:b})=>{ve.div(_),O.forEach(L=>{let G=b[L],B=d[L]||"",Le=null;B.includes(h)&&(B=n(B.substring(h.length))),we.boolean.includes(L)&&(Le=`[${n("boolean")}]`),we.count.includes(L)&&(Le=`[${n("count")}]`),we.string.includes(L)&&(Le=`[${n("string")}]`),we.normalize.includes(L)&&(Le=`[${n("string")}]`),we.array.includes(L)&&(Le=`[${n("array")}]`),we.number.includes(L)&&(Le=`[${n("number")}]`);let Re=I=>typeof I=="string"?`[${n("deprecated: %s",I)}]`:`[${n("deprecated")}]`,et=[L in X?Re(X[L]):null,Le,L in V?`[${n("required")}]`:null,we.choices&&we.choices[L]?`[${n("choices:")} ${r.stringifiedValues(we.choices[L])}]`:null,T(we.default[L],we.defaultDescription[L])].filter(Boolean).join(" ");ve.span({text:cp(G),padding:[0,2,0,2+IS(G)],width:g(b,Je)+4},B);let E=e.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;et&&!E?ve.div({text:et,padding:[0,0,0,2],align:"right"}):ve.div()}),ve.div()}),f.length&&(ve.div(n("Examples:")),f.forEach(_=>{_[0]=_[0].replace(/\$0/g,F)}),f.forEach(_=>{_[1]===""?ve.div({text:_[0],padding:[0,2,0,2]}):ve.div({text:_[0],padding:[0,2,0,2],width:g(f,Je)+4},{text:_[1]})}),ve.div()),m.length>0){let _=m.map(O=>O.replace(/\$0/g,F)).join(`
416
+ `);ve.div(`${_}
417
+ `)}return ve.toString().replace(/\s*$/,"")};function g(D,F,V){let se=0;return Array.isArray(D)||(D=Object.values(D).map(X=>[X])),D.forEach(X=>{se=Math.max(t.stringWidth(V?`${V} ${cp(X[0])}`:cp(X[0]))+IS(X[0]),se)}),F&&(se=Math.min(se,parseInt((F*.5).toString(),10))),se}function w(){let D=e.getDemandedOptions(),F=e.getOptions();(Object.keys(F.alias)||[]).forEach(V=>{F.alias[V].forEach(se=>{d[se]&&r.describe(V,d[se]),se in D&&e.demandOption(V,D[se]),F.boolean.includes(se)&&e.boolean(V),F.count.includes(se)&&e.count(V),F.string.includes(se)&&e.string(V),F.normalize.includes(se)&&e.normalize(V),F.array.includes(se)&&e.array(V),F.number.includes(se)&&e.number(V)})})}let x;r.cacheHelpMessage=function(){x=this.help()},r.clearCachedHelpMessage=function(){x=void 0},r.hasCachedHelpMessage=function(){return!!x};function C(D,F,V,se){let X=[],Ve=null;return Object.keys(V).forEach(we=>{X=X.concat(V[we])}),D.forEach(we=>{Ve=[we].concat(F[we]),Ve.some(Te=>X.indexOf(Te)!==-1)||V[se].push(we)}),X}function A(D){return e.getOptions().hiddenOptions.indexOf(D)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}r.showHelp=D=>{let F=e.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:F[D])(r.help())},r.functionDescription=D=>["(",D.name?t.Parser.decamelize(D.name,"-"):n("generated-value"),")"].join(""),r.stringifiedValues=function(F,V){let se="",X=V||", ",Ve=[].concat(F);return!F||!Ve.length||Ve.forEach(we=>{se.length&&(se+=X),se+=JSON.stringify(we)}),se};function T(D,F){let V=`[${n("default:")} `;if(D===void 0&&!F)return null;if(F)V+=F;else switch(typeof D){case"string":V+=`"${D}"`;break;case"object":V+=JSON.stringify(D);break;default:V+=D}return`${V}]`}function z(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let M=null;r.version=D=>{M=D},r.showVersion=D=>{let F=e.getInternalMethods().getLoggerInstance();D||(D="error"),(typeof D=="function"?D:F[D])(M)},r.reset=function(F){return s=null,l=!1,u=[],c=!1,m=[],f=[],p=[],d=as(d,V=>!F[V]),r};let U=[];return r.freeze=function(){U.push({failMessage:s,failureOutput:l,usages:u,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d})},r.unfreeze=function(F=!1){let V=U.pop();V&&(F?(d={...V.descriptions,...d},p=[...V.commands,...p],u=[...V.usages,...u],f=[...V.examples,...f],m=[...V.epilogs,...m]):{failMessage:s,failureOutput:l,usages:u,usageDisabled:c,epilogs:m,examples:f,commands:p,descriptions:d}=V)},r}function Og(e){return typeof e=="object"}function XD(e,t){return Og(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function IS(e){return Og(e)?e.indentation:0}function cp(e){return Og(e)?e.text:e}var TS=`###-begin-{{app_name}}-completions-###
418
+ #
419
+ # yargs command completion script
420
+ #
421
+ # Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
422
+ # or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
423
+ #
424
+ _{{app_name}}_yargs_completions()
425
+ {
426
+ local cur_word args type_list
427
+
428
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
429
+ args=("\${COMP_WORDS[@]}")
430
+
431
+ # ask yargs to generate completions.
432
+ type_list=$({{app_path}} --get-yargs-completions "\${args[@]}")
433
+
434
+ COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) )
435
+
436
+ # if no match was found, fall back to filename completion
437
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
438
+ COMPREPLY=()
439
+ fi
440
+
441
+ return 0
442
+ }
443
+ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
444
+ ###-end-{{app_name}}-completions-###
445
+ `,AS=`#compdef {{app_name}}
446
+ ###-begin-{{app_name}}-completions-###
447
+ #
448
+ # yargs command completion script
449
+ #
450
+ # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
451
+ # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
452
+ #
453
+ _{{app_name}}_yargs_completions()
454
+ {
455
+ local reply
456
+ local si=$IFS
457
+ IFS=$'
458
+ ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
459
+ IFS=$si
460
+ _describe 'values' reply
461
+ }
462
+ compdef _{{app_name}}_yargs_completions {{app_name}}
463
+ ###-end-{{app_name}}-completions-###
464
+ `;var Eg=class{constructor(t,n,r,i){var s,o,a;this.yargs=t,this.usage=n,this.command=r,this.shim=i,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(a=((s=this.shim.getEnv("SHELL"))===null||s===void 0?void 0:s.includes("zsh"))||((o=this.shim.getEnv("ZSH_NAME"))===null||o===void 0?void 0:o.includes("zsh")))!==null&&a!==void 0?a:!1}defaultCompletion(t,n,r,i){let s=this.command.getCommandHandlers();for(let a=0,l=t.length;a<l;++a)if(s[t[a]]&&s[t[a]].builder){let u=s[t[a]].builder;if(up(u)){this.indexAfterLastReset=a+1;let c=this.yargs.getInternalMethods().reset();return u(c,!0),c.argv}}let o=[];this.commandCompletions(o,t,r),this.optionCompletions(o,t,n,r),this.choicesFromOptionsCompletions(o,t,n,r),this.choicesFromPositionalsCompletions(o,t,n,r),i(null,o)}commandCompletions(t,n,r){let i=this.yargs.getInternalMethods().getContext().commands;!r.match(/^-/)&&i[i.length-1]!==r&&!this.previousArgHasChoices(n)&&this.usage.getCommands().forEach(s=>{let o=os(s[0]).cmd;if(n.indexOf(o)===-1)if(!this.zshShell)t.push(o);else{let a=s[1]||"";t.push(o.replace(/:/g,"\\:")+":"+a)}})}optionCompletions(t,n,r,i){if((i.match(/^-/)||i===""&&t.length===0)&&!this.previousArgHasChoices(n)){let s=this.yargs.getOptions(),o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(s.key).forEach(a=>{let l=!!s.configuration["boolean-negation"]&&s.boolean.includes(a);!o.includes(a)&&!s.hiddenOptions.includes(a)&&!this.argsContainKey(n,a,l)&&this.completeOptionKey(a,t,i,l&&!!s.default[a])})}}choicesFromOptionsCompletions(t,n,r,i){if(this.previousArgHasChoices(n)){let s=this.getPreviousArgChoices(n);s&&s.length>0&&t.push(...s.map(o=>o.replace(/:/g,"\\:")))}}choicesFromPositionalsCompletions(t,n,r,i){if(i===""&&t.length>0&&this.previousArgHasChoices(n))return;let s=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],o=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),a=s[r._.length-o-1];if(!a)return;let l=this.yargs.getOptions().choices[a]||[];for(let u of l)u.startsWith(i)&&t.push(u.replace(/:/g,"\\:"))}getPreviousArgChoices(t){if(t.length<1)return;let n=t[t.length-1],r="";if(!n.startsWith("-")&&t.length>1&&(r=n,n=t[t.length-2]),!n.startsWith("-"))return;let i=n.replace(/^-+/,""),s=this.yargs.getOptions(),o=[i,...this.yargs.getAliases()[i]||[]],a;for(let l of o)if(Object.prototype.hasOwnProperty.call(s.key,l)&&Array.isArray(s.choices[l])){a=s.choices[l];break}if(a)return a.filter(l=>!r||l.startsWith(r))}previousArgHasChoices(t){let n=this.getPreviousArgChoices(t);return n!==void 0&&n.length>0}argsContainKey(t,n,r){let i=s=>t.indexOf((/^[^0-9]$/.test(s)?"-":"--")+s)!==-1;if(i(n)||r&&i(`no-${n}`))return!0;if(this.aliases){for(let s of this.aliases[n])if(i(s))return!0}return!1}completeOptionKey(t,n,r,i){var s,o,a,l;let u=t;if(this.zshShell){let d=this.usage.getDescriptions(),m=(o=(s=this===null||this===void 0?void 0:this.aliases)===null||s===void 0?void 0:s[t])===null||o===void 0?void 0:o.find(h=>{let g=d[h];return typeof g=="string"&&g.length>0}),y=m?d[m]:void 0,v=(l=(a=d[t])!==null&&a!==void 0?a:y)!==null&&l!==void 0?l:"";u=`${t.replace(/:/g,"\\:")}:${v.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`}let c=d=>/^--/.test(d),f=d=>/^[^0-9]$/.test(d),p=!c(r)&&f(t)?"-":"--";n.push(p+u),i&&n.push(p+"no-"+u)}customCompletion(t,n,r,i){if(dn(this.customCompletionFunction,null,this.shim),ZD(this.customCompletionFunction)){let s=this.customCompletionFunction(r,n);return at(s)?s.then(o=>{this.shim.process.nextTick(()=>{i(null,o)})}).catch(o=>{this.shim.process.nextTick(()=>{i(o,void 0)})}):i(null,s)}else return QD(this.customCompletionFunction)?this.customCompletionFunction(r,n,(s=i)=>this.defaultCompletion(t,n,r,s),s=>{i(null,s)}):this.customCompletionFunction(r,n,s=>{i(null,s)})}getCompletion(t,n){let r=t.length?t[t.length-1]:"",i=this.yargs.parse(t,!0),s=this.customCompletionFunction?o=>this.customCompletion(t,o,r,n):o=>this.defaultCompletion(t,o,r,n);return at(i)?i.then(s):s(i)}generateCompletionScript(t,n){let r=this.zshShell?AS:TS,i=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),r=r.replace(/{{app_name}}/g,i),r=r.replace(/{{completion_command}}/g,n),r.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t}setParsed(t){this.aliases=t.aliases}};function LS(e,t,n,r){return new Eg(e,t,n,r)}function ZD(e){return e.length<3}function QD(e){return e.length>3}function NS(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)===e.charAt(i-1)?n[r][i]=n[r-1][i-1]:r>1&&i>1&&t.charAt(r-2)===e.charAt(i-1)&&t.charAt(r-1)===e.charAt(i-2)?n[r][i]=n[r-2][i-2]+1:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}var DS=["$0","--","_"];function kS(e,t,n){let r=n.y18n.__,i=n.y18n.__n,s={};s.nonOptionCount=function(f){let p=e.getDemandedCommands(),m=f._.length+(f["--"]?f["--"].length:0)-e.getInternalMethods().getContext().commands.length;p._&&(m<p._.min||m>p._.max)&&(m<p._.min?p._.minMsg!==void 0?t.fail(p._.minMsg?p._.minMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.min.toString()):null):t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",m,m.toString(),p._.min.toString())):m>p._.max&&(p._.maxMsg!==void 0?t.fail(p._.maxMsg?p._.maxMsg.replace(/\$0/g,m.toString()).replace(/\$1/,p._.max.toString()):null):t.fail(i("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",m,m.toString(),p._.max.toString()))))},s.positionalCount=function(f,p){p<f&&t.fail(i("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",p,p+"",f+""))},s.requiredArguments=function(f,p){let d=null;for(let m of Object.keys(p))(!Object.prototype.hasOwnProperty.call(f,m)||typeof f[m]>"u")&&(d=d||{},d[m]=p[m]);if(d){let m=[];for(let v of Object.keys(d)){let h=d[v];h&&m.indexOf(h)<0&&m.push(h)}let y=m.length?`
465
+ ${m.join(`
466
+ `)}`:"";t.fail(i("Missing required argument: %s","Missing required arguments: %s",Object.keys(d).length,Object.keys(d).join(", ")+y))}},s.unknownArguments=function(f,p,d,m,y=!0){var v;let h=e.getInternalMethods().getCommandInstance().getCommands(),g=[],w=e.getInternalMethods().getContext();if(Object.keys(f).forEach(x=>{!DS.includes(x)&&!Object.prototype.hasOwnProperty.call(d,x)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),x)&&!s.isValidAndSomeAliasIsNotNew(x,p)&&g.push(x)}),y&&(w.commands.length>0||h.length>0||m)&&f._.slice(w.commands.length).forEach(x=>{h.includes(""+x)||g.push(""+x)}),y){let C=((v=e.getDemandedCommands()._)===null||v===void 0?void 0:v.max)||0,A=w.commands.length+C;A<f._.length&&f._.slice(A).forEach(T=>{T=String(T),!w.commands.includes(T)&&!g.includes(T)&&g.push(T)})}g.length&&t.fail(i("Unknown argument: %s","Unknown arguments: %s",g.length,g.map(x=>x.trim()?x:`"${x}"`).join(", ")))},s.unknownCommands=function(f){let p=e.getInternalMethods().getCommandInstance().getCommands(),d=[],m=e.getInternalMethods().getContext();return(m.commands.length>0||p.length>0)&&f._.slice(m.commands.length).forEach(y=>{p.includes(""+y)||d.push(""+y)}),d.length>0?(t.fail(i("Unknown command: %s","Unknown commands: %s",d.length,d.join(", "))),!0):!1},s.isValidAndSomeAliasIsNotNew=function(f,p){if(!Object.prototype.hasOwnProperty.call(p,f))return!1;let d=e.parsed.newAliases;return[f,...p[f]].some(m=>!Object.prototype.hasOwnProperty.call(d,m)||!d[f])},s.limitedChoices=function(f){let p=e.getOptions(),d={};if(!Object.keys(p.choices).length)return;Object.keys(f).forEach(v=>{DS.indexOf(v)===-1&&Object.prototype.hasOwnProperty.call(p.choices,v)&&[].concat(f[v]).forEach(h=>{p.choices[v].indexOf(h)===-1&&h!==void 0&&(d[v]=(d[v]||[]).concat(h))})});let m=Object.keys(d);if(!m.length)return;let y=r("Invalid values:");m.forEach(v=>{y+=`
467
+ ${r("Argument: %s, Given: %s, Choices: %s",v,t.stringifiedValues(d[v]),t.stringifiedValues(p.choices[v]))}`}),t.fail(y)};let o={};s.implies=function(f,p){le("<string|object> [array|number|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{s.implies(d,f[d])}):(e.global(f),o[f]||(o[f]=[]),Array.isArray(p)?p.forEach(d=>s.implies(f,d)):(dn(p,void 0,n),o[f].push(p)))},s.getImplied=function(){return o};function a(c,f){let p=Number(f);return f=isNaN(p)?f:p,typeof f=="number"?f=c._.length>=f:f.match(/^--no-.+/)?(f=f.match(/^--no-(.+)/)[1],f=!Object.prototype.hasOwnProperty.call(c,f)):f=Object.prototype.hasOwnProperty.call(c,f),f}s.implications=function(f){let p=[];if(Object.keys(o).forEach(d=>{let m=d;(o[d]||[]).forEach(y=>{let v=m,h=y;v=a(f,v),y=a(f,y),v&&!y&&p.push(` ${m} -> ${h}`)})}),p.length){let d=`${r("Implications failed:")}
468
+ `;p.forEach(m=>{d+=m}),t.fail(d)}};let l={};s.conflicts=function(f,p){le("<string|object> [array|string]",[f,p],arguments.length),typeof f=="object"?Object.keys(f).forEach(d=>{s.conflicts(d,f[d])}):(e.global(f),l[f]||(l[f]=[]),Array.isArray(p)?p.forEach(d=>s.conflicts(f,d)):l[f].push(p))},s.getConflicting=()=>l,s.conflicting=function(f){Object.keys(f).forEach(p=>{l[p]&&l[p].forEach(d=>{d&&f[p]!==void 0&&f[d]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",p,d))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(l).forEach(p=>{l[p].forEach(d=>{d&&f[n.Parser.camelCase(p)]!==void 0&&f[n.Parser.camelCase(d)]!==void 0&&t.fail(r("Arguments %s and %s are mutually exclusive",p,d))})})},s.recommendCommands=function(f,p){p=p.sort((v,h)=>h.length-v.length);let m=null,y=1/0;for(let v=0,h;(h=p[v])!==void 0;v++){let g=NS(f,h);g<=3&&g<y&&(y=g,m=h)}m&&t.fail(r("Did you mean %s?",m))},s.reset=function(f){return o=as(o,p=>!f[p]),l=as(l,p=>!f[p]),s};let u=[];return s.freeze=function(){u.push({implied:o,conflicting:l})},s.unfreeze=function(){let f=u.pop();dn(f,void 0,n),{implied:o,conflicting:l}=f},s}var Ig=[],Mu;function Ru(e,t,n,r){Mu=r;let i={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return i;let s=/\.json|\..*rc$/.test(e.extends),o=null;if(s)o=tk(t,e.extends);else try{o=K.resolve(e.extends)}catch{return e}ek(o),Ig.push(o),i=s?JSON.parse(Mu.readFileSync(o,"utf8")):K(e.extends),delete e.extends,i=Ru(i,Mu.path.dirname(o),n,Mu)}return Ig=[],n?MS(i,e):Object.assign({},i,e)}function ek(e){if(Ig.indexOf(e)>-1)throw new ot(`Circular extended configurations: '${e}'.`)}function tk(e,t){return Mu.path.resolve(e,t)}function MS(e,t){let n={};function r(i){return i&&typeof i=="object"&&!Array.isArray(i)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=MS(e[i],t[i]):n[i]=t[i];return n}var ce=function(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n},S=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Ct,Lo,Vu,rr,Rn,fp,us,No,pp,ir,dp,sr,ni,Vn,or,mp,Ya,Ut,me,hp,gp,jn,Do,Xa,ko,cs,yp,Ee,Mo,Ro,Vo,Pe,vp,ri,wt;function t_(e){return(t=[],n=e.process.cwd(),r)=>{let i=new jg(t,n,r,e);return Object.defineProperty(i,"argv",{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}var RS=Symbol("copyDoubleDash"),VS=Symbol("copyDoubleDash"),Pg=Symbol("deleteFromParserHintObject"),jS=Symbol("emitWarning"),BS=Symbol("freeze"),US=Symbol("getDollarZero"),jo=Symbol("getParserConfiguration"),FS=Symbol("getUsageConfiguration"),Tg=Symbol("guessLocale"),WS=Symbol("guessVersion"),zS=Symbol("parsePositionalNumbers"),Ag=Symbol("pkgUp"),fs=Symbol("populateParserHintArray"),Ja=Symbol("populateParserHintSingleValueDictionary"),Lg=Symbol("populateParserHintArrayDictionary"),Ng=Symbol("populateParserHintDictionary"),Dg=Symbol("sanitizeKey"),kg=Symbol("setKey"),Mg=Symbol("unfreeze"),GS=Symbol("validateAsync"),$S=Symbol("getCommandInstance"),HS=Symbol("getContext"),qS=Symbol("getHasOutput"),KS=Symbol("getLoggerInstance"),YS=Symbol("getParseContext"),XS=Symbol("getUsageInstance"),JS=Symbol("getValidationInstance"),wp=Symbol("hasParseCallback"),ZS=Symbol("isGlobalContext"),Bo=Symbol("postProcess"),QS=Symbol("rebase"),Rg=Symbol("reset"),ju=Symbol("runYargsParserAndExecuteCommands"),Vg=Symbol("runValidation"),e_=Symbol("setHasOutput"),Uo=Symbol("kTrackManuallySetKeys"),jg=class{constructor(t=[],n,r,i){this.customScriptName=!1,this.parsed=!1,Ct.set(this,void 0),Lo.set(this,void 0),Vu.set(this,{commands:[],fullCommands:[]}),rr.set(this,null),Rn.set(this,null),fp.set(this,"show-hidden"),us.set(this,null),No.set(this,!0),pp.set(this,{}),ir.set(this,!0),dp.set(this,[]),sr.set(this,void 0),ni.set(this,{}),Vn.set(this,!1),or.set(this,null),mp.set(this,!0),Ya.set(this,void 0),Ut.set(this,""),me.set(this,void 0),hp.set(this,void 0),gp.set(this,{}),jn.set(this,null),Do.set(this,null),Xa.set(this,{}),ko.set(this,{}),cs.set(this,void 0),yp.set(this,!1),Ee.set(this,void 0),Mo.set(this,!1),Ro.set(this,!1),Vo.set(this,!1),Pe.set(this,void 0),vp.set(this,{}),ri.set(this,null),wt.set(this,void 0),ce(this,Ee,i,"f"),ce(this,cs,t,"f"),ce(this,Lo,n,"f"),ce(this,hp,r,"f"),ce(this,sr,new lp(this),"f"),this.$0=this[US](),this[Rg](),ce(this,Ct,S(this,Ct,"f"),"f"),ce(this,Pe,S(this,Pe,"f"),"f"),ce(this,wt,S(this,wt,"f"),"f"),ce(this,me,S(this,me,"f"),"f"),S(this,me,"f").showHiddenOpt=S(this,fp,"f"),ce(this,Ya,this[VS](),"f")}addHelpOpt(t,n){let r="help";return le("[string|boolean] [string]",[t,n],arguments.length),S(this,or,"f")&&(this[Pg](S(this,or,"f")),ce(this,or,null,"f")),t===!1&&n===void 0?this:(ce(this,or,typeof t=="string"?t:r,"f"),this.boolean(S(this,or,"f")),this.describe(S(this,or,"f"),n||S(this,Pe,"f").deferY18nLookup("Show help")),this)}help(t,n){return this.addHelpOpt(t,n)}addShowHiddenOpt(t,n){if(le("[string|boolean] [string]",[t,n],arguments.length),t===!1&&n===void 0)return this;let r=typeof t=="string"?t:S(this,fp,"f");return this.boolean(r),this.describe(r,n||S(this,Pe,"f").deferY18nLookup("Show hidden options")),S(this,me,"f").showHiddenOpt=r,this}showHidden(t,n){return this.addShowHiddenOpt(t,n)}alias(t,n){return le("<object|string|array> [string|array]",[t,n],arguments.length),this[Lg](this.alias.bind(this),"alias",t,n),this}array(t){return le("<array|string>",[t],arguments.length),this[fs]("array",t),this[Uo](t),this}boolean(t){return le("<array|string>",[t],arguments.length),this[fs]("boolean",t),this[Uo](t),this}check(t,n){return le("<function> [boolean]",[t,n],arguments.length),this.middleware((r,i)=>Ao(()=>t(r,i.getOptions()),s=>(s?(typeof s=="string"||s instanceof Error)&&S(this,Pe,"f").fail(s.toString(),s):S(this,Pe,"f").fail(S(this,Ee,"f").y18n.__("Argument check failed: %s",t.toString())),r),s=>(S(this,Pe,"f").fail(s.message?s.message:s.toString(),s),r)),!1,n),this}choices(t,n){return le("<object|string|array> [string|array]",[t,n],arguments.length),this[Lg](this.choices.bind(this),"choices",t,n),this}coerce(t,n){if(le("<object|string|array> [function]",[t,n],arguments.length),Array.isArray(t)){if(!n)throw new ot("coerce callback must be provided");for(let r of t)this.coerce(r,n);return this}else if(typeof t=="object"){for(let r of Object.keys(t))this.coerce(r,t[r]);return this}if(!n)throw new ot("coerce callback must be provided");return S(this,me,"f").key[t]=!0,S(this,sr,"f").addCoerceMiddleware((r,i)=>{let s;return Object.prototype.hasOwnProperty.call(r,t)?Ao(()=>(s=i.getAliases(),n(r[t])),a=>{r[t]=a;let l=i.getInternalMethods().getParserConfiguration()["strip-aliased"];if(s[t]&&l!==!0)for(let u of s[t])r[u]=a;return r},a=>{throw new ot(a.message)}):r},t),this}conflicts(t,n){return le("<string|object> [string|array]",[t,n],arguments.length),S(this,wt,"f").conflicts(t,n),this}config(t="config",n,r){return le("[object|string] [string|function] [function]",[t,n,r],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=Ru(t,S(this,Lo,"f"),this[jo]()["deep-merge-config"]||!1,S(this,Ee,"f")),S(this,me,"f").configObjects=(S(this,me,"f").configObjects||[]).concat(t),this):(typeof n=="function"&&(r=n,n=void 0),this.describe(t,n||S(this,Pe,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(i=>{S(this,me,"f").config[i]=r||!0}),this)}completion(t,n,r){return le("[string] [string|boolean|function] [function]",[t,n,r],arguments.length),typeof n=="function"&&(r=n,n=void 0),ce(this,Rn,t||S(this,Rn,"f")||"completion","f"),!n&&n!==!1&&(n="generate completion script"),this.command(S(this,Rn,"f"),n),r&&S(this,rr,"f").registerFunction(r),this}command(t,n,r,i,s,o){return le("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,n,r,i,s,o],arguments.length),S(this,Ct,"f").addHandler(t,n,r,i,s,o),this}commands(t,n,r,i,s,o){return this.command(t,n,r,i,s,o)}commandDir(t,n){le("<string> [object]",[t,n],arguments.length);let r=S(this,hp,"f")||S(this,Ee,"f").require;return S(this,Ct,"f").addDirectory(t,r,S(this,Ee,"f").getCallerFile(),n),this}count(t){return le("<array|string>",[t],arguments.length),this[fs]("count",t),this[Uo](t),this}default(t,n,r){return le("<object|string|array> [*] [string]",[t,n,r],arguments.length),r&&(_g(t,S(this,Ee,"f")),S(this,me,"f").defaultDescription[t]=r),typeof n=="function"&&(_g(t,S(this,Ee,"f")),S(this,me,"f").defaultDescription[t]||(S(this,me,"f").defaultDescription[t]=S(this,Pe,"f").functionDescription(n)),n=n.call()),this[Ja](this.default.bind(this),"default",t,n),this}defaults(t,n,r){return this.default(t,n,r)}demandCommand(t=1,n,r,i){return le("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,n,r,i],arguments.length),typeof n!="number"&&(r=n,n=1/0),this.global("_",!1),S(this,me,"f").demandedCommands._={min:t,max:n,minMsg:r,maxMsg:i},this}demand(t,n,r){return Array.isArray(n)?(n.forEach(i=>{dn(r,!0,S(this,Ee,"f")),this.demandOption(i,r)}),n=1/0):typeof n!="number"&&(r=n,n=1/0),typeof t=="number"?(dn(r,!0,S(this,Ee,"f")),this.demandCommand(t,n,r,r)):Array.isArray(t)?t.forEach(i=>{dn(r,!0,S(this,Ee,"f")),this.demandOption(i,r)}):typeof r=="string"?this.demandOption(t,r):(r===!0||typeof r>"u")&&this.demandOption(t),this}demandOption(t,n){return le("<object|string|array> [string]",[t,n],arguments.length),this[Ja](this.demandOption.bind(this),"demandedOptions",t,n),this}deprecateOption(t,n){return le("<string> [string|boolean]",[t,n],arguments.length),S(this,me,"f").deprecatedOptions[t]=n,this}describe(t,n){return le("<object|string|array> [string]",[t,n],arguments.length),this[kg](t,!0),S(this,Pe,"f").describe(t,n),this}detectLocale(t){return le("<boolean>",[t],arguments.length),ce(this,No,t,"f"),this}env(t){return le("[string|boolean]",[t],arguments.length),t===!1?delete S(this,me,"f").envPrefix:S(this,me,"f").envPrefix=t||"",this}epilogue(t){return le("<string>",[t],arguments.length),S(this,Pe,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,n){return le("<string|array> [string]",[t,n],arguments.length),Array.isArray(t)?t.forEach(r=>this.example(...r)):S(this,Pe,"f").example(t,n),this}exit(t,n){ce(this,Vn,!0,"f"),ce(this,us,n,"f"),S(this,ir,"f")&&S(this,Ee,"f").process.exit(t)}exitProcess(t=!0){return le("[boolean]",[t],arguments.length),ce(this,ir,t,"f"),this}fail(t){if(le("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new ot("Invalid first argument. Expected function or boolean 'false'");return S(this,Pe,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,n){return le("<array> [function]",[t,n],arguments.length),n?S(this,rr,"f").getCompletion(t,n):new Promise((r,i)=>{S(this,rr,"f").getCompletion(t,(s,o)=>{s?i(s):r(o)})})}getDemandedOptions(){return le([],0),S(this,me,"f").demandedOptions}getDemandedCommands(){return le([],0),S(this,me,"f").demandedCommands}getDeprecatedOptions(){return le([],0),S(this,me,"f").deprecatedOptions}getDetectLocale(){return S(this,No,"f")}getExitProcess(){return S(this,ir,"f")}getGroups(){return Object.assign({},S(this,ni,"f"),S(this,ko,"f"))}getHelp(){if(ce(this,Vn,!0,"f"),!S(this,Pe,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[ju](S(this,cs,"f"),void 0,void 0,0,!0);if(at(n))return n.then(()=>S(this,Pe,"f").help())}let t=S(this,Ct,"f").runDefaultBuilderOn(this);if(at(t))return t.then(()=>S(this,Pe,"f").help())}return Promise.resolve(S(this,Pe,"f").help())}getOptions(){return S(this,me,"f")}getStrict(){return S(this,Mo,"f")}getStrictCommands(){return S(this,Ro,"f")}getStrictOptions(){return S(this,Vo,"f")}global(t,n){return le("<string|array> [boolean]",[t,n],arguments.length),t=[].concat(t),n!==!1?S(this,me,"f").local=S(this,me,"f").local.filter(r=>t.indexOf(r)===-1):t.forEach(r=>{S(this,me,"f").local.includes(r)||S(this,me,"f").local.push(r)}),this}group(t,n){le("<string|array> <string>",[t,n],arguments.length);let r=S(this,ko,"f")[n]||S(this,ni,"f")[n];S(this,ko,"f")[n]&&delete S(this,ko,"f")[n];let i={};return S(this,ni,"f")[n]=(r||[]).concat(t).filter(s=>i[s]?!1:i[s]=!0),this}hide(t){return le("<string>",[t],arguments.length),S(this,me,"f").hiddenOptions.push(t),this}implies(t,n){return le("<string|object> [number|string|array]",[t,n],arguments.length),S(this,wt,"f").implies(t,n),this}locale(t){return le("[string]",[t],arguments.length),t===void 0?(this[Tg](),S(this,Ee,"f").y18n.getLocale()):(ce(this,No,!1,"f"),S(this,Ee,"f").y18n.setLocale(t),this)}middleware(t,n,r){return S(this,sr,"f").addMiddleware(t,!!n,r)}nargs(t,n){return le("<string|object|array> [number]",[t,n],arguments.length),this[Ja](this.nargs.bind(this),"narg",t,n),this}normalize(t){return le("<array|string>",[t],arguments.length),this[fs]("normalize",t),this}number(t){return le("<array|string>",[t],arguments.length),this[fs]("number",t),this[Uo](t),this}option(t,n){if(le("<string|object> [object]",[t,n],arguments.length),typeof t=="object")Object.keys(t).forEach(r=>{this.options(r,t[r])});else{typeof n!="object"&&(n={}),this[Uo](t),S(this,ri,"f")&&(t==="version"||n?.alias==="version")&&this[jS](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
469
+ `),void 0,"versionWarning"),S(this,me,"f").key[t]=!0,n.alias&&this.alias(t,n.alias);let r=n.deprecate||n.deprecated;r&&this.deprecateOption(t,r);let i=n.demand||n.required||n.require;i&&this.demand(t,i),n.demandOption&&this.demandOption(t,typeof n.demandOption=="string"?n.demandOption:void 0),n.conflicts&&this.conflicts(t,n.conflicts),"default"in n&&this.default(t,n.default),n.implies!==void 0&&this.implies(t,n.implies),n.nargs!==void 0&&this.nargs(t,n.nargs),n.config&&this.config(t,n.configParser),n.normalize&&this.normalize(t),n.choices&&this.choices(t,n.choices),n.coerce&&this.coerce(t,n.coerce),n.group&&this.group(t,n.group),(n.boolean||n.type==="boolean")&&(this.boolean(t),n.alias&&this.boolean(n.alias)),(n.array||n.type==="array")&&(this.array(t),n.alias&&this.array(n.alias)),(n.number||n.type==="number")&&(this.number(t),n.alias&&this.number(n.alias)),(n.string||n.type==="string")&&(this.string(t),n.alias&&this.string(n.alias)),(n.count||n.type==="count")&&this.count(t),typeof n.global=="boolean"&&this.global(t,n.global),n.defaultDescription&&(S(this,me,"f").defaultDescription[t]=n.defaultDescription),n.skipValidation&&this.skipValidation(t);let s=n.describe||n.description||n.desc,o=S(this,Pe,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(o,t)||typeof s=="string")&&this.describe(t,s),n.hidden&&this.hide(t),n.requiresArg&&this.requiresArg(t)}return this}options(t,n){return this.option(t,n)}parse(t,n,r){le("[string|array] [function|boolean|object] [function]",[t,n,r],arguments.length),this[BS](),typeof t>"u"&&(t=S(this,cs,"f")),typeof n=="object"&&(ce(this,Do,n,"f"),n=r),typeof n=="function"&&(ce(this,jn,n,"f"),n=!1),n||ce(this,cs,t,"f"),S(this,jn,"f")&&ce(this,ir,!1,"f");let i=this[ju](t,!!n),s=this.parsed;return S(this,rr,"f").setParsed(this.parsed),at(i)?i.then(o=>(S(this,jn,"f")&&S(this,jn,"f").call(this,S(this,us,"f"),o,S(this,Ut,"f")),o)).catch(o=>{throw S(this,jn,"f")&&S(this,jn,"f")(o,this.parsed.argv,S(this,Ut,"f")),o}).finally(()=>{this[Mg](),this.parsed=s}):(S(this,jn,"f")&&S(this,jn,"f").call(this,S(this,us,"f"),i,S(this,Ut,"f")),this[Mg](),this.parsed=s,i)}parseAsync(t,n,r){let i=this.parse(t,n,r);return at(i)?i:Promise.resolve(i)}parseSync(t,n,r){let i=this.parse(t,n,r);if(at(i))throw new ot(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return i}parserConfiguration(t){return le("<object>",[t],arguments.length),ce(this,gp,t,"f"),this}pkgConf(t,n){le("<string> [string]",[t,n],arguments.length);let r=null,i=this[Ag](n||S(this,Lo,"f"));return i[t]&&typeof i[t]=="object"&&(r=Ru(i[t],n||S(this,Lo,"f"),this[jo]()["deep-merge-config"]||!1,S(this,Ee,"f")),S(this,me,"f").configObjects=(S(this,me,"f").configObjects||[]).concat(r)),this}positional(t,n){le("<string> <object>",[t,n],arguments.length);let r=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];n=as(n,(o,a)=>o==="type"&&!["string","number","boolean"].includes(a)?!1:r.includes(o));let i=S(this,Vu,"f").fullCommands[S(this,Vu,"f").fullCommands.length-1],s=i?S(this,Ct,"f").cmdToParseOptions(i):{array:[],alias:{},default:{},demand:{}};return qa(s).forEach(o=>{let a=s[o];Array.isArray(a)?a.indexOf(t)!==-1&&(n[o]=!0):a[t]&&!(o in n)&&(n[o]=a[t])}),this.group(t,S(this,Pe,"f").getPositionalGroupName()),this.option(t,n)}recommendCommands(t=!0){return le("[boolean]",[t],arguments.length),ce(this,yp,t,"f"),this}required(t,n,r){return this.demand(t,n,r)}require(t,n,r){return this.demand(t,n,r)}requiresArg(t){return le("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&S(this,me,"f").narg[t]?this:(this[Ja](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,n){return le("[string] [string]",[t,n],arguments.length),t=t||this.$0,S(this,Ya,"f").log(S(this,rr,"f").generateCompletionScript(t,n||S(this,Rn,"f")||"completion")),this}showHelp(t){if(le("[string|function]",[t],arguments.length),ce(this,Vn,!0,"f"),!S(this,Pe,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[ju](S(this,cs,"f"),void 0,void 0,0,!0);if(at(r))return r.then(()=>{S(this,Pe,"f").showHelp(t)}),this}let n=S(this,Ct,"f").runDefaultBuilderOn(this);if(at(n))return n.then(()=>{S(this,Pe,"f").showHelp(t)}),this}return S(this,Pe,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,n){return le("[boolean|string] [string]",[t,n],arguments.length),S(this,Pe,"f").showHelpOnFail(t,n),this}showVersion(t){return le("[string|function]",[t],arguments.length),S(this,Pe,"f").showVersion(t),this}skipValidation(t){return le("<array|string>",[t],arguments.length),this[fs]("skipValidation",t),this}strict(t){return le("[boolean]",[t],arguments.length),ce(this,Mo,t!==!1,"f"),this}strictCommands(t){return le("[boolean]",[t],arguments.length),ce(this,Ro,t!==!1,"f"),this}strictOptions(t){return le("[boolean]",[t],arguments.length),ce(this,Vo,t!==!1,"f"),this}string(t){return le("<array|string>",[t],arguments.length),this[fs]("string",t),this[Uo](t),this}terminalWidth(){return le([],0),S(this,Ee,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return le("<object>",[t],arguments.length),ce(this,No,!1,"f"),S(this,Ee,"f").y18n.updateLocale(t),this}usage(t,n,r,i){if(le("<string|null|undefined> [string|boolean] [function|object] [function]",[t,n,r,i],arguments.length),n!==void 0){if(dn(t,null,S(this,Ee,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,n,r,i);throw new ot(".usage() description must start with $0 if being used as alias for .command()")}else return S(this,Pe,"f").usage(t),this}usageConfiguration(t){return le("<object>",[t],arguments.length),ce(this,vp,t,"f"),this}version(t,n,r){let i="version";if(le("[boolean|string] [string] [string]",[t,n,r],arguments.length),S(this,ri,"f")&&(this[Pg](S(this,ri,"f")),S(this,Pe,"f").version(void 0),ce(this,ri,null,"f")),arguments.length===0)r=this[WS](),t=i;else if(arguments.length===1){if(t===!1)return this;r=t,t=i}else arguments.length===2&&(r=n,n=void 0);return ce(this,ri,typeof t=="string"?t:i,"f"),n=n||S(this,Pe,"f").deferY18nLookup("Show version number"),S(this,Pe,"f").version(r||void 0),this.boolean(S(this,ri,"f")),this.describe(S(this,ri,"f"),n),this}wrap(t){return le("<number|null|undefined>",[t],arguments.length),S(this,Pe,"f").wrap(t),this}[(Ct=new WeakMap,Lo=new WeakMap,Vu=new WeakMap,rr=new WeakMap,Rn=new WeakMap,fp=new WeakMap,us=new WeakMap,No=new WeakMap,pp=new WeakMap,ir=new WeakMap,dp=new WeakMap,sr=new WeakMap,ni=new WeakMap,Vn=new WeakMap,or=new WeakMap,mp=new WeakMap,Ya=new WeakMap,Ut=new WeakMap,me=new WeakMap,hp=new WeakMap,gp=new WeakMap,jn=new WeakMap,Do=new WeakMap,Xa=new WeakMap,ko=new WeakMap,cs=new WeakMap,yp=new WeakMap,Ee=new WeakMap,Mo=new WeakMap,Ro=new WeakMap,Vo=new WeakMap,Pe=new WeakMap,vp=new WeakMap,ri=new WeakMap,wt=new WeakMap,RS)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[VS](){return{log:(...t)=>{this[wp]()||console.log(...t),ce(this,Vn,!0,"f"),S(this,Ut,"f").length&&ce(this,Ut,S(this,Ut,"f")+`
470
+ `,"f"),ce(this,Ut,S(this,Ut,"f")+t.join(" "),"f")},error:(...t)=>{this[wp]()||console.error(...t),ce(this,Vn,!0,"f"),S(this,Ut,"f").length&&ce(this,Ut,S(this,Ut,"f")+`
471
+ `,"f"),ce(this,Ut,S(this,Ut,"f")+t.join(" "),"f")}}}[Pg](t){qa(S(this,me,"f")).forEach(n=>{if((i=>i==="configObjects")(n))return;let r=S(this,me,"f")[n];Array.isArray(r)?r.includes(t)&&r.splice(r.indexOf(t),1):typeof r=="object"&&delete r[t]}),delete S(this,Pe,"f").getDescriptions()[t]}[jS](t,n,r){S(this,pp,"f")[r]||(S(this,Ee,"f").process.emitWarning(t,n),S(this,pp,"f")[r]=!0)}[BS](){S(this,dp,"f").push({options:S(this,me,"f"),configObjects:S(this,me,"f").configObjects.slice(0),exitProcess:S(this,ir,"f"),groups:S(this,ni,"f"),strict:S(this,Mo,"f"),strictCommands:S(this,Ro,"f"),strictOptions:S(this,Vo,"f"),completionCommand:S(this,Rn,"f"),output:S(this,Ut,"f"),exitError:S(this,us,"f"),hasOutput:S(this,Vn,"f"),parsed:this.parsed,parseFn:S(this,jn,"f"),parseContext:S(this,Do,"f")}),S(this,Pe,"f").freeze(),S(this,wt,"f").freeze(),S(this,Ct,"f").freeze(),S(this,sr,"f").freeze()}[US](){let t="",n;return/\b(node|iojs|electron)(\.exe)?$/.test(S(this,Ee,"f").process.argv()[0])?n=S(this,Ee,"f").process.argv().slice(1,2):n=S(this,Ee,"f").process.argv().slice(0,1),t=n.map(r=>{let i=this[QS](S(this,Lo,"f"),r);return r.match(/^(\/|([a-zA-Z]:)?\\)/)&&i.length<r.length?i:r}).join(" ").trim(),S(this,Ee,"f").getEnv("_")&&S(this,Ee,"f").getProcessArgvBin()===S(this,Ee,"f").getEnv("_")&&(t=S(this,Ee,"f").getEnv("_").replace(`${S(this,Ee,"f").path.dirname(S(this,Ee,"f").process.execPath())}/`,"")),t}[jo](){return S(this,gp,"f")}[FS](){return S(this,vp,"f")}[Tg](){if(!S(this,No,"f"))return;let t=S(this,Ee,"f").getEnv("LC_ALL")||S(this,Ee,"f").getEnv("LC_MESSAGES")||S(this,Ee,"f").getEnv("LANG")||S(this,Ee,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[WS](){return this[Ag]().version||"unknown"}[zS](t){let n=t["--"]?t["--"]:t._;for(let r=0,i;(i=n[r])!==void 0;r++)S(this,Ee,"f").Parser.looksLikeNumber(i)&&Number.isSafeInteger(Math.floor(parseFloat(`${i}`)))&&(n[r]=Number(i));return t}[Ag](t){let n=t||"*";if(S(this,Xa,"f")[n])return S(this,Xa,"f")[n];let r={};try{let i=t||S(this,Ee,"f").mainFilename;!t&&S(this,Ee,"f").path.extname(i)&&(i=S(this,Ee,"f").path.dirname(i));let s=S(this,Ee,"f").findUp(i,(o,a)=>{if(a.includes("package.json"))return"package.json"});dn(s,void 0,S(this,Ee,"f")),r=JSON.parse(S(this,Ee,"f").readFileSync(s,"utf8"))}catch{}return S(this,Xa,"f")[n]=r||{},S(this,Xa,"f")[n]}[fs](t,n){n=[].concat(n),n.forEach(r=>{r=this[Dg](r),S(this,me,"f")[t].push(r)})}[Ja](t,n,r,i){this[Ng](t,n,r,i,(s,o,a)=>{S(this,me,"f")[s][o]=a})}[Lg](t,n,r,i){this[Ng](t,n,r,i,(s,o,a)=>{S(this,me,"f")[s][o]=(S(this,me,"f")[s][o]||[]).concat(a)})}[Ng](t,n,r,i,s){if(Array.isArray(r))r.forEach(o=>{t(o,i)});else if((o=>typeof o=="object")(r))for(let o of qa(r))t(o,r[o]);else s(n,this[Dg](r),i)}[Dg](t){return t==="__proto__"?"___proto___":t}[kg](t,n){return this[Ja](this[kg].bind(this),"key",t,n),this}[Mg](){var t,n,r,i,s,o,a,l,u,c,f,p;let d=S(this,dp,"f").pop();dn(d,void 0,S(this,Ee,"f"));let m;t=this,n=this,r=this,i=this,s=this,o=this,a=this,l=this,u=this,c=this,f=this,p=this,{options:{set value(y){ce(t,me,y,"f")}}.value,configObjects:m,exitProcess:{set value(y){ce(n,ir,y,"f")}}.value,groups:{set value(y){ce(r,ni,y,"f")}}.value,output:{set value(y){ce(i,Ut,y,"f")}}.value,exitError:{set value(y){ce(s,us,y,"f")}}.value,hasOutput:{set value(y){ce(o,Vn,y,"f")}}.value,parsed:this.parsed,strict:{set value(y){ce(a,Mo,y,"f")}}.value,strictCommands:{set value(y){ce(l,Ro,y,"f")}}.value,strictOptions:{set value(y){ce(u,Vo,y,"f")}}.value,completionCommand:{set value(y){ce(c,Rn,y,"f")}}.value,parseFn:{set value(y){ce(f,jn,y,"f")}}.value,parseContext:{set value(y){ce(p,Do,y,"f")}}.value}=d,S(this,me,"f").configObjects=m,S(this,Pe,"f").unfreeze(),S(this,wt,"f").unfreeze(),S(this,Ct,"f").unfreeze(),S(this,sr,"f").unfreeze()}[GS](t,n){return Ao(n,r=>(t(r),r))}getInternalMethods(){return{getCommandInstance:this[$S].bind(this),getContext:this[HS].bind(this),getHasOutput:this[qS].bind(this),getLoggerInstance:this[KS].bind(this),getParseContext:this[YS].bind(this),getParserConfiguration:this[jo].bind(this),getUsageConfiguration:this[FS].bind(this),getUsageInstance:this[XS].bind(this),getValidationInstance:this[JS].bind(this),hasParseCallback:this[wp].bind(this),isGlobalContext:this[ZS].bind(this),postProcess:this[Bo].bind(this),reset:this[Rg].bind(this),runValidation:this[Vg].bind(this),runYargsParserAndExecuteCommands:this[ju].bind(this),setHasOutput:this[e_].bind(this)}}[$S](){return S(this,Ct,"f")}[HS](){return S(this,Vu,"f")}[qS](){return S(this,Vn,"f")}[KS](){return S(this,Ya,"f")}[YS](){return S(this,Do,"f")||{}}[XS](){return S(this,Pe,"f")}[JS](){return S(this,wt,"f")}[wp](){return!!S(this,jn,"f")}[ZS](){return S(this,mp,"f")}[Bo](t,n,r,i){return r||at(t)||(n||(t=this[RS](t)),(this[jo]()["parse-positional-numbers"]||this[jo]()["parse-positional-numbers"]===void 0)&&(t=this[zS](t)),i&&(t=To(t,this,S(this,sr,"f").getMiddleware(),!1))),t}[Rg](t={}){ce(this,me,S(this,me,"f")||{},"f");let n={};n.local=S(this,me,"f").local||[],n.configObjects=S(this,me,"f").configObjects||[];let r={};n.local.forEach(o=>{r[o]=!0,(t[o]||[]).forEach(a=>{r[a]=!0})}),Object.assign(S(this,ko,"f"),Object.keys(S(this,ni,"f")).reduce((o,a)=>{let l=S(this,ni,"f")[a].filter(u=>!(u in r));return l.length>0&&(o[a]=l),o},{})),ce(this,ni,{},"f");let i=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],s=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return i.forEach(o=>{n[o]=(S(this,me,"f")[o]||[]).filter(a=>!r[a])}),s.forEach(o=>{n[o]=as(S(this,me,"f")[o],a=>!r[a])}),n.envPrefix=S(this,me,"f").envPrefix,ce(this,me,n,"f"),ce(this,Pe,S(this,Pe,"f")?S(this,Pe,"f").reset(r):PS(this,S(this,Ee,"f")),"f"),ce(this,wt,S(this,wt,"f")?S(this,wt,"f").reset(r):kS(this,S(this,Pe,"f"),S(this,Ee,"f")),"f"),ce(this,Ct,S(this,Ct,"f")?S(this,Ct,"f").reset():OS(S(this,Pe,"f"),S(this,wt,"f"),S(this,sr,"f"),S(this,Ee,"f")),"f"),S(this,rr,"f")||ce(this,rr,LS(this,S(this,Pe,"f"),S(this,Ct,"f"),S(this,Ee,"f")),"f"),S(this,sr,"f").reset(),ce(this,Rn,null,"f"),ce(this,Ut,"","f"),ce(this,us,null,"f"),ce(this,Vn,!1,"f"),this.parsed=!1,this}[QS](t,n){return S(this,Ee,"f").path.relative(t,n)}[ju](t,n,r,i=0,s=!1){let o=!!r||s;t=t||S(this,cs,"f"),S(this,me,"f").__=S(this,Ee,"f").y18n.__,S(this,me,"f").configuration=this[jo]();let a=!!S(this,me,"f").configuration["populate--"],l=Object.assign({},S(this,me,"f").configuration,{"populate--":!0}),u=S(this,Ee,"f").Parser.detailed(t,Object.assign({},S(this,me,"f"),{configuration:{"parse-positional-numbers":!1,...l}})),c=Object.assign(u.argv,S(this,Do,"f")),f,p=u.aliases,d=!1,m=!1;Object.keys(c).forEach(y=>{y===S(this,or,"f")&&c[y]?d=!0:y===S(this,ri,"f")&&c[y]&&(m=!0)}),c.$0=this.$0,this.parsed=u,i===0&&S(this,Pe,"f").clearCachedHelpMessage();try{if(this[Tg](),n)return this[Bo](c,a,!!r,!1);S(this,or,"f")&&[S(this,or,"f")].concat(p[S(this,or,"f")]||[]).filter(w=>w.length>1).includes(""+c._[c._.length-1])&&(c._.pop(),d=!0),ce(this,mp,!1,"f");let y=S(this,Ct,"f").getCommands(),v=S(this,rr,"f").completionKey in c,h=d||v||s;if(c._.length){if(y.length){let g;for(let w=i||0,x;c._[w]!==void 0;w++)if(x=String(c._[w]),y.includes(x)&&x!==S(this,Rn,"f")){let C=S(this,Ct,"f").runCommand(x,this,u,w+1,s,d||m||s);return this[Bo](C,a,!!r,!1)}else if(!g&&x!==S(this,Rn,"f")){g=x;break}!S(this,Ct,"f").hasDefaultCommand()&&S(this,yp,"f")&&g&&!h&&S(this,wt,"f").recommendCommands(g,y)}S(this,Rn,"f")&&c._.includes(S(this,Rn,"f"))&&!v&&(S(this,ir,"f")&&ls(!0),this.showCompletionScript(),this.exit(0))}if(S(this,Ct,"f").hasDefaultCommand()&&!h){let g=S(this,Ct,"f").runCommand(null,this,u,0,s,d||m||s);return this[Bo](g,a,!!r,!1)}if(v){S(this,ir,"f")&&ls(!0),t=[].concat(t);let g=t.slice(t.indexOf(`--${S(this,rr,"f").completionKey}`)+1);return S(this,rr,"f").getCompletion(g,(w,x)=>{if(w)throw new ot(w.message);(x||[]).forEach(C=>{S(this,Ya,"f").log(C)}),this.exit(0)}),this[Bo](c,!a,!!r,!1)}if(S(this,Vn,"f")||(d?(S(this,ir,"f")&&ls(!0),o=!0,this.showHelp("log"),this.exit(0)):m&&(S(this,ir,"f")&&ls(!0),o=!0,S(this,Pe,"f").showVersion("log"),this.exit(0))),!o&&S(this,me,"f").skipValidation.length>0&&(o=Object.keys(c).some(g=>S(this,me,"f").skipValidation.indexOf(g)>=0&&c[g]===!0)),!o){if(u.error)throw new ot(u.error.message);if(!v){let g=this[Vg](p,{},u.error);r||(f=To(c,this,S(this,sr,"f").getMiddleware(),!0)),f=this[GS](g,f??c),at(f)&&!r&&(f=f.then(()=>To(c,this,S(this,sr,"f").getMiddleware(),!1)))}}}catch(y){if(y instanceof ot)S(this,Pe,"f").fail(y.message,y);else throw y}return this[Bo](f??c,a,!!r,!0)}[Vg](t,n,r,i){let s={...this.getDemandedOptions()};return o=>{if(r)throw new ot(r.message);S(this,wt,"f").nonOptionCount(o),S(this,wt,"f").requiredArguments(o,s);let a=!1;S(this,Ro,"f")&&(a=S(this,wt,"f").unknownCommands(o)),S(this,Mo,"f")&&!a?S(this,wt,"f").unknownArguments(o,t,n,!!i):S(this,Vo,"f")&&S(this,wt,"f").unknownArguments(o,t,{},!1,!1),S(this,wt,"f").limitedChoices(o),S(this,wt,"f").implications(o),S(this,wt,"f").conflicting(o)}}[e_](){ce(this,Vn,!0,"f")}[Uo](t){if(typeof t=="string")S(this,me,"f").key[t]=!0;else for(let n of t)S(this,me,"f").key[n]=!0}};function ES(e){return!!e&&typeof e.getInternalMethods=="function"}var nk=t_(Sg),n_=nk;import Xk from"react";import{render as Jk}from"ink";import lt from"react";import{Box as qu,Text as si}from"ink";import Gg,{useContext as ak}from"react";import{Text as f_,Transform as lk}from"ink";var Ke="\x1B[",Bu="\x1B]",Za="\x07",xp=";",r_=process.env.TERM_PROGRAM==="Apple_Terminal",Ue={};Ue.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?Ke+(e+1)+"G":Ke+(t+1)+";"+(e+1)+"H"};Ue.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let n="";return e<0?n+=Ke+-e+"D":e>0&&(n+=Ke+e+"C"),t<0?n+=Ke+-t+"A":t>0&&(n+=Ke+t+"B"),n};Ue.cursorUp=(e=1)=>Ke+e+"A";Ue.cursorDown=(e=1)=>Ke+e+"B";Ue.cursorForward=(e=1)=>Ke+e+"C";Ue.cursorBackward=(e=1)=>Ke+e+"D";Ue.cursorLeft=Ke+"G";Ue.cursorSavePosition=r_?"\x1B7":Ke+"s";Ue.cursorRestorePosition=r_?"\x1B8":Ke+"u";Ue.cursorGetPosition=Ke+"6n";Ue.cursorNextLine=Ke+"E";Ue.cursorPrevLine=Ke+"F";Ue.cursorHide=Ke+"?25l";Ue.cursorShow=Ke+"?25h";Ue.eraseLines=e=>{let t="";for(let n=0;n<e;n++)t+=Ue.eraseLine+(n<e-1?Ue.cursorUp():"");return e&&(t+=Ue.cursorLeft),t};Ue.eraseEndLine=Ke+"K";Ue.eraseStartLine=Ke+"1K";Ue.eraseLine=Ke+"2K";Ue.eraseDown=Ke+"J";Ue.eraseUp=Ke+"1J";Ue.eraseScreen=Ke+"2J";Ue.scrollUp=Ke+"S";Ue.scrollDown=Ke+"T";Ue.clearScreen="\x1Bc";Ue.clearTerminal=process.platform==="win32"?`${Ue.eraseScreen}${Ke}0f`:`${Ue.eraseScreen}${Ke}3J${Ke}H`;Ue.beep=Za;Ue.link=(e,t)=>[Bu,"8",xp,xp,t,Za,e,Bu,"8",xp,xp,Za].join("");Ue.image=(e,t={})=>{let n=`${Bu}1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=";preserveAspectRatio=0"),n+":"+e.toString("base64")+Za};Ue.iTerm={setCwd:(e=process.cwd())=>`${Bu}50;CurrentDir=${e}${Za}`,annotation:(e,t={})=>{let n=`${Bu}1337;`,r=typeof t.x<"u",i=typeof t.y<"u";if((r||i)&&!(r&&i&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),n+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):n+=e,n+Za}};var i_=Ue;var Sp=Ar(c_(),1);function Fo(e,t,{target:n="stdout",...r}={}){return Sp.default[n]?i_.link(e,t):r.fallback===!1?e:typeof r.fallback=="function"?r.fallback(e,t):`${e} (\u200B${t}\u200B)`}Fo.isSupported=Sp.default.stdout;Fo.stderr=(e,t,n={})=>Fo(e,t,{target:"stderr",...n});Fo.stderr.isSupported=Sp.default.stderr;import{createContext as ok}from"react";var Ye=ok({lite:!1});var xt=({text:e,url:t,subtle:n})=>{let{lite:r}=ak(Ye);return Gg.createElement(f_,{color:r||n?void 0:"blueBright",bold:!0},Gg.createElement(lk,{transform:()=>Fo(e,t)},Gg.createElement(f_,null,e)))};function Li(e,t){if(e==null)throw new Error(t||"argument is null");return e}var Uu=class extends Error{constructor(t){super(`Unreachable case: ${t}`)}};var Wo=({env:e,appId:t})=>{let n;switch(e){case"dev":n="https://www.canva-dev.com/developers/app";break;case"staging":n="https://www.canva-staging.com/developers/app";break;case"prod":n="https://www.canva.com/developers/app";break;default:throw new Uu(e)}return t?`${n}/${t}`:`${n}s`},_p=e=>{let t,n=e.appId.toLowerCase();switch(e.env){case"dev":t=`https://app-${n}.canva-apps-dev.com`;break;case"staging":t=`https://app-${n}.canva-apps-staging.com`;break;case"prod":t=`https://app-${n}.canva-apps.com`;break;default:throw new Uu(e.env)}return t};import Hu,{useContext as Hk}from"react";import{Box as pC,Spacer as dC}from"ink";var p_="#8b3dff",Cp="grey",d_=[{color:"#00c4cc",pos:0},{pos:.5},{color:"#6420ff",pos:.9},{color:"#7d2ae7",pos:1}];import $u from"react";import{Text as zk,Newline as Gk}from"ink";var ii=Ar(S_(),1),l0=Ar(lC(),1);import jk from"react";import{Transform as Bk}from"ink";function o0({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var Vk=o0();function a0(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Vk,"")}var uC=e=>{if(e.name&&e.colors)throw new Error("The `name` and `colors` props are mutually exclusive");let t;if(e.name)t=l0.default[e.name];else if(e.colors)t=(0,l0.default)(e.colors);else throw new Error("Either `name` or `colors` prop must be provided");let n=r=>t.multiline(a0(r));return jk.createElement(Bk,{transform:n},e.children)};uC.propTypes={children:ii.default.oneOfType([ii.default.arrayOf(ii.default.node),ii.default.node]).isRequired,name:ii.default.oneOf(["cristal","teen","mind","morning","vice","passion","fruit","instagram","atlas","retro","summer","pastel","rainbow"]),colors:ii.default.arrayOf(ii.default.oneOfType([ii.default.string,ii.default.object]))};var cC=uC;import Uk,{useContext as Fk}from"react";import{Text as Wk}from"ink";var Lt=e=>{let{lite:t}=Fk(Ye);if(!t)return Uk.createElement(Wk,{...e})};var $k=({children:e})=>{let t=e.split(`
472
+ `).filter(n=>n.length>0);return $u.createElement(Lt,null,t.map((n,r)=>$u.createElement(zk,{key:r},n,$u.createElement(Gk,null))))},fC=()=>$u.createElement(cC,{colors:d_},$u.createElement($k,null,`
473
+ \u2584\u259F\u2580\u2580\u2580\u2584
474
+
475
+ \u2588\u259B \u259D\u2598 \u2584\u2584\u2596\u2584 \u2584 \u2584\u2584 \u2584 \u2597\u2580\u2596 \u2584\u2584\u2596\u2584
476
+
477
+ \u2588\u258C \u2597\u259F\u259B \u259F\u259B \u259F\u2588\u259E\u2597\u2588 \u259E\u2588 \u2597\u259B\u2584\u2588\u259B \u259F\u259B
478
+
479
+ \u259D\u259C\u2584\u2584\u2584\u259E\u2598\u2580\u2599\u259E\u259C\u2599\u259E\u2588\u2598 \u259D\u2599\u259E \u259C\u2599\u2598 \u2580\u2599\u259E\u259C\u2599\u259E
480
+ `));var Bn=({children:e})=>{let{lite:t}=Hk(Ye);return Hu.createElement(pC,{borderStyle:t?void 0:"round",margin:t?void 0:2,flexDirection:"column",borderColor:t?void 0:Cp},Hu.createElement(pC,{flexDirection:"row",paddingY:1},Hu.createElement(dC,null),Hu.createElement(fC,null),Hu.createElement(dC,null)),e)};import{useContext as qk}from"react";import{Text as Kk}from"ink";import Yk from"react";var bt=e=>{let{lite:t}=qk(Ye);return Yk.createElement(Kk,{bold:e.bold??!0,color:t?void 0:"cyanBright",italic:e.italic},e.children)};var hC=({lite:e})=>lt.createElement(Ye.Provider,{value:{lite:e}},lt.createElement(Bn,null,lt.createElement(qu,{flexDirection:"column",margin:.5},lt.createElement(si,null,lt.createElement(Lt,null,"\u{1F44B} "),lt.createElement(si,{bold:!0},"Welcome!")," Let\u2019s bring your Canva app to life."),lt.createElement(qu,{marginTop:1,flexDirection:"column"},lt.createElement(qu,{flexDirection:"column"},lt.createElement(si,null,"Run ",lt.createElement(bt,null,"canva apps create")," to create a new app"),lt.createElement(si,{dimColor:!0},"By creating an app, you agree to the"," ",lt.createElement(xt,{url:"https://www.canva.com/policies/canva-developer-terms/",text:"Canva Developer terms"}))),lt.createElement(qu,{marginTop:1},lt.createElement(si,null,"Run ",lt.createElement(bt,null,"canva apps list")," to view a list of your apps")),lt.createElement(qu,{borderStyle:e?void 0:"double",borderColor:e?void 0:"cyanBright",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",width:"98%",marginTop:1,marginX:2,paddingX:1},lt.createElement(si,{bold:!0},lt.createElement(Lt,null,"\u{1F4A1} "),"Tips"),lt.createElement(si,null," ","\u2022 For a list of all commands, run"," ",lt.createElement(bt,null,"canva --help")),lt.createElement(si,null," ","\u2022 View our Developer Documentation"," ",lt.createElement(xt,{url:"https://canva.dev",text:"Developer Documentation"})," ","for more information"),lt.createElement(si,null," ","\u2022 Examples of all components from"," ",lt.createElement(si,{bold:!0},"@canva/app-ui-kit")," are available in the"," ",lt.createElement(xt,{url:"https://www.canva.dev/docs/apps/app-ui-kit/storybook",text:"App UI Kit Storybook"})))))));var Zk=e=>{Jk(Xk.createElement(hC,{lite:e.lite}))},gC=e=>e.command(["welcome","$0"],"Welcome page",()=>{},t=>{Zk(t)});import u0 from"react";import{render as n5}from"ink";import Ku from"react";import{Box as Qk,Text as yC}from"ink";var Lp=e=>{let{lite:t}=Ku.useContext(Ye);return Ku.createElement(Qk,{borderStyle:t?void 0:"double",borderColor:t?void 0:"cyanBright",display:"flex",justifyContent:"center",alignItems:"center",width:"98%",marginTop:1,marginX:2,paddingX:1},Ku.createElement(yC,{bold:!0},Ku.createElement(Lt,null,"\u{1F4A1}")," Tip:"," "),Ku.createElement(yC,null," "),e.children)};import{Text as lr}from"ink";import Ze from"react";function e5(e,t){if(e.length===0)throw new Error("Unable to select random element from an empty array.");if(t)return e[t];let n=Math.floor(Math.random()*e.length);return e[n]}var t5=[Ze.createElement(lr,{key:"ui-kit"},"Use the ",Ze.createElement(xt,{text:"@canva/app-ui-kit",url:"https://www.npmjs.com/package/@canva/app-ui-kit"})," ","library to create apps that look and feel like the rest of Canva!"),Ze.createElement(lr,{key:"dam"},"Building a Digital Asset Management app? checkout the"," ",Ze.createElement(bt,{italic:!0},"SearchableListView")," component from"," ",Ze.createElement(xt,{text:"@canva/app-components",url:"https://www.npmjs.com/package/@canva/app-components"}),"."),Ze.createElement(lr,{key:"hmr"},"Enable"," ",Ze.createElement(xt,{text:"Hot Module Replacement (HMR)",url:"https://www.canva.dev/docs/apps/previewing-apps/#automatic"})," ","to automatically reload your app inside the Canva editor whenever your source code changes!"),Ze.createElement(lr,{key:"storybook"},"Examples of all available components from"," ",Ze.createElement(xt,{text:"@canva/app-ui-kit",url:"https://www.npmjs.com/package/@canva/app-ui-kit"})," are available in the"," ",Ze.createElement(xt,{text:"App UI Kit Storybook",url:"https://www.canva.dev/docs/apps/app-ui-kit/storybook"}),"."),Ze.createElement(lr,{key:"discourse"},"Sign up to our ",Ze.createElement(xt,{text:"Community forum",url:"https://community.canva.dev"})," to be involved in our community and network with fellow App Builders!"),Ze.createElement(lr,{key:"design-guidelines"},"Checkout our ",Ze.createElement(xt,{text:"Design Guidelines",url:"https://www.canva.dev/docs/apps/design-guidelines/"})," ","to ensure your app complies, and help you speed through our app review process!"),Ze.createElement(lr,{key:"starter-kit"},"Explore the various example apps we have in our"," ",Ze.createElement(xt,{text:"Apps SDK Starter Kit",url:"https://github.com/canva-sdks/canva-apps-sdk-starter-kit/tree/main"})," by running the command ",Ze.createElement(bt,null,"npm start examples"),"."),Ze.createElement(lr,{key:"mobile"},"To test your app locally on a mobile device, you need to build your app and upload it as a Javascript bundle in the developer portal. The local development URL won't work when testing on mobile."),Ze.createElement(lr,{key:"submit"},"Once you're ready to submit your app, run the"," ",Ze.createElement(bt,null,"npm run build")," command, to generate a Javascript bundle to upload via the"," ",Ze.createElement(xt,{text:"Developer Portal",url:Wo({env:"prod"})}),"."),Ze.createElement(lr,{key:"getting-featured"},"Want to get featured on the apps marketplace? Checkout this article on"," ",Ze.createElement(xt,{text:"how to get featured",url:"https://www.canva.dev/docs/apps/getting-featured/"}),"."),Ze.createElement(lr,{key:"deep-linking"},"Did you know you can create URLs that link users directly to the Canva editor with your app? To find our more, checkout this article on"," ",Ze.createElement(xt,{text:"deep linking",url:"https://www.canva.dev/docs/apps/deep-linking/"}),"."),Ze.createElement(lr,{key:"docs"},"View our Developer Documentation"," ",Ze.createElement(xt,{url:"https://canva.dev",text:"Developer Documentation"})," to learn more about our Canva Developers platform.")],Np=e=>e5(t5,e);var r5=async e=>{let t=await e.argv;n5(u0.createElement(Ye.Provider,{value:{lite:t.lite}},u0.createElement(Bn,null,u0.createElement(Lp,null,Np()))))},vC=e=>e.command(["tip","tips"],"Get a random tip or trick",()=>{r5(e)});import q1 from"react";import{render as Yj}from"ink";var Jt=Ar(ac(),1);import td from"node:process";import{Buffer as SM}from"node:buffer";import Ab from"node:path";import{fileURLToPath as _M}from"node:url";import CM from"node:child_process";import $0,{constants as Lb}from"node:fs/promises";import bb from"node:process";import rM from"node:os";import iM from"node:fs";import tM from"node:fs";import _b from"node:fs";var V0;function Q5(){try{return _b.statSync("/.dockerenv"),!0}catch{return!1}}function eM(){try{return _b.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function j0(){return V0===void 0&&(V0=Q5()||eM()),V0}var B0,nM=()=>{try{return tM.statSync("/run/.containerenv"),!0}catch{return!1}};function hl(){return B0===void 0&&(B0=nM()||j0()),B0}var Cb=()=>{if(bb.platform!=="linux")return!1;if(rM.release().toLowerCase().includes("microsoft"))return!hl();try{return iM.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!hl():!1}catch{return!1}},Xo=bb.env.__IS_WSL_TEST__?Cb:Cb();function Jo(e,t,n){let r=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let i=n();return r(i),i},set(i){r(i)}}),e}import{promisify as yM}from"node:util";import z0 from"node:process";import{execFile as vM}from"node:child_process";import{promisify as sM}from"node:util";import oM from"node:process";import{execFile as aM}from"node:child_process";var lM=sM(aM);async function U0(){if(oM.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await lM("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari"}import uM from"node:process";import{promisify as cM}from"node:util";import{execFile as fM,execFileSync as Rq}from"node:child_process";var pM=cM(fM);async function Ob(e,{humanReadableOutput:t=!0}={}){if(uM.platform!=="darwin")throw new Error("macOS only");let n=t?[]:["-ss"],{stdout:r}=await pM("osascript",["-e",e,n]);return r.trim()}async function F0(e){return Ob(`tell application "Finder" to set app_path to application file id "${e}" as string
481
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}import{promisify as dM}from"node:util";import{execFile as mM}from"node:child_process";var hM=dM(mM),gM={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},ed=class extends Error{};async function W0(e=hM){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new ed(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=gM[r];if(!i)throw new ed(`Unknown browser ID: ${r}`);return i}var wM=yM(vM),xM=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase());async function G0(){if(z0.platform==="darwin"){let e=await U0();return{name:await F0(e),id:e}}if(z0.platform==="linux"){let{stdout:e}=await wM("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:xM(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(z0.platform==="win32")return W0();throw new Error("Only macOS, Linux, and Windows are supported")}var H0=Ab.dirname(_M(import.meta.url)),Eb=Ab.join(H0,"xdg-open"),{platform:gl,arch:Ib}=td,bM=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let n="/etc/wsl.conf",r=!1;try{await $0.access(n,Lb.F_OK),r=!0}catch{}if(!r)return e;let i=await $0.readFile(n,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(t=s.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),Pb=async(e,t)=>{let n;for(let r of e)try{return await t(r)}catch(i){n=i}throw n},nd=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Pb(e.app,a=>nd({...e,app:a}));let{name:t,arguments:n=[]}=e.app??{};if(n=[...n],Array.isArray(t))return Pb(t,a=>nd({...e,app:{name:a,arguments:n}}));if(t==="browser"||t==="browserPrivate"){let a={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","microsoft-edge.desktop":"edge"},l={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"},u=await G0();if(u.id in a){let c=a[u.id];return t==="browserPrivate"&&n.push(l[c]),nd({...e,app:{name:yl[c],arguments:n}})}throw new Error(`${u.name} is not supported as a default browser`)}let r,i=[],s={};if(gl==="darwin")r="open",e.wait&&i.push("--wait-apps"),e.background&&i.push("--background"),e.newInstance&&i.push("--new"),t&&i.push("-a",t);else if(gl==="win32"||Xo&&!hl()&&!t){let a=await bM();r=Xo?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${td.env.SYSTEMROOT||td.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),Xo||(s.windowsVerbatimArguments=!0);let l=["Start"];e.wait&&l.push("-Wait"),t?(l.push(`"\`"${t}\`""`),e.target&&n.push(e.target)):e.target&&l.push(`"${e.target}"`),n.length>0&&(n=n.map(u=>`"\`"${u}\`""`),l.push("-ArgumentList",n.join(","))),e.target=SM.from(l.join(" "),"utf16le").toString("base64")}else{if(t)r=t;else{let a=!H0||H0==="/",l=!1;try{await $0.access(Eb,Lb.X_OK),l=!0}catch{}r=td.versions.electron??(gl==="android"||a||!l)?"xdg-open":Eb}n.length>0&&i.push(...n),e.wait||(s.stdio="ignore",s.detached=!0)}gl==="darwin"&&n.length>0&&i.push("--args",...n),e.target&&i.push(e.target);let o=CM.spawn(r,i,s);return e.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",u=>{if(!e.allowNonzeroExitCode&&u>0){l(new Error(`Exited with code ${u}`));return}a(o)})}):(o.unref(),o)},OM=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return nd({...t,target:e})};function Tb(e){if(typeof e=="string"||Array.isArray(e))return e;let{[Ib]:t}=e;if(!t)throw new Error(`${Ib} is not supported`);return t}function q0({[gl]:e},{wsl:t}){if(t&&Xo)return Tb(t);if(!e)throw new Error(`${gl} is not supported`);return Tb(e)}var yl={};Jo(yl,"chrome",()=>q0({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Jo(yl,"firefox",()=>q0({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Jo(yl,"edge",()=>q0({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Jo(yl,"browser",()=>"browser");Jo(yl,"browserPrivate",()=>"browserPrivate");var vl=OM;import Xt from"node:fs";import mn from"node:path";import{promisify as TM}from"util";import{exec as AM}from"child_process";import EM from"node:path";function lc(e){return e.replace(/\s+/g,"-").toLowerCase()}function rd(e){return EM.join(process.cwd(),lc(e))}var IM=18;function uc(e){return e.length?e.trim()===""?{valid:!1,message:"Name cannot be empty."}:e.trim()!==e?{valid:!1,message:"Name cannot contain leading or trailing whitespace."}:e.length>IM?{valid:!1,message:"Name cannot be longer than 18 characters."}:/[|\r\n/\\:*?"<>.]+/g.test(e)?{valid:!1,message:'Name cannot contain any of these invalid characters (\\ / : * ? " < > | .).'}:/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\.\w+)?$/i.test(e)?{valid:!1,message:"Name cannot be the same as any reserved windows filenames."}:{valid:!0}:{valid:!1,message:"Name is required."}}var PM=["private","name","version","description","license","author","scripts","dependencies","devDependencies","keywords","engines","canvaCliMetadata"];function Nb(e){let t={};return PM.forEach(n=>{e[n]&&(t[n]=e[n])}),Object.keys(e).forEach(n=>{t[n]||(t[n]=e[n])}),JSON.stringify(t,null,2)}import{fileURLToPath as LM}from"node:url";var Db=TM(AM),id=LM(import.meta.url),K0={type:"preAppCreation",start:"Checking write permissions",failure:"We don\u2019t have write access to this folder, maybe try somewhere else?",action:async()=>{await Xt.promises.access(process.cwd(),(Xt.constants||Xt).W_OK)},preventCleanupOnError:!0},Y0={type:"preAppCreation",start:"Checking folder name available",failure:"The folder already exists. We don\u2019t want to overwrite it automatically, so please remove it first.",action:async e=>{let t=!1;try{await Xt.promises.access(e.folderName,(Xt.constants||Xt).F_OK),t=!0}catch{t=!1}if(t)throw new Error(`A folder named ${e.folderName} already exists.`)},preventCleanupOnError:!0},X0={type:"preAppCreation",start:"Creating folder",failure:"We couldn\u2019t make a folder with that app name, maybe it already exists?",action:async e=>{await Xt.promises.mkdir(e.folderName,{recursive:!0})},preventCleanupOnError:!0},J0={type:"preAppCreation",start:"Copying template files",failure:"Failed to copy template files",action:async e=>{let t=mn.dirname(id),n=mn.join(t,"templates",e.template.path),r=e.folderName;return Xt.promises.cp(n,r,{recursive:!0,dereference:!0})},preventCleanupOnError:!1},Z0={type:"preAppCreation",start:"Copying common files",failure:"Failed to copy common files",action:async e=>{let t=mn.dirname(id),n=mn.join(t,"templates","common"),r=e.folderName;e.debug&&console.log("running 'cp' command with following args: ",{src:n,destination:r}),await Xt.promises.cp(n,r,{recursive:!0,dereference:!0});let i=mn.join(e.folderName,".gitignore.template"),s=mn.join(e.folderName,".gitignore");await Xt.promises.rename(i,s)},preventCleanupOnError:!1},Q0={type:"preAppCreation",start:"Generating README.md",failure:"Failed to generate README.md.",action:async e=>{let t=mn.dirname(id),n=mn.join(t,"templates","common","README.md"),r=mn.join(t,"templates",e.template.path,"README.md"),i=mn.join(e.folderName,"README.md"),o=await Xt.promises.readFile(n,{encoding:"utf8"});try{let a=await Xt.promises.readFile(r,"utf8");o=o+`
482
+ `+a}catch{}await Xt.promises.writeFile(i,o)},preventCleanupOnError:!1},ey={type:"preAppCreation",start:"Generating an .env file",failure:"Failed to generate an .env file",action:async e=>{let t=mn.join(e.folderName,".env.template"),n=mn.join(e.folderName,".env");await Xt.promises.copyFile(t,n)},preventCleanupOnError:!1},ty={type:"preAppCreation",start:"Updating package.json",failure:"Failed to update package.json",action:async e=>{let t=mn.join(e.folderName,"package.json");e.debug&&console.log("Reading 'package.json': ",{packageJsonName:t});let n=await Xt.promises.readFile(t,"utf8"),r=JSON.parse(n);r.name=lc(e.name);let i=mn.dirname(id),s=mn.join(i,"templates","base","package.json"),o=await Xt.promises.readFile(s,"utf8"),a=JSON.parse(o),l=a.canvaCliMetadata;(l.inheritable||[]).forEach(c=>{r[c]=r[c]||a[c]||""}),l.version&&(r.canvaCliMetadata={version:process.env.npm_package_version});let u=Nb(r);await Xt.promises.writeFile(t,u)},preventCleanupOnError:!1},ny={type:"preAppCreation",start:"Initializing git repository",failure:"Failed to initialize git repository",action:async e=>{await Db(`git init ${e.folderName}`)},preventCleanupOnError:!1},ry={type:"preAppCreation",start:"Installing dependencies (This may take a few minutes)",failure:"Failed to install node packages",action:async e=>{await Db(`cd ${e.folderName} && npm install`)},preventCleanupOnError:!1};async function ji(e=500){await new Promise(t=>setTimeout(t,e))}var kb,Mb,Rb,Vb,jb,Bb,Dt,iy,sy,oy,ay,ly,uy;Bb=[Jt.observable],jb=[Jt.observable],Vb=[Jt.observable],Rb=[Jt.observable],Mb=[Jt.observable],kb=[Jt.observable];var Br=class{constructor(){Lr(this,iy,it(Dt,8,this,"")),it(Dt,11,this);Lr(this,sy,it(Dt,12,this,null)),it(Dt,15,this);Lr(this,oy,it(Dt,16,this,!1)),it(Dt,19,this);Lr(this,ay,it(Dt,20,this,null)),it(Dt,23,this);Lr(this,ly,it(Dt,24,this,null)),it(Dt,27,this);Lr(this,uy,it(Dt,28,this,!0)),it(Dt,31,this)}};Dt=Ha(null),iy=new WeakMap,sy=new WeakMap,oy=new WeakMap,ay=new WeakMap,ly=new WeakMap,uy=new WeakMap,st(Dt,4,"codeInput",Bb,Br,iy),st(Dt,4,"codeVerifier",jb,Br,sy),st(Dt,4,"loginSuccessful",Vb,Br,oy),st(Dt,4,"loginUrl",Rb,Br,ay),st(Dt,4,"error",Mb,Br,ly),st(Dt,4,"loading",kb,Br,uy),Io(Dt,Br);var Ub,Fb,Wb,zb,Gb,$b,Hb,qb,Kb,jr;Kb=[Jt.action],qb=[Jt.action],Hb=[Jt.action],$b=[Jt.action],Gb=[Jt.action],zb=[Jt.action],Wb=[Jt.action],Fb=[Jt.action],Ub=[Jt.action];var En=class{constructor(t,n,r=ji){this.services=t;this.onLogin=n;this.delay=r;it(jr,5,this)}async initLogin(t){if(this.setLoading(t,!0),await this.services.tokenService.isLoggedIn()){this.rerouteOnSuccess(t);return}this.setLoading(t,!1);let{url:r,codeVerifier:i}=this.services.authService.constructAuthUrl();this.setCodeVerifier(t,i),this.setLoginUrl(t,r),await this.delay(1500),vl(r)}setCodeInput(t,n){t.codeInput=n}async handleCodeInput(t){try{let n=t.codeInput.split("&")[0];if(!n){this.exitOnFailure(t,"Invalid input. Please paste the full code.");return}let[r,i]=n.split("=");if(!i||r!=="code"){this.exitOnFailure(t,"Invalid input. Please ensure the code includes the 'code=' prefix.");return}if(!t.codeVerifier){this.exitOnFailure(t,"Failed to generate code verifier.");return}let s=await this.services.tokenService.exchangeCodeForToken({authCode:i,codeVerifier:t.codeVerifier});s instanceof Error?this.exitOnFailure(t,s.message):this.rerouteOnSuccess(t)}catch(n){this.exitOnFailure(t,n.message)}}exitOnFailure(t,n){this.setError(t,n),this.delay().then(()=>process.exit(1))}setCodeVerifier(t,n){t.codeVerifier=n}setLoginSuccessful(t,n){t.loginSuccessful=n}setError(t,n){t.error=n}setLoginUrl(t,n){t.loginUrl=n}setLoading(t,n){t.loading=n}rerouteOnSuccess(t){this.setLoading(t,!1),this.setLoginSuccessful(t,!0),this.delay(1500).then(()=>this.onLogin())}};jr=Ha(null),st(jr,1,"setCodeInput",Kb,En),st(jr,1,"handleCodeInput",qb,En),st(jr,1,"exitOnFailure",Hb,En),st(jr,1,"setCodeVerifier",$b,En),st(jr,1,"setLoginSuccessful",Gb,En),st(jr,1,"setError",zb,En),st(jr,1,"setLoginUrl",Wb,En),st(jr,1,"setLoading",Fb,En),st(jr,1,"rerouteOnSuccess",Ub,En),Io(jr,En);var H1=Ar(T1(),1);import $t from"react";import{Box as mf,Text as eu}from"ink";import{Text as OY}from"ink";import IY from"react";var jV=Ar(tP(),1);import uY,{createContext as RV,useContext as VV}from"react";import yi from"node:process";function A1(){return yi.platform!=="win32"?yi.env.TERM!=="linux":!!yi.env.WT_SESSION||!!yi.env.TERMINUS_SUBLIME||yi.env.ConEmuTask==="{cmd::Cmder}"||yi.env.TERM_PROGRAM==="Terminus-Sublime"||yi.env.TERM_PROGRAM==="vscode"||yi.env.TERM==="xterm-256color"||yi.env.TERM==="alacritty"||yi.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var nP={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},rP={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},gV={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},yV={...nP,...rP},vV={...nP,...gV},wV=A1(),xV=wV?yV:vV,_t=xV,zK=Object.entries(rP);var iP={info:"blue",success:"green",error:"red",warning:"yellow"},SV={styles:{container:({variant:e})=>({flexGrow:1,borderStyle:"round",borderColor:iP[e],gap:1,paddingX:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:iP[e]}),content:()=>({flexShrink:1,flexGrow:1,minWidth:0,flexDirection:"column",gap:1}),title:()=>({bold:!0}),message:()=>({})},config({variant:e}){let t;return e==="info"&&(t=_t.info),e==="success"&&(t=_t.tick),e==="error"&&(t=_t.cross),e==="warning"&&(t=_t.warning),{icon:t}}},sP=SV;var _V={styles:{container:({color:e})=>({backgroundColor:e}),label:()=>({color:"black"})}},oP=_V;var CV={styles:{input:({isFocused:e})=>({dimColor:!e})}},aP=CV;var bV={styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:e?0:2}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let n;return t&&(n="green"),e&&(n="blue"),{color:n}},highlightedText:()=>({bold:!0})}},lP=bV;var OV={styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})}},uP=OV;var EV={styles:{container:()=>({flexGrow:1,minWidth:0}),completed:()=>({color:"magenta"}),remaining:()=>({dimColor:!0})},config:()=>({completedCharacter:_t.square,remainingCharacter:_t.squareLightShade})},cP=EV;var IV={styles:{container:()=>({flexDirection:"column"}),option:({isFocused:e})=>({gap:1,paddingLeft:e?0:2}),selectedIndicator:()=>({color:"green"}),focusIndicator:()=>({color:"blue"}),label({isFocused:e,isSelected:t}){let n;return t&&(n="green"),e&&(n="blue"),{color:n}},highlightedText:()=>({bold:!0})}},fP=IV;var PV={styles:{container:()=>({gap:1}),frame:()=>({color:"blue"}),label:()=>({})}},pP=PV;var TV={success:"green",error:"red",warning:"yellow",info:"blue"},AV={success:_t.tick,error:_t.cross,warning:_t.warning,info:_t.info},LV={styles:{container:()=>({gap:1}),iconContainer:()=>({flexShrink:0}),icon:({variant:e})=>({color:TV[e]}),message:()=>({})},config:({variant:e})=>({icon:AV[e]})},dP=LV;var NV={styles:{list:()=>({flexDirection:"column"}),listItem:()=>({gap:1}),marker:()=>({dimColor:!0}),content:()=>({flexDirection:"column"})},config:()=>({marker:_t.line})},mP=NV;var DV={styles:{value:()=>({})}},hP=DV;var kV={styles:{value:()=>({})}},gP=kV;var MV={styles:{value:()=>({})}},yP=MV;var BV={components:{Alert:sP,Badge:oP,ConfirmInput:aP,MultiSelect:lP,OrderedList:uP,ProgressBar:cP,Select:fP,Spinner:pP,StatusMessage:dP,UnorderedList:mP,TextInput:hP,EmailInput:gP,PasswordInput:yP}},UV=RV(BV);var Qe=e=>VV(UV).components[e];import FV from"react";import{Text as WV,useInput as zV}from"ink";function vP({isDisabled:e=!1,defaultChoice:t="confirm",submitOnEnter:n=!0,onConfirm:r,onCancel:i}){zV((o,a)=>{o.toLowerCase()==="y"&&r(),o.toLowerCase()==="n"&&i(),a.return&&n&&(t==="confirm"?r():i())},{isActive:!e});let{styles:s}=Qe("ConfirmInput");return FV.createElement(WV,{...s.input({isFocused:!e})},t==="confirm"?"Y/n":"y/N")}import{Box as KV}from"ink";import D1,{useMemo as SP,useContext as YV}from"react";import{Box as wP,Text as $V}from"ink";import L1,{useContext as HV}from"react";import{createContext as GV}from"react";var of=_t.line;var Pm=GV({marker:of});function xP({children:e}){let{marker:t}=HV(Pm),{styles:n}=Qe("UnorderedList");return L1.createElement(wP,{...n.listItem()},L1.createElement($V,{...n.marker()},t),L1.createElement(wP,{...n.content()},e))}import{createContext as qV}from"react";var N1=qV({depth:0});function XV({children:e}){let{depth:t}=YV(N1),{styles:n,config:r}=Qe("UnorderedList"),i=SP(()=>({depth:t+1}),[t]),s=SP(()=>{let{marker:o}=r();return typeof o=="string"?{marker:o}:Array.isArray(o)?{marker:o[t]??o.at(-1)??of}:{marker:of}},[r,t]);return D1.createElement(N1.Provider,{value:i},D1.createElement(Pm.Provider,{value:s},D1.createElement(KV,{...n.list()},e)))}XV.Item=xP;import TX from"react";import{Box as LX,Text as NX}from"ink";import aX from"react";import{Box as uX,Text as cX}from"ink";import{useReducer as hX,useCallback as gX,useMemo as yX,useState as vX,useEffect as wX}from"react";var Jl=class extends Map{first;constructor(t){let n=[],r,i,s=0;for(let o of t){let a={...o,previous:i,next:void 0,index:s};i&&(i.next=a),r||=a,n.push([o.value,a]),s++,i=a}super(n),this.first=r}};import{useInput as CX}from"ink";import FX,{useState as WX}from"react";import{Box as GX,Text as $X,measureElement as HX}from"ink";import af from"react";import{Box as sj,Text as oj}from"ink";import Tm from"react";import{Box as JV,Text as k1}from"ink";function _P({isFocused:e,isSelected:t,children:n}){let{styles:r}=Qe("Select");return Tm.createElement(JV,{...r.option({isFocused:e})},e&&Tm.createElement(k1,{...r.focusIndicator()},_t.pointer),Tm.createElement(k1,{...r.label({isFocused:e,isSelected:t})},n),t&&Tm.createElement(k1,{...r.selectedIndicator()},_t.tick))}import{isDeepStrictEqual as ZV}from"node:util";import{useReducer as QV,useCallback as M1,useMemo as ej,useState as tj,useEffect as nj}from"react";var rj=(e,t)=>{switch(t.type){case"focus-next-option":{if(!e.focusedValue)return e;let n=e.optionMap.get(e.focusedValue);if(!n)return e;let r=n.next;if(!r)return e;if(!(r.index>=e.visibleToIndex))return{...e,focusedValue:r.value};let s=Math.min(e.optionMap.size,e.visibleToIndex+1),o=s-e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:o,visibleToIndex:s}}case"focus-previous-option":{if(!e.focusedValue)return e;let n=e.optionMap.get(e.focusedValue);if(!n)return e;let r=n.previous;if(!r)return e;if(!(r.index<=e.visibleFromIndex))return{...e,focusedValue:r.value};let s=Math.max(0,e.visibleFromIndex-1),o=s+e.visibleOptionCount;return{...e,focusedValue:r.value,visibleFromIndex:s,visibleToIndex:o}}case"select-focused-option":return{...e,previousValue:e.value,value:e.focusedValue};case"reset":return t.state}},CP=({visibleOptionCount:e,defaultValue:t,options:n})=>{let r=typeof e=="number"?Math.min(e,n.length):n.length,i=new Jl(n);return{optionMap:i,visibleOptionCount:r,focusedValue:i.first?.value,visibleFromIndex:0,visibleToIndex:r,previousValue:t,value:t}},bP=({visibleOptionCount:e=5,options:t,defaultValue:n,onChange:r})=>{let[i,s]=QV(rj,{visibleOptionCount:e,defaultValue:n,options:t},CP),[o,a]=tj(t);t!==o&&!ZV(t,o)&&(s({type:"reset",state:CP({visibleOptionCount:e,defaultValue:n,options:t})}),a(t));let l=M1(()=>{s({type:"focus-next-option"})},[]),u=M1(()=>{s({type:"focus-previous-option"})},[]),c=M1(()=>{s({type:"select-focused-option"})},[]),f=ej(()=>t.map((p,d)=>({...p,index:d})).slice(i.visibleFromIndex,i.visibleToIndex),[t,i.visibleFromIndex,i.visibleToIndex]);return nj(()=>{i.value&&i.previousValue!==i.value&&r?.(i.value)},[i.previousValue,i.value,t,r]),{focusedValue:i.focusedValue,visibleFromIndex:i.visibleFromIndex,visibleToIndex:i.visibleToIndex,value:i.value,visibleOptions:f,focusNextOption:l,focusPreviousOption:u,selectFocusedOption:c}};import{useInput as ij}from"ink";var OP=({isDisabled:e=!1,state:t})=>{ij((n,r)=>{r.downArrow&&t.focusNextOption(),r.upArrow&&t.focusPreviousOption(),r.return&&t.selectFocusedOption()},{isActive:!e})};function Xi({isDisabled:e=!1,visibleOptionCount:t=5,highlightText:n,options:r,defaultValue:i,onChange:s}){let o=bP({visibleOptionCount:t,options:r,defaultValue:i,onChange:s});OP({isDisabled:e,state:o});let{styles:a}=Qe("Select");return af.createElement(sj,{...a.container()},o.visibleOptions.map(l=>{let u=l.label;if(n&&l.label.includes(n)){let c=l.label.indexOf(n);u=af.createElement(af.Fragment,null,l.label.slice(0,c),af.createElement(oj,{...a.highlightedText()},n),l.label.slice(c+n.length))}return af.createElement(_P,{key:l.value,isFocused:!e&&o.focusedValue===l.value,isSelected:o.value===l.value},u)}))}import V1 from"react";import{Box as cj,Text as PP}from"ink";import{useEffect as lj,useState as uj}from"react";var R1={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}};var EP=R1,yJ=Object.keys(R1);function IP({type:e="dots"}){let[t,n]=uj(0),r=EP[e];return lj(()=>{let i=setInterval(()=>{n(s=>s===r.frames.length-1?0:s+1)},r.interval);return()=>{clearInterval(i)}},[r]),{frame:r.frames[t]??""}}function TP({label:e,type:t}){let{frame:n}=IP({type:t}),{styles:r}=Qe("Spinner");return V1.createElement(cj,{...r.container()},V1.createElement(PP,{...r.frame()},n),e&&V1.createElement(PP,{...r.label()},e))}import Lj from"react";import{Text as Nj}from"ink";import{useReducer as fj,useCallback as lf,useEffect as pj,useMemo as dj}from"react";var mj=(e,t)=>{switch(t.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+t.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+t.text.length};case"delete":{let n=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,n)+e.value.slice(n+1),cursorOffset:n}}}},AP=({defaultValue:e="",suggestions:t,onChange:n,onSubmit:r})=>{let[i,s]=fj(mj,{previousValue:e,value:e,cursorOffset:e.length}),o=dj(()=>{if(i.value.length!==0)return t?.find(p=>p.startsWith(i.value))?.replace(i.value,"")},[i.value,t]),a=lf(()=>{s({type:"move-cursor-left"})},[]),l=lf(()=>{s({type:"move-cursor-right"})},[]),u=lf(p=>{s({type:"insert",text:p})},[]),c=lf(()=>{s({type:"delete"})},[]),f=lf(()=>{if(o){u(o),r?.(i.value+o);return}r?.(i.value)},[i.value,o,u,r]);return pj(()=>{i.value!==i.previousValue&&n?.(i.value)},[i.previousValue,i.value,n]),{...i,suggestion:o,moveCursorLeft:a,moveCursorRight:l,insert:u,delete:c,submit:f}};import{useMemo as WP}from"react";import{useInput as Aj}from"ink";var LP=(e=0)=>t=>`\x1B[${t+e}m`,NP=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,DP=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,mt={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]}},NJ=Object.keys(mt.modifier),hj=Object.keys(mt.color),gj=Object.keys(mt.bgColor),DJ=[...hj,...gj];function yj(){let e=new Map;for(let[t,n]of Object.entries(mt)){for(let[r,i]of Object.entries(n))mt[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[r]=mt[r],e.set(i[0],i[1]);Object.defineProperty(mt,t,{value:n,enumerable:!1})}return Object.defineProperty(mt,"codes",{value:e,enumerable:!1}),mt.color.close="\x1B[39m",mt.bgColor.close="\x1B[49m",mt.color.ansi=LP(),mt.color.ansi256=NP(),mt.color.ansi16m=DP(),mt.bgColor.ansi=LP(10),mt.bgColor.ansi256=NP(10),mt.bgColor.ansi16m=DP(10),Object.defineProperties(mt,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(s=>s+s).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>mt.rgbToAnsi256(...mt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,i;if(t>=232)n=((t-232)*10+8)/255,r=n,i=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,i=a%6/5}let s=Math.max(n,r,i)*2;if(s===0)return 30;let o=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(n));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>mt.ansi256ToAnsi(mt.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>mt.ansi256ToAnsi(mt.hexToAnsi256(t)),enumerable:!1}}),mt}var vj=yj(),Yr=vj;import j1 from"node:process";import wj from"node:os";import kP from"node:tty";function vr(e,t=globalThis.Deno?globalThis.Deno.args:j1.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:vt}=j1,Am;vr("no-color")||vr("no-colors")||vr("color=false")||vr("color=never")?Am=0:(vr("color")||vr("colors")||vr("color=true")||vr("color=always"))&&(Am=1);function xj(){if("FORCE_COLOR"in vt)return vt.FORCE_COLOR==="true"?1:vt.FORCE_COLOR==="false"?0:vt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(vt.FORCE_COLOR,10),3)}function Sj(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function _j(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=xj();r!==void 0&&(Am=r);let i=n?Am:r;if(i===0)return 0;if(n){if(vr("color=16m")||vr("color=full")||vr("color=truecolor"))return 3;if(vr("color=256"))return 2}if("TF_BUILD"in vt&&"AGENT_NAME"in vt)return 1;if(e&&!t&&i===void 0)return 0;let s=i||0;if(vt.TERM==="dumb")return s;if(j1.platform==="win32"){let o=wj.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in vt)return"GITHUB_ACTIONS"in vt||"GITEA_ACTIONS"in vt?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in vt)||vt.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in vt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(vt.TEAMCITY_VERSION)?1:0;if(vt.COLORTERM==="truecolor"||vt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in vt){let o=Number.parseInt((vt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(vt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(vt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(vt.TERM)||"COLORTERM"in vt?1:s}function MP(e,t={}){let n=_j(e,{streamIsTTY:e&&e.isTTY,...t});return Sj(n)}var Cj={stdout:MP({isTTY:kP.isatty(1)}),stderr:MP({isTTY:kP.isatty(2)})},RP=Cj;function VP(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,o="";do o+=e.slice(s,r)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return o+=e.slice(s),o}function jP(e,t,n,r){let i=0,s="";do{let o=e[r-1]==="\r";s+=e.slice(i,o?r-1:r)+t+(o?`\r
483
+ `:`
484
+ `)+n,i=r+1,r=e.indexOf(`
485
+ `,i)}while(r!==-1);return s+=e.slice(i),s}var{stdout:BP,stderr:UP}=RP,B1=Symbol("GENERATOR"),Zl=Symbol("STYLER"),uf=Symbol("IS_EMPTY"),FP=["ansi","ansi","ansi256","ansi16m"],Ql=Object.create(null),bj=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=BP?BP.level:0;e.level=t.level===void 0?n:t.level};var Oj=e=>{let t=(...n)=>n.join(" ");return bj(t,e),Object.setPrototypeOf(t,cf.prototype),t};function cf(e){return Oj(e)}Object.setPrototypeOf(cf.prototype,Function.prototype);for(let[e,t]of Object.entries(Yr))Ql[e]={get(){let n=Lm(this,F1(t.open,t.close,this[Zl]),this[uf]);return Object.defineProperty(this,e,{value:n}),n}};Ql.visible={get(){let e=Lm(this,this[Zl],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var U1=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?Yr[n].ansi16m(...r):t==="ansi256"?Yr[n].ansi256(Yr.rgbToAnsi256(...r)):Yr[n].ansi(Yr.rgbToAnsi(...r)):e==="hex"?U1("rgb",t,n,...Yr.hexToRgb(...r)):Yr[n][e](...r),Ej=["rgb","hex","ansi256"];for(let e of Ej){Ql[e]={get(){let{level:n}=this;return function(...r){let i=F1(U1(e,FP[n],"color",...r),Yr.color.close,this[Zl]);return Lm(this,i,this[uf])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ql[t]={get(){let{level:n}=this;return function(...r){let i=F1(U1(e,FP[n],"bgColor",...r),Yr.bgColor.close,this[Zl]);return Lm(this,i,this[uf])}}}}var Ij=Object.defineProperties(()=>{},{...Ql,level:{enumerable:!0,get(){return this[B1].level},set(e){this[B1].level=e}}}),F1=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},Lm=(e,t,n)=>{let r=(...i)=>Pj(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,Ij),r[B1]=e,r[Zl]=t,r[uf]=n,r},Pj=(e,t)=>{if(e.level<=0||!t)return e[uf]?"":t;let n=e[Zl];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=VP(t,n.close,n.open),n=n.parent;let s=t.indexOf(`
486
+ `);return s!==-1&&(t=jP(t,i,r,s)),r+t+i};Object.defineProperties(cf.prototype,Ql);var Tj=cf(),zJ=cf({level:UP?UP.level:0});var nn=Tj;var W1=nn.inverse(" "),zP=({isDisabled:e=!1,state:t,placeholder:n=""})=>{let r=WP(()=>e?n?nn.dim(n):"":n&&n.length>0?nn.inverse(n[0])+nn.dim(n.slice(1)):W1,[e,n]),i=WP(()=>{if(e)return t.value;let s=0,o=t.value.length>0?"":W1;for(let a of t.value)o+=s===t.cursorOffset?nn.inverse(a):a,s++;return t.suggestion?(t.cursorOffset===t.value.length?o+=nn.inverse(t.suggestion[0])+nn.dim(t.suggestion.slice(1)):o+=nn.dim(t.suggestion),o):(t.value.length>0&&t.cursorOffset===t.value.length&&(o+=W1),o)},[e,t.value,t.cursorOffset,t.suggestion]);return Aj((s,o)=>{if(!(o.upArrow||o.downArrow||o.ctrl&&s==="c"||o.tab||o.shift&&o.tab)){if(o.return){t.submit();return}o.leftArrow?t.moveCursorLeft():o.rightArrow?t.moveCursorRight():o.backspace||o.delete?t.delete():t.insert(s)}},{isActive:!e}),{inputValue:t.value.length>0?i:r}};function GP({isDisabled:e=!1,defaultValue:t,placeholder:n="",suggestions:r,onChange:i,onSubmit:s}){let o=AP({defaultValue:t,suggestions:r,onChange:i,onSubmit:s}),{inputValue:a}=zP({isDisabled:e,placeholder:n,state:o}),{styles:l}=Qe("TextInput");return Lj.createElement(Nj,{...l.value()},a)}import{Box as Vj}from"ink";import ff,{useContext as jj,isValidElement as HP}from"react";import{Box as $P,Text as kj}from"ink";import z1,{useContext as Mj}from"react";import{createContext as Dj}from"react";var Nm=Dj({marker:_t.line});function Dm({children:e}){let{marker:t}=Mj(Nm),{styles:n}=Qe("OrderedList");return z1.createElement($P,{...n.listItem()},z1.createElement(kj,{...n.marker()},t),z1.createElement($P,{...n.content()},e))}import{createContext as Rj}from"react";var G1=Rj({marker:""});function Bj({children:e}){let{marker:t}=jj(G1),{styles:n}=Qe("OrderedList"),r=0;for(let s of ff.Children.toArray(e))!HP(s)||s.type!==Dm||r++;let i=String(r).length;return ff.createElement(Vj,{...n.list()},ff.Children.map(e,(s,o)=>{if(!HP(s)||s.type!==Dm)return s;let a=`${String(o+1).padStart(i)}.`,l=`${t}${a}`;return ff.createElement(G1.Provider,{value:{marker:l}},ff.createElement(Nm.Provider,{value:{marker:l}},s))}))}Bj.Item=Dm;import Gj from"react";import{Text as $j}from"ink";import{useReducer as Uj,useCallback as pf,useEffect as Fj}from"react";var Wj=(e,t)=>{switch(t.type){case"move-cursor-left":return{...e,cursorOffset:Math.max(0,e.cursorOffset-1)};case"move-cursor-right":return{...e,cursorOffset:Math.min(e.value.length,e.cursorOffset+1)};case"insert":return{...e,previousValue:e.value,value:e.value.slice(0,e.cursorOffset)+t.text+e.value.slice(e.cursorOffset),cursorOffset:e.cursorOffset+t.text.length};case"delete":{let n=Math.max(0,e.cursorOffset-1);return{...e,previousValue:e.value,value:e.value.slice(0,n)+e.value.slice(n+1),cursorOffset:n}}}},qP=({onChange:e,onSubmit:t})=>{let[n,r]=Uj(Wj,{previousValue:"",value:"",cursorOffset:0}),i=pf(()=>{r({type:"move-cursor-left"})},[]),s=pf(()=>{r({type:"move-cursor-right"})},[]),o=pf(u=>{r({type:"insert",text:u})},[]),a=pf(()=>{r({type:"delete"})},[]),l=pf(()=>{t?.(n.value)},[n.value,t]);return Fj(()=>{n.value!==n.previousValue&&e?.(n.value)},[n.previousValue,n.value,e]),{...n,moveCursorLeft:i,moveCursorRight:s,insert:o,delete:a,submit:l}};import{useMemo as KP}from"react";import{useInput as zj}from"ink";var $1=nn.inverse(" "),YP=({isDisabled:e=!1,state:t,placeholder:n=""})=>{let r=KP(()=>e?n?nn.dim(n):"":n&&n.length>0?nn.inverse(n[0])+nn.dim(n.slice(1)):$1,[e,n]),i=KP(()=>{let s="*".repeat(t.value.length);if(e)return s;let o=0,a=s.length>0?"":$1;for(let l of s)a+=o===t.cursorOffset?nn.inverse(l):l,o++;return s.length>0&&t.cursorOffset===s.length&&(a+=$1),a},[e,t.value,t.cursorOffset]);return zj((s,o)=>{if(!(o.upArrow||o.downArrow||o.ctrl&&s==="c"||o.tab||o.shift&&o.tab)){if(o.return){t.submit();return}o.leftArrow?t.moveCursorLeft():o.rightArrow?t.moveCursorRight():o.backspace||o.delete?t.delete():t.insert(s)}},{isActive:!e}),{inputValue:t.value.length>0?i:r}};function XP({isDisabled:e=!1,placeholder:t="",onChange:n,onSubmit:r}){let i=qP({onChange:n,onSubmit:r}),{inputValue:s}=YP({isDisabled:e,placeholder:t,state:i}),{styles:o}=Qe("PasswordInput");return Gj.createElement($j,{...o.value()},s)}import VZ from"react";import{Box as BZ,Text as UZ}from"ink";import HZ from"react";import{Box as KZ,Text as YZ}from"ink";import gQ from"react";import{Text as vQ}from"ink";import{useReducer as tQ,useCallback as nQ,useEffect as rQ,useMemo as iQ}from"react";import{useMemo as aQ}from"react";import{useInput as uQ}from"ink";var fQ=nn.inverse(" ");import{Text as Hj}from"ink";import*as df from"react";var Ws=e=>{let{lite:t}=df.useContext(Ye);return t?df.createElement(Hj,null,e.label):df.createElement(TP,{type:"bouncingBall",...e})};var JP=(0,H1.observer)(({store:e,presenter:t})=>($t.useEffect(()=>{t.initLogin(e)},[]),e.loading?$t.createElement(mf,{marginX:2,marginY:1},$t.createElement(Ws,{type:"bouncingBall",label:"Checking login status..."})):e.loginSuccessful?$t.createElement(Kj,null):$t.createElement(qj,{store:e,presenter:t}))),qj=(0,H1.observer)(({store:e,presenter:t})=>$t.createElement(mf,{flexDirection:"column",paddingX:2},$t.createElement(eu,null,"Let's get you logged in to Canva CLI!"),!!e.loginUrl&&$t.createElement(mf,null,$t.createElement(eu,{color:"yellow"},"If a browser window didn't open, click"," ",$t.createElement(xt,{text:"here",url:e.loginUrl,subtle:!0}))),$t.createElement(mf,{marginY:1},$t.createElement(eu,{bold:!0},"Confirmation code: "),$t.createElement(eu,null," "),$t.createElement(XP,{onChange:n=>t.setCodeInput(e,n),placeholder:"Paste the confirmation code from the web browser then press enter.",onSubmit:()=>t.handleCodeInput(e)})),e.error&&$t.createElement(eu,{color:"redBright"},e.error))),Kj=()=>$t.createElement(mf,{flexDirection:"column",paddingX:2},$t.createElement(eu,null,$t.createElement(Lt,null,"\u2705")," Successfully logged in!"));var Xj=async({argv:e},t,n)=>{let r=await e,i=()=>{t.parse("welcome")},s=new Br,o=new En(n,i);Yj(q1.createElement(Ye.Provider,{value:{lite:r.lite}},q1.createElement(Bn,null,q1.createElement(JP,{store:s,presenter:o}))))},ZP=({cli:e,services:t})=>e.command("login","Log in to the Canva CLI",n=>{Xj(n,e,t)});import ah from"react";import{render as cF}from"ink";import Be from"react";import{Box as Ta,Text as qs,useApp as nF,useInput as rF}from"ink";var QP=e=>e.charAt(0).toUpperCase()+e.slice(1);import $A from"node:process";var PA=Ar(FT(),1);import{Buffer as j6}from"node:buffer";import B6 from"node:path";import Ew from"node:child_process";import Km from"node:process";function rw(e){let t=typeof e=="string"?`
487
+ `:10,n=typeof e=="string"?"\r":13;return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}import Rm from"node:process";import hf from"node:path";import{fileURLToPath as WT}from"node:url";function Mm(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}var CB=({cwd:e=Rm.cwd(),path:t=Rm.env[Mm()],preferLocal:n=!0,execPath:r=Rm.execPath,addExecPath:i=!0}={})=>{let s=e instanceof URL?WT(e):e,o=hf.resolve(s),a=[];return n&&bB(a,o),i&&OB(a,r,o),[...a,t].join(hf.delimiter)},bB=(e,t)=>{let n;for(;n!==t;)e.push(hf.join(t,"node_modules/.bin")),n=t,t=hf.resolve(t,"..")},OB=(e,t,n)=>{let r=t instanceof URL?WT(t):t;e.push(hf.resolve(n,r,".."))},zT=({env:e=Rm.env,...t}={})=>{e={...e};let n=Mm({env:e});return t.path=e[n],e[n]=CB(t),e};var EB=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let i=Object.getOwnPropertyDescriptor(e,n),s=Object.getOwnPropertyDescriptor(t,n);!IB(i,s)&&r||Object.defineProperty(e,n,s)},IB=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},PB=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},TB=(e,t)=>`/* Wrapped ${e}*/
488
+ ${t}`,AB=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),LB=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),NB=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,i=TB.bind(null,r,t.toString());Object.defineProperty(i,"name",LB),Object.defineProperty(e,"toString",{...AB,value:i})};function iw(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let i of Reflect.ownKeys(t))EB(e,t,i,n);return PB(e,t),NB(e,t,r),e}var Vm=new WeakMap,GT=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,i=e.displayName||e.name||"<anonymous>",s=function(...o){if(Vm.set(s,++r),r===1)n=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return n};return iw(s,e),Vm.set(s,r),s};GT.callCount=e=>{if(!Vm.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Vm.get(e)};var $T=GT;import WB from"node:process";import{constants as RB}from"node:os";var HT=()=>{let e=KT-qT+1;return Array.from({length:e},DB)},DB=(e,t)=>({name:`SIGRT${t+1}`,number:qT+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),qT=34,KT=64;import{constants as kB}from"node:os";var YT=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var sw=()=>{let e=HT();return[...YT,...e].map(MB)},MB=({name:e,number:t,description:n,action:r,forced:i=!1,standard:s})=>{let{signals:{[e]:o}}=kB,a=o!==void 0;return{name:e,number:a?o:t,description:n,supported:a,action:r,forced:i,standard:s}};var VB=()=>{let e=sw();return Object.fromEntries(e.map(jB))},jB=({name:e,number:t,description:n,supported:r,action:i,forced:s,standard:o})=>[e,{name:e,number:t,description:n,supported:r,action:i,forced:s,standard:o}],XT=VB(),BB=()=>{let e=sw(),t=65,n=Array.from({length:t},(r,i)=>UB(i,e));return Object.assign({},...n)},UB=(e,t)=>{let n=FB(e,t);if(n===void 0)return{};let{name:r,description:i,supported:s,action:o,forced:a,standard:l}=n;return{[e]:{name:r,number:e,description:i,supported:s,action:o,forced:a,standard:l}}},FB=(e,t)=>{let n=t.find(({name:r})=>RB.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},jee=BB();var zB=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:s,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${i})`:s!==void 0?`failed with exit code ${s}`:"failed",gf=({stdout:e,stderr:t,all:n,error:r,signal:i,exitCode:s,command:o,escapedCommand:a,timedOut:l,isCanceled:u,killed:c,parsed:{options:{timeout:f,cwd:p=WB.cwd()}}})=>{s=s===null?void 0:s,i=i===null?void 0:i;let d=i===void 0?void 0:XT[i].description,m=r&&r.code,v=`Command ${zB({timedOut:l,timeout:f,errorCode:m,signal:i,signalDescription:d,exitCode:s,isCanceled:u})}: ${o}`,h=Object.prototype.toString.call(r)==="[object Error]",g=h?`${v}
489
+ ${r.message}`:v,w=[g,t,e].filter(Boolean).join(`
490
+ `);return h?(r.originalMessage=r.message,r.message=w):r=new Error(w),r.shortMessage=g,r.command=o,r.escapedCommand=a,r.exitCode=s,r.signal=i,r.signalDescription=d,r.stdout=e,r.stderr=t,r.cwd=p,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!l,r.isCanceled=u,r.killed=c&&!l,r};var jm=["stdin","stdout","stderr"],GB=e=>jm.some(t=>e[t]!==void 0),JT=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return jm.map(r=>e[r]);if(GB(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${jm.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,jm.length);return Array.from({length:n},(r,i)=>t[i])};import qB from"node:os";var da=[];da.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&da.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&da.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Bm=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",ow=Symbol.for("signal-exit emitter"),aw=globalThis,$B=Object.defineProperty.bind(Object),lw=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(aw[ow])return aw[ow];$B(aw,ow,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],i=r.indexOf(n);i!==-1&&(i===0&&r.length===1?r.length=0:r.splice(i,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(let s of this.listeners[t])i=s(n,r)===!0||i;return t==="exit"&&(i=this.emit("afterExit",n,r)||i),i}},Um=class{},HB=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),uw=class extends Um{onExit(){return()=>{}}load(){}unload(){}},cw=class extends Um{#o=fw.platform==="win32"?"SIGINT":"SIGHUP";#t=new lw;#e;#i;#s;#r={};#n=!1;constructor(t){super(),this.#e=t,this.#r={};for(let n of da)this.#r[n]=()=>{let r=this.#e.listeners(n),{count:i}=this.#t,s=t;if(typeof s.__signal_exit_emitter__=="object"&&typeof s.__signal_exit_emitter__.count=="number"&&(i+=s.__signal_exit_emitter__.count),r.length===i){this.unload();let o=this.#t.emit("exit",null,n),a=n==="SIGHUP"?this.#o:n;o||t.kill(t.pid,a)}};this.#s=t.reallyExit,this.#i=t.emit}onExit(t,n){if(!Bm(this.#e))return()=>{};this.#n===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#t.on(r,t),()=>{this.#t.removeListener(r,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#n){this.#n=!0,this.#t.count+=1;for(let t of da)try{let n=this.#r[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#l(t,...n),this.#e.reallyExit=t=>this.#a(t)}}unload(){this.#n&&(this.#n=!1,da.forEach(t=>{let n=this.#r[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#s,this.#t.count-=1)}#a(t){return Bm(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#s.call(this.#e,this.#e.exitCode)):0}#l(t,...n){let r=this.#i;if(t==="exit"&&Bm(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let i=r.call(this.#e,t,...n);return this.#t.emit("exit",this.#e.exitCode,null),i}else return r.call(this.#e,t,...n)}},fw=globalThis.process,{onExit:ZT,load:Hee,unload:qee}=HB(Bm(fw)?new cw(fw):new uw);var KB=1e3*5,QT=(e,t="SIGTERM",n={})=>{let r=e(t);return YB(e,t,n,r),r},YB=(e,t,n,r)=>{if(!XB(t,n,r))return;let i=ZB(n),s=setTimeout(()=>{e("SIGKILL")},i);s.unref&&s.unref()},XB=(e,{forceKillAfterTimeout:t},n)=>JB(e)&&t!==!1&&n,JB=e=>e===qB.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",ZB=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return KB;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},eA=(e,t)=>{e.kill()&&(t.isCanceled=!0)},QB=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},tA=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let i,s=new Promise((a,l)=>{i=setTimeout(()=>{QB(e,n,l)},t)}),o=r.finally(()=>{clearTimeout(i)});return Promise.race([s,o])},nA=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},rA=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let i=ZT(()=>{e.kill()});return r.finally(()=>{i()})};import{createWriteStream as e6}from"node:fs";import{ChildProcess as t6}from"node:child_process";function Fm(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function pw(e){return Fm(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}var n6=e=>e instanceof t6&&typeof e.then=="function",dw=(e,t,n)=>{if(typeof n=="string")return e[t].pipe(e6(n)),e;if(pw(n))return e[t].pipe(n),e;if(!n6(n))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!pw(n.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(n.stdin),n},iA=e=>{e.stdout!==null&&(e.pipeStdout=dw.bind(void 0,e,"stdout")),e.stderr!==null&&(e.pipeStderr=dw.bind(void 0,e,"stderr")),e.all!==void 0&&(e.pipeAll=dw.bind(void 0,e,"all"))};import{createReadStream as S6,readFileSync as _6}from"node:fs";import{setTimeout as C6}from"node:timers/promises";var yf=async(e,{init:t,convertChunk:n,getSize:r,truncateChunk:i,addChunk:s,getFinalChunk:o,finalize:a},{maxBuffer:l=Number.POSITIVE_INFINITY}={})=>{if(!i6(e))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let u=t();u.length=0;try{for await(let c of e){let f=s6(c),p=n[f](c,u);aA({convertedChunk:p,state:u,getSize:r,truncateChunk:i,addChunk:s,maxBuffer:l})}return r6({state:u,convertChunk:n,getSize:r,truncateChunk:i,addChunk:s,getFinalChunk:o,maxBuffer:l}),a(u)}catch(c){throw c.bufferedData=a(u),c}},r6=({state:e,getSize:t,truncateChunk:n,addChunk:r,getFinalChunk:i,maxBuffer:s})=>{let o=i(e);o!==void 0&&aA({convertedChunk:o,state:e,getSize:t,truncateChunk:n,addChunk:r,maxBuffer:s})},aA=({convertedChunk:e,state:t,getSize:n,truncateChunk:r,addChunk:i,maxBuffer:s})=>{let o=n(e),a=t.length+o;if(a<=s){sA(e,t,i,a);return}let l=r(e,s-t.length);throw l!==void 0&&sA(l,t,i,s),new Wm},sA=(e,t,n,r)=>{t.contents=n(e,t,r),t.length=r},i6=e=>typeof e=="object"&&e!==null&&typeof e[Symbol.asyncIterator]=="function",s6=e=>{let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if(globalThis.Buffer?.isBuffer(e))return"buffer";let n=oA.call(e);return n==="[object ArrayBuffer]"?"arrayBuffer":n==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&oA.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:oA}=Object.prototype,Wm=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var mw=e=>e,hw=()=>{},gw=({contents:e})=>e,zm=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},Gm=e=>e.length;async function yw(e,t){return yf(e,m6,t)}var o6=()=>({contents:new ArrayBuffer(0)}),a6=e=>l6.encode(e),l6=new TextEncoder,lA=e=>new Uint8Array(e),uA=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),u6=(e,t)=>e.slice(0,t),c6=(e,{contents:t,length:n},r)=>{let i=pA()?p6(t,r):f6(t,r);return new Uint8Array(i).set(e,n),i},f6=(e,t)=>{if(t<=e.byteLength)return e;let n=new ArrayBuffer(fA(t));return new Uint8Array(n).set(new Uint8Array(e),0),n},p6=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let n=new ArrayBuffer(t,{maxByteLength:fA(t)});return new Uint8Array(n).set(new Uint8Array(e),0),n},fA=e=>cA**Math.ceil(Math.log(e)/Math.log(cA)),cA=2,d6=({contents:e,length:t})=>pA()?e:e.slice(0,t),pA=()=>"resize"in ArrayBuffer.prototype,m6={init:o6,convertChunk:{string:a6,buffer:lA,arrayBuffer:lA,dataView:uA,typedArray:uA,others:zm},getSize:Gm,truncateChunk:u6,addChunk:c6,getFinalChunk:hw,finalize:d6};async function $m(e,t){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return dA(await yw(e,t))}catch(n){throw n.bufferedData!==void 0&&(n.bufferedData=dA(n.bufferedData)),n}}var dA=e=>globalThis.Buffer.from(e);async function vw(e,t){return yf(e,w6,t)}var h6=()=>({contents:"",textDecoder:new TextDecoder}),Hm=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),g6=(e,{contents:t})=>t+e,y6=(e,t)=>e.slice(0,t),v6=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},w6={init:h6,convertChunk:{string:mw,buffer:Hm,arrayBuffer:Hm,dataView:Hm,typedArray:Hm,others:zm},getSize:Gm,truncateChunk:y6,addChunk:g6,getFinalChunk:v6,finalize:gw};var gA=Ar(hA(),1),yA=e=>{if(e!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},b6=({input:e,inputFile:t})=>typeof t!="string"?e:(yA(e),_6(t)),vA=e=>{let t=b6(e);if(Fm(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},O6=({input:e,inputFile:t})=>typeof t!="string"?e:(yA(e),S6(t)),wA=(e,t)=>{let n=O6(t);n!==void 0&&(Fm(n)?n.pipe(e.stdin):e.stdin.end(n))},xA=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,gA.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},ww=async(e,t)=>{if(!(!e||t===void 0)){await C6(0),e.destroy();try{return await t}catch(n){return n.bufferedData}}},xw=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t==="utf8"||t==="utf-8"?vw(e,{maxBuffer:r}):t===null||t==="buffer"?$m(e,{maxBuffer:r}):E6(e,r,t)},E6=async(e,t,n)=>(await $m(e,{maxBuffer:t})).toString(n),SA=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:s},o)=>{let a=xw(e,{encoding:r,buffer:i,maxBuffer:s}),l=xw(t,{encoding:r,buffer:i,maxBuffer:s}),u=xw(n,{encoding:r,buffer:i,maxBuffer:s*2});try{return await Promise.all([o,a,l,u])}catch(c){return Promise.all([{error:c,signal:c.signal,timedOut:c.timedOut},ww(e,a),ww(t,l),ww(n,u)])}};var I6=(async()=>{})().constructor.prototype,P6=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(I6,e)]),Sw=(e,t)=>{for(let[n,r]of P6){let i=typeof t=="function"?(...s)=>Reflect.apply(r.value,t(),s):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:i})}},_A=e=>new Promise((t,n)=>{e.on("exit",(r,i)=>{t({exitCode:r,signal:i})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});import{Buffer as T6}from"node:buffer";import{ChildProcess as A6}from"node:child_process";var OA=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],L6=/^[\w.-]+$/,N6=e=>typeof e!="string"||L6.test(e)?e:`"${e.replaceAll('"','\\"')}"`,_w=(e,t)=>OA(e,t).join(" "),Cw=(e,t)=>OA(e,t).map(n=>N6(n)).join(" "),D6=/ +/g;var CA=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(t==="object"&&e!==null&&!(e instanceof A6)&&"stdout"in e){let n=typeof e.stdout;if(n==="string")return e.stdout;if(T6.isBuffer(e.stdout))return e.stdout.toString();throw new TypeError(`Unexpected "${n}" stdout in template expression`)}throw new TypeError(`Unexpected "${t}" in template expression`)},bA=(e,t,n)=>n||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],k6=({templates:e,expressions:t,tokens:n,index:r,template:i})=>{let s=i??e.raw[r],o=s.split(D6).filter(Boolean),a=bA(n,o,s.startsWith(" "));if(r===t.length)return a;let l=t[r],u=Array.isArray(l)?l.map(c=>CA(c)):[CA(l)];return bA(a,u,s.endsWith(" "))},bw=(e,t)=>{let n=[];for(let[r,i]of e.entries())n=k6({templates:e,expressions:t,tokens:n,index:r,template:i});return n};import{debuglog as M6}from"node:util";import R6 from"node:process";var EA=M6("execa").enabled,qm=(e,t)=>String(e).padStart(t,"0"),V6=()=>{let e=new Date;return`${qm(e.getHours(),2)}:${qm(e.getMinutes(),2)}:${qm(e.getSeconds(),2)}.${qm(e.getMilliseconds(),3)}`},Ow=(e,{verbose:t})=>{t&&R6.stderr.write(`[${V6()}] ${e}
491
+ `)};var U6=1e3*1e3*100,F6=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let s=t?{...Km.env,...e}:e;return n?zT({env:s,cwd:r,execPath:i}):s},TA=(e,t,n={})=>{let r=PA.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:U6,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||Km.cwd(),execPath:Km.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:EA,...n},n.env=F6(n),n.stdio=JT(n),Km.platform==="win32"&&B6.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},vf=(e,t,n)=>typeof t!="string"&&!j6.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?rw(t):t;function Xn(e,t,n){let r=TA(e,t,n),i=_w(e,t),s=Cw(e,t);Ow(s,r.options),nA(r.options);let o;try{o=Ew.spawn(r.file,r.args,r.options)}catch(d){let m=new Ew.ChildProcess,y=Promise.reject(gf({error:d,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return Sw(m,y),m}let a=_A(o),l=tA(o,r.options,a),u=rA(o,r.options,l),c={isCanceled:!1};o.kill=QT.bind(null,o.kill.bind(o)),o.cancel=eA.bind(null,o,c);let p=$T(async()=>{let[{error:d,exitCode:m,signal:y,timedOut:v},h,g,w]=await SA(o,r.options,u),x=vf(r.options,h),C=vf(r.options,g),A=vf(r.options,w);if(d||m!==0||y!==null){let T=gf({error:d,exitCode:m,signal:y,stdout:x,stderr:C,all:A,command:i,escapedCommand:s,parsed:r,timedOut:v,isCanceled:c.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:o.killed});if(!r.options.reject)return T;throw T}return{command:i,escapedCommand:s,exitCode:0,stdout:x,stderr:C,all:A,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return wA(o,r.options),o.all=xA(o,r.options),iA(o),Sw(o,p),o}function Jn(e,t,n){let r=TA(e,t,n),i=_w(e,t),s=Cw(e,t);Ow(s,r.options);let o=vA(r.options),a;try{a=Ew.spawnSync(r.file,r.args,{...r.options,input:o})}catch(c){throw gf({error:c,stdout:"",stderr:"",all:"",command:i,escapedCommand:s,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let l=vf(r.options,a.stdout,a.error),u=vf(r.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let c=gf({stdout:l,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:s,parsed:r,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!r.options.reject)return c;throw c}return{command:i,escapedCommand:s,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}var W6=({input:e,inputFile:t,stdio:n})=>e===void 0&&t===void 0&&n===void 0?{stdin:"inherit"}:{},IA=(e={})=>({preferLocal:!0,...W6(e),...e});function AA(e){function t(n,...r){if(!Array.isArray(n))return AA({...e,...n});let[i,...s]=bw(n,r);return Xn(i,s,IA(e))}return t.sync=(n,...r)=>{if(!Array.isArray(n))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[i,...s]=bw(n,r);return Jn(i,s,IA(e))},t}var Qte=AA();var Ym=e=>{throw e.code==="ENOENT"?new Error("Couldn't find the termux-api scripts. You can install them with: apt install termux-api"):e},z6={async copy(e){try{await Xn("termux-clipboard-set",e)}catch(t){Ym(t)}},async paste(e){try{let{stdout:t}=await Xn("termux-clipboard-get",e);return t}catch(t){Ym(t)}},copySync(e){try{Jn("termux-clipboard-set",e)}catch(t){Ym(t)}},pasteSync(e){try{return Jn("termux-clipboard-get",e).stdout}catch(t){Ym(t)}}},LA=z6;import RA from"node:path";import{fileURLToPath as G6}from"node:url";var $6=RA.dirname(G6(import.meta.url)),VA="xsel",jA=RA.join($6,"../fallbacks/linux/xsel"),NA=["--clipboard","--input"],DA=["--clipboard","--output"],BA=(e,t)=>{let n;return e.code==="ENOENT"?n=new Error("Couldn't find the `xsel` binary and fallback didn't work. On Debian/Ubuntu you can install xsel with: sudo apt install xsel"):(n=new Error("Both xsel and fallback failed"),n.xselError=e),n.fallbackError=t,n},kA=async(e,t)=>{try{let{stdout:n}=await Xn(VA,e,t);return n}catch(n){try{let{stdout:r}=await Xn(jA,e,t);return r}catch(r){throw BA(n,r)}}},MA=(e,t)=>{try{return Jn(VA,e,t).stdout}catch(n){try{return Jn(jA,e,t).stdout}catch(r){throw BA(n,r)}}},H6={async copy(e){await kA(NA,e)},copySync(e){MA(NA,e)},paste:e=>kA(DA,e),pasteSync:e=>MA(DA,e)},UA=H6;var Xm={LC_CTYPE:"UTF-8"},q6={copy:async e=>Xn("pbcopy",{...e,env:Xm}),async paste(e){let{stdout:t}=await Xn("pbpaste",{...e,env:Xm});return t},copySync:e=>Jn("pbcopy",{...e,env:Xm}),pasteSync:e=>Jn("pbpaste",{...e,env:Xm}).stdout},FA=q6;import GA from"node:path";import{fileURLToPath as J6}from"node:url";import{promisify as K6}from"node:util";import Y6 from"node:process";import Iw from"node:child_process";var pne=K6(Iw.execFile);function WA(){let{arch:e,platform:t,env:n}=Y6;return t==="darwin"&&e==="x64"?Iw.execFileSync("sysctl",["-inq","sysctl.proc_translated"],{encoding:"utf8"}).trim()==="1"?"arm64":"x64":e==="arm64"||e==="x64"?e:t==="win32"&&Object.hasOwn(n,"PROCESSOR_ARCHITEW6432")||t==="linux"&&Iw.execFileSync("getconf",["LONG_BIT"],{encoding:"utf8"}).trim()==="64"?"x64":e}var X6=new Set(["arm64","x64","ppc64","riscv64"]);function zA(){return X6.has(WA())}var Z6=GA.dirname(J6(import.meta.url)),Q6=zA()?"x86_64":"i686",Jm=GA.join(Z6,`../fallbacks/windows/clipboard_${Q6}.exe`),eU={copy:async e=>Xn(Jm,["--copy"],e),async paste(e){let{stdout:t}=await Xn(Jm,["--paste"],e);return t},copySync:e=>Jn(Jm,["--copy"],e),pasteSync:e=>Jn(Jm,["--paste"],e).stdout},Pw=eU;var Zm=(()=>{switch($A.platform){case"darwin":return FA;case"win32":return Pw;case"android":{if($A.env.PREFIX!=="/data/data/com.termux/files/usr")throw new Error("You need to install Termux for this module to work on Android: https://termux.com");return LA}default:return Xo?Pw:UA}})(),wf={};wf.write=async e=>{if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);await Zm.copy({input:e})};wf.read=async()=>Zm.paste({stripFinalNewline:!1});wf.writeSync=e=>{if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);Zm.copySync({input:e})};wf.readSync=()=>Zm.pasteSync({stripFinalNewline:!1});var Tw=wf;var ze;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{let s={};for(let o of i)s[o]=o;return s},e.getValidEnumValues=i=>{let s=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(let a of s)o[a]=i[a];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},e.find=(i,s)=>{for(let o of i)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ze||(ze={}));var Lw;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Lw||(Lw={}));var ie=ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zs=e=>{switch(typeof e){case"undefined":return ie.undefined;case"string":return ie.string;case"number":return isNaN(e)?ie.nan:ie.number;case"boolean":return ie.boolean;case"function":return ie.function;case"bigint":return ie.bigint;case"symbol":return ie.symbol;case"object":return Array.isArray(e)?ie.array:e===null?ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ie.promise:typeof Map<"u"&&e instanceof Map?ie.map:typeof Set<"u"&&e instanceof Set?ie.set:typeof Date<"u"&&e instanceof Date?ie.date:ie.object;default:return ie.unknown}},q=ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),tU=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Zn=class e extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){let u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Zn.create=e=>new Zn(e);var su=(e,t)=>{let n;switch(e.code){case q.invalid_type:e.received===ie.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ze.jsonStringifyReplacer)}`;break;case q.unrecognized_keys:n=`Unrecognized key(s) in object: ${ze.joinValues(e.keys,", ")}`;break;case q.invalid_union:n="Invalid input";break;case q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ze.joinValues(e.options)}`;break;case q.invalid_enum_value:n=`Invalid enum value. Expected ${ze.joinValues(e.options)}, received '${e.received}'`;break;case q.invalid_arguments:n="Invalid function arguments";break;case q.invalid_return_type:n="Invalid function return type";break;case q.invalid_date:n="Invalid date";break;case q.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ze.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case q.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case q.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case q.custom:n="Invalid input";break;case q.invalid_intersection_types:n="Intersection results could not be merged";break;case q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case q.not_finite:n="Number must be finite";break;default:n=t.defaultError,ze.assertNever(e)}return{message:n}},KA=su;function nU(e){KA=e}function Qm(){return KA}var eh=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="",l=r.filter(u=>!!u).slice().reverse();for(let u of l)a=u(o,{data:t,defaultError:a}).message;return{...i,path:s,message:a}},rU=[];function ee(e,t){let n=Qm(),r=eh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===su?void 0:su].filter(i=>!!i)});e.common.issues.push(r)}var un=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let i of n){if(i.status==="aborted")return Ie;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let i of n){let s=await i.key,o=await i.value;r.push({key:s,value:o})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let i of n){let{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Ie;s.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:t.value,value:r}}},Ie=Object.freeze({status:"aborted"}),iu=e=>({status:"dirty",value:e}),xn=e=>({status:"valid",value:e}),Nw=e=>e.status==="aborted",Dw=e=>e.status==="dirty",_f=e=>e.status==="valid",Cf=e=>typeof Promise<"u"&&e instanceof Promise;function th(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function YA(e,t,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(e,n):i?i.value=n:t.set(e,n),n}var he;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(he||(he={}));var xf,Sf,xr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},HA=(e,t)=>{if(_f(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Zn(e.common.issues);return this._error=n,this._error}}};function De(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,a)=>{var l,u;let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:i}}var ke=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return zs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new un,ctx:{common:t.parent.common,data:t.data,parsedType:zs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Cf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},s=this._parseSync({data:t,path:i.path,parent:i});return HA(i,s)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:zs(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(Cf(i)?i:Promise.resolve(i));return HA(r,s)}refine(t,n){let r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{let o=t(i),a=()=>s.addIssue({code:q.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Qn({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return wr.create(this,this._def)}nullable(){return wi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qi.create(this,this._def)}promise(){return Hs.create(this,this._def)}or(t){return xa.create([this,t],this._def)}and(t){return Sa.create(this,t,this._def)}transform(t){return new Qn({...De(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Ea({...De(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new bf({typeName:Oe.ZodBranded,type:this,...De(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Ia({...De(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Of.create(this,t)}readonly(){return Pa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},iU=/^c[^\s-]{8,}$/i,sU=/^[0-9a-z]+$/,oU=/^[0-9A-HJKMNP-TV-Z]{26}$/,aU=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lU=/^[a-z0-9_-]{21}$/i,uU=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,cU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Aw,pU=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,dU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,mU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,XA="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",hU=new RegExp(`^${XA}$`);function JA(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function gU(e){return new RegExp(`^${JA(e)}$`)}function ZA(e){let t=`${XA}T${JA(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function yU(e,t){return!!((t==="v4"||!t)&&pU.test(e)||(t==="v6"||!t)&&dU.test(e))}var Gs=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ie.string){let s=this._getOrReturnCtx(t);return ee(s,{code:q.invalid_type,expected:ie.string,received:s.parsedType}),Ie}let r=new un,i;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),ee(i,{code:q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),ee(i,{code:q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){let o=t.data.length>s.value,a=t.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(t,i),o?ee(i,{code:q.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&ee(i,{code:q.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")cU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"email",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Aw||(Aw=new RegExp(fU,"u")),Aw.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"emoji",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")aU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"uuid",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")lU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"nanoid",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")iU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"cuid",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")sU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"cuid2",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")oU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"ulid",code:q.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),ee(i,{validation:"url",code:q.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"regex",code:q.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?ZA(s).test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?hU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?gU(s).test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{code:q.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?uU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"duration",code:q.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?yU(t.data,s.version)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"ip",code:q.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?mU.test(t.data)||(i=this._getOrReturnCtx(t,i),ee(i,{validation:"base64",code:q.invalid_string,message:s.message}),r.dirty()):ze.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:q.invalid_string,...he.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...he.errToObj(t)})}url(t){return this._addCheck({kind:"url",...he.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...he.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...he.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...he.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...he.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...he.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...he.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...he.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...he.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...he.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...he.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...he.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...he.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...he.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...he.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...he.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...he.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...he.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...he.errToObj(n)})}nonempty(t){return this.min(1,he.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Gs.create=e=>{var t;return new Gs({checks:[],typeName:Oe.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...De(e)})};function vU(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}var ma=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ie.number){let s=this._getOrReturnCtx(t);return ee(s,{code:q.invalid_type,expected:ie.number,received:s.parsedType}),Ie}let r,i=new un;for(let s of this._def.checks)s.kind==="int"?ze.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:q.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?vU(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ee(r,{code:q.not_finite,message:s.message}),i.dirty()):ze.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:he.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:he.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ze.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};ma.create=e=>new ma({checks:[],typeName:Oe.ZodNumber,coerce:e?.coerce||!1,...De(e)});var ha=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ie.bigint){let s=this._getOrReturnCtx(t);return ee(s,{code:q.invalid_type,expected:ie.bigint,received:s.parsedType}),Ie}let r,i=new un;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ee(r,{code:q.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ze.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,he.toString(n))}gt(t,n){return this.setLimit("min",t,!1,he.toString(n))}lte(t,n){return this.setLimit("max",t,!0,he.toString(n))}lt(t,n){return this.setLimit("max",t,!1,he.toString(n))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:he.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:he.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ha.create=e=>{var t;return new ha({checks:[],typeName:Oe.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...De(e)})};var ga=class extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ie.boolean){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.boolean,received:r.parsedType}),Ie}return xn(t.data)}};ga.create=e=>new ga({typeName:Oe.ZodBoolean,coerce:e?.coerce||!1,...De(e)});var ya=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ie.date){let s=this._getOrReturnCtx(t);return ee(s,{code:q.invalid_type,expected:ie.date,received:s.parsedType}),Ie}if(isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return ee(s,{code:q.invalid_date}),Ie}let r=new un,i;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),ee(i,{code:q.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),ee(i,{code:q.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ze.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:he.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:he.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};ya.create=e=>new ya({checks:[],coerce:e?.coerce||!1,typeName:Oe.ZodDate,...De(e)});var ou=class extends ke{_parse(t){if(this._getType(t)!==ie.symbol){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.symbol,received:r.parsedType}),Ie}return xn(t.data)}};ou.create=e=>new ou({typeName:Oe.ZodSymbol,...De(e)});var va=class extends ke{_parse(t){if(this._getType(t)!==ie.undefined){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.undefined,received:r.parsedType}),Ie}return xn(t.data)}};va.create=e=>new va({typeName:Oe.ZodUndefined,...De(e)});var wa=class extends ke{_parse(t){if(this._getType(t)!==ie.null){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.null,received:r.parsedType}),Ie}return xn(t.data)}};wa.create=e=>new wa({typeName:Oe.ZodNull,...De(e)});var $s=class extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return xn(t.data)}};$s.create=e=>new $s({typeName:Oe.ZodAny,...De(e)});var Zi=class extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return xn(t.data)}};Zi.create=e=>new Zi({typeName:Oe.ZodUnknown,...De(e)});var Xr=class extends ke{_parse(t){let n=this._getOrReturnCtx(t);return ee(n,{code:q.invalid_type,expected:ie.never,received:n.parsedType}),Ie}};Xr.create=e=>new Xr({typeName:Oe.ZodNever,...De(e)});var au=class extends ke{_parse(t){if(this._getType(t)!==ie.undefined){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.void,received:r.parsedType}),Ie}return xn(t.data)}};au.create=e=>new au({typeName:Oe.ZodVoid,...De(e)});var Qi=class e extends ke{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ie.array)return ee(n,{code:q.invalid_type,expected:ie.array,received:n.parsedType}),Ie;if(i.exactLength!==null){let o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(ee(n,{code:o?q.too_big:q.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ee(n,{code:q.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ee(n,{code:q.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new xr(n,o,n.path,a)))).then(o=>un.mergeArray(r,o));let s=[...n.data].map((o,a)=>i.type._parseSync(new xr(n,o,n.path,a)));return un.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:he.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:he.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:he.toString(n)}})}nonempty(t){return this.min(1,t)}};Qi.create=(e,t)=>new Qi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...De(t)});function ru(e){if(e instanceof Dn){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=wr.create(ru(r))}return new Dn({...e._def,shape:()=>t})}else return e instanceof Qi?new Qi({...e._def,type:ru(e.element)}):e instanceof wr?wr.create(ru(e.unwrap())):e instanceof wi?wi.create(ru(e.unwrap())):e instanceof vi?vi.create(e.items.map(t=>ru(t))):e}var Dn=class e extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=ze.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ie.object){let u=this._getOrReturnCtx(t);return ee(u,{code:q.invalid_type,expected:ie.object,received:u.parsedType}),Ie}let{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(let u in i.data)o.includes(u)||a.push(u);let l=[];for(let u of o){let c=s[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new xr(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Xr){let u=this._def.unknownKeys;if(u==="passthrough")for(let c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(ee(i,{code:q.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let c of a){let f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new xr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let c of l){let f=await c.key,p=await c.value;u.push({key:f,value:p,alwaysSet:c.alwaysSet})}return u}).then(u=>un.mergeObjectSync(r,u)):un.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return he.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,s,o,a;let l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=he.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return ze.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return ze.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return ru(this)}partial(t){let n={};return ze.objectKeys(this.shape).forEach(r=>{let i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return ze.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof wr;)s=s._def.innerType;n[r]=s}}),new e({...this._def,shape:()=>n})}keyof(){return QA(ze.objectKeys(this.shape))}};Dn.create=(e,t)=>new Dn({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Oe.ZodObject,...De(t)});Dn.strictCreate=(e,t)=>new Dn({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Oe.ZodObject,...De(t)});Dn.lazycreate=(e,t)=>new Dn({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Oe.ZodObject,...De(t)});var xa=class extends ke{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let o=s.map(a=>new Zn(a.ctx.common.issues));return ee(n,{code:q.invalid_union,unionErrors:o}),Ie}if(n.common.async)return Promise.all(r.map(async s=>{let o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s,o=[];for(let l of r){let u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(l=>new Zn(l));return ee(n,{code:q.invalid_union,unionErrors:a}),Ie}}get options(){return this._def.options}};xa.create=(e,t)=>new xa({options:e,typeName:Oe.ZodUnion,...De(t)});var Ji=e=>e instanceof _a?Ji(e.schema):e instanceof Qn?Ji(e.innerType()):e instanceof Ca?[e.value]:e instanceof ba?e.options:e instanceof Oa?ze.objectValues(e.enum):e instanceof Ea?Ji(e._def.innerType):e instanceof va?[void 0]:e instanceof wa?[null]:e instanceof wr?[void 0,...Ji(e.unwrap())]:e instanceof wi?[null,...Ji(e.unwrap())]:e instanceof bf||e instanceof Pa?Ji(e.unwrap()):e instanceof Ia?Ji(e._def.innerType):[],nh=class e extends ke{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.object)return ee(n,{code:q.invalid_type,expected:ie.object,received:n.parsedType}),Ie;let r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ee(n,{code:q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let s of n){let o=Ji(s.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,s)}}return new e({typeName:Oe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...De(r)})}};function kw(e,t){let n=zs(e),r=zs(t);if(e===t)return{valid:!0,data:e};if(n===ie.object&&r===ie.object){let i=ze.objectKeys(t),s=ze.objectKeys(e).filter(a=>i.indexOf(a)!==-1),o={...e,...t};for(let a of s){let l=kw(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===ie.array&&r===ie.array){if(e.length!==t.length)return{valid:!1};let i=[];for(let s=0;s<e.length;s++){let o=e[s],a=t[s],l=kw(o,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ie.date&&r===ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Sa=class extends ke{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),i=(s,o)=>{if(Nw(s)||Nw(o))return Ie;let a=kw(s.value,o.value);return a.valid?((Dw(s)||Dw(o))&&n.dirty(),{status:n.value,value:a.data}):(ee(r,{code:q.invalid_intersection_types}),Ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Sa.create=(e,t,n)=>new Sa({left:e,right:t,typeName:Oe.ZodIntersection,...De(n)});var vi=class e extends ke{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.array)return ee(r,{code:q.invalid_type,expected:ie.array,received:r.parsedType}),Ie;if(r.data.length<this._def.items.length)return ee(r,{code:q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&r.data.length>this._def.items.length&&(ee(r,{code:q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let s=[...r.data].map((o,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new xr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>un.mergeArray(n,o)):un.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};vi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vi({items:e,typeName:Oe.ZodTuple,rest:null,...De(t)})};var rh=class e extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.object)return ee(r,{code:q.invalid_type,expected:ie.object,received:r.parsedType}),Ie;let i=[],s=this._def.keyType,o=this._def.valueType;for(let a in r.data)i.push({key:s._parse(new xr(r,a,r.path,a)),value:o._parse(new xr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?un.mergeObjectAsync(n,i):un.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ke?new e({keyType:t,valueType:n,typeName:Oe.ZodRecord,...De(r)}):new e({keyType:Gs.create(),valueType:t,typeName:Oe.ZodRecord,...De(n)})}},lu=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.map)return ee(r,{code:q.invalid_type,expected:ie.map,received:r.parsedType}),Ie;let i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new xr(r,a,r.path,[u,"key"])),value:s._parse(new xr(r,l,r.path,[u,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of o){let u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Ie;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of o){let u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Ie;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}};lu.create=(e,t,n)=>new lu({valueType:t,keyType:e,typeName:Oe.ZodMap,...De(n)});var uu=class e extends ke{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ie.set)return ee(r,{code:q.invalid_type,expected:ie.set,received:r.parsedType}),Ie;let i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(ee(r,{code:q.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(ee(r,{code:q.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());let s=this._def.valueType;function o(l){let u=new Set;for(let c of l){if(c.status==="aborted")return Ie;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}let a=[...r.data.values()].map((l,u)=>s._parse(new xr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:he.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:he.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};uu.create=(e,t)=>new uu({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...De(t)});var ih=class e extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.function)return ee(n,{code:q.invalid_type,expected:ie.function,received:n.parsedType}),Ie;function r(a,l){return eh({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qm(),su].filter(u=>!!u),issueData:{code:q.invalid_arguments,argumentsError:l}})}function i(a,l){return eh({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Qm(),su].filter(u=>!!u),issueData:{code:q.invalid_return_type,returnTypeError:l}})}let s={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Hs){let a=this;return xn(async function(...l){let u=new Zn([]),c=await a._def.args.parseAsync(l,s).catch(d=>{throw u.addIssue(r(l,d)),u}),f=await Reflect.apply(o,this,c);return await a._def.returns._def.type.parseAsync(f,s).catch(d=>{throw u.addIssue(i(f,d)),u})})}else{let a=this;return xn(function(...l){let u=a._def.args.safeParse(l,s);if(!u.success)throw new Zn([r(l,u.error)]);let c=Reflect.apply(o,this,u.data),f=a._def.returns.safeParse(c,s);if(!f.success)throw new Zn([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:vi.create(t).rest(Zi.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||vi.create([]).rest(Zi.create()),returns:n||Zi.create(),typeName:Oe.ZodFunction,...De(r)})}},_a=class extends ke{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};_a.create=(e,t)=>new _a({getter:e,typeName:Oe.ZodLazy,...De(t)});var Ca=class extends ke{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ee(n,{received:n.data,code:q.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ca.create=(e,t)=>new Ca({value:e,typeName:Oe.ZodLiteral,...De(t)});function QA(e,t){return new ba({values:e,typeName:Oe.ZodEnum,...De(t)})}var ba=class e extends ke{constructor(){super(...arguments),xf.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{expected:ze.joinValues(r),received:n.parsedType,code:q.invalid_type}),Ie}if(th(this,xf,"f")||YA(this,xf,new Set(this._def.values),"f"),!th(this,xf,"f").has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return ee(n,{received:n.data,code:q.invalid_enum_value,options:r}),Ie}return xn(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};xf=new WeakMap;ba.create=QA;var Oa=class extends ke{constructor(){super(...arguments),Sf.set(this,void 0)}_parse(t){let n=ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ie.string&&r.parsedType!==ie.number){let i=ze.objectValues(n);return ee(r,{expected:ze.joinValues(i),received:r.parsedType,code:q.invalid_type}),Ie}if(th(this,Sf,"f")||YA(this,Sf,new Set(ze.getValidEnumValues(this._def.values)),"f"),!th(this,Sf,"f").has(t.data)){let i=ze.objectValues(n);return ee(r,{received:r.data,code:q.invalid_enum_value,options:i}),Ie}return xn(t.data)}get enum(){return this._def.values}};Sf=new WeakMap;Oa.create=(e,t)=>new Oa({values:e,typeName:Oe.ZodNativeEnum,...De(t)});var Hs=class extends ke{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ie.promise&&n.common.async===!1)return ee(n,{code:q.invalid_type,expected:ie.promise,received:n.parsedType}),Ie;let r=n.parsedType===ie.promise?n.data:Promise.resolve(n.data);return xn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Hs.create=(e,t)=>new Hs({type:e,typeName:Oe.ZodPromise,...De(t)});var Qn=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:o=>{ee(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let o=i.transform(r.data,s);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return Ie;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Ie:l.status==="dirty"||n.value==="dirty"?iu(l.value):l});{if(n.value==="aborted")return Ie;let a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?Ie:a.status==="dirty"||n.value==="dirty"?iu(a.value):a}}if(i.type==="refinement"){let o=a=>{let l=i.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ie:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Ie:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!_f(o))return o;let a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>_f(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):o);ze.assertNever(i)}};Qn.create=(e,t,n)=>new Qn({schema:e,typeName:Oe.ZodEffects,effect:t,...De(n)});Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...De(n)});var wr=class extends ke{_parse(t){return this._getType(t)===ie.undefined?xn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};wr.create=(e,t)=>new wr({innerType:e,typeName:Oe.ZodOptional,...De(t)});var wi=class extends ke{_parse(t){return this._getType(t)===ie.null?xn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};wi.create=(e,t)=>new wi({innerType:e,typeName:Oe.ZodNullable,...De(t)});var Ea=class extends ke{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===ie.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Ea.create=(e,t)=>new Ea({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...De(t)});var Ia=class extends ke{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Cf(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Zn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Ia.create=(e,t)=>new Ia({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...De(t)});var cu=class extends ke{_parse(t){if(this._getType(t)!==ie.nan){let r=this._getOrReturnCtx(t);return ee(r,{code:q.invalid_type,expected:ie.nan,received:r.parsedType}),Ie}return{status:"valid",value:t.data}}};cu.create=e=>new cu({typeName:Oe.ZodNaN,...De(e)});var wU=Symbol("zod_brand"),bf=class extends ke{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},Of=class e extends ke{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ie:s.status==="dirty"?(n.dirty(),iu(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ie:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Oe.ZodPipeline})}},Pa=class extends ke{_parse(t){let n=this._def.innerType._parse(t),r=i=>(_f(i)&&(i.value=Object.freeze(i.value)),i);return Cf(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};Pa.create=(e,t)=>new Pa({innerType:e,typeName:Oe.ZodReadonly,...De(t)});function eL(e,t={},n){return e?$s.create().superRefine((r,i)=>{var s,o;if(!e(r)){let a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:l})}}):$s.create()}var xU={object:Dn.lazycreate},Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));var SU=(e,t={message:`Input not instance of ${e.name}`})=>eL(n=>n instanceof e,t),tL=Gs.create,nL=ma.create,_U=cu.create,CU=ha.create,rL=ga.create,bU=ya.create,OU=ou.create,EU=va.create,IU=wa.create,PU=$s.create,TU=Zi.create,AU=Xr.create,LU=au.create,NU=Qi.create,Ef=Dn.create,DU=Dn.strictCreate,kU=xa.create,MU=nh.create,RU=Sa.create,VU=vi.create,jU=rh.create,BU=lu.create,UU=uu.create,FU=ih.create,WU=_a.create,zU=Ca.create,GU=ba.create,$U=Oa.create,HU=Hs.create,qA=Qn.create,qU=wr.create,KU=wi.create,YU=Qn.createWithPreprocess,XU=Of.create,JU=()=>tL().optional(),ZU=()=>nL().optional(),QU=()=>rL().optional(),eF={string:e=>Gs.create({...e,coerce:!0}),number:e=>ma.create({...e,coerce:!0}),boolean:e=>ga.create({...e,coerce:!0}),bigint:e=>ha.create({...e,coerce:!0}),date:e=>ya.create({...e,coerce:!0})},tF=Ie,If=Object.freeze({__proto__:null,defaultErrorMap:su,setErrorMap:nU,getErrorMap:Qm,makeIssue:eh,EMPTY_PATH:rU,addIssueToContext:ee,ParseStatus:un,INVALID:Ie,DIRTY:iu,OK:xn,isAborted:Nw,isDirty:Dw,isValid:_f,isAsync:Cf,get util(){return ze},get objectUtil(){return Lw},ZodParsedType:ie,getParsedType:zs,ZodType:ke,datetimeRegex:ZA,ZodString:Gs,ZodNumber:ma,ZodBigInt:ha,ZodBoolean:ga,ZodDate:ya,ZodSymbol:ou,ZodUndefined:va,ZodNull:wa,ZodAny:$s,ZodUnknown:Zi,ZodNever:Xr,ZodVoid:au,ZodArray:Qi,ZodObject:Dn,ZodUnion:xa,ZodDiscriminatedUnion:nh,ZodIntersection:Sa,ZodTuple:vi,ZodRecord:rh,ZodMap:lu,ZodSet:uu,ZodFunction:ih,ZodLazy:_a,ZodLiteral:Ca,ZodEnum:ba,ZodNativeEnum:Oa,ZodPromise:Hs,ZodEffects:Qn,ZodTransformer:Qn,ZodOptional:wr,ZodNullable:wi,ZodDefault:Ea,ZodCatch:Ia,ZodNaN:cu,BRAND:wU,ZodBranded:bf,ZodPipeline:Of,ZodReadonly:Pa,custom:eL,Schema:ke,ZodSchema:ke,late:xU,get ZodFirstPartyTypeKind(){return Oe},coerce:eF,any:PU,array:NU,bigint:CU,boolean:rL,date:bU,discriminatedUnion:MU,effect:qA,enum:GU,function:FU,instanceof:SU,intersection:RU,lazy:WU,literal:zU,map:BU,nan:_U,nativeEnum:$U,never:AU,null:IU,nullable:KU,number:nL,object:Ef,oboolean:QU,onumber:ZU,optional:qU,ostring:JU,pipeline:XU,preprocess:YU,promise:HU,record:jU,set:UU,strictObject:DU,string:tL,symbol:OU,transformer:qA,tuple:VU,undefined:EU,union:kU,unknown:TU,void:LU,NEVER:tF,ZodIssueCode:q,quotelessJson:tU,ZodError:Zn});function iL(e){let t=e.runtimeEnvStrict??e.runtimeEnv??process.env;if(e.emptyStringAsUndefined??!1)for(let[A,T]of Object.entries(t))T===""&&delete t[A];if(!!e.skipValidation)return t;let i=typeof e.client=="object"?e.client:{},s=typeof e.server=="object"?e.server:{},o=typeof e.shared=="object"?e.shared:{},a=Ef(i),l=Ef(s),u=Ef(o),c=e.isServer??(typeof window>"u"||"Deno"in window),f=a.merge(u),p=l.merge(u).merge(a),d=c?p.safeParse(t):f.safeParse(t),m=e.onValidationError??(A=>{throw console.error("\u274C Invalid environment variables:",A.flatten().fieldErrors),new Error("Invalid environment variables")}),y=e.onInvalidAccess??(A=>{throw new Error("\u274C Attempted to access a server-side environment variable on the client")});if(d.success===!1)return m(d.error);let v=A=>e.clientPrefix?!A.startsWith(e.clientPrefix)&&!(A in u.shape):!0,h=A=>c||!v(A),g=A=>A==="__esModule"||A==="$$typeof",w=(e.extends??[]).reduce((A,T)=>Object.assign(A,T),{}),x=Object.assign(d.data,w);return new Proxy(x,{get(A,T){if(typeof T=="string"&&!g(T))return h(T)?Reflect.get(A,T):y(T)}})}var Mw={dev:{CONNECT_API_BASE_URL:"https://api.canva-dev.com/rest",CANVA_ENV_URL:"https://www.canva-dev.com",CANVA_CLI_CLIENT_ID:"OC-AZFEJKOjQYw3"},staging:{CONNECT_API_BASE_URL:"https://api.canva-staging.com/rest",CANVA_ENV_URL:"https://www.canva-staging.com",CANVA_CLI_CLIENT_ID:"OC-AZH-EOTpT8Ib"},prod:{CONNECT_API_BASE_URL:"https://api.canva.com/rest",CANVA_ENV_URL:"https://www.canva.com",CANVA_CLI_CLIENT_ID:"OC-AZICxlGo2biD"}},Sr=iL({server:{ENV:If.enum(["dev","staging","prod"]).default("prod"),CONNECT_API_BASE_URL:If.string().url(),CANVA_ENV_URL:If.string().url(),CANVA_CLI_CLIENT_ID:If.string()},runtimeEnv:{ENV:process.env.ENV??"prod",CONNECT_API_BASE_URL:Mw[process.env.ENV??"prod"].CONNECT_API_BASE_URL,CANVA_ENV_URL:Mw[process.env.ENV??"prod"].CANVA_ENV_URL,CANVA_CLI_CLIENT_ID:Mw[process.env.ENV??"prod"].CANVA_CLI_CLIENT_ID},emptyStringAsUndefined:!0});var iF=7,sL=()=>Be.createElement(qs,{color:"gray"},"(Use arrow keys, return/enter to select)"),sF=()=>Be.createElement(Be.Fragment,null,Be.createElement(qs,null,"Looks like you don't have any apps."),Be.createElement(qs,null,"Run ",Be.createElement(bt,null,"canva apps create")," to create a new app!")),sh=({label:e,value:t})=>Be.createElement(Ta,null,Be.createElement(qs,{bold:!0},e,": "),Be.createElement(bt,{bold:!1},t)),oL=[{label:"View app in the Developer Portal",value:"open-in-developer-portal",action:e=>{let t=Wo({env:Sr.ENV,appId:e.id});vl(t)}},{label:"Copy App ID",value:"copy-app-id",action:e=>{Tw.writeSync(e.id)}},{label:"Copy App Origin",value:"copy-app-origin",action:e=>{let t=_p({env:Sr.ENV,appId:e.id});Tw.writeSync(t)}},{label:"Return to app list",value:"return-to-app-list",action:()=>{}}],oF=({apps:e})=>{let[t,n]=Be.useState(),{exit:r}=nF();if(rF(i=>{i==="q"&&r()}),t){let i=Li(e.find(s=>s.id===t));return Be.createElement(Ta,{flexDirection:"column"},Be.createElement(sh,{label:"Name",value:i.name}),Be.createElement(sh,{label:"Distribution",value:QP(i.distribution)}),Be.createElement(sh,{label:"App ID",value:i.id}),Be.createElement(sh,{label:"App version",value:i.version.toString()}),Be.createElement(Ta,{height:1}),Be.createElement(qs,{bold:!0},"Select an action: ",Be.createElement(sL,null)),Be.createElement(Xi,{options:oL,onChange:s=>{let{action:o,value:a}=Li(oL.find(l=>l.value===s));a==="return-to-app-list"?n(void 0):o(i)}}))}return Be.createElement(Ta,{flexDirection:"column",margin:1},e.length===0?Be.createElement(sF,null):Be.createElement(Be.Fragment,null,Be.createElement(qs,{bold:!0},"Select an app: ",Be.createElement(sL,null)),Be.createElement(Xi,{options:e.map(i=>({label:i.name,value:i.id})),visibleOptionCount:iF,onChange:n}),Be.createElement(Ta,{height:1}),Be.createElement(qs,{color:"yellow"},'Press "q" to quit.')))},aF=({code:e,message:t})=>Be.createElement(qs,{color:"red"},`${e}: ${t}`),aL=({listApps:e})=>{let[t,n]=Be.useState();return Be.useEffect(()=>{e().then(n)},[]),t?Be.createElement(Ta,{marginX:2,marginY:1},t.success?Be.createElement(oF,{apps:t.data}):Be.createElement(aF,{code:t.code,message:t.message})):Be.createElement(Ta,{marginX:2,marginY:1},Be.createElement(Ws,{type:"bouncingBall",label:"Loading your apps..."}))};import Aa,{useEffect as lF,useState as lL}from"react";import{Box as uL,Text as uF}from"ink";var oh=({children:e,checkLoginStatus:t})=>{let[n,r]=lL(!0),[i,s]=lL(!1);return lF(()=>{t().then(o=>{s(o),r(!1)})},[]),n?Aa.createElement(uL,{marginX:2,marginY:1},Aa.createElement(Ws,{type:"bouncingBall",label:"Checking login status..."})):i?Aa.createElement(Aa.Fragment,null,e):Aa.createElement(uL,{flexDirection:"column",paddingX:2},Aa.createElement(uF,null,"You need to be logged in to run this command. Run"," ",Aa.createElement(bt,null,"canva login")))};var fF=async({argv:e},t)=>{let n=await e;cF(ah.createElement(Ye.Provider,{value:{lite:n.lite}},ah.createElement(Bn,null,ah.createElement(oh,{checkLoginStatus:t.tokenService.isLoggedIn},ah.createElement(aL,{listApps:t.appService.listApps})))))},cL=({cli:e,services:t})=>e.command("list","List all apps",n=>{fF(n,t)});import vh from"react";import{render as BF}from"ink";var fL={name:"Generative AI",path:"gen_ai",key:"gen_ai",config:{}};var dL={name:"Hello world",path:"hello_world",key:"hello_world",config:{}};var mL={name:"Digital Asset Management",path:"dam",key:"dam",config:{}};var La=[dL,mL,fL];var hL=e=>{let t=La.find(n=>n.key===e);if(!t)throw new Error(`Couldn't find a template with key : ${e}`);return t};import Rt,{useEffect as RF,useState as VF}from"react";import{Text as mu,Box as Bw,useApp as jF}from"ink";import Rw from"react";import{Text as pF,Box as dF,Spacer as mF}from"ink";var gL=e=>Rw.createElement(dF,{borderStyle:e.lite?void 0:"single",borderColor:e.lite?void 0:Cp,borderTop:!0,borderLeft:!1,borderRight:!1,borderBottom:!1,paddingY:0,paddingX:2},Rw.createElement(mF,null),Rw.createElement(pF,{color:"gray"},`Step ${e.step}/${e.totalSteps}: ${e.description}`));import jw,{useEffect as EF,useState as IL}from"react";import{Box as IF}from"ink";function yL(e){return e.git==null||e.name==null||e.installDependencies==null||e.template==null}import uh,{useState as vF}from"react";import fu from"react";import{Box as vL,Text as Vw}from"ink";var xi=e=>fu.createElement(vL,{flexGrow:1,flexDirection:"column",margin:1},fu.createElement(Vw,{bold:!0},fu.createElement(Lt,{color:"greenBright"},"? "),e.question,e.note&&fu.createElement(Vw,{color:"grey"}," (",e.note,")")),fu.createElement(vL,{flexDirection:"row"},e.children),e.error&&fu.createElement(Vw,{color:"redBright"},e.error));import lh from"react";import{Box as hF,Text as gF}from"ink";var yF=e=>e?"Yes":"No",Si=e=>{let t=typeof e.choice=="boolean"?yF(e.choice):e.choice;return lh.createElement(hF,{flexGrow:1,flexDirection:"row"},lh.createElement(gF,{bold:!0},lh.createElement(Lt,{color:"greenBright"},"\u{1F449} "),e.question,":"," "),lh.createElement(bt,{bold:!1},t))};var wF=({name:e,onNameChange:t})=>{let[n,r]=vF(),i=!!e?.length,s="What would you like to call your app?",o="After creating your app, you can update its name in the Developer Portal",a=u=>{let c=uc(u);if(!c.valid){r(c.message);return}t(u.trim())},l=u=>{if(!n)return;let c=uc(u);r(c.valid?"":c.message)};return i?uh.createElement(Si,{question:s,choice:e}):uh.createElement(xi,{question:s,note:o,error:n},uh.createElement(GP,{placeholder:"My cool app",onSubmit:a,onChange:l}))},wL={key:"name",needsInput:e=>e?.name==null,render:e=>uh.createElement(wF,{onNameChange:n=>{e.submitProjectConfig({...e.project,name:n})},name:e.project.name})};import fh from"react";import xL,{useContext as xF}from"react";var SL=[{label:"Yes",value:"yes"},{label:"No",value:"no"}],ch=e=>{let{lite:t}=xF(Ye),n=i=>{let s=i==="yes";e.onChange?.(s)},r=e.default==="no"?SL.reverse():SL;return t?xL.createElement(vP,{onConfirm:()=>n("yes"),onCancel:()=>n("no"),defaultChoice:e.default==="yes"?"confirm":"cancel"}):xL.createElement(Xi,{options:r,onChange:i=>n(i)})};var SF=({git:e,onChange:t})=>{let n=e!=null,r="Would you like this app to be set up with a git repo?",i="If you\u2019re not sure, pick Yes";return n?fh.createElement(Si,{question:r,choice:e}):fh.createElement(xi,{question:r,note:i},fh.createElement(ch,{default:"yes",onChange:t}))},_L={key:"git",needsInput:e=>e?.git==null,render:e=>fh.createElement(SF,{onChange:n=>{e.submitProjectConfig({...e.project,git:n})},git:e.project.git})};import ph from"react";var _F=({install:e,onChange:t})=>{let n=e!=null,r="Would you like this app to have its dependencies installed with NPM? ",i="If you\u2019re not sure, pick Yes";return n?ph.createElement(Si,{question:r,choice:e}):ph.createElement(xi,{question:r,note:i},ph.createElement(ch,{default:"yes",onChange:t}))},CL={key:"installDependencies",needsInput:e=>e?.installDependencies==null,render:e=>ph.createElement(_F,{onChange:n=>{e.submitProjectConfig({...e.project,installDependencies:n})},install:e.project.installDependencies})};import dh from"react";var CF=({template:e,onChange:t})=>{let n=e!=null,r="What kind of app do you want to create?",i="Use arrow keys, return/enter to select";return n?dh.createElement(Si,{question:r,choice:hL(e).name}):dh.createElement(xi,{question:r,note:i},dh.createElement(Xi,{options:La.map(s=>({label:s.name,value:s.key})),onChange:t}))},bL={key:"template",needsInput:e=>e?.template==null,render:e=>dh.createElement(CF,{onChange:n=>{e.submitProjectConfig({...e.project,template:n})},template:e.project.template})};import mh from"react";var OL=["private","public"],bF=e=>e.charAt(0).toUpperCase()+e.slice(1),OF=({distribution:e,onChange:t})=>{let n=e!=null,r="Who is this app for?",i=[{label:"Public (Available to all Canva users. A reviewer from Canva must approve the app for release.)",value:"public"},{label:"Private (Only available to members of your team. Your team\u2019s owner or administrator must approve the app for release.)",value:"private"}];return n?mh.createElement(Si,{question:r,choice:bF(e||"")}):mh.createElement(xi,{question:r},mh.createElement(Xi,{options:i,onChange:t}))},EL={key:"distribution",needsInput:e=>e?.distribution==null,render:e=>mh.createElement(OF,{onChange:n=>{e.submitProjectConfig({...e.project,distribution:n})},distribution:e.project.distribution})};var PL=[bL,EL,wL,_L,CL],PF=e=>{let t=e.project,[n,r]=IL(t),[i,s]=IL(0),o=()=>{PL.at(i+1)&&s(i+1)},a=l=>{r(l),o()};return EF(()=>{yL(n)||(e.submitProjectConfig(n),e.onStepComplete())},[n,e]),jw.createElement(IF,{flexGrow:1,flexDirection:"column",margin:1},PL.filter(l=>l.needsInput(t)).slice(0,i+1).map((l,u)=>jw.createElement(l.render,{...e,project:n,submitProjectConfig:a,key:u})))},TL={render:e=>jw.createElement(PF,{...e}),description:"Configuring your app"};import{Text as RL,Box as yh}from"ink";import es,{useEffect as VL,useState as kF}from"react";import{Text as hh,Box as TF}from"ink";import Pf,{useContext as AF}from"react";var AL=({color:e,backgroundColor:t,dimColor:n,inverse:r,percent:i,width:s=40})=>{let{lite:o}=AF(Ye);if(i>1)return Pf.createElement(hh,null,"Done!");let a="\u2588".repeat(Math.round(i*s)),l="\u2591".repeat(s-a.length),u=`${Math.round(i*100)}%`;return o?Pf.createElement(hh,null,u):Pf.createElement(TF,null,Pf.createElement(hh,{color:e,backgroundColor:t,dimColor:n,inverse:r},a,l),Pf.createElement(hh,null,` ${u}`))};import LF from"node:fs";var gh=({envLines:e,key:t,value:n,comment:r=""})=>e.map(i=>{if(i.startsWith(`${t}=`)){let s=`${t}=${n}`;return r?`${s} ${r}`:s}return i});import*as LL from"node:path";import*as pu from"node:fs";var NL={type:"appCreation",start:"Creating app on Canva",failure:"Failed to create app on Canva",action:async(e,t)=>{let n=await t.appService.createApp(e);if(!n.success)throw new Error(`[${n.code}]: Unable to create app on Canva: '${n.message}'.`);return n.data},preventCleanupOnError:!1},DL={type:"postCreation",start:"Updating .env file",failure:"Failed to update .env file",action:async e=>{try{let t=LL.join(e.folderName,".env");if(!pu.existsSync(t))throw new Error(`.env file not found at '${t}'.`);let r=pu.readFileSync(t,"utf-8").split(`
492
+ `),i="# replaced via the canva cli",s=e.app.id,o=gh({envLines:r,key:"CANVA_APP_ID",value:s,comment:i});o=gh({envLines:o,key:"CANVA_APP_ORIGIN",value:_p({env:Sr.ENV,appId:s}),comment:i}),o=gh({envLines:o,key:"CANVA_HMR_ENABLED",value:"TRUE",comment:i}),pu.writeFileSync(t,o.join(`
493
+ `))}catch(t){throw new Error(`Failed to update .env file: ${t.message}`)}},preventCleanupOnError:!1};var kL=[K0,Y0,X0,J0,Z0,Q0,ey,NL,DL,ty];async function NF(e,t,n){let{start:r,action:i,failure:s,type:o}=e.step;e.setMessage(`${r}...`,{percent:e.index/e.totalSteps});try{if(e.dryRun)return!0;switch(o){case"preAppCreation":await i(e.stepContext);break;case"appCreation":{let a=await i(e.stepContext,t);n(a);break}case"postCreation":{let a=e.getApp();if(!a)throw new Error("App is undefined in a post creation step.");await i({...e.stepContext,app:a});break}default:break}return!0}catch(a){return e.stepContext.debug&&console.error(a),e.setMessage(s,{error:!0}),!1}}function DF(e,t){if(!(e.percent>=1))return LF.promises.rm(rd(t),{recursive:!0,force:!0})}async function ML(e,t,n,r,i,s,o,a,l,u,c,f,p){let d=rd(o),m=[...kL,...a?[ny]:[],...l?[ry]:[]],y=m.length,v=(g,w={error:!1})=>{w.percent!==void 0?n({...e,message:g,error:w.error||e.error,percent:w.percent}):n({...e,message:g,error:w.error||e.error})},h={folderName:d,name:o,template:u,distribution:c,debug:p};for(let g=0;g<m.length;g++){let w=m[g];if(!w)return;if(!await NF({step:w,index:g,totalSteps:y,stepContext:h,setMessage:v,dryRun:f,getApp:()=>t.createdApp},i,s)){!p&&!w.preventCleanupOnError&&await DF(e,o),r();return}await ji()}v("Done!",{percent:1})}var MF=e=>{let[t,n]=kF({percent:0,message:"",error:!1}),r=Li(La.find(i=>i.key===e.project.template));return VL(()=>{ML(t,e.store,n,e.onQuit,e.services,e.registerApp,Li(e.project.name,"name is required"),Li(e.project.git,"git usage question is required"),Li(e.project.installDependencies,"package manager usage is required"),r,Li(e.project.distribution,"distribution is required"),e.dryRun,e.debug)},[]),VL(()=>{t.error&&ji(750).then(e.onQuit),t.percent>=1&&ji(750).then(e.onStepComplete)},[t,e.onQuit,e.onStepComplete]),es.createElement(yh,{flexGrow:1,flexDirection:"column",margin:1},es.createElement(yh,null,es.createElement(RL,null,"Creating your ",r.name," app"," ",es.createElement(bt,null,`${e.project.name}`),"...")),es.createElement(yh,null,es.createElement(RL,null,t.message)),!t.error&&es.createElement(yh,null,es.createElement(AL,{color:p_,percent:t.percent})))},jL={render:e=>es.createElement(MF,{...e}),description:"Creating your app"};var du=[TL,jL];var BL=Ar(T1(),1);var UL=(0,BL.observer)(e=>{let{store:t,onQuit:n,getCommandsToRun:r}=e,[i,s]=VF({project:e.project,template:e.template}),o=du[t.currentStepIndex],a=o?.render,{exit:l}=jF(),u=c=>{s(f=>({...f,project:c}))};return RF(()=>{t.stepsComplete&&ji(1500).then(()=>{vl(t.developerPortalAppUrl),l()})},[l,t.createdApp,t.stepsComplete]),Rt.createElement(Rt.Fragment,null,Rt.createElement(Bw,null,a&&Rt.createElement(a,{...i,dryRun:e.dryRun,debug:e.debug,services:e.services,lite:e.lite,store:t,onQuit:n,onStepComplete:()=>e.incrementStep(t),registerApp:e.registerApp,submitProjectConfig:u})),t.quit&&Rt.createElement(mu,{color:"redBright"},"A step failed and we weren't able to create your app."),t.stepsComplete&&!t.quit&&Rt.createElement(Bw,{justifyContent:"center",alignItems:"center",flexDirection:"column",marginY:1},Rt.createElement(mu,{bold:!0},Rt.createElement(Lt,null,"\u{1F389}")," Your app"," ",i.project.name&&Rt.createElement(bt,null,i.project.name)," ","was successfully created ",Rt.createElement(Lt,null,"\u{1F389}")),Rt.createElement(Bw,{flexDirection:"column",marginY:1,alignItems:"center"},Rt.createElement(mu,null,"You should now run the following commands:"),r(i.project).map((c,f)=>Rt.createElement(mu,{key:f,color:"greenBright"},c))),Rt.createElement(mu,null,"Then head over to our"," ",Rt.createElement(xt,{url:t.developerPortalAppUrl,text:"Developer Portal"})," ","to edit and preview your app."),Rt.createElement(mu,null,"And remember our ",Rt.createElement(xt,{url:"https://canva.dev",text:"Docs"})," are also always here to help!"),Rt.createElement(Lp,null,Np())),!t.stepsComplete&&!t.quit&&Rt.createElement(gL,{step:t.currentStepIndex+1,totalSteps:t.totalSteps,description:o?.description||"",lite:e.lite}))});var Jr=Ar(ac(),1);var FL,WL,zL,GL,$L,er,Uw,Fw,Ww;$L=[Jr.observable.ref],GL=[Jr.observable.ref],zL=[Jr.observable.ref],WL=[Jr.computed],FL=[Jr.computed];var _i=class{constructor(t=du){this.scaffolderSteps=t;it(er,5,this);Lr(this,Uw,it(er,8,this,!1)),it(er,11,this);Lr(this,Fw,it(er,12,this,0)),it(er,15,this);Lr(this,Ww,it(er,16,this)),it(er,19,this)}get totalSteps(){return this.scaffolderSteps.length}get stepsComplete(){return this.currentStepIndex>=this.scaffolderSteps.length}get developerPortalAppUrl(){return this.createdApp?Wo({env:Sr.ENV,appId:this.createdApp.id}):Wo({env:Sr.ENV})}};er=Ha(null),Uw=new WeakMap,Fw=new WeakMap,Ww=new WeakMap,st(er,4,"quit",$L,_i,Uw),st(er,4,"currentStepIndex",GL,_i,Fw),st(er,4,"createdApp",zL,_i,Ww),st(er,2,"stepsComplete",WL,_i),st(er,2,"developerPortalAppUrl",FL,_i),Io(er,_i);var HL,qL,KL,Na;KL=[Jr.action],qL=[Jr.action],HL=[Jr.action];var Ks=class{constructor(){it(Na,5,this);ug(this,"getCommandsToRun",({name:t,installDependencies:n})=>[`cd ${t?lc(t):"<app_name>"}`,...n?[]:["npm install"],"npm start"]);ug(this,"quit",it(Na,8,this,t=>{t.quit=!0})),it(Na,11,this)}registerApp(t,n){t.createdApp=n}incrementStep(t){if(t.stepsComplete)throw new Error("Cannot increment step when all steps are complete");t.currentStepIndex+=1}};Na=Ha(null),st(Na,1,"registerApp",qL,Ks),st(Na,1,"incrementStep",HL,Ks),st(Na,5,"quit",KL,Ks),Io(Na,Ks);function UF(e){return e.option("template",{type:"string",choices:La.map(t=>t.key)}).option("distribution",{type:"string",choices:OL,describe:"Choose a distribution to use for the app"}).option("git",{type:"boolean",describe:"Initialize a git repository"}).option("installDependencies",{type:"boolean",describe:"Install dependencies (using npm)"}).positional("name",{type:"string",describe:"Name of the app you\u2019re creating"}).check(t=>{if(t.name){let n=uc(t.name);if(!n.valid)throw new Error(n.message)}return!0})}var FF=(e,t)=>{let n=new _i(du),r=new Ks;BF(vh.createElement(Ye.Provider,{value:{lite:e.lite}},vh.createElement(Bn,null,vh.createElement(oh,{checkLoginStatus:t.tokenService.isLoggedIn},vh.createElement(UL,{getCommandsToRun:r.getCommandsToRun,onQuit:()=>r.quit(n),incrementStep:()=>r.incrementStep(n),registerApp:i=>r.registerApp(n,i),store:n,project:e,template:e,lite:e.lite,dryRun:e.dryRun,services:t,debug:e.debug})))))},YL=({cli:e,services:t})=>e.command("create [name]","Create a new Canva app",UF,n=>{FF(n,t)});var XL=({cli:e,services:t})=>e.command("apps","Manage Canva apps",n=>{YL({cli:n,services:t}),cL({cli:n,services:t})}).demandCommand(1,"You need to specify a command.");import GF from"react";import{render as $F}from"ink";import It from"react";import{Box as JL,Text as wh}from"ink";var ZL=({lite:e,logoutResult:t})=>{let[n,r]=It.useState();return It.useEffect(()=>{t.then(r)},[t]),n?It.createElement(Ye.Provider,{value:{lite:e}},It.createElement(Bn,null,It.createElement(JL,{flexDirection:"column",paddingX:2},n.success?It.createElement(WF,null):It.createElement(zF,{message:n.message,code:n.code})))):It.createElement(Ye.Provider,{value:{lite:e}},It.createElement(Bn,null,It.createElement(JL,{marginX:2,marginY:1},It.createElement(Ws,{type:"bouncingBall",label:"Logging you out..."}))))},WF=()=>It.createElement(It.Fragment,null,It.createElement(wh,null,It.createElement(Lt,null,"\u2705")," ",It.createElement(wh,{color:"greenBright"},"You have successfully logged out. "),"To log back in, run ",It.createElement(bt,null,"canva login"))),zF=({message:e,code:t})=>{let n=t==="NO_TOKEN"?"Looks like you are not logged in, so we were unable to log you out.":e;return It.createElement(wh,null,It.createElement(Lt,null,"\u274C")," ",It.createElement(wh,{color:"redBright"},"Logout error:")," ",n)};var HF=async({argv:e},t)=>{let n=await e,r=t.tokenService.revokeToken();$F(GF.createElement(ZL,{lite:n.lite,logoutResult:r}))},QL=({cli:e,services:t})=>e.command("logout","Revoke access and log out of the Canva CLI",n=>{HF(n,t)});var $w={};iD($w,{client:()=>Ys,createApp:()=>QF,exchangeAccessToken:()=>t8,getApp:()=>e8,introspectToken:()=>n8,listApps:()=>ZF,revokeTokens:()=>r8,usersMe:()=>i8});var qF=/\{[^{}]+\}/g,Sh=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},n3=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let a=(e?i:i.map(l=>encodeURIComponent(l))).join((l=>{switch(l){case"form":default:return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20"}})(r));switch(r){case"label":return`.${a}`;case"matrix":return`;${n}=${a}`;case"simple":return a;default:return`${n}=${a}`}}let s=(a=>{switch(a){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}})(r),o=i.map(a=>r==="label"||r==="simple"?e?a:encodeURIComponent(a):Sh({allowReserved:e,name:n,value:a})).join(s);return r==="label"||r==="matrix"?s+o:o},r3=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let a=[];Object.entries(i).forEach(([u,c])=>{a=[...a,u,e?c:encodeURIComponent(c)]});let l=a.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let s=(a=>{switch(a){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}})(r),o=Object.entries(i).map(([a,l])=>Sh({allowReserved:e,name:r==="deepObject"?`${n}[${a}]`:a,value:l})).join(s);return r==="label"||r==="matrix"?s+o:o},i3=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let s in r){let o=r[s];o!=null&&(i=Array.isArray(o)?[...i,n3({allowReserved:e,explode:!0,name:s,style:"form",value:o,...t})]:typeof o!="object"?[...i,Sh({allowReserved:e,name:s,value:o})]:[...i,r3({allowReserved:e,explode:!0,name:s,style:"deepObject",value:o,...n})])}return i.join("&")},KF=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let s=e+(i.startsWith("/")?i:`/${i}`);t&&(s=(({path:a,url:l})=>{let u=l,c=l.match(qF);if(c)for(let f of c){let p=!1,d=f.substring(1,f.length-1),m="simple";d.endsWith("*")&&(p=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),m="label"):d.startsWith(";")&&(d=d.substring(1),m="matrix");let y=a[d];y!=null&&(u=Array.isArray(y)?u.replace(f,n3({explode:p,name:d,style:m,value:y})):typeof y!="object"?m!=="matrix"?u.replace(f,m==="label"?`.${y}`:y):u.replace(f,`;${Sh({name:d,value:y})}`):u.replace(f,r3({explode:p,name:d,style:m,value:y})))}return u})({path:t,url:s}));let o=n?r(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(s+=`?${o}`),s},e3=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=s3(e.headers,t.headers),n},s3=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,s]of r)if(s===null)t.delete(i);else if(Array.isArray(s))for(let o of s)t.append(i,o);else s!==void 0&&t.set(i,typeof s=="object"?JSON.stringify(s):s)}return t},xh=class{_fns;constructor(){this._fns=[]}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}};var YF={bodySerializer:e=>JSON.stringify(e)},t3=(e,t,n)=>{typeof n=="string"?e.append(t,n):e.append(t,JSON.stringify(n))},_h={bodySerializer:e=>{let t=new URLSearchParams;return Object.entries(e).forEach(([n,r])=>{r!=null&&(Array.isArray(r)?r.forEach(i=>t3(t,n,i)):t3(t,n,r))}),t}},XF=i3({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),JF={"Content-Type":"application/json"},Gw=(e={})=>({...YF,baseUrl:"",fetch:globalThis.fetch,headers:JF,parseAs:"auto",querySerializer:XF,...e}),Ch=(e={})=>{let t=e3(Gw(),e),n=()=>({...t}),r={request:new xh,response:new xh},i=async s=>{let o={...t,...s,headers:s3(t.headers,s.headers)};o.body&&o.bodySerializer&&(o.body=o.bodySerializer(o.body)),o.body||o.headers.delete("Content-Type");let a=KF({baseUrl:o.baseUrl??"",path:o.path,query:o.query,querySerializer:typeof o.querySerializer=="function"?o.querySerializer:i3(o.querySerializer),url:o.url}),l={redirect:"follow",...o},u=new Request(a,l);for(let m of r.request._fns)u=await m(u,o);let c=o.fetch,f=await c(u);for(let m of r.response._fns)f=await m(f,u,o);let p={request:u,response:f};if(f.ok){if(f.status===204||f.headers.get("Content-Length")==="0")return{data:{},...p};if(o.parseAs==="stream")return{data:f.body,...p};let m=(o.parseAs==="auto"?(v=>{if(v)return v.startsWith("application/json")||v.endsWith("+json")?"json":v==="multipart/form-data"?"formData":["application/","audio/","image/","video/"].some(h=>v.startsWith(h))?"blob":v.startsWith("text/")?"text":void 0})(f.headers.get("Content-Type")):o.parseAs)??"json",y=await f[m]();return m==="json"&&o.responseTransformer&&(y=await o.responseTransformer(y)),{data:y,...p}}let d=await f.text();if(o.throwOnError)throw new Error(d);try{d=JSON.parse(d)}catch{}return{error:d||{},...p}};return{connect:s=>i({...s,method:"CONNECT"}),delete:s=>i({...s,method:"DELETE"}),get:s=>i({...s,method:"GET"}),getConfig:n,head:s=>i({...s,method:"HEAD"}),interceptors:r,options:s=>i({...s,method:"OPTIONS"}),patch:s=>i({...s,method:"PATCH"}),post:s=>i({...s,method:"POST"}),put:s=>i({...s,method:"PUT"}),request:i,setConfig:s=>(t=e3(t,s),n()),trace:s=>i({...s,method:"TRACE"})}};var Ys=Ch(Gw()),ZF=e=>(e?.client??Ys).get({...e,url:"/v1/apps"}),QF=e=>(e?.client??Ys).post({...e,url:"/v1/apps"}),e8=e=>(e?.client??Ys).get({...e,url:"/v1/apps/{appId}"}),t8=e=>(e?.client??Ys).post({...e,..._h,headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"/v1/oauth/token"}),n8=e=>(e?.client??Ys).post({...e,..._h,headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"/v1/oauth/introspect"}),r8=e=>(e?.client??Ys).post({...e,..._h,headers:{"Content-Type":"application/x-www-form-urlencoded"},url:"/v1/oauth/revoke"}),i8=e=>(e?.client??Ys).get({...e,url:"/v1/users/me"});var bh=class{constructor(t,n,r=!1,i=$w){this.tokenService=t;this.env=n;this.debug=r;this.generatedAppService=i}getClient=async()=>{let t=await this.tokenService.getToken();if(!t.success)return{success:!1,code:"NO_TOKEN",message:"No token found. Please login first."};let n=Ch({baseUrl:this.env.CONNECT_API_BASE_URL,fetch,headers:{Authorization:`Bearer ${t.data}`,"Content-Type":"application/json"}});return this.debug&&n.interceptors.response.use(r=>{let i=r.headers.get("x-request-id");return r.status>=400?console.warn(`Response status ${r.status} on ${r.url}: request id: ${i}}`):console.log(`Response status ${r.status} on ${r.url}: request id: ${i}`),r}),{success:!0,data:n}};listApps=async()=>{let t=await this.getClient();if(!t.success)return t;let{data:n}=t;try{let r=await this.generatedAppService.listApps({client:n});return r.error?{success:!1,code:"API_FAILURE",message:`Failed to fetch apps data: ${r.error.message}`}:{success:!0,data:r.data.items}}catch(r){return{success:!1,code:"API_FAILURE",message:`Failed to fetch apps data: ${r instanceof Error?r.message:String(r)}`}}};createApp=async({name:t,distribution:n})=>{let r=await this.getClient();if(!r.success)return r;let{data:i}=r;try{let s=await this.generatedAppService.createApp({client:i,body:{name:t,distribution:n}});if(s.error)return{success:!1,code:"API_FAILURE",message:`Failed to create app: ${s.error.message}`};let{app:o}=s.data;return{success:!0,data:o}}catch(s){return{success:!1,code:"API_FAILURE",message:`Failed to create app: ${s instanceof Error?s.message:String(s)}`}}}};import Hw from"crypto";var Oh=class{constructor(t){this.env=t}constructAuthUrl(){let t=`${this.env.CANVA_ENV_URL}/api/oauth/authorized/${this.env.CANVA_CLI_CLIENT_ID}`,n=Hw.randomBytes(96).toString("base64url"),r=Hw.randomBytes(96).toString("base64url"),i=Hw.createHash("sha256").update(n).digest().toString("base64url");return{url:this.getAuthorizationUrl(t,r,i),codeVerifier:n}}getAuthorizationUrl(t,n,r){let s=["app:read","app:write","profile:read"].join(" "),o=`${this.env.CANVA_ENV_URL}/api`,a=new URL(`${o}/oauth/authorize`);return a.searchParams.append("code_challenge",r),a.searchParams.append("code_challenge_method","S256"),a.searchParams.append("scope",s),a.searchParams.append("response_type","code"),a.searchParams.append("client_id",this.env.CANVA_CLI_CLIENT_ID),a.searchParams.append("redirect_uri",t),a.searchParams.append("state",n),a.toString()}};var YN=Ar(KN(),1);import np from"crypto";var ig=class{KEY_DERIVATION_ITERATIONS=1e5;KEY_LENGTH=32;async c(){let t=await YN.default.uuid();return`${t.os}::${t.hardware}`}f(t,n){return np.pbkdf2Sync(t,n,this.KEY_DERIVATION_ITERATIONS,this.KEY_LENGTH,"sha256")}async encrypt(t){let n=await this.c(),r=np.randomBytes(16),i=this.f(n,r),s=np.randomBytes(12),o=np.createCipheriv("aes-256-gcm",i,s),a=o.update(t,"utf8","hex");a+=o.final("hex");let l=o.getAuthTag(),u={iv:s.toString("hex"),authTag:l.toString("hex"),cipherText:a,salt:r.toString("hex")};return`${u.iv}:${u.authTag}:${u.cipherText}:${u.salt}`}async decrypt(t){let n=await this.c(),r=t.split(":");if(r.length!==4)throw new Error("Invalid encrypted data format.");let[i,s,o,a]=r;if(!i||!s||!o||!a)throw new Error("Missing required components for decryption.");let l=Buffer.from(i,"hex"),u=Buffer.from(s,"hex"),c=Buffer.from(a,"hex"),f=this.f(n,c),p=np.createDecipheriv("aes-256-gcm",f,l);p.setAuthTag(u);let d=p.update(o,"hex","utf8");return d+=p.final("utf8"),d}};import sg,{chmod as C7}from"fs/promises";import b7 from"os";import XN from"path";var og=class{constructor(t){this.encryptionService=t}tokenKey="tokenData";filePath=XN.join(b7.homedir(),".canva-cli","credentials");async ensureDirectoryExists(t){try{await sg.mkdir(t,{recursive:!0})}catch(n){let r=n instanceof Error?n.message:String(n);throw new Error(`Failed to create directory ${t}: ${r}`)}}async readJsonFromFile(){try{let t=await sg.readFile(this.filePath,"utf-8");return JSON.parse(t)}catch(t){let n=t instanceof Error?t.message:String(t);throw new Error(`Failed to read the file at ${this.filePath}: ${n}`)}}async writeJsonToFile(t){try{await sg.writeFile(this.filePath,JSON.stringify(t,null,2),"utf-8")}catch(n){let r=n instanceof Error?n.message:String(n);throw new Error(`Failed to write the file at ${this.filePath}: ${r}`)}try{await C7(this.filePath,384)}catch(n){let r=n instanceof Error?n.message:String(n);throw new Error(`Failed to set permissions on the file at ${this.filePath}: ${r}`)}}async saveTokenData(t){let n=await this.encryptionService.encrypt(JSON.stringify(t)),r={[this.tokenKey]:n};try{let i=XN.dirname(this.filePath);await this.ensureDirectoryExists(i),await this.writeJsonToFile(r)}catch(i){throw new Error(`Failed to save token data to file: ${i}`)}}async getTokenData(){try{let t=await this.readJsonFromFile();if(t[this.tokenKey]){let n=await this.encryptionService.decrypt(t[this.tokenKey]);return{success:!0,data:JSON.parse(n)}}else return{success:!1,code:"NO_TOKEN",message:"Token data not found in credentials file."}}catch(t){return{success:!1,code:"NO_TOKEN",message:`Failed to read the token file: ${t}`}}}async deleteToken(){try{if((await this.readJsonFromFile())[this.tokenKey])await sg.unlink(this.filePath);else throw new Error("Token file does not exist or token data not found.")}catch(t){throw new Error(`Failed to delete the token data file: ${t}`)}}};import{Buffer as O7}from"node:buffer";var Soe=new TextEncoder,ag=new TextDecoder,_oe=2**32;function E7(e){let t=e;return t instanceof Uint8Array&&(t=ag.decode(t)),t}var JN=e=>new Uint8Array(O7.from(E7(e),"base64url"));var Gx=class extends Error{static get code(){return"ERR_JOSE_GENERIC"}code="ERR_JOSE_GENERIC";constructor(t){super(t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}};var Ti=class extends Gx{static get code(){return"ERR_JWT_INVALID"}code="ERR_JWT_INVALID"};function T7(e){return typeof e=="object"&&e!==null}function $x(e){if(!T7(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var ZN=JN;function Hx(e){if(typeof e!="string")throw new Ti("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:n}=e.split(".");if(n===5)throw new Ti("Only JWTs using Compact JWS serialization can be decoded");if(n!==3)throw new Ti("Invalid JWT");if(!t)throw new Ti("JWTs must contain a payload");let r;try{r=ZN(t)}catch{throw new Ti("Failed to base64url decode the payload")}let i;try{i=JSON.parse(ag.decode(r))}catch{throw new Ti("Failed to parse the decoded payload as JSON")}if(!$x(i))throw new Ti("Invalid JWT Claims Set");return i}import{URLSearchParams as qx}from"url";var lg=class{constructor(t,n){this.storageService=t;this.env=n}get tokenEndpointUrl(){return`${this.env.CONNECT_API_BASE_URL}/v1/oauth/token`}async exchangeCodeForToken({authCode:t,codeVerifier:n}){let r=`${this.env.CANVA_ENV_URL}/api/oauth/authorized/${this.env.CANVA_CLI_CLIENT_ID}`;try{let i=await fetch(this.tokenEndpointUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new qx({grant_type:"authorization_code",code:t,code_verifier:n,client_id:this.env.CANVA_CLI_CLIENT_ID,redirect_uri:r})});if(!i.ok){let o=await i.text();return new Error(`Failed to exchange code for token: ${o}`)}let s=await i.json();return await this.storageService.saveTokenData(s),s.access_token}catch(i){return new Error(`Error exchanging authorization code for token: ${i}`)}}async getToken(){try{let t=await this.storageService.getTokenData();if(!t.success)return t;let n=t.data,r=Hx(n.access_token),i=60*10;if(r.exp){let l=r.exp-i;if(Date.now()/1e3<l)return{success:!0,data:n.access_token}}let s=n.refresh_token,o=await fetch(this.tokenEndpointUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new qx({grant_type:"refresh_token",refresh_token:s,client_id:this.env.CANVA_CLI_CLIENT_ID})});if(!o.ok){let l=await o.text();throw new Error(`Failed to refresh token: ${l}`)}let a=await o.json();return await this.storageService.saveTokenData(a),{success:!0,data:a.access_token}}catch(t){return{success:!1,code:"API_FAILURE",message:`An error occurred while getting the token: ${t}`}}}async revokeToken(){let t=await this.storageService.getTokenData();if(!t.success)return t;let n=t.data,r=`${this.env.CONNECT_API_BASE_URL}/v1/oauth/revoke`;try{let i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new qx({token:n.refresh_token,client_id:this.env.CANVA_CLI_CLIENT_ID})});if(!i.ok)throw new Error(`Failed to revoke token, status: ${i.status}`);return await this.storageService.deleteToken(),{success:!0,data:void 0}}catch(i){return{success:!1,code:"LOGOUT_ERROR",message:`An error occurred while revoking the token: ${i}`}}}isLoggedIn=async()=>(await this.getToken()).success};var QN=({debug:e})=>{let t=new ig,n=new og(t),r=new Oh(Sr),i=new lg(n,Sr);return{appService:new bh(i,Sr,e),authService:r,tokenService:i}};function N7(e){return e.option("lite",{type:"boolean",default:!1,global:!0,describe:"Minimize command line UI for improved accessibility"}).option("dryRun",{type:"boolean",default:!1,global:!0,describe:"Skips the scaffolding step. Useful for testing when making changes to the CLI interface.",hidden:!0}).option("debug",{type:"boolean",default:!1,global:!0,describe:"Log info to aid with debugging.",hidden:!0})}var eD=e=>{let t=n_(wg(e)),n=N7(t),r=QN({debug:e.some(i=>i.toLowerCase()==="--debug")});return gC(n),vC(n),ZP({cli:n,services:r}),XL({cli:n,services:r}),QL({cli:n,services:r}),n.demandCommand().recommendCommands().strict(!0).help().parseSync(),n};eD(process.argv);
494
+ /*! Bundled license information:
495
+
496
+ scheduler/cjs/scheduler.production.min.js:
497
+ (**
498
+ * @license React
499
+ * scheduler.production.min.js
500
+ *
501
+ * Copyright (c) Facebook, Inc. and its affiliates.
502
+ *
503
+ * This source code is licensed under the MIT license found in the
504
+ * LICENSE file in the root directory of this source tree.
505
+ *)
506
+
507
+ react-dom/cjs/react-dom.production.min.js:
508
+ (**
509
+ * @license React
510
+ * react-dom.production.min.js
511
+ *
512
+ * Copyright (c) Facebook, Inc. and its affiliates.
513
+ *
514
+ * This source code is licensed under the MIT license found in the
515
+ * LICENSE file in the root directory of this source tree.
516
+ *)
517
+
518
+ use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js:
519
+ (**
520
+ * @license React
521
+ * use-sync-external-store-shim.production.min.js
522
+ *
523
+ * Copyright (c) Facebook, Inc. and its affiliates.
524
+ *
525
+ * This source code is licensed under the MIT license found in the
526
+ * LICENSE file in the root directory of this source tree.
527
+ *)
528
+
529
+ yargs-parser/build/lib/string-utils.js:
530
+ (**
531
+ * @license
532
+ * Copyright (c) 2016, Contributors
533
+ * SPDX-License-Identifier: ISC
534
+ *)
535
+
536
+ yargs-parser/build/lib/tokenize-arg-string.js:
537
+ (**
538
+ * @license
539
+ * Copyright (c) 2016, Contributors
540
+ * SPDX-License-Identifier: ISC
541
+ *)
542
+
543
+ yargs-parser/build/lib/yargs-parser-types.js:
544
+ (**
545
+ * @license
546
+ * Copyright (c) 2016, Contributors
547
+ * SPDX-License-Identifier: ISC
548
+ *)
549
+
550
+ yargs-parser/build/lib/yargs-parser.js:
551
+ (**
552
+ * @license
553
+ * Copyright (c) 2016, Contributors
554
+ * SPDX-License-Identifier: ISC
555
+ *)
556
+
557
+ yargs-parser/build/lib/index.js:
558
+ (**
559
+ * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
560
+ * CJS and ESM environments.
561
+ *
562
+ * @license
563
+ * Copyright (c) 2016, Contributors
564
+ * SPDX-License-Identifier: ISC
565
+ *)
566
+ */