@omnitron-dev/omnitron 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/dist/cli/omnitron.js +32 -1
  2. package/dist/cli/omnitron.js.map +1 -1
  3. package/dist/cluster/leader-election.d.ts.map +1 -1
  4. package/dist/cluster/leader-election.js +0 -2
  5. package/dist/cluster/leader-election.js.map +1 -1
  6. package/dist/commands/env.d.ts.map +1 -1
  7. package/dist/commands/env.js +10 -2
  8. package/dist/commands/env.js.map +1 -1
  9. package/dist/commands/health.d.ts.map +1 -1
  10. package/dist/commands/health.js +10 -2
  11. package/dist/commands/health.js.map +1 -1
  12. package/dist/commands/inspect-graph.d.ts +20 -0
  13. package/dist/commands/inspect-graph.d.ts.map +1 -0
  14. package/dist/commands/inspect-graph.js +78 -0
  15. package/dist/commands/inspect-graph.js.map +1 -0
  16. package/dist/commands/inspect.d.ts.map +1 -1
  17. package/dist/commands/inspect.js +10 -2
  18. package/dist/commands/inspect.js.map +1 -1
  19. package/dist/commands/list.d.ts.map +1 -1
  20. package/dist/commands/list.js +11 -1
  21. package/dist/commands/list.js.map +1 -1
  22. package/dist/commands/logs.d.ts.map +1 -1
  23. package/dist/commands/logs.js +17 -3
  24. package/dist/commands/logs.js.map +1 -1
  25. package/dist/commands/metrics.d.ts.map +1 -1
  26. package/dist/commands/metrics.js +10 -2
  27. package/dist/commands/metrics.js.map +1 -1
  28. package/dist/commands/monit.d.ts.map +1 -1
  29. package/dist/commands/monit.js +9 -0
  30. package/dist/commands/monit.js.map +1 -1
  31. package/dist/commands/output.d.ts +35 -0
  32. package/dist/commands/output.d.ts.map +1 -0
  33. package/dist/commands/output.js +63 -0
  34. package/dist/commands/output.js.map +1 -0
  35. package/dist/commands/stack.d.ts.map +1 -1
  36. package/dist/commands/stack.js +22 -7
  37. package/dist/commands/stack.js.map +1 -1
  38. package/dist/commands/status.d.ts.map +1 -1
  39. package/dist/commands/status.js +17 -0
  40. package/dist/commands/status.js.map +1 -1
  41. package/dist/commands/tor.d.ts +13 -0
  42. package/dist/commands/tor.d.ts.map +1 -0
  43. package/dist/commands/tor.js +100 -0
  44. package/dist/commands/tor.js.map +1 -0
  45. package/dist/commands/up.js +1 -1
  46. package/dist/commands/up.js.map +1 -1
  47. package/dist/config/loader.d.ts.map +1 -1
  48. package/dist/config/loader.js +29 -5
  49. package/dist/config/loader.js.map +1 -1
  50. package/dist/config/types.d.ts +14 -0
  51. package/dist/config/types.d.ts.map +1 -1
  52. package/dist/daemon/daemon-client.d.ts +14 -0
  53. package/dist/daemon/daemon-client.d.ts.map +1 -1
  54. package/dist/daemon/daemon-client.js +4 -0
  55. package/dist/daemon/daemon-client.js.map +1 -1
  56. package/dist/daemon/daemon-entry.js +17 -23
  57. package/dist/daemon/daemon-entry.js.map +1 -1
  58. package/dist/daemon/daemon.d.ts +2 -0
  59. package/dist/daemon/daemon.d.ts.map +1 -1
  60. package/dist/daemon/daemon.js +118 -7
  61. package/dist/daemon/daemon.js.map +1 -1
  62. package/dist/daemon/daemon.module.d.ts.map +1 -1
  63. package/dist/daemon/daemon.module.js +41 -14
  64. package/dist/daemon/daemon.module.js.map +1 -1
  65. package/dist/daemon/daemon.rpc-service.d.ts +19 -0
  66. package/dist/daemon/daemon.rpc-service.d.ts.map +1 -1
  67. package/dist/daemon/daemon.rpc-service.js +14 -0
  68. package/dist/daemon/daemon.rpc-service.js.map +1 -1
  69. package/dist/daemon/pid-manager.d.ts +55 -4
  70. package/dist/daemon/pid-manager.d.ts.map +1 -1
  71. package/dist/daemon/pid-manager.js +123 -16
  72. package/dist/daemon/pid-manager.js.map +1 -1
  73. package/dist/daemon/state-store.d.ts.map +1 -1
  74. package/dist/daemon/state-store.js +43 -1
  75. package/dist/daemon/state-store.js.map +1 -1
  76. package/dist/infrastructure/container-runtime.d.ts +10 -0
  77. package/dist/infrastructure/container-runtime.d.ts.map +1 -1
  78. package/dist/infrastructure/container-runtime.js +111 -36
  79. package/dist/infrastructure/container-runtime.js.map +1 -1
  80. package/dist/infrastructure/infrastructure.service.d.ts +41 -0
  81. package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
  82. package/dist/infrastructure/infrastructure.service.js +157 -8
  83. package/dist/infrastructure/infrastructure.service.js.map +1 -1
  84. package/dist/infrastructure/phantom-endpoint-janitor.d.ts +72 -0
  85. package/dist/infrastructure/phantom-endpoint-janitor.d.ts.map +1 -0
  86. package/dist/infrastructure/phantom-endpoint-janitor.js +149 -0
  87. package/dist/infrastructure/phantom-endpoint-janitor.js.map +1 -0
  88. package/dist/infrastructure/presets/index.d.ts.map +1 -1
  89. package/dist/infrastructure/presets/index.js +2 -0
  90. package/dist/infrastructure/presets/index.js.map +1 -1
  91. package/dist/infrastructure/presets/postgres.d.ts.map +1 -1
  92. package/dist/infrastructure/presets/postgres.js +9 -3
  93. package/dist/infrastructure/presets/postgres.js.map +1 -1
  94. package/dist/infrastructure/presets/redis.d.ts.map +1 -1
  95. package/dist/infrastructure/presets/redis.js +10 -4
  96. package/dist/infrastructure/presets/redis.js.map +1 -1
  97. package/dist/infrastructure/presets/registry.d.ts.map +1 -1
  98. package/dist/infrastructure/presets/registry.js +12 -0
  99. package/dist/infrastructure/presets/registry.js.map +1 -1
  100. package/dist/infrastructure/presets/tor.d.ts +74 -0
  101. package/dist/infrastructure/presets/tor.d.ts.map +1 -0
  102. package/dist/infrastructure/presets/tor.js +176 -0
  103. package/dist/infrastructure/presets/tor.js.map +1 -0
  104. package/dist/infrastructure/service-resolver.d.ts +31 -0
  105. package/dist/infrastructure/service-resolver.d.ts.map +1 -1
  106. package/dist/infrastructure/service-resolver.js +60 -9
  107. package/dist/infrastructure/service-resolver.js.map +1 -1
  108. package/dist/infrastructure/stack-infra-manager.d.ts +1 -1
  109. package/dist/infrastructure/stack-infra-manager.js +1 -1
  110. package/dist/infrastructure/types.d.ts +17 -0
  111. package/dist/infrastructure/types.d.ts.map +1 -1
  112. package/dist/observability/index.d.ts +4 -0
  113. package/dist/observability/index.d.ts.map +1 -0
  114. package/dist/observability/index.js +3 -0
  115. package/dist/observability/index.js.map +1 -0
  116. package/dist/observability/metrics-bridge.d.ts +87 -0
  117. package/dist/observability/metrics-bridge.d.ts.map +1 -0
  118. package/dist/observability/metrics-bridge.js +295 -0
  119. package/dist/observability/metrics-bridge.js.map +1 -0
  120. package/dist/observability/metrics-server.d.ts +68 -0
  121. package/dist/observability/metrics-server.d.ts.map +1 -0
  122. package/dist/observability/metrics-server.js +146 -0
  123. package/dist/observability/metrics-server.js.map +1 -0
  124. package/dist/orchestrator/app-handle.d.ts +13 -1
  125. package/dist/orchestrator/app-handle.d.ts.map +1 -1
  126. package/dist/orchestrator/app-handle.js +12 -0
  127. package/dist/orchestrator/app-handle.js.map +1 -1
  128. package/dist/orchestrator/bootstrap-process.d.ts +49 -0
  129. package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
  130. package/dist/orchestrator/bootstrap-process.js +167 -0
  131. package/dist/orchestrator/bootstrap-process.js.map +1 -1
  132. package/dist/orchestrator/build-service.d.ts +50 -3
  133. package/dist/orchestrator/build-service.d.ts.map +1 -1
  134. package/dist/orchestrator/build-service.js +357 -85
  135. package/dist/orchestrator/build-service.js.map +1 -1
  136. package/dist/orchestrator/file-watcher.d.ts.map +1 -1
  137. package/dist/orchestrator/file-watcher.js +60 -38
  138. package/dist/orchestrator/file-watcher.js.map +1 -1
  139. package/dist/orchestrator/orchestrator.service.d.ts +176 -3
  140. package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
  141. package/dist/orchestrator/orchestrator.service.js +587 -56
  142. package/dist/orchestrator/orchestrator.service.js.map +1 -1
  143. package/dist/orchestrator/process-janitor.d.ts +153 -0
  144. package/dist/orchestrator/process-janitor.d.ts.map +1 -0
  145. package/dist/orchestrator/process-janitor.js +279 -0
  146. package/dist/orchestrator/process-janitor.js.map +1 -0
  147. package/dist/project/config-resolver.d.ts.map +1 -1
  148. package/dist/project/config-resolver.js +38 -12
  149. package/dist/project/config-resolver.js.map +1 -1
  150. package/dist/project/registry.d.ts +1 -0
  151. package/dist/project/registry.d.ts.map +1 -1
  152. package/dist/project/registry.js +30 -0
  153. package/dist/project/registry.js.map +1 -1
  154. package/dist/services/auth.service.d.ts.map +1 -1
  155. package/dist/services/auth.service.js +9 -2
  156. package/dist/services/auth.service.js.map +1 -1
  157. package/dist/services/netron-telemetry-transport.d.ts.map +1 -1
  158. package/dist/services/netron-telemetry-transport.js +0 -4
  159. package/dist/services/netron-telemetry-transport.js.map +1 -1
  160. package/dist/services/node-manager.service.js +1 -1
  161. package/dist/services/node-manager.service.js.map +1 -1
  162. package/dist/services/pipeline.service.d.ts +15 -0
  163. package/dist/services/pipeline.service.d.ts.map +1 -1
  164. package/dist/services/pipeline.service.js +53 -2
  165. package/dist/services/pipeline.service.js.map +1 -1
  166. package/dist/services/project.rpc-service.d.ts +4 -0
  167. package/dist/services/project.rpc-service.d.ts.map +1 -1
  168. package/dist/services/project.rpc-service.js +9 -0
  169. package/dist/services/project.rpc-service.js.map +1 -1
  170. package/dist/services/project.service.d.ts +9 -0
  171. package/dist/services/project.service.d.ts.map +1 -1
  172. package/dist/services/project.service.js +148 -21
  173. package/dist/services/project.service.js.map +1 -1
  174. package/dist/shared/dto/project.d.ts +1 -1
  175. package/dist/shared/dto/project.d.ts.map +1 -1
  176. package/dist/shared/dto/services.d.ts +24 -0
  177. package/dist/shared/dto/services.d.ts.map +1 -1
  178. package/dist/workers/health-monitor.service.d.ts.map +1 -1
  179. package/dist/workers/health-monitor.service.js +4 -1
  180. package/dist/workers/health-monitor.service.js.map +1 -1
  181. package/dist/workers/types.d.ts +3 -0
  182. package/dist/workers/types.d.ts.map +1 -1
  183. package/package.json +19 -18
  184. package/webapp/dist/assets/Badge-D2ZBP5iK.js +1 -0
  185. package/webapp/dist/assets/Card-vO88g06B.js +1 -0
  186. package/webapp/dist/assets/CardActions-C9h7Q2wW.js +1 -0
  187. package/webapp/dist/assets/CardContent-BA_Xmmhk.js +1 -0
  188. package/webapp/dist/assets/CardHeader-ceIs__6x.js +1 -0
  189. package/webapp/dist/assets/Chip-Ckk0xUhK.js +1 -0
  190. package/webapp/dist/assets/DialogActions-BhHM7hov.js +1 -0
  191. package/webapp/dist/assets/DialogContentText-BT2JQRmK.js +1 -0
  192. package/webapp/dist/assets/FormControlLabel-CcQByVS8.js +1 -0
  193. package/webapp/dist/assets/Grid-14PETRQW.js +1 -0
  194. package/webapp/dist/assets/InputAdornment-B8aHIsQ7.js +1 -0
  195. package/webapp/dist/assets/Skeleton-B74-Ds6O.js +37 -0
  196. package/webapp/dist/assets/Switch-DvWD2wh4.js +1 -0
  197. package/webapp/dist/assets/SwitchBase-CDU4nY8O.js +1 -0
  198. package/webapp/dist/assets/Tab-DcCOYYp5.js +1 -0
  199. package/webapp/dist/assets/TableContainer-CzTh4mu-.js +1 -0
  200. package/webapp/dist/assets/TableRow-BySEreZR.js +2 -0
  201. package/webapp/dist/assets/TextField-BLf-BHz2.js +1 -0
  202. package/webapp/dist/assets/alerts-DnRbT41C.js +1 -0
  203. package/webapp/dist/assets/apps-CdR0VH2d.js +1 -0
  204. package/webapp/dist/assets/chunk-DtcAfS_W.js +1 -0
  205. package/webapp/dist/assets/client-DU8I_lDc.js +2 -0
  206. package/webapp/dist/assets/containers-Dw-rRXV1.js +1 -0
  207. package/webapp/dist/assets/dashboard-CzgB0uZz.js +1 -0
  208. package/webapp/dist/assets/dashboard-builder-DsA0yg33.js +1 -0
  209. package/webapp/dist/assets/deployments-DtQAoIcQ.js +1 -0
  210. package/webapp/dist/assets/detail-BJR-G7JG.js +1 -0
  211. package/webapp/dist/assets/detail-nlCeSltl.js +8 -0
  212. package/webapp/dist/assets/index-ByQDwp2r.js +566 -0
  213. package/webapp/dist/assets/isMuiElement-DwF2naaF.js +1 -0
  214. package/webapp/dist/assets/logs-Kn8o4H7k.js +11 -0
  215. package/webapp/dist/assets/metrics-DN8Zu5wT.js +2 -0
  216. package/webapp/dist/assets/nodes-Bgch7AtN.js +7 -0
  217. package/webapp/dist/assets/pipelines-Cry3qm-S.js +4 -0
  218. package/webapp/dist/assets/popper-BJFSj6rc.js +1 -0
  219. package/webapp/dist/assets/preload-helper-DSXbuxSR.js +1 -0
  220. package/webapp/dist/assets/projects-Dym2GI1U.js +1 -0
  221. package/webapp/dist/assets/react-apexcharts.esm-CSGK5Cxn.js +958 -0
  222. package/webapp/dist/assets/react-apexcharts.esm-DEAWOwx5.js +1003 -0
  223. package/webapp/dist/assets/settings-va3zTcow.js +1 -0
  224. package/webapp/dist/assets/sign-in-ik35umbp.js +1 -0
  225. package/webapp/dist/assets/stacks-CVFOnxbF.js +1 -0
  226. package/webapp/dist/assets/system-info-npIXAjX2.js +1 -0
  227. package/webapp/dist/assets/topology-bDe70vLs.js +12 -0
  228. package/webapp/dist/assets/traces-DIIcT8DF.js +1 -0
  229. package/webapp/dist/assets/use-stack-context-DHLwZv1r.js +1 -0
  230. package/webapp/dist/index.html +5 -6
  231. package/webapp/dist/assets/Chip-BySxTjyN.js +0 -1
  232. package/webapp/dist/assets/DialogContentText-YQWiAVrU.js +0 -1
  233. package/webapp/dist/assets/DialogTitle-CDkgUIwp.js +0 -1
  234. package/webapp/dist/assets/FormControlLabel-Bu3CCsBM.js +0 -1
  235. package/webapp/dist/assets/Grid-BFY8hAzL.js +0 -1
  236. package/webapp/dist/assets/InputAdornment-_Dayk-3y.js +0 -3
  237. package/webapp/dist/assets/Skeleton-BGj6Sw8m.js +0 -37
  238. package/webapp/dist/assets/Switch-CA6682vv.js +0 -1
  239. package/webapp/dist/assets/TableContainer-4epq10KJ.js +0 -1
  240. package/webapp/dist/assets/TextField-C73KHMVN.js +0 -1
  241. package/webapp/dist/assets/alerts-JEQALS7Y.js +0 -1
  242. package/webapp/dist/assets/apps-DMPysEKB.js +0 -1
  243. package/webapp/dist/assets/client-DlGPter5.js +0 -110
  244. package/webapp/dist/assets/containers-CvkC7do8.js +0 -1
  245. package/webapp/dist/assets/dashboard-C0Fre9pC.js +0 -1
  246. package/webapp/dist/assets/dashboard-builder-DAghqdpE.js +0 -1
  247. package/webapp/dist/assets/deployments-Cg1lI1uT.js +0 -1
  248. package/webapp/dist/assets/detail-CyFtEson.js +0 -1
  249. package/webapp/dist/assets/detail-DqoSGKT1.js +0 -8
  250. package/webapp/dist/assets/icons-ynIWYfBP.js +0 -3
  251. package/webapp/dist/assets/index-vKrDmEA_.js +0 -259
  252. package/webapp/dist/assets/isMuiElement-BRL3YuCT.js +0 -1
  253. package/webapp/dist/assets/logs-IovIij1C.js +0 -11
  254. package/webapp/dist/assets/metrics-Dufwtwjq.js +0 -1
  255. package/webapp/dist/assets/nodes-Brvu8W3j.js +0 -7
  256. package/webapp/dist/assets/pipelines-t40X4MuC.js +0 -4
  257. package/webapp/dist/assets/prop-types-CvVtHxp4.js +0 -1
  258. package/webapp/dist/assets/react-apexcharts.esm-CLO6gala.js +0 -954
  259. package/webapp/dist/assets/settings-DTAIST3v.js +0 -1
  260. package/webapp/dist/assets/sign-in-DQEAkJum.js +0 -1
  261. package/webapp/dist/assets/stacks-BjM1f45N.js +0 -1
  262. package/webapp/dist/assets/system-info-BQSbSEK-.js +0 -1
  263. package/webapp/dist/assets/topology-6N8-Az_Z.js +0 -12
  264. package/webapp/dist/assets/traces-DVXyb-4m.js +0 -1
  265. package/webapp/dist/assets/use-stack-context-CbE8fxBA.js +0 -1
  266. /package/webapp/dist/assets/{constants-DqFQJ27U.js → constants-BgnT-Xdy.js} +0 -0
  267. /package/webapp/dist/assets/{formatters-J3Xqn6BQ.js → formatters-Do41SRmE.js} +0 -0
  268. /package/webapp/dist/assets/{fs-uP8eiZAR.js → fs-CgZLtHiQ.js} +0 -0
@@ -1,110 +0,0 @@
1
- import{i as e,n as t,o as n,r}from"./prop-types-CvVtHxp4.js";function i(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var a=`$$material`;function o(){return o=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},o.apply(null,arguments)}var s=!1;function c(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function l(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var u=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!s:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(l(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=c(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),d=`-ms-`,f=`-moz-`,p=`-webkit-`,m=`comm`,h=`rule`,g=`decl`,_=`@import`,v=`@keyframes`,y=`@layer`,b=Math.abs,x=String.fromCharCode,S=Object.assign;function C(e,t){return E(e,0)^45?(((t<<2^E(e,0))<<2^E(e,1))<<2^E(e,2))<<2^E(e,3):0}function w(e){return e.trim()}function ee(e,t){return(e=t.exec(e))?e[0]:e}function T(e,t,n){return e.replace(t,n)}function te(e,t){return e.indexOf(t)}function E(e,t){return e.charCodeAt(t)|0}function ne(e,t,n){return e.slice(t,n)}function re(e){return e.length}function ie(e){return e.length}function ae(e,t){return t.push(e),e}function oe(e,t){return e.map(t).join(``)}var D=1,se=1,ce=0,O=0,k=0,le=``;function ue(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:D,column:se,length:o,return:``}}function de(e,t){return S(ue(``,null,null,``,null,null,0),e,{length:-e.length},t)}function fe(){return k}function pe(){return k=O>0?E(le,--O):0,se--,k===10&&(se=1,D--),k}function A(){return k=O<ce?E(le,O++):0,se++,k===10&&(se=1,D++),k}function me(){return E(le,O)}function he(){return O}function ge(e,t){return ne(le,e,t)}function _e(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ve(e){return D=se=1,ce=re(le=e),O=0,[]}function ye(e){return le=``,e}function be(e){return w(ge(O-1,Ce(e===91?e+2:e===40?e+1:e)))}function xe(e){for(;(k=me())&&k<33;)A();return _e(e)>2||_e(k)>3?``:` `}function Se(e,t){for(;--t&&A()&&!(k<48||k>102||k>57&&k<65||k>70&&k<97););return ge(e,he()+(t<6&&me()==32&&A()==32))}function Ce(e){for(;A();)switch(k){case e:return O;case 34:case 39:e!==34&&e!==39&&Ce(k);break;case 40:e===41&&Ce(e);break;case 92:A();break}return O}function we(e,t){for(;A()&&e+k!==57&&!(e+k===84&&me()===47););return`/*`+ge(t,O-1)+`*`+x(e===47?e:A())}function Te(e){for(;!_e(me());)A();return ge(e,O)}function Ee(e){return ye(De(``,null,null,null,[``],e=ve(e),0,[0],e))}function De(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,S=a,C=r,w=y;g;)switch(m=v,v=A()){case 40:if(m!=108&&E(w,d-1)==58){te(w+=T(be(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:w+=be(v);break;case 9:case 10:case 13:case 32:w+=xe(m);break;case 92:w+=Se(he()-1,7);continue;case 47:switch(me()){case 42:case 47:ae(ke(we(A(),he()),t,n),c);break;default:w+=`/`}break;case 123*h:s[l++]=re(w)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(w=T(w,/\f/g,``)),p>0&&re(w)-d&&ae(p>32?Ae(w+`;`,r,n,d-1):Ae(T(w,` `,``)+`;`,r,n,d-2),c);break;case 59:w+=`;`;default:if(ae(C=Oe(w,t,n,l,u,i,s,y,b=[],S=[],d),a),v===123)if(u===0)De(w,t,C,C,b,a,d,s,S);else switch(f===99&&E(w,3)===110?100:f){case 100:case 108:case 109:case 115:De(e,C,C,r&&ae(Oe(e,C,C,0,0,i,s,y,i,b=[],d),S),i,S,d,s,r?b:S);break;default:De(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,y=w=``,d=o;break;case 58:d=1+re(w),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&pe()==125)continue}switch(w+=x(v),v*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:s[l++]=(re(w)-1)*_,_=1;break;case 64:me()===45&&(w+=be(A())),f=me(),u=d=re(y=w+=Te(he())),v++;break;case 45:m===45&&re(w)==2&&(h=0)}}return a}function Oe(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=ie(f),m=0,g=0,_=0;m<r;++m)for(var v=0,y=ne(e,d+1,d=b(g=o[m])),x=e;v<p;++v)(x=w(g>0?f[v]+` `+y:T(y,/&\f/g,f[v])))&&(c[_++]=x);return ue(e,t,n,i===0?h:s,c,l,u)}function ke(e,t,n){return ue(e,t,n,m,x(fe()),ne(e,2,-2),0)}function Ae(e,t,n,r){return ue(e,t,n,g,ne(e,0,r),ne(e,r+1,-1),r)}function je(e,t){for(var n=``,r=ie(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Me(e,t,n,r){switch(e.type){case y:if(e.children.length)break;case _:case g:return e.return=e.return||e.value;case m:return``;case v:return e.return=e.value+`{`+je(e.children,r)+`}`;case h:e.value=e.props.join(`,`)}return re(n=je(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Ne(e){var t=ie(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Pe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Fe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ie=e((()=>{})),Le=function(e,t,n){for(var r=0,i=0;r=i,i=me(),r===38&&i===12&&(t[n]=1),!_e(i);)A();return ge(e,O)},Re=function(e,t){var n=-1,r=44;do switch(_e(r)){case 0:r===38&&me()===12&&(t[n]=1),e[n]+=Le(O-1,t,n);break;case 2:e[n]+=be(r);break;case 4:if(r===44){e[++n]=me()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=x(r)}while(r=A());return e},ze=function(e,t){return ye(Re(ve(e),t))},Be=new WeakMap,Ve=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!Be.get(n))&&!r){Be.set(e,!0);for(var i=[],a=ze(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},He=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function Ue(e,t){switch(C(e,t)){case 5103:return p+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return p+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return p+e+f+e+d+e+e;case 6828:case 4268:return p+e+d+e+e;case 6165:return p+e+d+`flex-`+e+e;case 5187:return p+e+T(e,/(\w+).+(:[^]+)/,p+`box-$1$2`+d+`flex-$1$2`)+e;case 5443:return p+e+d+`flex-item-`+T(e,/flex-|-self/,``)+e;case 4675:return p+e+d+`flex-line-pack`+T(e,/align-content|flex-|-self/,``)+e;case 5548:return p+e+d+T(e,`shrink`,`negative`)+e;case 5292:return p+e+d+T(e,`basis`,`preferred-size`)+e;case 6060:return p+`box-`+T(e,`-grow`,``)+p+e+d+T(e,`grow`,`positive`)+e;case 4554:return p+T(e,/([^-])(transform)/g,`$1`+p+`$2`)+e;case 6187:return T(T(T(e,/(zoom-|grab)/,p+`$1`),/(image-set)/,p+`$1`),e,``)+e;case 5495:case 3959:return T(e,/(image-set\([^]*)/,p+"$1$`$1");case 4968:return T(T(e,/(.+:)(flex-)?(.*)/,p+`box-pack:$3`+d+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+p+e+e;case 4095:case 3583:case 4068:case 2532:return T(e,/(.+)-inline(.+)/,p+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(re(e)-1-t>6)switch(E(e,t+1)){case 109:if(E(e,t+4)!==45)break;case 102:return T(e,/(.+:)(.+)-([^]+)/,`$1`+p+`$2-$3$1`+f+(E(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~te(e,`stretch`)?Ue(T(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(E(e,t+1)!==115)break;case 6444:switch(E(e,re(e)-3-(~te(e,`!important`)&&10))){case 107:return T(e,`:`,`:`+p)+e;case 101:return T(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+p+(E(e,14)===45?`inline-`:``)+`box$3$1`+p+`$2$3$1`+d+`$2box$3`)+e}break;case 5936:switch(E(e,t+11)){case 114:return p+e+d+T(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return p+e+d+T(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return p+e+d+T(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return p+e+d+e+e}return e}var We=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case g:e.return=Ue(e.value,e.length);break;case v:return je([de(e,{value:T(e.value,`@`,`@`+p)})],r);case h:if(e.length)return oe(e.props,function(t){switch(ee(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return je([de(e,{props:[T(t,/:(read-\w+)/,`:`+f+`$1`)]})],r);case`::placeholder`:return je([de(e,{props:[T(t,/:(plac\w+)/,`:`+p+`input-$1`)]}),de(e,{props:[T(t,/:(plac\w+)/,`:`+f+`$1`)]}),de(e,{props:[T(t,/:(plac\w+)/,d+`input-$1`)]})],r)}return``})}}],Ge=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||We,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Ve,He],l,d=[Me,Pe(function(e){l.insert(e)})],f=Ne(c.concat(r,d)),p=function(e){return je(Ee(e),f)};s=function(e,t,n,r){l=n,p(e?e+`{`+t.styles+`}`:t.styles),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new u({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return m.sheet.hydrate(o),m},Ke=r((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),qe=r(((e,t)=>{t.exports=Ke()})),Je=r(((e,t)=>{var n=qe(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h})),Ye=!0;function Xe(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var Ze=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||Ye===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},Qe=function(e,t,n){Ze(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function $e(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var et={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};Ie();var tt=!1,nt=/[A-Z]|^ms/g,rt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,it=function(e){return e.charCodeAt(1)===45},at=function(e){return e!=null&&typeof e!=`boolean`},ot=Fe(function(e){return it(e)?e:e.replace(nt,`-$&`).toLowerCase()}),st=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(rt,function(e,t,n){return ft={name:t,styles:n,next:ft},t})}return et[e]!==1&&!it(e)&&typeof t==`number`&&t!==0?t+`px`:t},ct=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function lt(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return ft={name:i.name,styles:i.styles,next:ft},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ft={name:o.name,styles:o.styles,next:ft},o=o.next;return a.styles+`;`}return ut(e,t,n);case`function`:if(e!==void 0){var s=ft,c=n(e);return ft=s,lt(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ut(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=lt(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:at(s)&&(r+=ot(a)+`:`+st(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&tt)throw Error(ct);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)at(o[c])&&(r+=ot(a)+`:`+st(a,o[c])+`;`);else{var l=lt(e,t,o);switch(a){case`animation`:case`animationName`:r+=ot(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var dt=/label:\s*([^\s;{]+)\s*(;|$)/g,ft;function pt(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;ft=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=lt(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=lt(n,t,e[o]),r&&(i+=a[o]);dt.lastIndex=0;for(var s=``,c;(c=dt.exec(i))!==null;)s+=`-`+c[1];return{name:$e(i)+s,styles:i,next:ft}}var j=n(t()),mt=function(e){return e()},ht=j.useInsertionEffect?j.useInsertionEffect:!1,gt=ht||mt,_t=ht||j.useLayoutEffect,vt=j.createContext(typeof HTMLElement<`u`?Ge({key:`css`}):null),yt=vt.Provider,bt=function(e){return(0,j.forwardRef)(function(t,n){return e(t,(0,j.useContext)(vt),n)})},xt=j.createContext({}),St={}.hasOwnProperty,Ct=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,wt=function(e,t){var n={};for(var r in t)St.call(t,r)&&(n[r]=t[r]);return n[Ct]=e,n},Tt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ze(t,n,r),gt(function(){return Qe(t,n,r)}),null},Et=bt(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Ct],a=[r],o=``;typeof e.className==`string`?o=Xe(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=pt(a,void 0,j.useContext(xt));o+=t.key+`-`+s.name;var c={};for(var l in e)St.call(e,l)&&l!==`css`&&l!==Ct&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),j.createElement(j.Fragment,null,j.createElement(Tt,{cache:t,serialized:s,isStringTag:typeof i==`string`}),j.createElement(i,c))});Je();var Dt=function(e,t){var n=arguments;if(t==null||!St.call(t,`css`))return j.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Et,i[1]=wt(e,t);for(var a=2;a<r;a++)i[a]=n[a];return j.createElement.apply(null,i)};(function(e){var t;(function(e){})(t||=e.JSX||={})})(Dt||={});var Ot=bt(function(e,t){var n=e.styles,r=pt([n],void 0,j.useContext(xt)),i=j.useRef();return _t(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),_t(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&Qe(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function kt(){return pt([...arguments])}function At(){var e=kt.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var jt,Mt;e((()=>{Ie(),jt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mt=Fe(function(e){return jt.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}))();var Nt=!1,Pt=Mt,Ft=function(e){return e!==`theme`},It=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?Pt:Ft},Lt=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},Rt=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ze(t,n,r),gt(function(){return Qe(t,n,r)}),null},zt=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,s;n!==void 0&&(a=n.label,s=n.target);var c=Lt(t,n,r),l=c||It(i),u=!l(`as`);return function(){var d=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&f.push(`label:`+a+`;`),d[0]==null||d[0].raw===void 0)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var m=d.length,h=1;h<m;h++)f.push(d[h],p[h])}var g=bt(function(e,t,n){var r=u&&e.as||i,a=``,o=[],d=e;if(e.theme==null){for(var p in d={},e)d[p]=e[p];d.theme=j.useContext(xt)}typeof e.className==`string`?a=Xe(t.registered,o,e.className):e.className!=null&&(a=e.className+` `);var m=pt(f.concat(o),t.registered,d);a+=t.key+`-`+m.name,s!==void 0&&(a+=` `+s);var h=u&&c===void 0?It(r):l,g={};for(var _ in e)u&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),j.createElement(j.Fragment,null,j.createElement(Rt,{cache:t,serialized:m,isStringTag:typeof r==`string`}),j.createElement(r,g))});return g.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=f,g.__emotion_forwardProp=c,Object.defineProperty(g,`toString`,{value:function(){return s===void 0&&Nt?`NO_COMPONENT_SELECTOR`:`.`+s}}),g.withComponent=function(t,r){return e(t,o({},n,r,{shouldForwardProp:Lt(g,r,!0)})).apply(void 0,f)},g}},Bt=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),Vt=zt.bind(null);Bt.forEach(function(e){Vt[e]=Vt(e)});var Ht=r((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ut=r(((e,t)=>{t.exports=Ht()})),M=Ut();function Wt(e){return e==null||Object.keys(e).length===0}function Gt(e){let{styles:t,defaultTheme:n={}}=e;return(0,M.jsx)(Ot,{styles:typeof t==`function`?e=>t(Wt(e)?n:e):t})}function Kt(e,t){return Vt(e,t)}function qt(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Jt=[];function Yt(e){return Jt[0]=e,pt(Jt)}var Xt=r((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),Zt=r(((e,t)=>{t.exports=Xt()}))();function Qt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $t(e){if(j.isValidElement(e)||(0,Zt.isValidElementType)(e)||!Qt(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=$t(e[n])}),t}function N(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return Qt(e)&&Qt(t)&&Object.keys(t).forEach(i=>{j.isValidElement(t[i])||(0,Zt.isValidElementType)(t[i])?r[i]=t[i]:Qt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Qt(e[i])?r[i]=N(e[i],t[i],n):n.clone?r[i]=Qt(t[i])?$t(t[i]):t[i]:r[i]=t[i]}),r}var en=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function tn(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=en(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}function nn(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function rn(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function an(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function on(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var sn={borderRadius:4};function cn(e,t){return t?N(e,t,{clone:!1}):e}var ln={xs:0,sm:600,md:900,lg:1200,xl:1536},un={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${ln[e]}px)`},dn={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:ln[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function fn(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||un;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||un;return Object.keys(t).reduce((i,a)=>{if(rn(e.keys,a)){let e=an(r.containerQueries?r:dn,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||ln).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function pn(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function mn(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function hn(e,...t){let n=pn(e),r=[n,...t].reduce((e,t)=>N(e,t),{});return mn(Object.keys(n),r)}function gn(e,t){if(typeof e!=`object`)return{};let n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{e[t]!=null&&(n[t]=!0)}),n}function _n({values:e,breakpoints:t,base:n}){let r=n||gn(e,t),i=Object.keys(r);if(i.length===0)return e;let a;return i.reduce((t,n,r)=>(Array.isArray(e)?(t[n]=e[r]==null?e[a]:e[r],a=r):typeof e==`object`?(t[n]=e[n]==null?e[a]:e[n],a=n):t[n]=e,t),{})}function vn(e){if(typeof e!=`string`)throw Error(i(7));return e.charAt(0).toUpperCase()+e.slice(1)}function yn(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function bn(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:yn(e,n)||r,t&&(i=t(i,r,e)),i}function P(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=yn(o,r)||{};return fn(e,a,e=>{let r=bn(s,i,e);return e===r&&typeof e==`string`&&(r=bn(s,i,`${t}${e===`default`?``:vn(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function xn(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var Sn={m:`margin`,p:`padding`},Cn={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},wn={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},Tn=xn(e=>{if(e.length>2)if(wn[e])e=wn[e];else return[e];let[t,n]=e.split(``),r=Sn[t],i=Cn[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),En=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],Dn=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],On=[...En,...Dn];function kn(e,t,n,r){let i=yn(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function An(e){return kn(e,`spacing`,8,`spacing`)}function jn(e,t){return typeof t==`string`||t==null?t:e(t)}function Mn(e,t){return n=>e.reduce((e,r)=>(e[r]=jn(t,n),e),{})}function Nn(e,t,n,r){if(!t.includes(n))return null;let i=Mn(Tn(n),r),a=e[n];return fn(e,a,i)}function Pn(e,t){let n=An(e.theme);return Object.keys(e).map(r=>Nn(e,t,r,n)).reduce(cn,{})}function F(e){return Pn(e,En)}F.propTypes={},F.filterProps=En;function I(e){return Pn(e,Dn)}I.propTypes={},I.filterProps=Dn;function Fn(e){return Pn(e,On)}Fn.propTypes={},Fn.filterProps=On;function In(e=8,t=An({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function Ln(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?cn(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Rn(e){return typeof e==`number`?`${e}px solid`:e}function zn(e,t){return P({prop:e,themeKey:`borders`,transform:t})}var Bn=zn(`border`,Rn),Vn=zn(`borderTop`,Rn),Hn=zn(`borderRight`,Rn),Un=zn(`borderBottom`,Rn),Wn=zn(`borderLeft`,Rn),Gn=zn(`borderColor`),Kn=zn(`borderTopColor`),qn=zn(`borderRightColor`),Jn=zn(`borderBottomColor`),Yn=zn(`borderLeftColor`),Xn=zn(`outline`,Rn),Zn=zn(`outlineColor`),Qn=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=kn(e.theme,`shape.borderRadius`,4,`borderRadius`);return fn(e,e.borderRadius,e=>({borderRadius:jn(t,e)}))}return null};Qn.propTypes={},Qn.filterProps=[`borderRadius`],Ln(Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Qn,Xn,Zn);var $n=e=>{if(e.gap!==void 0&&e.gap!==null){let t=kn(e.theme,`spacing`,8,`gap`);return fn(e,e.gap,e=>({gap:jn(t,e)}))}return null};$n.propTypes={},$n.filterProps=[`gap`];var er=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=kn(e.theme,`spacing`,8,`columnGap`);return fn(e,e.columnGap,e=>({columnGap:jn(t,e)}))}return null};er.propTypes={},er.filterProps=[`columnGap`];var tr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=kn(e.theme,`spacing`,8,`rowGap`);return fn(e,e.rowGap,e=>({rowGap:jn(t,e)}))}return null};tr.propTypes={},tr.filterProps=[`rowGap`],Ln($n,er,tr,P({prop:`gridColumn`}),P({prop:`gridRow`}),P({prop:`gridAutoFlow`}),P({prop:`gridAutoColumns`}),P({prop:`gridAutoRows`}),P({prop:`gridTemplateColumns`}),P({prop:`gridTemplateRows`}),P({prop:`gridTemplateAreas`}),P({prop:`gridArea`}));function nr(e,t){return t===`grey`?t:e}Ln(P({prop:`color`,themeKey:`palette`,transform:nr}),P({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:nr}),P({prop:`backgroundColor`,themeKey:`palette`,transform:nr}));function rr(e){return e<=1&&e!==0?`${e*100}%`:e}var ir=P({prop:`width`,transform:rr}),ar=e=>e.maxWidth!==void 0&&e.maxWidth!==null?fn(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||ln[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:rr(t)}}):null;ar.filterProps=[`maxWidth`];var or=P({prop:`minWidth`,transform:rr}),sr=P({prop:`height`,transform:rr}),cr=P({prop:`maxHeight`,transform:rr}),lr=P({prop:`minHeight`,transform:rr});P({prop:`size`,cssProperty:`width`,transform:rr}),P({prop:`size`,cssProperty:`height`,transform:rr}),Ln(ir,ar,or,sr,cr,lr,P({prop:`boxSizing`}));var ur={border:{themeKey:`borders`,transform:Rn},borderTop:{themeKey:`borders`,transform:Rn},borderRight:{themeKey:`borders`,transform:Rn},borderBottom:{themeKey:`borders`,transform:Rn},borderLeft:{themeKey:`borders`,transform:Rn},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:Rn},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Qn},color:{themeKey:`palette`,transform:nr},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:nr},backgroundColor:{themeKey:`palette`,transform:nr},p:{style:I},pt:{style:I},pr:{style:I},pb:{style:I},pl:{style:I},px:{style:I},py:{style:I},padding:{style:I},paddingTop:{style:I},paddingRight:{style:I},paddingBottom:{style:I},paddingLeft:{style:I},paddingX:{style:I},paddingY:{style:I},paddingInline:{style:I},paddingInlineStart:{style:I},paddingInlineEnd:{style:I},paddingBlock:{style:I},paddingBlockStart:{style:I},paddingBlockEnd:{style:I},m:{style:F},mt:{style:F},mr:{style:F},mb:{style:F},ml:{style:F},mx:{style:F},my:{style:F},margin:{style:F},marginTop:{style:F},marginRight:{style:F},marginBottom:{style:F},marginLeft:{style:F},marginX:{style:F},marginY:{style:F},marginInline:{style:F},marginInlineStart:{style:F},marginInlineEnd:{style:F},marginBlock:{style:F},marginBlockStart:{style:F},marginBlockEnd:{style:F},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$n},rowGap:{style:tr},columnGap:{style:er},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:rr},maxWidth:{style:ar},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function dr(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function fr(e,t){return typeof e==`function`?e(t):e}function pr(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=yn(n,s)||{};return l?l(i):fn(i,t,t=>{let n=bn(u,c,t);return t===n&&typeof t==`string`&&(n=bn(u,c,`${e}${t===`default`?``:vn(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??ur;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=pn(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=fr(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=cn(l,e(n,a,i,o));else{let e=fn({theme:i},a,e=>({[n]:e}));dr(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=cn(l,e)}else l=cn(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":nn(i,mn(c,l))}:nn(i,mn(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var mr=pr();mr.filterProps=[`sx`];function hr(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function gr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=tn(n),c=In(i),l=N({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...sn,...a}},o);return l=on(l),l.applyStyles=hr,l=t.reduce((e,t)=>N(e,t),l),l.unstable_sxConfig={...ur,...o?.unstable_sxConfig},l.unstable_sx=function(e){return mr({sx:e,theme:this})},l}function _r(e){return Object.keys(e).length===0}function vr(e=null){let t=j.useContext(xt);return!t||_r(t)?e:t}var yr=gr();function br(e=yr){return vr(e)}function xr(e){let t=Yt(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Sr({styles:e,themeId:t,defaultTheme:n={}}){let r=br(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>xr(typeof e==`function`?e(i):e)):xr(a)),(0,M.jsx)(Gt,{styles:a})}var Cr=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??ur;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function wr(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=Cr(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return Qt(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}var Tr=e=>e,Er=(()=>{let e=Tr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Tr}}})();function Dr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Dr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function L(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dr(e))&&(r&&(r+=` `),r+=t);return r}function Or(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r=`MuiBox-root`,generateClassName:i}=e,a=Kt(`div`,{shouldForwardProp:e=>e!==`theme`&&e!==`sx`&&e!==`as`})(mr);return j.forwardRef(function(e,o){let s=br(n),{className:c,component:l=`div`,...u}=wr(e);return(0,M.jsx)(a,{as:l,ref:o,className:L(c,i?i(r):r),theme:t&&s[t]||s,...u})})}var kr={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Ar(e,t,n=`Mui`){let r=kr[t];return r?`${n}-${r}`:`${Er.generate(e)}-${t}`}function jr(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Ar(e,t,n)}),r}function Mr(e){let{variants:t,...n}=e,r={variants:t,style:Yt(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Yt(e.style))}),r}var Nr=gr();function Pr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Fr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ir(e){return e?(t,n)=>n[e]:null}function Lr(e,t,n){e.theme=Vr(e.theme)?n:e.theme[t]||e.theme}function Rr(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Rr(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Fr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Fr(Yt(i),n):i}return zr(e,r.variants,[t],n)}return r?.isProcessed?n?Fr(Yt(r.style),n):r.style:n?Fr(Yt(r),n):r}function zr(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Fr(Yt(o.style(i)),r):o.style(i))):n.push(r?Fr(Yt(o.style),r):o.style)}return n}function Br(e={}){let{themeId:t,defaultTheme:n=Nr,rootShouldForwardProp:r=Pr,slotShouldForwardProp:i=Pr}=e;function a(e){Lr(e,t,n)}return(e,t={})=>{qt(e,e=>e.filter(e=>e!==mr));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=Ir(Ur(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Pr;o===`Root`||o===`root`?m=r:o?m=i:Hr(e)&&(m=void 0);let h=Kt(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Rr(t,e,t.theme.modularCssLayers?d:void 0)};if(Qt(e)){let t=Mr(e);return function(e){return t.variants?Rr(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Fr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Rr(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?zr(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(mr),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=h(...r,...i,...o);return e.muiName&&(s.muiName=e.muiName),s};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Vr(e){for(let t in e)return!1;return!0}function Hr(e){return typeof e==`string`&&e.charCodeAt(0)>96}function Ur(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var Wr=Br();function Gr(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=Gr(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=L(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function Kr(e){let{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Gr(t.components[n].defaultProps,r)}function qr({props:e,name:t,defaultTheme:n,themeId:r}){let i=br(n);return r&&(i=i[r]||i),Kr({theme:i,name:t,props:e})}var Jr=typeof window<`u`?j.useLayoutEffect:j.useEffect;function Yr(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Xr(e,t=0,n=1){return Yr(e,t,n)}function Zr(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function Qr(e){if(e.type)return e;if(e.charAt(0)===`#`)return Qr(Zr(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(i(9,e));let r=e.substring(t+1,e.length-1),a;if(n===`color`){if(r=r.split(` `),a=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(a))throw Error(i(10,a))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:a}}var $r=e=>{let t=Qr(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},ei=(e,t)=>{try{return $r(e)}catch{return e}};function ti(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function ni(e){e=Qr(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),ti({type:s,values:c})}function ri(e){e=Qr(e);let t=e.type===`hsl`||e.type===`hsla`?Qr(ni(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ii(e,t){let n=ri(e),r=ri(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function ai(e,t){return e=Qr(e),t=Xr(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,ti(e)}function oi(e,t,n){try{return ai(e,t)}catch{return e}}function si(e,t){if(e=Qr(e),t=Xr(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ti(e)}function R(e,t,n){try{return si(e,t)}catch{return e}}function ci(e,t){if(e=Qr(e),t=Xr(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ti(e)}function z(e,t,n){try{return ci(e,t)}catch{return e}}function li(e,t=.15){return ri(e)>.5?si(e,t):ci(e,t)}function ui(e,t,n){try{return li(e,t)}catch{return e}}var di=j.createContext();function fi({value:e,...t}){return(0,M.jsx)(di.Provider,{value:e??!0,...t})}var pi=()=>j.useContext(di)??!1,mi=j.createContext(void 0);function hi({value:e,children:t}){return(0,M.jsx)(mi.Provider,{value:e,children:t})}function gi(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?Gr(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Gr(i,r,t.components.mergeClassNameAndStyle):r}function _i({props:e,name:t}){return gi({props:e,name:t,theme:{components:j.useContext(mi)}})}var vi=0;function yi(e){let[t,n]=j.useState(e),r=e||t;return j.useEffect(()=>{t??(vi+=1,n(`mui-${vi}`))},[t]),r}var bi={...j}.useId;function xi(e){if(bi!==void 0){let t=bi();return e??t}return yi(e)}var Si={theme:void 0};function Ci(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Si.theme=r.theme,i=Mr(e(Si)),t=i,n=r.theme),i}}function wi(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var Ti=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},Ei=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},Di=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Oi(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return Ei(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Di(e,t);Object.assign(i,{[r]:c}),Ti(a,e,`var(${r})`,s),Ti(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function ki(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Oi(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Oi(n,t);p=N(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Oi(h,t);p=N(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=N(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function Ai(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function ji(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}var Mi=gr(),Ni=Wr(`div`,{name:`MuiStack`,slot:`Root`});function Pi(e){return qr({props:e,name:`MuiStack`,defaultTheme:Mi})}function Fi(e,t){let n=j.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(j.cloneElement(t,{key:`separator-${i}`})),e),[])}var Ii=e=>({row:`Left`,"row-reverse":`Right`,column:`Top`,"column-reverse":`Bottom`})[e],Li=({ownerState:e,theme:t})=>{let n={display:`flex`,flexDirection:`column`,...fn({theme:t},_n({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=An(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>((typeof e.spacing==`object`&&e.spacing[n]!=null||typeof e.direction==`object`&&e.direction[n]!=null)&&(t[n]=!0),t),{}),a=_n({values:e.direction,base:i}),o=_n({values:e.spacing,base:i});typeof a==`object`&&Object.keys(a).forEach((e,t,n)=>{a[e]||(a[e]=t>0?a[n[t-1]]:`column`)}),n=N(n,fn({theme:t},o,(t,n)=>e.useFlexGap?{gap:jn(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Ii(n?a[n]:e.direction)}`]:jn(r,t)}}))}return n=hn(t.breakpoints,n),n};function Ri(e={}){let{createStyledComponent:t=Ni,useThemeProps:n=Pi,componentName:r=`MuiStack`}=e,i=()=>ji({root:[`root`]},e=>Ar(r,e),{}),a=t(Li);return j.forwardRef(function(e,t){let{component:r=`div`,direction:o=`column`,spacing:s=0,divider:c,children:l,className:u,useFlexGap:d=!1,...f}=wr(n(e));return(0,M.jsx)(a,{as:r,ownerState:{direction:o,spacing:s,useFlexGap:d},ref:t,className:L(i().root,u),...f,children:c?Fi(l,c):l})})}var zi={black:`#000`,white:`#fff`},Bi={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},Vi={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},Hi={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},Ui={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},Wi={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},Gi={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Ki={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function qi(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:zi.white,default:zi.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var Ji=qi();function Yi(){return{text:{primary:zi.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:zi.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var Xi=Yi();function Zi(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=ci(e.main,i):t===`dark`&&(e.dark=si(e.main,a)))}function Qi(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function $i(e=`light`){return e===`dark`?{main:Wi[200],light:Wi[50],dark:Wi[400]}:{main:Wi[700],light:Wi[400],dark:Wi[800]}}function ea(e=`light`){return e===`dark`?{main:Vi[200],light:Vi[50],dark:Vi[400]}:{main:Vi[500],light:Vi[300],dark:Vi[700]}}function ta(e=`light`){return e===`dark`?{main:Hi[500],light:Hi[300],dark:Hi[700]}:{main:Hi[700],light:Hi[400],dark:Hi[800]}}function na(e=`light`){return e===`dark`?{main:Gi[400],light:Gi[300],dark:Gi[700]}:{main:Gi[700],light:Gi[500],dark:Gi[900]}}function ra(e=`light`){return e===`dark`?{main:Ki[400],light:Ki[300],dark:Ki[700]}:{main:Ki[800],light:Ki[500],dark:Ki[900]}}function ia(e=`light`){return e===`dark`?{main:Ui[400],light:Ui[300],dark:Ui[700]}:{main:`#ed6c02`,light:Ui[500],dark:Ui[900]}}function aa(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function oa(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:a,...o}=e,s=e.primary||$i(t),c=e.secondary||ea(t),l=e.error||ta(t),u=e.info||na(t),d=e.success||ra(t),f=e.warning||ia(t);function p(e){return a?aa(e):ii(e,Xi.text.primary)>=n?Xi.text.primary:Ji.text.primary}let m=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:s=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(i(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(i(12,t?` (${t})`:``,JSON.stringify(e.main)));return a?(Qi(a,e,`light`,o,r),Qi(a,e,`dark`,s,r)):(Zi(e,`light`,o,r),Zi(e,`dark`,s,r)),e.contrastText||=p(e.main),e},h;return t===`light`?h=qi():t===`dark`&&(h=Yi()),N({common:{...zi},mode:t,primary:m({color:s,name:`primary`}),secondary:m({color:c,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:m({color:l,name:`error`}),warning:m({color:f,name:`warning`}),info:m({color:u,name:`info`}),success:m({color:d,name:`success`}),grey:Bi,contrastThreshold:n,getContrastText:p,augmentColor:m,tonalOffset:r,...h},o)}function sa(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function ca(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function la(e){return Math.round(e*1e5)/1e5}var ua={textTransform:`uppercase`},da=`"Roboto", "Helvetica", "Arial", sans-serif`;function fa(e,t){let{fontFamily:n=da,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===da?{letterSpacing:`${la(i/t)}em`}:{},...a,...l});return N({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,ua),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,ua),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var pa=.2,ma=.14,ha=.12;function B(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${pa})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ma})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ha})`].join(`,`)}var ga=[`none`,B(0,2,1,-1,0,1,1,0,0,1,3,0),B(0,3,1,-2,0,2,2,0,0,1,5,0),B(0,3,3,-2,0,3,4,0,0,1,8,0),B(0,2,4,-1,0,4,5,0,0,1,10,0),B(0,3,5,-1,0,5,8,0,0,1,14,0),B(0,3,5,-1,0,6,10,0,0,1,18,0),B(0,4,5,-2,0,7,10,1,0,2,16,1),B(0,5,5,-3,0,8,10,1,0,3,14,2),B(0,5,6,-3,0,9,12,1,0,3,16,2),B(0,6,6,-3,0,10,14,1,0,4,18,3),B(0,6,7,-4,0,11,15,1,0,4,20,3),B(0,7,8,-4,0,12,17,2,0,5,22,4),B(0,7,8,-4,0,13,19,2,0,5,24,4),B(0,7,9,-4,0,14,21,2,0,5,26,4),B(0,8,9,-5,0,15,22,2,0,6,28,5),B(0,8,10,-5,0,16,24,2,0,6,30,5),B(0,8,11,-5,0,17,26,2,0,6,32,5),B(0,9,11,-5,0,18,28,2,0,7,34,6),B(0,9,12,-6,0,19,29,2,0,7,36,6),B(0,10,13,-6,0,20,31,3,0,8,38,7),B(0,10,13,-6,0,21,33,3,0,8,40,7),B(0,10,14,-6,0,22,35,3,0,8,42,7),B(0,11,14,-7,0,23,36,3,0,9,44,8),B(0,11,15,-7,0,24,38,3,0,9,46,8)],_a={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},va={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ya(e){return`${Math.round(e)}ms`}function ba(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function xa(e){let t={..._a,...e.easing},n={...va,...e.duration};return{getAutoHeightDuration:ba,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:ya(i)} ${a} ${typeof o==`string`?o:ya(o)}`).join(`,`)},...e,easing:t,duration:n}}var Sa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ca(e){return Qt(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function wa(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ca(a)||i.startsWith(`unstable_`)?delete e[i]:Qt(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
2
-
3
- const theme = ${JSON.stringify(t,null,2)};
4
-
5
- theme.breakpoints = createBreakpoints(theme.breakpoints || {});
6
- theme.transitions = createTransitions(theme.transitions || {});
7
-
8
- export default theme;`}function Ta(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Ea=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function Da(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:ai(t,Ea(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Ta(n)})`:ci(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Ta(n)})`:si(t,n)}})}function Oa(e={},...t){let{breakpoints:n,mixins:r={},spacing:a,palette:o={},transitions:s={},typography:c={},shape:l,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(i(20));let f=oa({...o,colorSpace:u}),p=gr(e),m=N(p,{mixins:ca(p.breakpoints,r),palette:f,shadows:ga.slice(),typography:fa(f,c),transitions:xa(s),zIndex:{...Sa}});return m=N(m,d),m=t.reduce((e,t)=>N(e,t),m),m.unstable_sxConfig={...ur,...d?.unstable_sxConfig},m.unstable_sx=function(e){return mr({sx:e,theme:this})},m.toRuntimeSource=wa,Da(m),m}function ka(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var Aa=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=ka(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function ja(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function Ma(e){return e===`dark`?Aa:[]}function Na(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=oa({...t,colorSpace:i});return{palette:o,opacity:{...ja(o.mode),...n},overlays:r||Ma(o.mode),...a}}function Pa(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Fa=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Ia=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return Fa(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function La(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function V(e,t,n){!e[t]&&n&&(e[t]=n)}function Ra(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:ni(e)}function za(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ei(Ra(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
9
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Ba(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var Va=e=>{try{return e()}catch{}},Ha=(e=`mui`)=>wi(e);function Ua(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=Na({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=Oa({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...ja(a),...n?.opacity},overlays:n?.overlays||Ma(a)},s}function Wa(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:a=!1,cssVarPrefix:o=`mui`,nativeColor:s=!1,shouldSkipGeneratingVar:c=Pa,colorSchemeSelector:l=n.light&&n.dark?`media`:void 0,rootSelector:u=`:root`,...d}=e,f=Object.keys(n)[0],p=r||(n.light&&f!==`light`?`light`:f),m=Ha(o),{[p]:h,light:g,dark:_,...v}=n,y={...v},b=h;if((p===`dark`&&!(`dark`in n)||p===`light`&&!(`light`in n))&&(b=!0),!b)throw Error(i(21,p));let x;s&&(x=`oklch`);let S=Ua(x,y,b,d,p);g&&!y.light&&Ua(x,y,g,void 0,`light`),_&&!y.dark&&Ua(x,y,_,void 0,`dark`);let C={defaultColorScheme:p,...S,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:u,getCssVar:m,colorSchemes:y,font:{...sa(S.typography),...S.font},spacing:Ba(d.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return m(e,t[r][i])};t.mode===`light`&&(V(t.common,`background`,`#fff`),V(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(V(t.common,`background`,`#000`),V(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===oi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===R&&(r=`#000 ${(n*100).toFixed(0)}%`),e===z&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(La(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){V(t.Alert,`errorColor`,r(R,s?m(`palette-error-light`):t.error.light,.6)),V(t.Alert,`infoColor`,r(R,s?m(`palette-info-light`):t.info.light,.6)),V(t.Alert,`successColor`,r(R,s?m(`palette-success-light`):t.success.light,.6)),V(t.Alert,`warningColor`,r(R,s?m(`palette-warning-light`):t.warning.light,.6)),V(t.Alert,`errorFilledBg`,n(`palette-error-main`)),V(t.Alert,`infoFilledBg`,n(`palette-info-main`)),V(t.Alert,`successFilledBg`,n(`palette-success-main`)),V(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),V(t.Alert,`errorFilledColor`,Va(()=>t.getContrastText(t.error.main))),V(t.Alert,`infoFilledColor`,Va(()=>t.getContrastText(t.info.main))),V(t.Alert,`successFilledColor`,Va(()=>t.getContrastText(t.success.main))),V(t.Alert,`warningFilledColor`,Va(()=>t.getContrastText(t.warning.main))),V(t.Alert,`errorStandardBg`,r(z,s?m(`palette-error-light`):t.error.light,.9)),V(t.Alert,`infoStandardBg`,r(z,s?m(`palette-info-light`):t.info.light,.9)),V(t.Alert,`successStandardBg`,r(z,s?m(`palette-success-light`):t.success.light,.9)),V(t.Alert,`warningStandardBg`,r(z,s?m(`palette-warning-light`):t.warning.light,.9)),V(t.Alert,`errorIconColor`,n(`palette-error-main`)),V(t.Alert,`infoIconColor`,n(`palette-info-main`)),V(t.Alert,`successIconColor`,n(`palette-success-main`)),V(t.Alert,`warningIconColor`,n(`palette-warning-main`)),V(t.AppBar,`defaultBg`,n(`palette-grey-100`)),V(t.Avatar,`defaultBg`,n(`palette-grey-400`)),V(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),V(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),V(t.Chip,`defaultBorder`,n(`palette-grey-400`)),V(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),V(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),V(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),V(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),V(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),V(t.LinearProgress,`primaryBg`,r(z,s?m(`palette-primary-main`):t.primary.main,.62)),V(t.LinearProgress,`secondaryBg`,r(z,s?m(`palette-secondary-main`):t.secondary.main,.62)),V(t.LinearProgress,`errorBg`,r(z,s?m(`palette-error-main`):t.error.main,.62)),V(t.LinearProgress,`infoBg`,r(z,s?m(`palette-info-main`):t.info.main,.62)),V(t.LinearProgress,`successBg`,r(z,s?m(`palette-success-main`):t.success.main,.62)),V(t.LinearProgress,`warningBg`,r(z,s?m(`palette-warning-light`):t.warning.main,.62)),V(t.Skeleton,`bg`,x?r(oi,s?m(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),V(t.Slider,`primaryTrack`,r(z,s?m(`palette-primary-main`):t.primary.main,.62)),V(t.Slider,`secondaryTrack`,r(z,s?m(`palette-secondary-main`):t.secondary.main,.62)),V(t.Slider,`errorTrack`,r(z,s?m(`palette-error-main`):t.error.main,.62)),V(t.Slider,`infoTrack`,r(z,s?m(`palette-info-main`):t.info.main,.62)),V(t.Slider,`successTrack`,r(z,s?m(`palette-success-main`):t.success.main,.62)),V(t.Slider,`warningTrack`,r(z,s?m(`palette-warning-main`):t.warning.main,.62));let e=x?r(R,s?m(`palette-background-default`):t.background.default,.6825):ui(t.background.default,.8);V(t.SnackbarContent,`bg`,e),V(t.SnackbarContent,`color`,Va(()=>x?Xi.text.primary:t.getContrastText(e))),V(t.SpeedDialAction,`fabHoverBg`,ui(t.background.paper,.15)),V(t.StepConnector,`border`,n(`palette-grey-400`)),V(t.StepContent,`border`,n(`palette-grey-400`)),V(t.Switch,`defaultColor`,n(`palette-common-white`)),V(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),V(t.Switch,`primaryDisabledColor`,r(z,s?m(`palette-primary-main`):t.primary.main,.62)),V(t.Switch,`secondaryDisabledColor`,r(z,s?m(`palette-secondary-main`):t.secondary.main,.62)),V(t.Switch,`errorDisabledColor`,r(z,s?m(`palette-error-main`):t.error.main,.62)),V(t.Switch,`infoDisabledColor`,r(z,s?m(`palette-info-main`):t.info.main,.62)),V(t.Switch,`successDisabledColor`,r(z,s?m(`palette-success-main`):t.success.main,.62)),V(t.Switch,`warningDisabledColor`,r(z,s?m(`palette-warning-main`):t.warning.main,.62)),V(t.TableCell,`border`,r(z,oi(s?m(`palette-divider`):t.divider,1),.88)),V(t.Tooltip,`bg`,r(oi,s?m(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){V(t.Alert,`errorColor`,r(z,s?m(`palette-error-light`):t.error.light,.6)),V(t.Alert,`infoColor`,r(z,s?m(`palette-info-light`):t.info.light,.6)),V(t.Alert,`successColor`,r(z,s?m(`palette-success-light`):t.success.light,.6)),V(t.Alert,`warningColor`,r(z,s?m(`palette-warning-light`):t.warning.light,.6)),V(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),V(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),V(t.Alert,`successFilledBg`,n(`palette-success-dark`)),V(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),V(t.Alert,`errorFilledColor`,Va(()=>t.getContrastText(t.error.dark))),V(t.Alert,`infoFilledColor`,Va(()=>t.getContrastText(t.info.dark))),V(t.Alert,`successFilledColor`,Va(()=>t.getContrastText(t.success.dark))),V(t.Alert,`warningFilledColor`,Va(()=>t.getContrastText(t.warning.dark))),V(t.Alert,`errorStandardBg`,r(R,s?m(`palette-error-light`):t.error.light,.9)),V(t.Alert,`infoStandardBg`,r(R,s?m(`palette-info-light`):t.info.light,.9)),V(t.Alert,`successStandardBg`,r(R,s?m(`palette-success-light`):t.success.light,.9)),V(t.Alert,`warningStandardBg`,r(R,s?m(`palette-warning-light`):t.warning.light,.9)),V(t.Alert,`errorIconColor`,n(`palette-error-main`)),V(t.Alert,`infoIconColor`,n(`palette-info-main`)),V(t.Alert,`successIconColor`,n(`palette-success-main`)),V(t.Alert,`warningIconColor`,n(`palette-warning-main`)),V(t.AppBar,`defaultBg`,n(`palette-grey-900`)),V(t.AppBar,`darkBg`,n(`palette-background-paper`)),V(t.AppBar,`darkColor`,n(`palette-text-primary`)),V(t.Avatar,`defaultBg`,n(`palette-grey-600`)),V(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),V(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),V(t.Chip,`defaultBorder`,n(`palette-grey-700`)),V(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),V(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),V(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),V(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),V(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),V(t.LinearProgress,`primaryBg`,r(R,s?m(`palette-primary-main`):t.primary.main,.5)),V(t.LinearProgress,`secondaryBg`,r(R,s?m(`palette-secondary-main`):t.secondary.main,.5)),V(t.LinearProgress,`errorBg`,r(R,s?m(`palette-error-main`):t.error.main,.5)),V(t.LinearProgress,`infoBg`,r(R,s?m(`palette-info-main`):t.info.main,.5)),V(t.LinearProgress,`successBg`,r(R,s?m(`palette-success-main`):t.success.main,.5)),V(t.LinearProgress,`warningBg`,r(R,s?m(`palette-warning-main`):t.warning.main,.5)),V(t.Skeleton,`bg`,x?r(oi,s?m(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),V(t.Slider,`primaryTrack`,r(R,s?m(`palette-primary-main`):t.primary.main,.5)),V(t.Slider,`secondaryTrack`,r(R,s?m(`palette-secondary-main`):t.secondary.main,.5)),V(t.Slider,`errorTrack`,r(R,s?m(`palette-error-main`):t.error.main,.5)),V(t.Slider,`infoTrack`,r(R,s?m(`palette-info-main`):t.info.main,.5)),V(t.Slider,`successTrack`,r(R,s?m(`palette-success-main`):t.success.main,.5)),V(t.Slider,`warningTrack`,r(R,s?m(`palette-warning-light`):t.warning.main,.5));let e=x?r(z,s?m(`palette-background-default`):t.background.default,.985):ui(t.background.default,.98);V(t.SnackbarContent,`bg`,e),V(t.SnackbarContent,`color`,Va(()=>x?Ji.text.primary:t.getContrastText(e))),V(t.SpeedDialAction,`fabHoverBg`,ui(t.background.paper,.15)),V(t.StepConnector,`border`,n(`palette-grey-600`)),V(t.StepContent,`border`,n(`palette-grey-600`)),V(t.Switch,`defaultColor`,n(`palette-grey-300`)),V(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),V(t.Switch,`primaryDisabledColor`,r(R,s?m(`palette-primary-main`):t.primary.main,.55)),V(t.Switch,`secondaryDisabledColor`,r(R,s?m(`palette-secondary-main`):t.secondary.main,.55)),V(t.Switch,`errorDisabledColor`,r(R,s?m(`palette-error-main`):t.error.main,.55)),V(t.Switch,`infoDisabledColor`,r(R,s?m(`palette-info-main`):t.info.main,.55)),V(t.Switch,`successDisabledColor`,r(R,s?m(`palette-success-main`):t.success.main,.55)),V(t.Switch,`warningDisabledColor`,r(R,s?m(`palette-warning-light`):t.warning.main,.55)),V(t.TableCell,`border`,r(R,oi(s?m(`palette-divider`):t.divider,1),.68)),V(t.Tooltip,`bg`,r(oi,s?m(`palette-grey-700`):t.grey[700],.92))}za(t.background,`default`),za(t.background,`paper`),za(t.common,`background`),za(t.common,`onBackground`),za(t,`divider`),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&n&&typeof n==`object`&&(n.main&&V(t[e],`mainChannel`,ei(Ra(n.main))),n.light&&V(t[e],`lightChannel`,ei(Ra(n.light))),n.dark&&V(t[e],`darkChannel`,ei(Ra(n.dark))),n.contrastText&&V(t[e],`contrastTextChannel`,ei(Ra(n.contrastText))),e===`text`&&(za(t[e],`primary`),za(t[e],`secondary`)),e===`action`&&(n.active&&za(t[e],`active`),n.selected&&za(t[e],`selected`)))})}),C=t.reduce((e,t)=>N(e,t),C);let w={prefix:o,disableCssColorScheme:a,shouldSkipGeneratingVar:c,getSelector:Ia(C),enableContrastVars:s},{vars:ee,generateThemeVars:T,generateStyleSheets:te}=ki(C,w);return C.vars=ee,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=T,C.generateStyleSheets=te,C.generateSpacing=function(){return In(d.spacing,An(this))},C.getColorSchemeSelector=Ai(l),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=c,C.unstable_sxConfig={...ur,...d?.unstable_sxConfig},C.unstable_sx=function(e){return mr({sx:e,theme:this})},C.toRuntimeSource=wa,C}function Ga(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:oa({...n===!0?{}:n.palette,mode:t})})}function Ka(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return Oa(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=Oa({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},Ga(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},Ga(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),Wa({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var qa=Ka();function Ja(){let e=br(qa);return e.$$material||e}function Ya(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Xa=e=>Ya(e)&&e!==`classes`,H=Br({themeId:a,defaultTheme:qa,rootShouldForwardProp:Xa}),U=vn;function Za(e){return(0,M.jsx)(Sr,{...e,defaultTheme:qa,themeId:a})}function Qa(e){return function(t){return(0,M.jsx)(Za,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function $a(){return wr}var eo=Ci;function to(e){return _i(e)}function no(e){return Ar(`MuiSvgIcon`,e)}var ro=jr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]),io=e=>{let{color:t,fontSize:n,classes:r}=e;return ji({root:[`root`,t!==`inherit`&&`color${U(t)}`,`fontSize${U(n)}`]},no,r)},ao=H(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${U(n.color)}`],t[`fontSize${U(n.fontSize)}`]]}})(eo(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),oo=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=j.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};return l||(h.viewBox=d),(0,M.jsxs)(ao,{as:o,className:L(io(m).root,i),focusable:`false`,color:c,"aria-hidden":u?void 0:!0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,M.jsx)(`title`,{children:u}):null]})});oo.muiName=`SvgIcon`;function so(e,t){function n(t,n){return(0,M.jsx)(oo,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=oo.muiName,j.memo(j.forwardRef(n))}var co=xi;function lo(e){let t=j.useRef(e);return Jr(()=>{t.current=e}),j.useRef((...e)=>(0,t.current)(...e)).current}var uo=lo;function fo(...e){let t=j.useRef(void 0),n=j.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return j.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var po=fo;function mo(e){return typeof e.main==`string`}function ho(e,t=[]){if(!mo(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function go(e=[]){return([,t])=>t&&ho(t,e)}function _o(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var vo={};function yo(e,t){let n=j.useRef(vo);return n.current===vo&&(n.current=e(t)),n}var bo=class e{static create(){return new e}static use(){let t=yo(e.create).current,[n,r]=j.useState(!1);return t.shouldMount=n,t.setShouldMount=r,j.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=So(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function xo(){return bo.use()}function So(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Co(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wo(e,t)}function To(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wo(e,t)}var Eo=j.createContext(null);function Do(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Oo(e,t){var n=function(e){return t&&(0,j.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&j.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function ko(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Ao(e,t,n){return n[t]==null?e.props[t]:n[t]}function jo(e,t){return Oo(e.children,function(n){return(0,j.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ao(n,`appear`,e),enter:Ao(n,`enter`,e),exit:Ao(n,`exit`,e)})})}function Mo(e,t,n){var r=Oo(e.children),i=ko(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,j.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,j.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,j.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Ao(o,`exit`,e),enter:Ao(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,j.cloneElement)(o,{in:!1}):c&&s&&(0,j.isValidElement)(l)&&(i[a]=(0,j.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Ao(o,`exit`,e),enter:Ao(o,`enter`,e)}))}}),i}var No=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Po={component:`div`,childFactory:function(e){return e}},Fo=function(e){To(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Do(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?jo(e,r):Mo(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Oo(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=o({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Co(e,[`component`,`childFactory`]),i=this.state.contextValue,a=No(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?j.createElement(Eo.Provider,{value:i},a):j.createElement(Eo.Provider,{value:i},j.createElement(t,r,a))},t}(j.Component);Fo.propTypes={},Fo.defaultProps=Po;var Io=[];function Lo(e){j.useEffect(e,Io)}var Ro=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function zo(){let e=yo(Ro.create).current;return Lo(e.disposeEffect),e}function Bo(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=j.useState(!1),f=L(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=L(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),j.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,M.jsx)(`span`,{className:f,style:p,children:(0,M.jsx)(`span`,{className:m})})}var Vo=jr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),Ho=550,Uo=At`
10
- 0% {
11
- transform: scale(0);
12
- opacity: 0.1;
13
- }
14
-
15
- 100% {
16
- transform: scale(1);
17
- opacity: 0.3;
18
- }
19
- `,Wo=At`
20
- 0% {
21
- opacity: 1;
22
- }
23
-
24
- 100% {
25
- opacity: 0;
26
- }
27
- `,Go=At`
28
- 0% {
29
- transform: scale(1);
30
- }
31
-
32
- 50% {
33
- transform: scale(0.92);
34
- }
35
-
36
- 100% {
37
- transform: scale(1);
38
- }
39
- `,Ko=H(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),qo=H(Bo,{name:`MuiTouchRipple`,slot:`Ripple`})`
40
- opacity: 0;
41
- position: absolute;
42
-
43
- &.${Vo.rippleVisible} {
44
- opacity: 0.3;
45
- transform: scale(1);
46
- animation-name: ${Uo};
47
- animation-duration: ${Ho}ms;
48
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
49
- }
50
-
51
- &.${Vo.ripplePulsate} {
52
- animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
53
- }
54
-
55
- & .${Vo.child} {
56
- opacity: 1;
57
- display: block;
58
- width: 100%;
59
- height: 100%;
60
- border-radius: 50%;
61
- background-color: currentColor;
62
- }
63
-
64
- & .${Vo.childLeaving} {
65
- opacity: 0;
66
- animation-name: ${Wo};
67
- animation-duration: ${Ho}ms;
68
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
69
- }
70
-
71
- & .${Vo.childPulsate} {
72
- position: absolute;
73
- /* @noflip */
74
- left: 0px;
75
- top: 0;
76
- animation-name: ${Go};
77
- animation-duration: 2500ms;
78
- animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
79
- animation-iteration-count: infinite;
80
- animation-delay: 200ms;
81
- }
82
- `,Jo=j.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=to({props:e,name:`MuiTouchRipple`}),[o,s]=j.useState([]),c=j.useRef(0),l=j.useRef(null);j.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=j.useRef(!1),d=zo(),f=j.useRef(null),p=j.useRef(null),m=j.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,M.jsx)(qo,{classes:{ripple:L(r.ripple,Vo.ripple),rippleVisible:L(r.rippleVisible,Vo.rippleVisible),ripplePulsate:L(r.ripplePulsate,Vo.ripplePulsate),child:L(r.child,Vo.child),childLeaving:L(r.childLeaving,Vo.childLeaving),childPulsate:L(r.childPulsate,Vo.childPulsate)},timeout:Ho,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=j.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),g=j.useCallback(()=>{h({},{pulsate:!0})},[h]),_=j.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{_(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return j.useImperativeHandle(t,()=>({pulsate:g,start:h,stop:_}),[g,h,_]),(0,M.jsx)(Ko,{className:L(Vo.root,r.root,i),ref:p,...a,children:(0,M.jsx)(Fo,{component:null,exit:!0,children:o})})});function Yo(e){return Ar(`MuiButtonBase`,e)}var Xo=jr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),Zo=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=ji({root:[`root`,t&&`disabled`,n&&`focusVisible`]},Yo,i);return n&&r&&(a.root+=` ${r}`),a},Qo=H(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${Xo.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),$o=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:g,onDragLeave:_,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:x,onMouseDown:S,onMouseLeave:C,onMouseUp:w,onTouchEnd:ee,onTouchMove:T,onTouchStart:te,tabIndex:E=0,TouchRippleProps:ne,touchRippleRef:re,type:ie,...ae}=n,oe=j.useRef(null),D=xo(),se=po(D.ref,re),[ce,O]=j.useState(!1);c&&ce&&O(!1),j.useImperativeHandle(r,()=>({focusVisible:()=>{O(!0),oe.current.focus()}}),[]);let k=D.shouldMount&&!l&&!c;j.useEffect(()=>{ce&&d&&!l&&D.pulsate()},[l,d,ce,D]);let le=es(D,`start`,S,u),ue=es(D,`stop`,g,u),de=es(D,`stop`,_,u),fe=es(D,`stop`,w,u),pe=es(D,`stop`,e=>{ce&&e.preventDefault(),C&&C(e)},u),A=es(D,`start`,te,u),me=es(D,`stop`,ee,u),he=es(D,`stop`,T,u),ge=es(D,`stop`,e=>{_o(e.target)||O(!1),m&&m(e)},!1),_e=uo(e=>{oe.current||=e.currentTarget,_o(e.target)&&(O(!0),y&&y(e)),v&&v(e)}),ve=()=>{let e=oe.current;return s&&s!==`button`&&!(e.tagName===`A`&&e.href)},ye=uo(e=>{d&&!e.repeat&&ce&&e.key===` `&&D.stop(e,()=>{D.start(e)}),e.target===e.currentTarget&&ve()&&e.key===` `&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&ve()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),be=uo(e=>{d&&e.key===` `&&ce&&!e.defaultPrevented&&D.stop(e,()=>{D.pulsate(e)}),x&&x(e),h&&e.target===e.currentTarget&&ve()&&e.key===` `&&!e.defaultPrevented&&h(e)}),xe=s;xe===`button`&&(ae.href||ae.to)&&(xe=p);let Se={};if(xe===`button`){let e=!!ae.formAction;Se.type=ie===void 0&&!e?`button`:ie,Se.disabled=c}else !ae.href&&!ae.to&&(Se.role=`button`),c&&(Se[`aria-disabled`]=c);let Ce=po(t,oe),we={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:E,focusVisible:ce},Te=Zo(we);return(0,M.jsxs)(Qo,{as:xe,className:L(Te.root,o),ownerState:we,onBlur:ge,onClick:h,onContextMenu:ue,onFocus:_e,onKeyDown:ye,onKeyUp:be,onMouseDown:le,onMouseLeave:pe,onMouseUp:fe,onDragLeave:de,onTouchEnd:me,onTouchMove:he,onTouchStart:A,ref:Ce,tabIndex:c?-1:E,type:ie,...Se,...ae,children:[a,k?(0,M.jsx)(Jo,{ref:se,center:i,...ne}):null]})});function es(e,t,n,r=!1){return uo(i=>(n&&n(i),r||e[t](i),!0))}function ts(e){return Ar(`MuiCircularProgress`,e)}jr(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var ns=44,rs=At`
83
- 0% {
84
- transform: rotate(0deg);
85
- }
86
-
87
- 100% {
88
- transform: rotate(360deg);
89
- }
90
- `,is=At`
91
- 0% {
92
- stroke-dasharray: 1px, 200px;
93
- stroke-dashoffset: 0;
94
- }
95
-
96
- 50% {
97
- stroke-dasharray: 100px, 200px;
98
- stroke-dashoffset: -15px;
99
- }
100
-
101
- 100% {
102
- stroke-dasharray: 1px, 200px;
103
- stroke-dashoffset: -126px;
104
- }
105
- `,as=typeof rs==`string`?null:kt`
106
- animation: ${rs} 1.4s linear infinite;
107
- `,os=typeof is==`string`?null:kt`
108
- animation: ${is} 1.4s ease-in-out infinite;
109
- `,ss=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return ji({root:[`root`,n,`color${U(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${U(n)}`,i&&`circleDisableShrink`]},ts,t)},cs=H(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${U(n.color)}`]]}})(eo(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:as||{animation:`${rs} 1.4s linear infinite`}},...Object.entries(e.palette).filter(go()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),ls=H(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),us=H(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${U(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(eo(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:os||{animation:`${is} 1.4s ease-in-out infinite`}}]}))),ds=H(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(eo(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),fs=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=ss(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((ns-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,M.jsx)(cs,{className:L(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,M.jsxs)(ls,{className:m.svg,ownerState:p,viewBox:`${ns/2} ${ns/2} ${ns} ${ns}`,children:[o?(0,M.jsx)(ds,{className:m.track,ownerState:p,cx:ns,cy:ns,r:(ns-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,M.jsx)(us,{className:m.circle,style:h,ownerState:p,cx:ns,cy:ns,r:(ns-l)/2,fill:`none`,strokeWidth:l})]})})});function ps(e){return Ar(`MuiIconButton`,e)}var ms=jr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),hs=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return ji({root:[`root`,o&&`loading`,n&&`disabled`,r!==`default`&&`color${U(r)}`,i&&`edge${U(i)}`,`size${U(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},ps,t)},gs=H($o,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!==`default`&&t[`color${U(n.color)}`],n.edge&&t[`edge${U(n.edge)}`],t[`size${U(n.size)}`]]}})(eo(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),eo(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(go()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(go()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${ms.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${ms.loading}`]:{color:`transparent`}}))),_s=H(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),vs=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=co(u),h=f??(0,M.jsx)(fs,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=hs(g);return(0,M.jsxs)(gs,{id:d?m:u,className:L(_.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,M.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,M.jsx)(_s,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})});function ys(e){return typeof e==`string`}function bs(e,t,n){return e===void 0||ys(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function xs(e,t,n){return typeof e==`function`?e(t,n):e}function Ss(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Cs(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function ws(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=L(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Ss({...i,...r}),s=Cs(r),c=Cs(i),l=t(o),u=L(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function Ts(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=xs(d[e],i),{props:{component:h,...g},internalRef:_}=ws({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=fo(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,bs(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}function Es(e){return Ar(`MuiPaper`,e)}jr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var Ds=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return ji({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},Es,i)},Os=H(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(eo(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),ks=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiPaper`}),r=Ja(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c};return(0,M.jsx)(Os,{as:a,ownerState:u,className:L(Ds(u).root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${ai(`#fff`,ka(o))}, ${ai(`#fff`,ka(o))})`}},...l.style}})}),As=so((0,M.jsx)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`);function js(e){return Ar(`MuiTypography`,e)}var Ms=jr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]),Ns={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ps=$a(),Fs=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return ji({root:[`root`,a,e.align!==`inherit`&&`align${U(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},js,o)},Is=H(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${U(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(eo(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(go()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${U(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Ls={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Rs=j.forwardRef(function(e,t){let{color:n,...r}=to({props:e,name:`MuiTypography`}),i=!Ns[n],a=Ps({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=Ls,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p};return(0,M.jsx)(Is,{as:c||(d?`p`:p[f]||Ls[f])||`span`,ref:t,className:L(Fs(h).root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function zs(e){return Ar(`MuiAlert`,e)}var Bs=jr(`MuiAlert`,[`root`,`action`,`icon`,`message`,`filled`,`colorSuccess`,`colorInfo`,`colorWarning`,`colorError`,`filledSuccess`,`filledInfo`,`filledWarning`,`filledError`,`outlined`,`outlinedSuccess`,`outlinedInfo`,`outlinedWarning`,`outlinedError`,`standard`,`standardSuccess`,`standardInfo`,`standardWarning`,`standardError`]),Vs=so((0,M.jsx)(`path`,{d:`M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z`}),`SuccessOutlined`),Hs=so((0,M.jsx)(`path`,{d:`M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z`}),`ReportProblemOutlined`),Us=so((0,M.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),`ErrorOutline`),Ws=so((0,M.jsx)(`path`,{d:`M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z`}),`InfoOutlined`),Gs=e=>{let{variant:t,color:n,severity:r,classes:i}=e;return ji({root:[`root`,`color${U(n||r)}`,`${t}${U(n||r)}`,`${t}`],icon:[`icon`],message:[`message`],action:[`action`]},zs,i)},Ks=H(ks,{name:`MuiAlert`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${U(n.color||n.severity)}`]]}})(eo(({theme:e})=>{let t=e.palette.mode===`light`?e.darken:e.lighten,n=e.palette.mode===`light`?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:`transparent`,display:`flex`,padding:`6px 16px`,variants:[...Object.entries(e.palette).filter(go([`light`])).map(([r])=>({props:{colorSeverity:r,variant:`standard`},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Bs.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(go([`light`])).map(([n])=>({props:{colorSeverity:n,variant:`outlined`},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Bs.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter(go([`dark`])).map(([t])=>({props:{colorSeverity:t,variant:`filled`},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:e.palette.mode===`dark`?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),qs=H(`div`,{name:`MuiAlert`,slot:`Icon`})({marginRight:12,padding:`7px 0`,display:`flex`,fontSize:22,opacity:.9}),Js=H(`div`,{name:`MuiAlert`,slot:`Message`})({padding:`8px 0`,minWidth:0,overflow:`auto`}),Ys=H(`div`,{name:`MuiAlert`,slot:`Action`})({display:`flex`,alignItems:`flex-start`,padding:`4px 0 0 16px`,marginLeft:`auto`,marginRight:-8}),Xs={success:(0,M.jsx)(Vs,{fontSize:`inherit`}),warning:(0,M.jsx)(Hs,{fontSize:`inherit`}),error:(0,M.jsx)(Us,{fontSize:`inherit`}),info:(0,M.jsx)(Ws,{fontSize:`inherit`})},Zs=j.forwardRef(function(e,t){let n=to({props:e,name:`MuiAlert`}),{action:r,children:i,className:a,closeText:o=`Close`,color:s,components:c={},componentsProps:l={},icon:u,iconMapping:d=Xs,onClose:f,role:p=`alert`,severity:m=`success`,slotProps:h={},slots:g={},variant:_=`standard`,...v}=n,y={...n,color:s,severity:m,variant:_,colorSeverity:s||m},b=Gs(y),x={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...g},slotProps:{...l,...h}},[S,C]=Ts(`root`,{ref:t,shouldForwardComponentProp:!0,className:L(b.root,a),elementType:Ks,externalForwardedProps:{...x,...v},ownerState:y,additionalProps:{role:p,elevation:0}}),[w,ee]=Ts(`icon`,{className:b.icon,elementType:qs,externalForwardedProps:x,ownerState:y}),[T,te]=Ts(`message`,{className:b.message,elementType:Js,externalForwardedProps:x,ownerState:y}),[E,ne]=Ts(`action`,{className:b.action,elementType:Ys,externalForwardedProps:x,ownerState:y}),[re,ie]=Ts(`closeButton`,{elementType:vs,externalForwardedProps:x,ownerState:y}),[ae,oe]=Ts(`closeIcon`,{elementType:As,externalForwardedProps:x,ownerState:y});return(0,M.jsxs)(S,{...C,children:[u===!1?null:(0,M.jsx)(w,{...ee,children:u||d[m]||Xs[m]}),(0,M.jsx)(T,{...te,children:i}),r==null?null:(0,M.jsx)(E,{...ne,children:r}),r==null&&f?(0,M.jsx)(E,{...ne,children:(0,M.jsx)(re,{size:`small`,"aria-label":o,title:o,color:`inherit`,onClick:f,...ie,children:(0,M.jsx)(ae,{fontSize:`small`,...oe})})}):null]})}),Qs=jr(`MuiBox`,[`root`]),$s=Or({themeId:a,defaultTheme:Ka(),defaultClassName:Qs.root,generateClassName:Er.generate}),ec=Ri({createStyledComponent:H(`div`,{name:`MuiStack`,slot:`Root`}),useThemeProps:e=>to({props:e,name:`MuiStack`})}),tc=Object.prototype,{hasOwnProperty:nc}=tc,{toString:rc}=tc;Function.prototype.toString.call(Object),Object.prototype.toString.call(typeof process<`u`?process:0);var{isArray:ic}=Array,ac=e=>e!=null&&(!!e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)||!!e._isBuffer),oc=e=>{if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null?!0:t===Object.prototype||Object.getPrototypeOf(t)===null?tc.toString.call(e)===`[object Object]`:!1};Number.isNaN;var{isFinite:sc}=Number,{isInteger:cc}=Number,{isSafeInteger:lc}=Number,uc=class{constructor(){this._size=0}enqueue(e){let t={value:e,next:void 0};this.tail?(this.tail.next=t,this.tail=t):this.head=this.tail=t,this._size++}dequeue(){let e=this.head;if(e)return this.head=e.next,this.head||(this.tail=void 0),this._size--,e.value}clear(){this.head=this.tail=void 0,this._size=0}get size(){return this._size}};function dc(e){fc(e);let t=new uc,n=0,r=e,i=()=>{if(n<r&&t.size>0){n++;let e=t.dequeue();e&&e()}},a=()=>{n--,i()},o=async(e,t,n)=>{let r=(async()=>e(...n))();t(r);try{await r}catch{}a()},s=(e,a,s)=>{t.enqueue(()=>{o(e,a,s)}),(async()=>{await Promise.resolve(),n<r&&t.size>0&&i()})()},c=(e,...t)=>new Promise(n=>{s(e,n,t)});return Object.defineProperties(c,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}},concurrency:{get:()=>r,set:e=>{fc(e),r=e,(typeof queueMicrotask<`u`?queueMicrotask:e=>Promise.resolve().then(e))(()=>{for(;n<r&&t.size>0;)i()})}},map:{async value(e,t){let n=e.map((e,n)=>this(t,e,n));return Promise.all(n)}}}),c}function fc(e){if(!((Number.isInteger(e)||e===1/0)&&e>0))throw TypeError("Expected `concurrency` to be a number from 1 and up")}var pc=class{constructor(e){this._events=new Map,this._eventsCount=0,this.onceListeners=new WeakMap,this.hasOnceListener=new Map,e&&e>=1&&this.setConcurrency(e)}eventNames(){return Array.from(this._events.keys())}listeners(e){let t=this._events.get(e);return t?Array.isArray(t)?t.map(e=>e.fn):[t.fn]:[]}listenerCount(e){let t=this._events.get(e);return t?Array.isArray(t)?t.length:1:0}emit(e,...t){let n=this._events.get(e);if(!n)return!1;if(!Array.isArray(n))n.once&&this.removeListener(e,n.fn),n.fn.apply(n.context,t);else{let r=this.hasOnceListener.get(e)?n.slice():n;for(let n=0;n<r.length;n++){let i=r[n];i&&i.once&&this.removeListener(e,i.fn),i&&i.fn.apply(i.context,t)}}return!0}on(e,t,n){return this.addListener(e,t,n,!1)}addListener(e,t,n,r=!1){if(typeof t!=`function`)throw TypeError(`The listener must be a function`);let i={fn:t,context:n||this,once:r||!1};r&&this.hasOnceListener.set(e,!0);let a=this._events.get(e);return a?Array.isArray(a)?a.push(i):this._events.set(e,[a,i]):(this._events.set(e,i),this._eventsCount++),this}once(e,t,n){if(typeof t!=`function`)throw TypeError(`The listener must be a function`);let r=!1,i=(...a)=>{if(this.removeListener(e,i),!r)return r=!0,t.apply(n||this,a)};return this.on(e,i),this.onceListeners.set(t,i),this}removeListener(e,t){let n=this.onceListeners.get(t);n&&(this.onceListeners.delete(t),t=n);let r=this._events.get(e);if(!r)return this;if(!Array.isArray(r))r.fn===t&&(this._events.delete(e),this._eventsCount--,this.hasOnceListener.delete(e));else{let n=r.filter(e=>e.fn!==t);n.length===0?(this._events.delete(e),this._eventsCount--,this.hasOnceListener.delete(e)):n.length===1&&n[0]?(this._events.set(e,n[0]),n[0].once||this.hasOnceListener.delete(e)):(this._events.set(e,n),n.some(e=>e.once)||this.hasOnceListener.delete(e))}return this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this._events.has(e)&&(this._events.delete(e),this._eventsCount--,this.hasOnceListener.delete(e)):(this._events.clear(),this._eventsCount=0,this.hasOnceListener.clear()),this}setConcurrency(e){return e>=1&&(this.limiter=dc(e)),this}emitParallel(e,...t){let n=this.listeners(e).map(e=>this._executeListener(e,t));return Promise.all(n)}emitSerial(e,...t){return this.listeners(e).reduce((e,n)=>e.then(e=>this._executeListener(n,t).then(t=>(e.push(t),e))),Promise.resolve([]))}emitReduce(e,...t){return this._emitReduceRun(e,t)}emitReduceRight(e,...t){return this._emitReduceRun(e,t,!0)}subscribe(e,t,n=!1){return n?this.once(e,t):this.on(e,t),()=>{this.removeListener(e,t)}}_emitReduceRun(e,t,n=!1){return(n?this.listeners(e).reverse():this.listeners(e)).reduce((e,t)=>e.then(e=>{let n=Array.isArray(e)?e:[e];return this._executeListener(t,n)}),Promise.resolve(t))}_executeListener(e,t){try{return this.limiter?this.limiter(()=>e(...t)):Promise.resolve(e(...t))}catch(e){return Promise.reject(e)}}},mc=BigInt(2**32-1),hc=BigInt(32);function gc(e,t=!1){return t?{h:Number(e&mc),l:Number(e>>hc&mc)}:{h:Number(e>>hc&mc)|0,l:Number(e&mc)|0}}function _c(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=gc(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}var vc=(e,t,n)=>e<<n|t>>>32-n,yc=(e,t,n)=>t<<n|e>>>32-n,bc=(e,t,n)=>t<<n-32|e>>>64-n,xc=(e,t,n)=>e<<n-32|t>>>64-n;function Sc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function Cc(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function wc(e,...t){if(!Sc(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function Tc(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function Ec(e,t){wc(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function Dc(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Oc(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}var kc=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ac(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function jc(e){for(let t=0;t<e.length;t++)e[t]=Ac(e[t]);return e}var Mc=kc?e=>e:jc;typeof Uint8Array.from([]).toHex==`function`&&Uint8Array.fromHex;function Nc(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function Pc(e){return typeof e==`string`&&(e=Nc(e)),wc(e),e}var Fc=class{};function Ic(e){let t=t=>e().update(Pc(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Lc(e){let t=(t,n)=>e(n).update(Pc(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t}var Rc=BigInt(0),zc=BigInt(1),Bc=BigInt(2),Vc=BigInt(7),Hc=BigInt(256),Uc=BigInt(113),Wc=[],Gc=[],Kc=[];for(let e=0,t=zc,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Wc.push(2*(5*r+n)),Gc.push((e+1)*(e+2)/2%64);let i=Rc;for(let e=0;e<7;e++)t=(t<<zc^(t>>Vc)*Uc)%Hc,t&Bc&&(i^=zc<<(zc<<BigInt(e))-zc);Kc.push(i)}var qc=_c(Kc,!0),Jc=qc[0],Yc=qc[1],Xc=(e,t,n)=>n>32?bc(e,t,n):vc(e,t,n),Zc=(e,t,n)=>n>32?xc(e,t,n):yc(e,t,n);function Qc(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let t=0;t<10;t++)n[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let r=(t+8)%10,i=(t+2)%10,a=n[i],o=n[i+1],s=Xc(a,o,1)^n[r],c=Zc(a,o,1)^n[r+1];for(let n=0;n<50;n+=10)e[t+n]^=s,e[t+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){let r=Gc[n],a=Xc(t,i,r),o=Zc(t,i,r),s=Wc[n];t=e[s],i=e[s+1],e[s]=a,e[s+1]=o}for(let t=0;t<50;t+=10){for(let r=0;r<10;r++)n[r]=e[t+r];for(let r=0;r<10;r++)e[t+r]^=~n[(r+2)%10]&n[(r+4)%10]}e[0]^=Jc[r],e[1]^=Yc[r]}Oc(n)}var $c=class e extends Fc{constructor(e,t,n,r=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=i,Cc(n),!(0<e&&e<200))throw Error(`only keccak-f1600 function is supported`);this.state=new Uint8Array(200),this.state32=Dc(this.state)}clone(){return this._cloneInto()}keccak(){Mc(this.state32),Qc(this.state32,this.rounds),Mc(this.state32),this.posOut=0,this.pos=0}update(e){Tc(this),e=Pc(e),wc(e);let{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(t-this.pos,r-i);for(let t=0;t<a;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,t&128&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){Tc(this,!1),wc(e),this.finish();let t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return e}xofInto(e){if(!this.enableXOF)throw Error(`XOF is not possible for this instance`);return this.writeInto(e)}xof(e){return Cc(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Ec(e,this),this.finished)throw Error(`digest() was already called`);return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Oc(this.state)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:a,enableXOF:o}=this;return t||=new e(n,r,i,o,a),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=r,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}},el=(e,t,n)=>Ic(()=>new $c(t,e,n));el(6,144,224/8),el(6,136,256/8),el(6,104,384/8);var tl=el(6,72,512/8);el(1,144,224/8),el(1,136,256/8),el(1,104,384/8),el(1,72,512/8);var nl=(e,t,n)=>Lc((r={})=>new $c(t,e,r.dkLen===void 0?n:r.dkLen,!0));nl(31,168,128/8),nl(31,136,256/8);var rl=`abcdefghijklmnopqrstuvwxyz`,il=26,al=`0123456789abcdefghijklmnopqrstuvwxyz`,ol=476782367,sl=16,cl=32,ll=new TextEncoder,ul=null,dl=Math.floor(Math.random()*ol),W=e=>al[e],fl=e=>{let t=``;switch(e){case 4:return W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0);case 8:return W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0);case 16:return W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0);case 24:return W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0);case 32:return W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0)+W(Math.random()*36|0);default:for(let n=0;n<e;n++)t+=W(Math.random()*36|0);return t}},pl=e=>{let t=e.length;if(t===0)return 0n;let n=new DataView(e.buffer,e.byteOffset,e.byteLength);if(t===64){let e=n.getBigUint64(0,!1),t=n.getBigUint64(8,!1),r=n.getBigUint64(16,!1),i=n.getBigUint64(24,!1),a=n.getBigUint64(32,!1),o=n.getBigUint64(40,!1),s=n.getBigUint64(48,!1),c=n.getBigUint64(56,!1);return e<<448n|t<<384n|r<<320n|i<<256n|a<<192n|o<<128n|s<<64n|c}let r=0n,i=0,a=t>>3<<3;for(;i<a;)r=r<<64n|n.getBigUint64(i,!1),i+=8;for(;i<t;)r=r<<8n|BigInt(e[i]),i++;return r},ml=e=>pl(tl(ll.encode(e))).toString(36).slice(1),hl=()=>{if(ul)return ul;let e=Object.keys(typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:{});return ul=ml(e.length?e.join(``)+fl(cl):fl(cl)).substring(0,cl),ul},gl=()=>{let e=rl[Math.random()*il|0],t=Date.now().toString(36),n=(++dl).toString(36),r=`${t}${fl(sl)}${n}${ul}`;return e+pl(tl(ll.encode(r))).toString(36).substring(1,sl)};hl();var _l=null;try{_l=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function G(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}G.prototype.__isLong__,Object.defineProperty(G.prototype,`__isLong__`,{value:!0});function K(e){return(e&&e.__isLong__)===!0}function vl(e){var t=Math.clz32(e&-e);return e?31-t:t}G.isLong=K;var yl={},bl={};function xl(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=bl[e],r)?r:(n=q(e,0,!0),i&&(bl[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=yl[e],r)?r:(n=q(e,e<0?-1:0,!1),i&&(yl[e]=n),n))}G.fromInt=xl;function Sl(e,t){if(isNaN(e))return t?Nl:Ml;if(t){if(e<0)return Nl;if(e>=kl)return Rl}else{if(e<=-Al)return zl;if(e+1>=Al)return Ll}return e<0?Sl(-e,t).neg():q(e%Ol|0,e/Ol|0,t)}G.fromNumber=Sl;function q(e,t,n){return new G(e,t,n)}G.fromBits=q;var Cl=Math.pow;function wl(e,t,n){if(e.length===0)throw Error(`empty string`);if(typeof t==`number`?(n=t,t=!1):t=!!t,e===`NaN`||e===`Infinity`||e===`+Infinity`||e===`-Infinity`)return t?Nl:Ml;if(n||=10,n<2||36<n)throw RangeError(`radix`);var r;if((r=e.indexOf(`-`))>0)throw Error(`interior hyphen`);if(r===0)return wl(e.substring(1),t,n).neg();for(var i=Sl(Cl(n,8)),a=Ml,o=0;o<e.length;o+=8){var s=Math.min(8,e.length-o),c=parseInt(e.substring(o,o+s),n);if(s<8){var l=Sl(Cl(n,s));a=a.mul(l).add(Sl(c))}else a=a.mul(i),a=a.add(Sl(c))}return a.unsigned=t,a}G.fromString=wl;function Tl(e,t){return typeof e==`number`?Sl(e,t):typeof e==`string`?wl(e,t):q(e.low,e.high,typeof t==`boolean`?t:e.unsigned)}G.fromValue=Tl;var El=65536,Dl=1<<24,Ol=El*El,kl=Ol*Ol,Al=kl/2,jl=xl(Dl),Ml=xl(0);G.ZERO=Ml;var Nl=xl(0,!0);G.UZERO=Nl;var Pl=xl(1);G.ONE=Pl;var Fl=xl(1,!0);G.UONE=Fl;var Il=xl(-1);G.NEG_ONE=Il;var Ll=q(-1,2147483647,!1);G.MAX_VALUE=Ll;var Rl=q(-1,-1,!0);G.MAX_UNSIGNED_VALUE=Rl;var zl=q(0,-2147483648,!1);G.MIN_VALUE=zl;var J=G.prototype;J.toInt=function(){return this.unsigned?this.low>>>0:this.low},J.toNumber=function(){return this.unsigned?(this.high>>>0)*Ol+(this.low>>>0):this.high*Ol+(this.low>>>0)},J.toString=function(e){if(e||=10,e<2||36<e)throw RangeError(`radix`);if(this.isZero())return`0`;if(this.isNegative())if(this.eq(zl)){var t=Sl(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}else return`-`+this.neg().toString(e);for(var i=Sl(Cl(e,6),this.unsigned),a=this,o=``;;){var s=a.div(i),c=(a.sub(s.mul(i)).toInt()>>>0).toString(e);if(a=s,a.isZero())return c+o;for(;c.length<6;)c=`0`+c;o=``+c+o}},J.getHighBits=function(){return this.high},J.getHighBitsUnsigned=function(){return this.high>>>0},J.getLowBits=function(){return this.low},J.getLowBitsUnsigned=function(){return this.low>>>0},J.getNumBitsAbs=function(){if(this.isNegative())return this.eq(zl)?64:this.neg().getNumBitsAbs();for(var e=this.high==0?this.low:this.high,t=31;t>0&&!(e&1<<t);t--);return this.high==0?t+1:t+33},J.isSafeInteger=function(){var e=this.high>>21;return e?this.unsigned?!1:e===-1&&!(this.low===0&&this.high===-2097152):!0},J.isZero=function(){return this.high===0&&this.low===0},J.eqz=J.isZero,J.isNegative=function(){return!this.unsigned&&this.high<0},J.isPositive=function(){return this.unsigned||this.high>=0},J.isOdd=function(){return(this.low&1)==1},J.isEven=function(){return(this.low&1)==0},J.equals=function(e){return K(e)||(e=Tl(e)),this.unsigned!==e.unsigned&&this.high>>>31==1&&e.high>>>31==1?!1:this.high===e.high&&this.low===e.low},J.eq=J.equals,J.notEquals=function(e){return!this.eq(e)},J.neq=J.notEquals,J.ne=J.notEquals,J.lessThan=function(e){return this.comp(e)<0},J.lt=J.lessThan,J.lessThanOrEqual=function(e){return this.comp(e)<=0},J.lte=J.lessThanOrEqual,J.le=J.lessThanOrEqual,J.greaterThan=function(e){return this.comp(e)>0},J.gt=J.greaterThan,J.greaterThanOrEqual=function(e){return this.comp(e)>=0},J.gte=J.greaterThanOrEqual,J.ge=J.greaterThanOrEqual,J.compare=function(e){if(K(e)||(e=Tl(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},J.comp=J.compare,J.negate=function(){return!this.unsigned&&this.eq(zl)?zl:this.not().add(Pl)},J.neg=J.negate,J.add=function(e){K(e)||(e=Tl(e));var t=this.high>>>16,n=this.high&65535,r=this.low>>>16,i=this.low&65535,a=e.high>>>16,o=e.high&65535,s=e.low>>>16,c=e.low&65535,l=0,u=0,d=0,f=0;return f+=i+c,d+=f>>>16,f&=65535,d+=r+s,u+=d>>>16,d&=65535,u+=n+o,l+=u>>>16,u&=65535,l+=t+a,l&=65535,q(d<<16|f,l<<16|u,this.unsigned)},J.subtract=function(e){return K(e)||(e=Tl(e)),this.add(e.neg())},J.sub=J.subtract,J.multiply=function(e){if(this.isZero())return this;if(K(e)||(e=Tl(e)),_l)return q(_l.mul(this.low,this.high,e.low,e.high),_l.get_high(),this.unsigned);if(e.isZero())return this.unsigned?Nl:Ml;if(this.eq(zl))return e.isOdd()?zl:Ml;if(e.eq(zl))return this.isOdd()?zl:Ml;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(jl)&&e.lt(jl))return Sl(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=this.high&65535,r=this.low>>>16,i=this.low&65535,a=e.high>>>16,o=e.high&65535,s=e.low>>>16,c=e.low&65535,l=0,u=0,d=0,f=0;return f+=i*c,d+=f>>>16,f&=65535,d+=r*c,u+=d>>>16,d&=65535,d+=i*s,u+=d>>>16,d&=65535,u+=n*c,l+=u>>>16,u&=65535,u+=r*s,l+=u>>>16,u&=65535,u+=i*o,l+=u>>>16,u&=65535,l+=t*c+n*s+r*o+i*a,l&=65535,q(d<<16|f,l<<16|u,this.unsigned)},J.mul=J.multiply,J.divide=function(e){if(K(e)||(e=Tl(e)),e.isZero())throw Error(`division by zero`);if(_l)return!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1?this:q((this.unsigned?_l.div_u:_l.div_s)(this.low,this.high,e.low,e.high),_l.get_high(),this.unsigned);if(this.isZero())return this.unsigned?Nl:Ml;var t,n,r;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return Nl;if(e.gt(this.shru(1)))return Fl;r=Nl}else{if(this.eq(zl))return e.eq(Pl)||e.eq(Il)?zl:e.eq(zl)?Pl:(t=this.shr(1).div(e).shl(1),t.eq(Ml)?e.isNegative()?Pl:Il:(n=this.sub(e.mul(t)),r=t.add(n.div(e)),r));if(e.eq(zl))return this.unsigned?Nl:Ml;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=Ml}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(t)/Math.LN2),a=i<=48?1:Cl(2,i-48),o=Sl(t),s=o.mul(e);s.isNegative()||s.gt(n);)t-=a,o=Sl(t,this.unsigned),s=o.mul(e);o.isZero()&&(o=Pl),r=r.add(o),n=n.sub(s)}return r},J.div=J.divide,J.modulo=function(e){return K(e)||(e=Tl(e)),_l?q((this.unsigned?_l.rem_u:_l.rem_s)(this.low,this.high,e.low,e.high),_l.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},J.mod=J.modulo,J.rem=J.modulo,J.not=function(){return q(~this.low,~this.high,this.unsigned)},J.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},J.clz=J.countLeadingZeros,J.countTrailingZeros=function(){return this.low?vl(this.low):vl(this.high)+32},J.ctz=J.countTrailingZeros,J.and=function(e){return K(e)||(e=Tl(e)),q(this.low&e.low,this.high&e.high,this.unsigned)},J.or=function(e){return K(e)||(e=Tl(e)),q(this.low|e.low,this.high|e.high,this.unsigned)},J.xor=function(e){return K(e)||(e=Tl(e)),q(this.low^e.low,this.high^e.high,this.unsigned)},J.shiftLeft=function(e){return K(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?q(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):q(0,this.low<<e-32,this.unsigned)},J.shl=J.shiftLeft,J.shiftRight=function(e){return K(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?q(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):q(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},J.shr=J.shiftRight,J.shiftRightUnsigned=function(e){return K(e)&&(e=e.toInt()),(e&=63)==0?this:e<32?q(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):q(e===32?this.high:this.high>>>e-32,0,this.unsigned)},J.shru=J.shiftRightUnsigned,J.shr_u=J.shiftRightUnsigned,J.rotateLeft=function(e){var t;return K(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?q(this.high,this.low,this.unsigned):e<32?(t=32-e,q(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(e-=32,t=32-e,q(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},J.rotl=J.rotateLeft,J.rotateRight=function(e){var t;return K(e)&&(e=e.toInt()),(e&=63)==0?this:e===32?q(this.high,this.low,this.unsigned):e<32?(t=32-e,q(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(e-=32,t=32-e,q(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},J.rotr=J.rotateRight,J.toSigned=function(){return this.unsigned?q(this.low,this.high,!1):this},J.toUnsigned=function(){return this.unsigned?this:q(this.low,this.high,!0)},J.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},J.toBytesLE=function(){var e=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},J.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,t>>>24,t>>>16&255,t>>>8&255,t&255]},G.fromBytes=function(e,t,n){return n?G.fromBytesLE(e,t):G.fromBytesBE(e,t)},G.fromBytesLE=function(e,t){return new G(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},G.fromBytesBE=function(e,t){return new G(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},typeof BigInt==`function`&&(G.fromBigInt=function(e,t){return q(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},G.fromValue=function(e,t){return typeof e==`bigint`?G.fromBigInt(e,t):Tl(e,t)},J.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});var Bl=r((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f;for(f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),Vl=r((e=>{e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),Hl=r((e=>{var t=Bl(),n=Vl(),r=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=a(),!s.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,`parent`,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,`offset`,{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(e){if(e>i)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return d(e)}return c(e,t,n)}s.poolSize=8192;function c(e,t,n){if(typeof e==`string`)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(De(e,ArrayBuffer)||e&&De(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(De(e,SharedArrayBuffer)||e&&De(e.buffer,SharedArrayBuffer)))return h(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return s.from(r,t,n);let i=g(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return s.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}s.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function l(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function u(e,t,n){return l(e),e<=0||t===void 0?o(e):typeof n==`string`?o(e).fill(t,n):o(e).fill(t)}s.alloc=function(e,t,n){return u(e,t,n)};function d(e){return l(e),o(e<0?0:_(e)|0)}s.allocUnsafe=function(e){return d(e)},s.allocUnsafeSlow=function(e){return d(e)};function f(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!s.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=y(e,t)|0,r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function p(e){let t=e.length<0?0:_(e.length)|0,n=o(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function m(e){if(De(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}function h(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,s.prototype),r}function g(e){if(s.isBuffer(e)){let t=_(e.length)|0,n=o(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||Oe(e.length)?o(0):p(e);if(e.type===`Buffer`&&Array.isArray(e.data))return p(e.data)}function _(e){if(e>=i)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+i.toString(16)+` bytes`);return e|0}function v(e){return+e!=e&&(e=0),s.alloc(+e)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(De(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),De(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return s.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(De(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||De(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return Se(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return Te(e).length;default:if(i)return r?-1:Se(e).length;t=(``+t).toLowerCase(),i=!0}}s.byteLength=y;function b(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return se(this,t,n);case`utf8`:case`utf-8`:return re(this,t,n);case`ascii`:return oe(this,t,n);case`latin1`:case`binary`:return D(this,t,n);case`base64`:return ne(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ce(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}s.prototype._isBuffer=!0;function x(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)x(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?re(this,0,e):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e?!0:s.compare(this,e)===0},s.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(De(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,c=Math.min(a,o),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<c;++e)if(l[e]!==u[e]){a=l[e],o=u[e];break}return a<o?-1:o<a?1:0};function S(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Oe(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0)if(i)n=0;else return-1;if(typeof t==`string`&&(t=s.from(t,r)),s.isBuffer(t))return t.length===0?-1:C(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):C(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function C(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},s.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)};function w(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o;for(o=0;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(Oe(r))return o;e[n+o]=r}return o}function ee(e,t,n,r){return Ee(Se(t,e.length-n),e,n,r)}function T(e,t,n,r){return Ee(Ce(t),e,n,r)}function te(e,t,n,r){return Ee(Te(t),e,n,r)}function E(e,t,n,r){return Ee(we(t,e.length-n),e,n,r)}s.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return w(this,e,t,n);case`utf8`:case`utf-8`:return ee(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return T(this,e,t,n);case`base64`:return te(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return E(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function ne(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function re(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return ae(r)}var ie=4096;function ae(e){let t=e.length;if(t<=ie)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ie));return n}function oe(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function D(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function se(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=ke[e[r]];return i}function ce(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r};function O(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=Ae(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=Ae(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=Ae(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=Ae(function(e){e>>>=0,ve(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&ye(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!1,52,8)};function k(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;k(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;k(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function le(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function ue(e,t,n,r,i){_e(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}s.prototype.writeBigUInt64LE=Ae(function(e,t=0){return le(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeBigUInt64BE=Ae(function(e,t=0){return ue(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);k(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);k(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=Ae(function(e,t=0){return le(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),s.prototype.writeBigInt64BE=Ae(function(e,t=0){return ue(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function de(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function fe(e,t,r,i,a){return t=+t,r>>>=0,a||de(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}s.prototype.writeFloatLE=function(e,t,n){return fe(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return fe(this,e,t,!1,n)};function pe(e,t,r,i,a){return t=+t,r>>>=0,a||de(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}s.prototype.writeDoubleLE=function(e,t,n){return pe(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return pe(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!s.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=s.isBuffer(e)?e:s.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var A={};function me(e,t,n){A[e]=class extends n{constructor(){super(),Object.defineProperty(this,`message`,{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,`code`,{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}me(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),me(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),me(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=he(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=he(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function he(e){let t=``,n=e.length,r=e[0]===`-`?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function ge(e,t,n){ve(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&ye(t,e.length-(n+1))}function _e(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new A.ERR_OUT_OF_RANGE(`value`,i,e)}ge(r,i,a)}function ve(e,t){if(typeof e!=`number`)throw new A.ERR_INVALID_ARG_TYPE(t,`number`,e)}function ye(e,t,n){throw Math.floor(e)===e?t<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE(n||`offset`,`>= ${n?1:0} and <= ${t}`,e):(ve(e,n),new A.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var be=/[^+/0-9A-Za-z-_]/g;function xe(e){if(e=e.split(`=`)[0],e=e.trim().replace(be,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function Se(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function Ce(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function we(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Te(e){return t.toByteArray(xe(e))}function Ee(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function De(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Oe(e){return e!==e}var ke=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function Ae(e){return typeof BigInt>`u`?je:e}function je(){throw Error(`BigInt not supported`)}}))(),Ul=8192,Wl=2147483647,Gl=16,Kl=1048576,ql=typeof TextEncoder<`u`?new TextEncoder:null,Jl=e=>{if(e===null)return`null`;if(e===void 0)return`undefined`;let t=typeof e;if(t!==`object`)return t;let n=Object.prototype.toString.call(e).match(/\[object (\w+)\]/);return n?n[1].toLowerCase():`object`},Yl=class{static{this.buffers=[]}static{this.positions=[]}static acquire(){if(this.buffers.length>0){let e=this.buffers.pop();return this.positions.pop()+7&4294967288,e.length-1024,e}return Hl.Buffer.allocUnsafe(Ul)}static release(e,t){e.length<=Kl&&this.buffers.length<Gl&&(this.buffers.push(e),this.positions.push(t))}static clear(){this.buffers=[],this.positions=[]}},Xl=class{constructor(){this.buffer=Yl.acquire(),this.position=0,this.start=0,this.view=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength)}release(){Yl.release(this.buffer,this.position)}};function Y(e,t){let n=e.position+t;if(n>e.buffer.length){let t=Math.min(Math.max(e.buffer.length*2,n),Wl),r=Hl.Buffer.allocUnsafe(t);e.buffer.copy(r,0,0,e.position),e.buffer=r,e.view=new DataView(e.buffer.buffer,e.buffer.byteOffset,e.buffer.byteLength)}}var Zl=class{constructor(e){this.encodingTypes=e,this.encodeDepth=0,this.state=new Xl}encode(e){let t=this.encodeDepth>0;if(this.encodeDepth++,t){let t=this.state;this.state=new Xl,this._encode(e);let n=this.state.buffer.subarray(0,this.state.position),r=Hl.Buffer.allocUnsafe(n.length);return n.copy(r),this.state.release(),this.state=t,this.encodeDepth--,r}else{this.state.position=0,this.state.start=0,this._encode(e);let t=this.state.buffer.subarray(0,this.state.position),n=Hl.Buffer.allocUnsafe(t.length);return t.copy(n),this.state.release(),this.state=new Xl,this.encodeDepth--,n}}_encode(e){let t=typeof e,n=this.state;switch(t){case`undefined`:Y(n,3),n.buffer[n.position]=212,n.buffer[n.position+1]=0,n.buffer[n.position+2]=0,n.position+=3;return;case`boolean`:Y(n,1),n.buffer[n.position++]=e?195:194;return;case`number`:this.encodeNumber(e);return;case`string`:this.encodeString(e);return;case`bigint`:this.encodeBigInt(e);return;default:break}e===null?(Y(n,1),n.buffer[n.position++]=192):ac(e)?this.encodeBuffer(e):Array.isArray(e)?this.encodeArray(e):oc(e)?this.encodeObject(e):this.encodeCustom(e)}encodeUndefined(){let e=this.state;Y(e,3);let t=e.buffer,n=e.position;t[n]=212,t[n+1]=0,t[n+2]=0,e.position=n+3}encodeNull(){let e=this.state;Y(e,1),e.buffer[e.position++]=192}encodeBoolean(e){let t=this.state;Y(t,1),t.buffer[t.position++]=e?195:194}encodeNumber(e){let t=this.state,n=t.position;if(e>>>0===e)if(e<128)Y(t,1),t.buffer[n++]=e;else if(e<256){Y(t,2);let r=t.buffer;r[n++]=204,r[n++]=e}else e<65536?(Y(t,3),t.buffer[n++]=205,t.view.setUint16(n,e,!1),n+=2):(Y(t,5),t.buffer[n++]=206,t.view.setUint32(n,e,!1),n+=4);else e>>0===e?e>=-32?(Y(t,1),t.buffer[n++]=256+e):e>=-128?(Y(t,2),t.buffer[n++]=208,t.view.setInt8(n++,e)):e>=-32768?(Y(t,3),t.buffer[n++]=209,t.view.setInt16(n,e,!1),n+=2):(Y(t,5),t.buffer[n++]=210,t.view.setInt32(n,e,!1),n+=4):(Y(t,9),t.buffer[n++]=203,t.view.setFloat64(n,e,!1),n+=8);t.position=n}encodeString(e){let t=this.state,n=e.length;if(n<64){let r=!0,i=n;for(let t=0;t<n;t++)if(e.charCodeAt(t)>=128){r=!1;break}if(r)if(i<32){Y(t,1+i);let r=t.buffer,a=t.position;r[a]=160|i;for(let t=0;t<n;t++)r[a+1+t]=e.charCodeAt(t);t.position=a+1+i;return}else{Y(t,2+i);let r=t.buffer,a=t.position;r[a]=217,r[a+1]=i;for(let t=0;t<n;t++)r[a+2+t]=e.charCodeAt(t);t.position=a+2+i;return}}let r=Hl.Buffer.byteLength(e,`utf8`),i;i=r<32?1:r<=255?2:r<=65535?3:5,Y(t,i+r);let a=t.buffer,o=t.position;if(r<32?a[o++]=160|r:r<=255?(a[o++]=217,a[o++]=r):r<=65535?(a[o++]=218,t.view.setUint16(o,r,!1),o+=2):(a[o++]=219,t.view.setUint32(o,r,!1),o+=4),ql&&r>0){let t=new Uint8Array(a.buffer,a.byteOffset+o,r),n=ql.encodeInto(e,t);o+=n.written}else r>0&&(a.write(e,o,r,`utf8`),o+=r);t.position=o}encodeBuffer(e){let t=this.state,n=e.length;if(n<=255){Y(t,2+n);let r=t.buffer,i=t.position;r[i]=196,r[i+1]=n,e.copy(r,i+2),t.position=i+2+n}else if(n<=65535){Y(t,3+n);let r=t.buffer,i=t.position;r[i]=197,t.view.setUint16(i+1,n,!1),e.copy(r,i+3),t.position=i+3+n}else{Y(t,5+n);let r=t.buffer,i=t.position;r[i]=198,t.view.setUint32(i+1,n,!1),e.copy(r,i+5),t.position=i+5+n}}encodeArray(e){let t=this.state,n=e.length,r=t.position;n<16?(Y(t,1),t.buffer[r++]=144|n,t.position=r):n<65536?(Y(t,3),t.buffer[r++]=220,t.view.setUint16(r,n,!1),t.position=r+2):(Y(t,5),t.buffer[r++]=221,t.view.setUint32(r,n,!1),t.position=r+4);for(let t=0;t<n;t++)this._encode(e[t])}encodeObject(e){let t=this.state,n=Object.keys(e),r=n.length,i=t.position;r<16?(Y(t,1),t.buffer[i++]=128|r,t.position=i):(Y(t,3),t.buffer[i++]=222,t.view.setUint16(i,r,!1),t.position=i+2);for(let t=0;t<r;t++){let r=n[t];this.encodeString(r),this._encode(e[r])}}encodeBigInt(e){let t=this.encodingTypes.get(120);if(!t)throw Error(`BigInt encoder not registered`);let n=this.state.position,r=t.encode(e);this.state.position=n,this.encodeExtension(120,r)}encodeCustom(e){for(let[t,n]of this.encodingTypes.entries())if(n.check(e)){let r=n.encode(e);this.encodeExtension(t,r);return}throw Error(`Not supported: ${Jl(e)}`)}encodeExtension(e,t){let n=this.state,r=t.length;if(r===1){Y(n,3);let r=n.buffer,i=n.position;r[i]=212,r[i+1]=e,r[i+2]=t[0],n.position=i+3}else if(r===2){Y(n,4);let r=n.buffer,i=n.position;r[i]=213,r[i+1]=e,t.copy(r,i+2),n.position=i+4}else if(r===4){Y(n,6);let r=n.buffer,i=n.position;r[i]=214,r[i+1]=e,t.copy(r,i+2),n.position=i+6}else if(r===8){Y(n,10);let r=n.buffer,i=n.position;r[i]=215,r[i+1]=e,t.copy(r,i+2),n.position=i+10}else if(r===16){Y(n,18);let r=n.buffer,i=n.position;r[i]=216,r[i+1]=e,t.copy(r,i+2),n.position=i+18}else if(r<256){Y(n,3+r);let i=n.buffer,a=n.position;i[a]=199,i[a+1]=r,i[a+2]=e,t.copy(i,a+3),n.position=a+3+r}else if(r<65536){Y(n,4+r);let i=n.buffer,a=n.position;i[a]=200,n.view.setUint16(a+1,r,!1),i[a+3]=e,t.copy(i,a+4),n.position=a+4+r}else{Y(n,6+r);let i=n.buffer,a=n.position;i[a]=201,n.view.setUint32(a+1,r,!1),i[a+5]=e,t.copy(i,a+6),n.position=a+6+r}}},Ql=class e{constructor(e=128){this._roffset=0,this.capacity=e,this.buffer=Hl.Buffer.allocUnsafe(e),this.position=0}static fromBuffer(t){let n=new e(t.length);return n.buffer=t,n.capacity=t.length,n.position=t.length,n._roffset=0,n}static wrap(t){let n=Hl.Buffer.isBuffer(t)?t:Hl.Buffer.from(t);return e.fromBuffer(n)}ensure(e){let t=this.position+e;if(t>this.capacity){let e=Math.max(this.capacity*2,t),n=Hl.Buffer.allocUnsafe(e);this.buffer.copy(n,0,0,this.position),this.buffer=n,this.capacity=e}}writeUInt8(e){this.ensure(1),this.buffer[this.position++]=e}writeInt8(e){this.ensure(1),this.buffer.writeInt8(e,this.position),this.position++}writeUInt16BE(e){this.ensure(2),this.buffer.writeUInt16BE(e,this.position),this.position+=2}writeInt16BE(e){this.ensure(2),this.buffer.writeInt16BE(e,this.position),this.position+=2}writeUInt32BE(e){this.ensure(4),this.buffer.writeUInt32BE(e,this.position),this.position+=4}writeInt32BE(e){this.ensure(4),this.buffer.writeInt32BE(e,this.position),this.position+=4}writeUInt64BE(e){if(this.ensure(8),typeof e==`number`){let t=Math.floor(e/4294967296),n=e>>>0;this.buffer.writeUInt32BE(t,this.position),this.buffer.writeUInt32BE(n,this.position+4)}else this.buffer.writeUInt32BE(e.high>>>0,this.position),this.buffer.writeUInt32BE(e.low>>>0,this.position+4);this.position+=8}writeInt64BE(e){if(this.ensure(8),typeof e==`number`){let t=Math.floor(e/4294967296),n=e>>>0;this.buffer.writeInt32BE(t,this.position),this.buffer.writeUInt32BE(n,this.position+4)}else this.buffer.writeInt32BE(e.high,this.position),this.buffer.writeUInt32BE(e.low>>>0,this.position+4);this.position+=8}writeDoubleBE(e){this.ensure(8),this.buffer.writeDoubleBE(e,this.position),this.position+=8}writeFloatBE(e){this.ensure(4),this.buffer.writeFloatBE(e,this.position),this.position+=4}write(e,t,n){if(typeof e==`string`){let r=n||Hl.Buffer.byteLength(e,t);this.ensure(r),this.buffer.write(e,this.position,r,t),this.position+=r}else{let t=n||e.length;this.ensure(t),e.copy(this.buffer,this.position,0,t),this.position+=t}return this}get roffset(){return this._roffset}set roffset(e){this._roffset=e}get woffset(){return this.position}set woffset(e){this.position=e}get length(){return this.position-this._roffset}readUInt8(e){let t=e===void 0?this._roffset:e;if(!(t>=this.position))return e===void 0&&this._roffset++,this.buffer[t]}readInt8(e){let t=e===void 0?this._roffset:e;return e===void 0&&this._roffset++,this.buffer.readInt8(t)}readUInt16BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readUInt16BE(t);return e===void 0&&(this._roffset+=2),n}readInt16BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readInt16BE(t);return e===void 0&&(this._roffset+=2),n}readUInt32BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readUInt32BE(t);return e===void 0&&(this._roffset+=4),n}readInt32BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readInt32BE(t);return e===void 0&&(this._roffset+=4),n}readUInt64BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readUInt32BE(t),r=this.buffer.readUInt32BE(t+4);return e===void 0&&(this._roffset+=8),G.fromBits(r,n,!0)}readInt64BE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readInt32BE(t),r=this.buffer.readUInt32BE(t+4);return e===void 0&&(this._roffset+=8),G.fromBits(r,n,!1)}readDoubleBE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readDoubleBE(t);return e===void 0&&(this._roffset+=8),n}readFloatBE(e){let t=e===void 0?this._roffset:e,n=this.buffer.readFloatBE(t);return e===void 0&&(this._roffset+=4),n}toString(e,t,n){return this.buffer.toString(e,t,n)}slice(t,n){let r=new e(n-t);return this.buffer.copy(r.buffer,0,t,n),r.position=n-t,r}skipRead(e){this._roffset+=e}getRemainingBuffer(){return this.buffer.slice(this._roffset,this.position)}toBuffer(){return this.buffer.slice(0,this.position)}},$l=class{constructor(e){this.decodingTypes=e,this.lastBytesConsumed=0,this.view=null}decode(e){if(e.length===0)throw this.lastBytesConsumed=0,Error(`Incomplete buffer`);let t=this.view;this.view=new DataView(e.buffer,e.byteOffset,e.byteLength);try{let t=this.tryDecode(e,0);if(t===void 0&&this.lastBytesConsumed===0)throw this.lastBytesConsumed=this.getMinHeaderSize(e[0]),this.lastBytesConsumed>e.length&&(this.lastBytesConsumed=e.length),Error(`Incomplete buffer`);return t}finally{this.view=t}}getLastBytesConsumed(e){return this.lastBytesConsumed}getMinHeaderSize(e){return e<128||e>=224||e>=160&&e<=191||e>=144&&e<=159||e>=128&&e<=143||e===192||e===194||e===195?1:e===196||e===199||e===204||e===208||e===212?2:e===197||e===200||e===205||e===209||e===213||e===217?3:e===210?4:e===202||e===198||e===201||e===206||e===214||e===218||e===220?5:e===211?6:e===203||e===215||e===219||e===221?9:e===216?10:e===217?18:1}tryDecode(e,t){let n=e.length;if(t>=n){this.lastBytesConsumed=0;return}let r=e[t],i=this.view;if(r<160){if(r<128)return this.lastBytesConsumed=1,r;if(r<144){let n=r&15;return this.decodeMap(e,t+1,n,1)}else{let n=r&15;return this.decodeArray(e,t+1,n,1)}}else if(r<192){let i=r&31;if(t+1+i>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=1+i,e.toString(`utf8`,t+1,t+1+i)}if(r>=224)return this.lastBytesConsumed=1,r-256;if(r===192)return this.lastBytesConsumed=1,null;if(r===194)return this.lastBytesConsumed=1,!1;if(r===195)return this.lastBytesConsumed=1,!0;if(r>=204&&r<=207)if(r===204){if(t+2>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=2,e[t+1]}else if(r===205){if(t+3>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=3,i.getUint16(t+1,!1)}else if(r===206){if(t+5>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=5,i.getUint32(t+1,!1)}else{if(t+9>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=9,i.getUint32(t+1,!1)*4294967296+i.getUint32(t+5,!1)}if(r>=208&&r<=211)if(r===208){if(t+2>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=2,i.getInt8(t+1)}else if(r===209){if(t+3>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=3,i.getInt16(t+1,!1)}else if(r===210){if(t+5>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=5,i.getInt32(t+1,!1)}else{if(t+9>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=9,i.getInt32(t+1,!1)*4294967296+i.getUint32(t+5,!1)}if(r===202){if(t+5>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=5,i.getFloat32(t+1,!1)}if(r===203){if(t+9>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=9,i.getFloat64(t+1,!1)}if(r===217){if(t+2>n){this.lastBytesConsumed=0;return}let r=e[t+1];if(t+2+r>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=2+r,e.toString(`utf8`,t+2,t+2+r)}if(r===218){if(t+3>n){this.lastBytesConsumed=0;return}let r=i.getUint16(t+1,!1);if(t+3+r>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=3+r,e.toString(`utf8`,t+3,t+3+r)}if(r===219){if(t+5>n){this.lastBytesConsumed=0;return}let r=i.getUint32(t+1,!1);if(t+5+r>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=5+r,e.toString(`utf8`,t+5,t+5+r)}let a;switch(r){case 196:if(t+2>n){this.lastBytesConsumed=0;return}if(a=e[t+1],t+2+a>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=2+a,e.slice(t+2,t+2+a);case 197:if(t+3>n){this.lastBytesConsumed=0;return}if(a=i.getUint16(t+1,!1),t+3+a>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=3+a,e.slice(t+3,t+3+a);case 198:if(t+5>n){this.lastBytesConsumed=0;return}if(a=i.getUint32(t+1,!1),t+5+a>n){this.lastBytesConsumed=0;return}return this.lastBytesConsumed=5+a,e.slice(t+5,t+5+a);case 220:if(t+3>n){this.lastBytesConsumed=0;return}return a=i.getUint16(t+1,!1),this.decodeArray(e,t+3,a,3);case 221:if(t+5>n){this.lastBytesConsumed=0;return}return a=i.getUint32(t+1,!1),this.decodeArray(e,t+5,a,5);case 222:if(t+3>n){this.lastBytesConsumed=0;return}return a=i.getUint16(t+1,!1),this.decodeMap(e,t+3,a,3);case 223:throw Error(`map too big to decode in JS`);case 212:return this.decodeFixExt(e,t,1,3);case 213:return this.decodeFixExt(e,t,2,4);case 214:return this.decodeFixExt(e,t,4,6);case 215:return this.decodeFixExt(e,t,8,10);case 216:return this.decodeFixExt(e,t,16,18);case 199:if(t+3>n){this.lastBytesConsumed=0;return}return a=e[t+1],this.decodeExt(e,t,a,3);case 200:if(t+4>n){this.lastBytesConsumed=0;return}return a=i.getUint16(t+1,!1),this.decodeExt(e,t,a,4);case 201:if(t+6>n){this.lastBytesConsumed=0;return}return a=i.getUint32(t+1,!1),this.decodeExt(e,t,a,6);default:throw Error(`Unknown MessagePack type: 0x${r.toString(16)}`)}}decodeArray(e,t,n,r){let i=[],a=0;for(let r=0;r<n;r++){let n=this.tryDecode(e,t+a);if(n===void 0&&this.lastBytesConsumed===0){this.lastBytesConsumed=0;return}i.push(n),a+=this.lastBytesConsumed}return this.lastBytesConsumed=r+a,i}decodeMap(e,t,n,r){let i={},a=0;for(let r=0;r<n;r++){let n=this.tryDecode(e,t+a);if(n===void 0&&this.lastBytesConsumed===0){this.lastBytesConsumed=0;return}a+=this.lastBytesConsumed;let r=this.tryDecode(e,t+a);if(r===void 0&&this.lastBytesConsumed===0){this.lastBytesConsumed=0;return}a+=this.lastBytesConsumed,i[n]=r}return this.lastBytesConsumed=r+a,i}decodeFixExt(e,t,n,r){if(t+r>e.length){this.lastBytesConsumed=0;return}let i=e[t+1];return this.decodeExtData(e,t+2,i,n,r)}decodeExt(e,t,n,r){if(t+r+n>e.length){this.lastBytesConsumed=0;return}let i=e[t+r-1];return this.decodeExtData(e,t+r,i,n,r+n)}decodeExtData(e,t,n,r,i){let a=this.decodingTypes.get(n);if(a){let n=e.slice(t,t+r),o=a(Ql.fromBuffer(n));return this.lastBytesConsumed=i,o}if(n===0&&r===1&&e[t]===0){this.lastBytesConsumed=i;return}throw Error(`Unable to find ext type ${n}`)}},eu=class{constructor(e=64){this.initialCapacity=e,this.encodingTypes=new Map,this.decodingTypes=new Map,this.encoder=new Zl(this.encodingTypes),this.decoder=new $l(this.decodingTypes)}registerEncoder(e,t,n){return this.encodingTypes.set(e,{check:t,encode:n}),this}registerDecoder(e,t){return this.decodingTypes.set(e,t),this}register(e,t,n,r){if(e<0||e>127)throw RangeError(`Bad type: 0 <= ${e} <= 127`);return this.registerEncoder(e,e=>e instanceof t,e=>{let t=new Ql(this.initialCapacity);return n(e,t),t.toBuffer()}),this.registerDecoder(e,r),this}encode(e,t){let n=this.encoder.encode(e);if(t){t.write(n);return}else{let e=n;e.toBuffer=function(){return this};let t=e.write;return e.write=function(e,n,r,i){return Hl.Buffer.isBuffer(e)?(this.copy(e,n||0),this.length):t.call(this,e,n,r,i)},e}}decode(e){if(e&&typeof e.getRemainingBuffer==`function`&&typeof e.skipRead==`function`){let t=e.getRemainingBuffer();try{return this.decoder.decode(t)}finally{let n=this.decoder.getLastBytesConsumed(t);e.skipRead(n)}}if(e&&typeof e.toBuffer==`function`&&typeof e.read==`function`&&typeof e.readUInt8==`function`){let t=e.roffset||0;try{return this.decoder.decode(e.toBuffer().slice(t))}finally{e.roffset=t+this.decoder.getLastBytesConsumed()}}return Hl.Buffer.isBuffer(e)?this.decoder.decode(e):e&&typeof e.toBuffer==`function`?this.decoder.decode(e.toBuffer()):this.decoder.decode(e)}},tu={},nu={},ru=[],iu={1:Error,2:SyntaxError,3:TypeError,4:ReferenceError,5:RangeError,6:EvalError,7:URIError},au=Object.keys(iu).map(e=>+e);for(let e=0;e<au.length;e++){let t=au[e],n=iu[t];tu[n]=t,ru.push(n),nu[n.name]=t}var ou=(e,t,n)=>{let r=new iu[e](t);return r.stack=n,r},su=e=>nu[e.constructor.name]??nu[Error.name],cu=e=>{e.register(126,Error,(t,n)=>{n.writeUInt16BE(su(t)),e.encode(t.name,n),e.encode(t.stack,n),e.encode(t.message,n);let r=Object.keys(t).filter(e=>![`stack`,`message`,`name`].includes(e)&&t[e]!==void 0);n.writeUInt16BE(r.length);for(let i of r)e.encode(i,n),e.encode(t[i],n)},t=>{let n=t.readUInt16BE(),r=e.decode(t),i=e.decode(t),a=ou(n,e.decode(t),i);a.name=r;let o=t.readUInt16BE();for(let n=0;n<o;n++){let n=e.decode(t);a[n]=e.decode(t)}return a}),e.register(125,Date,(e,t)=>{t.writeUInt64BE(e.getTime())},e=>new Date(e.readUInt64BE().toNumber())),e.register(124,Map,(t,n)=>{n.writeUInt32BE(t.size);for(let[r,i]of t.entries())e.encode(r,n),e.encode(i,n)},t=>{let n=new Map,r=t.readUInt32BE();for(let i=0;i<r;i++){let r=e.decode(t),i=e.decode(t);n.set(r,i)}return n}),e.register(123,Set,(t,n)=>{n.writeUInt32BE(t.size);for(let r of t.values())e.encode(r,n)},t=>{let n=new Set,r=t.readUInt32BE();for(let i=0;i<r;i++){let r=e.decode(t);n.add(r)}return n}),e.register(121,RegExp,(t,n)=>{e.encode(t.source,n),e.encode(t.flags,n)},t=>{let n=e.decode(t),r=e.decode(t);return new RegExp(n,r)}),e.register(120,BigInt,(t,n)=>{let r=t.toString();e.encode(r,n)},t=>{let n=e.decode(t);return BigInt(n)}),e.register(119,G,(e,t)=>{t.writeInt8(e.unsigned?1:0),e.unsigned?t.writeUInt64BE(e):t.writeInt64BE(e)},e=>e.readInt8()?e.readUInt64BE():e.readInt64BE())};cu(new eu);var lu=Object.defineProperty,uu=Object.getOwnPropertyNames,X=(e,t)=>function(){return e&&(t=(0,e[uu(e)[0]])(e=0)),t},du=(e,t)=>{for(var n in t)lu(e,n,{get:t[n],enumerable:!0})},fu,pu=X({"src/core/reference.ts"(){fu=class{constructor(e){if(this.defId=e,!e||typeof e!=`string`)throw Error(`Service definition ID must be a non-empty string`)}defId}}});function mu(e){return e>=200&&e<300?`success`:e===401||e===407||e===403?`auth`:e===422?`validation`:e===429?`rate_limit`:e>=400&&e<500?`client`:e>=500&&e<600?`server`:`custom`}function hu(e){return e===408||e===429||e===500||e===502||e===503||e===504||e===507||e===511}function gu(e){return{400:`The request is invalid`,401:`Authentication is required`,403:`You do not have permission to access this resource`,404:`The requested resource was not found`,405:`The requested method is not allowed`,408:`The request timed out`,409:`A conflict occurred`,413:`The request payload is too large`,414:`The request URI is too long`,415:`The media type is not supported`,418:`I'm a teapot`,422:`The request could not be processed`,429:`Too many requests, please try again later`,500:`An internal server error occurred`,501:`The requested functionality is not implemented`,502:`Bad gateway`,503:`The service is temporarily unavailable`,504:`Gateway timeout`,600:`Multiple errors occurred`,601:`An unknown error occurred`}[e]||`Error ${e}`}var _u=X({"src/errors/codes.ts"(){}}),vu,yu=X({"src/errors/core.ts"(){_u(),vu=class e extends Error{code;category;httpStatus;details;context;timestamp;requestId;correlationId;spanId;traceId;constructor(t){let n=t.message||gu(t.code);super(n),this.name=`TitanError`,this.code=t.code,this.category=mu(t.code),this.httpStatus=t.code,this.details=t.details||{},this.context=t.context||{},this.timestamp=Date.now(),this.requestId=t.requestId,this.correlationId=t.correlationId,this.spanId=t.spanId,this.traceId=t.traceId,t.cause&&(this.cause=t.cause),Object.setPrototypeOf(this,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,e),t.cause instanceof Error&&t.cause.stack&&(this.stack=`${this.stack}
110
- Caused by: ${t.cause.stack}`)}static isTitanError(t){return t instanceof e}isRetryable(){return hu(this.code)}getRetryStrategy(){return this.isRetryable()?this.code===429?{shouldRetry:!0,delay:(this.details?.retryAfter||60)*1e3,maxAttempts:3}:{shouldRetry:!0,delay:1e3,maxAttempts:3,backoffFactor:2}:{shouldRetry:!1,delay:0,maxAttempts:0}}toJSON(){return{name:this.name,code:this.code,category:this.category,message:this.message,details:this.details,context:this.context,timestamp:this.timestamp,requestId:this.requestId,correlationId:this.correlationId,spanId:this.spanId,traceId:this.traceId}}withContext(t){return new e({code:this.code,message:this.message,details:this.details,context:{...this.context,...t},requestId:this.requestId,correlationId:this.correlationId,spanId:this.spanId,traceId:this.traceId})}withDetails(t){return new e({code:this.code,message:this.message,details:{...this.details,...t},context:this.context,requestId:this.requestId,correlationId:this.correlationId,spanId:this.spanId,traceId:this.traceId})}static fromJSON(t){return new e({code:t.code,message:t.message,details:t.details,context:t.context,requestId:t.requestId,correlationId:t.correlationId,spanId:t.spanId,traceId:t.traceId})}}}}),bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou=X({"src/errors/netron.ts"(){yu(),bu=class e extends vu{serviceId;methodName;peerId;constructor(t){super(t),this.name=`NetronError`,this.serviceId=t.serviceId,this.methodName=t.methodName,this.peerId=t.peerId,Object.setPrototypeOf(this,e.prototype)}toJSON(){return{...super.toJSON(),serviceId:this.serviceId,methodName:this.methodName,peerId:this.peerId}}},xu=class e extends bu{constructor(t,n){super({code:404,message:`Service not found: ${t}`,details:n,serviceId:t}),this.name=`ServiceNotFoundError`,Object.setPrototypeOf(this,e.prototype)}static create(t){return new e(t)}},Su=class e extends bu{constructor(t,n,r){super({code:404,message:`Method not found: ${t}.${n}`,details:r,serviceId:t,methodName:n}),this.name=`MethodNotFoundError`,Object.setPrototypeOf(this,e.prototype)}static create(t,n){return new e(t,n)}},Cu=class e extends bu{transport;address;constructor(t){super(t),this.name=`TransportError`,this.transport=t.transport,this.address=t.address,Object.setPrototypeOf(this,e.prototype)}static connectionFailed(t,n,r){return new e({code:503,message:`Failed to connect to ${n} via ${t}`,transport:t,address:n,cause:r})}static connectionTimeout(t,n){return new e({code:408,message:`Connection timeout to ${n} via ${t}`,transport:t,address:n})}static connectionClosed(t,n){return new e({code:503,message:n||`Connection closed unexpectedly`,transport:t,details:{reason:n}})}toJSON(){return{...super.toJSON(),transport:this.transport,address:this.address}}},wu=class e extends bu{constructor(t){super(t),this.name=`PeerError`,Object.setPrototypeOf(this,e.prototype)}static notFound(t){return new e({code:404,message:`Peer not found: ${t}`,peerId:t})}static disconnected(t,n){return new e({code:503,message:`Peer disconnected: ${t}${n?` (${n})`:``}`,peerId:t,details:{reason:n}})}static unauthorized(t){return new e({code:401,message:`Peer not authorized: ${t}`,peerId:t})}},Tu=class e extends bu{rpcId;constructor(t){super(t),this.name=`RpcError`,this.rpcId=t.rpcId,Object.setPrototypeOf(this,e.prototype)}static timeout(t,n,r){return new e({code:408,message:`RPC call ${t}.${n} timed out after ${r}ms`,serviceId:t,methodName:n,details:{timeout:r}})}static invalidRequest(t,n){return new e({code:400,message:`Invalid RPC request: ${t}`,details:n})}static invalidResponse(t,n,r){return new e({code:500,message:`Invalid RPC response from ${t}.${n}`,serviceId:t,methodName:n,details:r})}toJSON(){return{...super.toJSON(),rpcId:this.rpcId}}},Eu=class e extends bu{streamId;constructor(t){super(t),this.name=`StreamError`,this.streamId=t.streamId,Object.setPrototypeOf(this,e.prototype)}static closed(t,n){return new e({code:410,message:`Stream closed: ${t}${n?` (${n})`:``}`,streamId:t,details:{reason:n}})}static error(t,n){return new e({code:500,message:`Stream error: ${n.message}`,streamId:t,cause:n})}static backpressure(t,n){return new e({code:429,message:`Stream backpressure: buffer size ${n}`,streamId:t,details:{bufferSize:n}})}toJSON(){return{...super.toJSON(),streamId:this.streamId}}},Du=class e extends bu{serializationType;constructor(t){super(t),this.name=`SerializationError`,this.serializationType=t.serializationType,Object.setPrototypeOf(this,e.prototype)}static encode(t,n){return new e({code:500,message:`Failed to encode value: ${typeof t}`,serializationType:`encode`,cause:n})}static decode(t,n){return new e({code:400,message:n?.message??`Failed to decode data`,serializationType:`decode`,cause:n})}toJSON(){return{...super.toJSON(),serializationType:this.serializationType}}}}}),ku=X({"src/errors/serialization.ts"(){}}),Au,ju=X({"src/errors/factories.ts"(){yu(),Ou(),Au={serviceNotFound(e){return xu.create(e)},methodNotFound(e,t){return Su.create(e,t)},connectionFailed(e,t,n){return Cu.connectionFailed(e,t,n)},connectionTimeout(e,t){return Cu.connectionTimeout(e,t)},connectionClosed(e,t){return Cu.connectionClosed(e,t)},peerNotFound(e){return wu.notFound(e)},peerDisconnected(e,t){return wu.disconnected(e,t)},peerUnauthorized(e){return wu.unauthorized(e)},rpcTimeout(e,t,n){return Tu.timeout(e,t,n)},invalidRequest(e,t){return Tu.invalidRequest(e,t)},invalidResponse(e,t,n){return Tu.invalidResponse(e,t,n)},streamClosed(e,t){return Eu.closed(e,t)},streamError(e,t){return Eu.error(e,t)},streamBackpressure(e,t){return Eu.backpressure(e,t)},serializeEncode(e,t){return Du.encode(e,t)},serializeDecode(e,t){return Du.decode(e,t)}}}}),Mu,Nu,Pu=X({"src/errors/legacy.ts"(){Ou(),Mu=class extends bu{constructor(e,t){super({code:503,message:e,details:t}),this.name=`ConnectionError`}},Nu=class extends bu{constructor(e,t){super({code:408,message:e,details:t}),this.name=`TimeoutError`}}}}),Fu=X({"src/errors/index.ts"(){_u(),yu(),Ou(),ku(),ju(),Pu(),yu(),Ou(),ju()}}),Iu,Lu,Ru,zu,Bu,Vu=X({"src/core/readable-stream.ts"(){Fu(),Iu=1e4,Lu=16,Ru=1024,zu=3e4,Bu=class e extends ReadableStream{peer;buffer=new Map;expectedIndex=0;timeout;id;isComplete=!1;isLive;events=new pc;controller;state=`IDLE`;highWaterMark;maxBufferSize;onErrorCallback;metrics={bytesReceived:0,packetsReceived:0,backpressureEvents:0,bufferPeakSize:0,currentBufferSize:0,estimatedMemoryUsage:0,state:`IDLE`,isPaused:!1};cleanupInterval;constructor({peer:e,streamId:t,isLive:n=!1,highWaterMark:r=Lu,maxBufferSize:i=Iu,onError:a}){let o;super({start(e){o=e},pull(){},cancel(e){console.log(`Stream ${t} cancelled:`,e)}}),this.peer=e,this.id=t,this.isLive=n,this.highWaterMark=r,this.maxBufferSize=i,this.onErrorCallback=a,this.controller=o,this.peer.logger&&this.peer.logger.info({streamId:this.id,isLive:n,highWaterMark:r,maxBufferSize:i},`Creating readable stream`),this.peer.readableStreams.set(this.id,this),this.transitionState(`ACTIVE`),this.isLive||(this.resetTimeout(),this.startBufferCleanup()),this.events.on(`close`,this.cleanup),this.events.on(`error`,this.handleError)}transitionState(e){let t=this.state;if(!{IDLE:[`ACTIVE`,`CLOSED`,`ERROR`],ACTIVE:[`PAUSED`,`CLOSING`,`CLOSED`,`ERROR`],PAUSED:[`ACTIVE`,`CLOSING`,`ERROR`],CLOSING:[`CLOSED`,`ERROR`],CLOSED:[],ERROR:[`CLOSED`]}[t].includes(e)){let n=Error(`Invalid state transition: ${t} -> ${e} for stream ${this.id}`);this.peer.logger&&this.peer.logger.warn({streamId:this.id,oldState:t,newState:e},n.message)}this.state=e,this.metrics.state=e,this.metrics.isPaused=e===`PAUSED`,this.peer.logger&&this.peer.logger.debug({streamId:this.id,oldState:t,newState:e},`Stream state transition`),this.events.emit(`stateChange`,{oldState:t,newState:e})}startBufferCleanup(){this.cleanupInterval=setInterval(()=>{this.performBufferCleanup()},zu)}performBufferCleanup(){if(!(this.state===`CLOSED`||this.state===`ERROR`)&&this.buffer.size>0){this.peer.logger&&this.peer.logger.debug({streamId:this.id,bufferSize:this.buffer.size},`Performing buffer cleanup`);let e=[];for(let[t]of Array.from(this.buffer.entries()))t<this.expectedIndex-100&&e.push(t);for(let t of e)this.buffer.delete(t),this.peer.logger&&this.peer.logger.warn({streamId:this.id,index:t},`Removed stale packet from buffer`);this.updateBufferMetrics()}}onPacket(e){if(this.state===`CLOSED`||this.state===`ERROR`){this.peer.logger&&this.peer.logger.warn({streamId:this.id,state:this.state},`Received packet for closed/errored stream`);return}if(this.state===`PAUSED`&&this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Received packet while paused`),this.resetTimeout(),this.metrics.packetsReceived++,e.data){let t=typeof e.data==`string`?e.data.length:e.data.byteLength??Ru;this.metrics.bytesReceived+=t}if(this.buffer.size>=this.maxBufferSize){this.peer.logger&&this.peer.logger.error({streamId:this.id,size:this.buffer.size},`Stream buffer overflow`);let e=Au.streamBackpressure(String(this.id),this.buffer.size);this.handleStreamError(e,`FATAL`);return}for(this.peer.logger&&this.peer.logger.debug({streamId:this.id,index:e.streamIndex},`Processing packet`),(!e.isLastChunk()||e.data!==null)&&this.buffer.set(e.streamIndex,e.data),this.updateBufferMetrics(),this.checkBackpressure();this.buffer.has(this.expectedIndex);){let e=this.buffer.get(this.expectedIndex);this.buffer.delete(this.expectedIndex),this.expectedIndex++;try{this.controller?.enqueue(e)}catch{this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Stream backpressure detected`),this.buffer.set(this.expectedIndex-1,e),this.expectedIndex--,this.handleStreamError(Error(`Failed to enqueue chunk`),`RECOVERABLE`);break}}if(this.updateBufferMetrics(),e.isLastChunk()){this.peer.logger&&this.peer.logger.info({streamId:this.id},`Received last chunk`),this.isComplete=!0,this.transitionState(`CLOSING`);try{this.controller?.close(),this.transitionState(`CLOSED`)}catch{this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Error closing stream`)}}}updateBufferMetrics(){this.metrics.currentBufferSize=this.buffer.size,this.buffer.size>this.metrics.bufferPeakSize&&(this.metrics.bufferPeakSize=this.buffer.size),this.metrics.estimatedMemoryUsage=this.buffer.size*Ru}checkBackpressure(){let e=this.buffer.size>=this.highWaterMark;e&&this.state===`ACTIVE`?this.pause():!e&&this.state===`PAUSED`&&this.resume()}pause(){this.state===`ACTIVE`&&(this.peer.logger&&this.peer.logger.warn({streamId:this.id,bufferSize:this.buffer.size},`Pausing stream due to backpressure`),this.transitionState(`PAUSED`),this.metrics.backpressureEvents++,this.events.emit(`backpressure`,{bufferSize:this.buffer.size,highWaterMark:this.highWaterMark}))}resume(){this.state===`PAUSED`&&(this.peer.logger&&this.peer.logger.info({streamId:this.id},`Resuming stream after backpressure`),this.transitionState(`ACTIVE`),this.events.emit(`resume`))}get desiredSize(){return this.highWaterMark-this.buffer.size}get isPaused(){return this.state===`PAUSED`}getState(){return this.state}getMetrics(){return{...this.metrics}}handleStreamError(e,t){if(this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e,severity:t},`Stream error occurred`),this.onErrorCallback)try{this.onErrorCallback(e,t)}catch(e){this.peer.logger&&this.peer.logger.error({streamId:this.id,callbackError:e},`Error in onError callback`)}t===`FATAL`?this.destroy(e):this.events.emit(`error`,e)}resetTimeout(){if(this.isLive)return;this.timeout&&clearTimeout(this.timeout);let e=this.peer.options?.streamTimeout??6e4;this.peer.logger&&this.peer.logger.debug({streamId:this.id,timeoutDuration:e},`Resetting stream timeout`),this.timeout=setTimeout(()=>{let t=`Stream ${this.id} inactive for ${e}ms, closing.`;this.peer.logger&&this.peer.logger.warn(t),this.buffer.clear(),this.updateBufferMetrics(),this.destroy(Au.streamClosed(String(this.id),t))},e)}closeStream(e=!1){if(this.state===`CLOSED`){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to close already closed stream`);return}if(this.isLive&&!e){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to close live stream`);return}this.peer.logger&&this.peer.logger.info({streamId:this.id,force:e},`Closing stream`),this.transitionState(`CLOSING`);try{this.controller?.close(),this.transitionState(`CLOSED`)}catch{this.transitionState(`CLOSED`)}this.isLive&&e&&this.destroy()}forceClose(e){if(this.state===`CLOSED`){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to force close already closed stream`);return}this.peer.logger&&this.peer.logger.info({streamId:this.id,reason:e},`Force closing stream`),this.transitionState(`CLOSING`),this.isComplete=!0;try{this.controller?.close(),this.transitionState(`CLOSED`)}catch{this.transitionState(`CLOSED`)}setTimeout(()=>{this.events.emit(`close`),this.cleanup()},0)}cleanup=()=>{this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Cleaning up stream resources`),this.timeout&&=(clearTimeout(this.timeout),void 0),this.cleanupInterval&&=(clearInterval(this.cleanupInterval),void 0),this.peer.readableStreams.delete(this.id),this.buffer.clear(),this.updateBufferMetrics()};handleError=e=>{this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Stream error occurred`),this.transitionState(`ERROR`),this.cleanup()};destroy(e){if(this.state===`CLOSED`){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to destroy already closed stream`);return}if(this.peer.logger&&this.peer.logger.info({streamId:this.id,error:e},`Destroying stream`),e){this.transitionState(`ERROR`);try{this.controller?.error(e)}catch{}this.events.emit(`error`,e)}else{this.transitionState(`CLOSING`);try{this.controller?.close()}catch{}}this.transitionState(`CLOSED`),this.cleanup()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}static create(t,n,r=!1){return new e({peer:t,streamId:n,isLive:r})}}}}),Hu,Uu=X({"src/packet/constants.ts"(){Hu=2**53-1>>>0}}),Wu,Gu=X({"src/packet/uid.ts"(){Uu(),Wu=class{value=0;constructor(e=0){this.reset(e)}next(){return this.value=this.value===Hu?1:this.value+1,this.value}reset(e=0){this.value=e>>>0}}}}),Ku,qu,Ju,Yu,Xu,Zu,Qu=X({"src/packet/types.ts"(){Ku=0,qu=3,Ju=4,Yu=5,Xu=6,Zu=7}}),$u,ed,td,nd,rd,id,ad,od,sd,cd,ld,ud,dd,fd,pd,md=X({"src/packet/packet.ts"(){Gu(),Qu(),$u=16,ed=32,td=64,nd=128,rd=(e,t)=>(1<<t)-1<<e,id=(e,t,n)=>e&~rd(t,n),ad=(e,t,n,r)=>{let i=rd(n,r);return e&~i|t<<n&i},od=(e,t,n)=>e>>t&(1<<n)-1,sd=0,cd=4,ld=4,ud=5,dd=new Wu,fd=class{constructor(e){this.id=e}id;flags=0;data;streamId;streamIndex;setType(e){this.flags=ad(id(this.flags,sd,cd),e,sd,cd)}getType(){return od(this.flags,sd,cd)}setImpulse(e){this.flags=e?this.flags|td:this.flags&~td}getImpulse(){return this.flags&td?1:0}setError(e){this.flags=e?this.flags|nd:this.flags&~nd}getError(){return this.flags&nd?1:0}setStreamInfo(e,t,n,r){this.streamId=e,this.streamIndex=t,this.flags=ad(ad(this.flags,n?1:0,ld,1),r?1:0,ud,1)}isStreamChunk(){return this.getType()===Yu}isLastChunk(){return(this.flags&$u)!==0}isLive(){return(this.flags&ed)!==0}static nextId(){return dd.next()}static resetId(){dd.reset()}},pd=(e,t,n,r)=>{let i=new fd(e);return i.setImpulse(t),i.setType(n),i.data=r,i}}}),hd,gd,_d=X({"src/core/writable-stream.ts"(){Gu(),md(),Qu(),Fu(),hd=new Wu,gd=class e extends WritableStream{id;peer;index=0;isLive;state=`IDLE`;events=new pc;writeBuffer=[];highWaterMark;retryConfig;errorHandler;metrics={bytesSent:0,packetsSent:0,retryCount:0,failedWrites:0,bufferSize:0,state:`IDLE`};isProcessing=!1;constructor({peer:e,streamId:t,isLive:n=!1,highWaterMark:r=16,retry:i,onError:a}){super({start:e=>{},write:async e=>this._write(e),close:async()=>this._final(),abort:e=>{this._abort(e)}}),this.peer=e,this.isLive=n,this.id=t??hd.next(),this.highWaterMark=r,this.errorHandler=a,this.retryConfig={maxAttempts:i?.maxAttempts??3,initialDelay:i?.initialDelay??100,maxDelay:i?.maxDelay??5e3,backoffFactor:i?.backoffFactor??2},this.peer.logger&&this.peer.logger.info({streamId:this.id,isLive:n,highWaterMark:this.highWaterMark,retryConfig:this.retryConfig},`Creating writable stream`),this.peer.writableStreams.set(this.id,this),this.events.once(`close`,this.cleanup)}async pipeFrom(e){this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Starting pipe operation`);let t=this.getWriter();try{if(Symbol.asyncIterator in e)for await(let n of e)await t.write(n);else{let n=e.getReader();try{for(;;){let{done:e,value:r}=await n.read();if(e)break;await t.write(r)}}finally{n.releaseLock()}}await t.close(),this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Pipe operation completed`)}catch(e){throw this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Pipe operation failed`),await t.abort(e),e}finally{t.releaseLock()}}async _write(e){if(this.state===`CLOSED`||this.state===`CLOSING`){let e=Au.streamClosed(String(this.id),`Attempt to write to closed stream`);throw this.peer.logger&&this.peer.logger.warn({streamId:this.id,state:this.state},`Attempt to write to closed stream`),e}if(this.state===`ERROR`)throw Au.streamError(String(this.id),Error(`Stream is in error state`));this.transitionState(`ACTIVE`);let t=await this.enqueueWrite(e,this.index++);return this.isProcessing||this.processWriteBuffer().catch(e=>{this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Error processing write buffer`)}),t}enqueueWrite(e,t){return new Promise((n,r)=>{let i={chunk:e,index:t,resolve:n,reject:r,retryCount:0,timestamp:Date.now()};this.writeBuffer.push(i),this.metrics.bufferSize=this.writeBuffer.length,this.peer.logger&&this.peer.logger.debug({streamId:this.id,index:t,bufferSize:this.writeBuffer.length},`Enqueued write to buffer`)})}async processWriteBuffer(){if(!this.isProcessing){this.isProcessing=!0;try{for(;this.writeBuffer.length>0;){let e=this.writeBuffer[0];if(!e){this.writeBuffer.shift();continue}try{await this.sendChunkWithRetry(e),this.writeBuffer.shift(),this.metrics.bufferSize=this.writeBuffer.length,e.resolve(),this.metrics.packetsSent++;let t=this.estimateChunkSize(e.chunk);this.metrics.bytesSent+=t,this.writeBuffer.length===this.highWaterMark-1&&(this.transitionState(`DRAINING`),this.events.emit(`drain`),this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Buffer draining below high water mark`))}catch(t){this.writeBuffer.shift(),this.metrics.bufferSize=this.writeBuffer.length,this.metrics.failedWrites++,this.transitionState(`ERROR`),this.errorHandler&&this.errorHandler(t);try{await this.peer.sendPacket(pd(fd.nextId(),1,Xu,{streamId:this.id,message:t.message}))}catch(e){this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Failed to send stream error packet`)}e.reject(t);break}}this.writeBuffer.length===0&&this.state!==`ERROR`&&this.transitionState(`IDLE`)}finally{this.isProcessing=!1}}}async sendChunkWithRetry(e){let t,n=this.retryConfig.initialDelay;for(let r=0;r<=this.retryConfig.maxAttempts;r++)try{this.peer.logger&&this.peer.logger.debug({streamId:this.id,index:e.index,attempt:r,retryCount:e.retryCount},`Sending chunk`),await this.peer.sendStreamChunk(this.id,e.chunk,e.index,!1,this.isLive);return}catch(i){t=i instanceof Error?i:Error(String(i));let a=this.isErrorRetryable(i);if(!a||r>=this.retryConfig.maxAttempts)throw this.peer.logger&&this.peer.logger.error({streamId:this.id,index:e.index,attempt:r,isRetryable:a},`Write failed, not retrying`),t;e.retryCount++,this.metrics.retryCount++,this.peer.logger&&this.peer.logger.warn({streamId:this.id,index:e.index,attempt:r,delay:n,error:i.message},`Write failed, retrying`),this.events.emit(`retry`,{index:e.index,attempt:r,error:t,delay:n}),await this.delay(n),n=Math.min(n*this.retryConfig.backoffFactor,this.retryConfig.maxDelay)}throw t}isErrorRetryable(e){if(e.code!==void 0){if(typeof e.code==`number`)return hu(e.code);if(e.code===`ECONNREFUSED`||e.code===`ECONNRESET`||e.code===`ETIMEDOUT`||e.code===`ENOTFOUND`||e.code===`ENETUNREACH`)return!0}return!(e instanceof TypeError||e instanceof ReferenceError)}estimateChunkSize(e){if(e==null)return 0;if(typeof e==`string`)return e.length*2;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return e.byteLength;try{return JSON.stringify(e).length*2}catch{return 0}}delay(e){return new Promise(t=>setTimeout(t,e))}async _final(){if(this.state===`CLOSED`)throw this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to finalize closed stream`),Au.streamClosed(String(this.id),`Attempt to finalize closed stream`);this.transitionState(`CLOSING`),this.peer.logger&&this.peer.logger.debug({streamId:this.id,index:this.index},`Finalizing stream`);try{await this.flush(),this.peer.logger&&this.peer.logger.debug({streamId:this.id,index:this.index},`Sending final chunk`),await this.peer.sendStreamChunk(this.id,null,this.index,!0,this.isLive)}catch(e){throw this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Error sending final chunk`),e}finally{this.closeStream()}}_abort(e){this.peer.logger&&this.peer.logger.info({streamId:this.id,reason:e},`Aborting stream`);let t=e instanceof Error?e:Error(String(e));this.destroy(t)}closeStream(){if(this.state===`CLOSED`){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to close already closed stream`);return}this.peer.logger&&this.peer.logger.info({streamId:this.id,state:this.state},`Closing stream`),this.transitionState(`CLOSED`),this.clearPendingWrites(),this.cleanup()}destroy(e){if(this.state===`CLOSED`){this.peer.logger&&this.peer.logger.warn({streamId:this.id},`Attempt to destroy already closed stream`);return}this.peer.logger&&this.peer.logger.info({streamId:this.id,error:e,state:this.state},`Destroying stream`),e?this.transitionState(`ERROR`):this.transitionState(`CLOSED`),this.clearPendingWrites(e),this.cleanup(),e&&(this.events.emit(`error`,e),this.errorHandler&&this.errorHandler(e));let t=e?e.message:`Stream destroyed`;this.peer.sendPacket(pd(fd.nextId(),1,Zu,{streamId:this.id,reason:t})).catch(e=>{this.peer.logger&&this.peer.logger.error({streamId:this.id,error:e},`Failed to send stream close packet`)})}cleanup=()=>{this.peer.logger&&this.peer.logger.debug({streamId:this.id},`Cleaning up stream resources`),this.peer.writableStreams.delete(this.id)};transitionState(e){let t=this.state;t!==e&&(this.state=e,this.metrics.state=e,this.peer.logger&&this.peer.logger.debug({streamId:this.id,oldState:t,newState:e},`Stream state transition`),this.events.emit(`state-change`,{oldState:t,newState:e}))}clearPendingWrites(e){let t=this.writeBuffer.length;if(t>0){let n=e||Error(`Stream closed with pending writes`);this.peer.logger&&this.peer.logger.warn({streamId:this.id,pendingCount:t},`Clearing pending writes`);for(let e of this.writeBuffer)e.reject(n);this.writeBuffer=[],this.metrics.bufferSize=0}}async flush(){this.writeBuffer.length!==0&&(this.peer.logger&&this.peer.logger.debug({streamId:this.id,pendingWrites:this.writeBuffer.length},`Flushing pending writes`),await new Promise((e,t)=>{let n=()=>{this.writeBuffer.length===0?e():this.state===`ERROR`?t(Error(`Stream in error state during flush`)):setTimeout(n,10)};n()}))}getMetrics(){return{...this.metrics}}getState(){return this.state}isWritable(){return this.state!==`CLOSED`&&this.state!==`CLOSING`&&this.state!==`ERROR`}isBufferFull(){return this.writeBuffer.length>=this.highWaterMark}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}static create(t,n,r=!1,i){let a=new e({peer:t,streamId:i,isLive:r});return n&&a.pipeFrom(n),a}}}}),vd,yd=X({"src/core/stream-reference.ts"(){Vu(),_d(),vd=class e{constructor(e,t,n,r){this.streamId=e,this.type=t,this.isLive=n,this.peerId=r}streamId;type;isLive;peerId;static from(t){let n=t instanceof Bu?`readable`:`writable`;return new e(t.id,n,t.isLive,t.peer.id)}static to(e,t){if(e.type===`readable`){let n=t.writableStreams.get(e.streamId);return n||=new gd({peer:t,streamId:e.streamId,isLive:e.isLive}),n}else{let n=t.readableStreams.get(e.streamId);return n||=new Bu({peer:t,streamId:e.streamId,isLive:e.isLive}),n}}}}}),bd=X({"src/utils/lru-cache.ts"(){}});function xd(){let e=new Uint8Array(2);return crypto.getRandomValues(e),(e[0]<<8|e[1])&4095}function Sd(){let e=Date.now();e>Cd?(Cd=e,wd=xd()):(wd++,wd>4095&&(Cd++,wd=xd()));let t=Cd,n=Math.trunc(t/4294967296),r=t>>>0,i=new Uint8Array(8);return crypto.getRandomValues(i),Z[n>>>8&255]+Z[n&255]+Z[r>>>24&255]+Z[r>>>16&255]+`-`+Z[r>>>8&255]+Z[r&255]+`-`+Z[112|wd>>>8&15]+Z[wd&255]+`-`+Z[128|i[0]&63]+Z[i[1]]+`-`+Z[i[2]]+Z[i[3]]+Z[i[4]]+Z[i[5]]+Z[i[6]]+Z[i[7]]}var Z,Cd,wd,Td=X({"src/utils/uuid.ts"(){Z=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`)),Cd=0,wd=0}}),Ed,Dd=X({"src/core/definition.ts"(){Td(),Ed=class{constructor(e,t,n){this.id=e,this.peerId=t,this.meta=n}id;peerId;meta;parentId=``;static nextId(){return Sd()}}}}),Od=X({"src/utils/validation.ts"(){}});function kd(){return gl()}function Ad(e,t,n,r){return{id:kd(),version:`1.0`,timestamp:Date.now(),service:e,method:t,input:n,context:r?.context,hints:r?.hints}}function jd(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Md(e){return e.replace(/^http/,`ws`)}function Nd(e,t=1e3,n=3e4){let r=Math.min(t*2**(e-1),n),i=r*.25*(Math.random()*2-1);return Math.max(t,Math.min(r+i,n))}var Pd=X({"src/utils/index.ts"(){bd(),Od()}}),Fd,Id=X({"src/middleware/types.ts"(){Fd=(e=>(e.PRE_REQUEST=`pre-request`,e.POST_RESPONSE=`post-response`,e.ERROR=`error`,e))(Fd||{})}}),Ld,Rd=X({"src/middleware/pipeline.ts"(){Id(),Ld=class{globalMiddleware=new Map;serviceMiddleware=new Map;methodMiddleware=new Map;metrics={executions:0,avgTime:0,errors:0,skips:0,byMiddleware:new Map};constructor(){for(let e of Object.values(Fd))this.globalMiddleware.set(e,[])}use(e,t,n=`pre-request`){let r={middleware:e,config:{name:t?.name||`anonymous`,priority:t?.priority??100,...t},stage:n},i=this.globalMiddleware.get(n)||[];i.push(r),i.sort((e,t)=>(e.config.priority??0)-(t.config.priority??0)),this.globalMiddleware.set(n,i)}useForService(e,t,n,r=`pre-request`){this.serviceMiddleware.has(e)||this.serviceMiddleware.set(e,new Map);let i=this.serviceMiddleware.get(e);i.has(r)||i.set(r,[]);let a={middleware:t,config:{name:n?.name||`${e}-middleware`,priority:n?.priority??100,...n},stage:r},o=i.get(r);o.push(a),o.sort((e,t)=>(e.config.priority??0)-(t.config.priority??0))}useForMethod(e,t,n,r,i=`pre-request`){let a=`${e}.${t}`;this.methodMiddleware.has(a)||this.methodMiddleware.set(a,new Map);let o=this.methodMiddleware.get(a);o.has(i)||o.set(i,[]);let s={middleware:n,config:{name:r?.name||`${a}-middleware`,priority:r?.priority??100,...r},stage:i},c=o.get(i);c.push(s),c.sort((e,t)=>(e.config.priority??0)-(t.config.priority??0))}getMiddleware(e,t,n){let r=n?[n]:Object.values(Fd),i=[];for(let n of r){let r=this.globalMiddleware.get(n)||[];if(i.push(...r),e){let t=this.serviceMiddleware.get(e);if(t){let e=t.get(n)||[];i.push(...e)}}if(e&&t){let r=`${e}.${t}`,a=this.methodMiddleware.get(r);if(a){let e=a.get(n)||[];i.push(...e)}}}return i.sort((e,t)=>(e.config.priority??0)-(t.config.priority??0)),i}async execute(e,t){let n=performance.now();this.metrics.executions++;let r=this.getMiddleware(e.service,e.method,t).filter(t=>{if(t.config.condition&&!t.config.condition(e))return this.metrics.skips++,!1;if(t.config.services){if(Array.isArray(t.config.services)){if(!t.config.services.includes(e.service))return!1}else if(t.config.services instanceof RegExp&&!t.config.services.test(e.service))return!1}if(t.config.methods){if(Array.isArray(t.config.methods)){if(!t.config.methods.includes(e.method))return!1}else if(t.config.methods instanceof RegExp&&!t.config.methods.test(e.method))return!1}return!0}),i=0,a=async()=>{if(e.skipRemaining||i>=r.length)return;let t=r[i++];if(!t)return;let n=performance.now(),o=this.metrics.byMiddleware.get(t.config.name)||{executions:0,avgTime:0,errors:0};try{await t.middleware(e,a),o.executions++;let r=performance.now()-n;o.avgTime=(o.avgTime*(o.executions-1)+r)/o.executions,e.timing.middlewareTimes.set(t.config.name,r)}catch(n){throw o.errors++,this.metrics.errors++,t.config.onError&&t.config.onError(n,e),n}finally{this.metrics.byMiddleware.set(t.config.name,o)}};try{await a()}finally{let e=performance.now()-n;this.metrics.avgTime=(this.metrics.avgTime*(this.metrics.executions-1)+e)/this.metrics.executions}}clear(){this.globalMiddleware.clear(),this.serviceMiddleware.clear(),this.methodMiddleware.clear();for(let e of Object.values(Fd))this.globalMiddleware.set(e,[]);this.metrics={executions:0,avgTime:0,errors:0,skips:0,byMiddleware:new Map}}getMetrics(){return{...this.metrics}}}}}),zd=X({"src/middleware/built-in/auth.ts"(){}}),Bd=X({"src/middleware/built-in/auth-error-handler.ts"(){}}),Vd=X({"src/middleware/built-in/logging.ts"(){}}),Hd=X({"src/middleware/built-in/timing.ts"(){}}),Ud=X({"src/middleware/built-in/error-transform.ts"(){}}),Wd=X({"src/middleware/built-in/index.ts"(){zd(),Bd(),Vd(),Hd(),Ud()}}),Gd=X({"src/middleware/index.ts"(){Id(),Rd(),Wd()}}),Kd={};du(Kd,{HttpClient:()=>qd});var qd,Jd=X({"src/client/http-client.ts"(){Pd(),Gd(),qd=class{baseUrl;timeout;headers;retry;maxRetries;auth;state=`disconnected`;middleware;metrics={requestsSent:0,responsesReceived:0,errors:0,latencies:[]};constructor(e){this.baseUrl=jd(e.url),this.timeout=e.timeout??3e4,this.headers=e.headers??{},this.retry=e.retry??!1,this.maxRetries=e.maxRetries??3,this.auth=e.auth,this.middleware=e.middleware||new Ld}async connect(){this.state=`connecting`,this.state=`connected`}async invoke(e,t,n,r){let i={service:e,method:t,args:n,request:{headers:{...this.headers},timeout:r?.hints?.timeout||this.timeout,metadata:r?.context},timing:{start:performance.now(),middlewareTimes:new Map},metadata:new Map,transport:`http`},a=r?.skipAuth??!1;try{if(await this.middleware.execute(i,`pre-request`),i.skipRemaining)return i.response?.data;let o=Ad(e,t,n,{context:i.request?.metadata,hints:{...r?.hints,timeout:i.request?.timeout}}),s=await this.sendRequest(o,0,i.request?.headers,a);if(!s.success){let e=Error(s.error?.message||`Method invocation failed`);throw e.code=s.error?.code,e}return i.response={data:s.data,headers:{},metadata:{}},await this.middleware.execute(i,`post-response`),i.response.data}catch(e){i.error=e;try{await this.middleware.execute(i,`error`)}catch{}throw e}}async sendRequest(e,t=0,n,r=!1){let i=`${this.baseUrl}/netron/invoke`,a=e.hints?.timeout||this.timeout,o=Date.now(),s=new AbortController,c=setTimeout(()=>s.abort(),a);try{this.metrics.requestsSent++;let t={"Content-Type":`application/json`,Accept:`application/json`,"X-Netron-Version":`1.0`,...this.headers,...n};this.auth&&!r&&!n?.Authorization&&Object.assign(t,this.auth.getAuthHeaders());let a=await fetch(i,{method:`POST`,headers:t,body:JSON.stringify(e),signal:s.signal});clearTimeout(c);let l=Date.now()-o;if(this.metrics.latencies.push(l),this.metrics.responsesReceived++,!a.ok)try{return await a.json()}catch{return this.metrics.errors++,{id:e.id,version:`2.0`,timestamp:Date.now(),success:!1,error:{code:`HTTP_ERROR`,message:`HTTP ${a.status}: ${a.statusText}`}}}return await a.json()}catch(i){if(clearTimeout(c),this.metrics.errors++,this.retry&&t<this.maxRetries){let i=2**t*1e3;return await new Promise(e=>setTimeout(e,i)),this.sendRequest(e,t+1,n,r)}return i.name===`AbortError`?{id:e.id,version:`2.0`,timestamp:Date.now(),success:!1,error:{code:`TIMEOUT`,message:`Request timeout after ${a}ms`}}:{id:e.id,version:`2.0`,timestamp:Date.now(),success:!1,error:{code:`NETWORK_ERROR`,message:i.message}}}}async disconnect(){this.state=`disconnected`}getState(){return this.state}getMetrics(){let e=this.metrics.latencies.length>0?this.metrics.latencies.reduce((e,t)=>e+t,0)/this.metrics.latencies.length:void 0;return{id:`http-client`,url:this.baseUrl,state:this.state,transport:`http`,requestsSent:this.metrics.requestsSent,responsesReceived:this.metrics.responsesReceived,errors:this.metrics.errors,avgLatency:e}}getMiddleware(){return this.middleware}use(e,t,n){return this.middleware.use(e,t,n),this}}}}),Q,Yd=X({"src/packet/serializer.ts"(){pu(),Dd(),yd(),yu(),Q=new eu,Q.register(110,vu,(e,t)=>{if(t.write(Q.encode(e.name)),t.write(Q.encode(e.code)),t.write(Q.encode(e.message)),t.write(Q.encode(e.details)),t.write(Q.encode(e.context)),t.write(Q.encode(e.timestamp)),t.write(Q.encode(e.requestId)),t.write(Q.encode(e.correlationId)),t.write(Q.encode(e.spanId)),t.write(Q.encode(e.traceId)),t.write(Q.encode(e.stack||null)),e.cause){let n=e.cause;n instanceof vu?t.write(Q.encode(n)):n instanceof Error?t.write(Q.encode({__errorType:`Error`,name:n.name,message:n.message,stack:n.stack})):t.write(Q.encode(null))}else t.write(Q.encode(null))},e=>{let t=Q.decode(e),n=Q.decode(e),r=Q.decode(e),i=Q.decode(e),a=Q.decode(e),o=Q.decode(e),s=Q.decode(e),c=Q.decode(e),l=Q.decode(e),u=Q.decode(e),d=Q.decode(e),f=Q.decode(e),p;if(f){if(f instanceof vu)p=f;else if(f.__errorType===`Error`){let e=Error(f.message);e.name=f.name,e.stack=f.stack,p=e}}let m=new vu({code:n,message:r,details:i,context:a,requestId:s,correlationId:c,spanId:l,traceId:u,cause:p});return m.name=t,d&&(m.stack=d),m.timestamp=o,m}),cu(Q),Q.register(109,Ed,(e,t)=>{t.write(Q.encode(e.id)),t.write(Q.encode(e.parentId)),t.write(Q.encode(e.peerId)),t.write(Q.encode(e.meta))},e=>{let t=Q.decode(e),n=Q.decode(e),r=Q.decode(e),i=Q.decode(e),a=new Ed(t,r,i);return a.parentId=n,a}).register(108,fu,(e,t)=>{t.write(Q.encode(e.defId))},e=>new fu(Q.decode(e))).register(107,vd,(e,t)=>{Q.encode(e.streamId.toString(),t),t.writeUInt8(e.type===`writable`?1:0),t.writeUInt8(e.isLive?1:0),Q.encode(e.peerId,t)},e=>{let t=Number(Q.decode(e)),n=e.readUInt8()===1?`writable`:`readable`,r=e.readUInt8()===1,i=Q.decode(e);return new vd(t,n,r,i)})}}),Xd,Zd,Qd,$d=X({"src/packet/index.ts"(){md(),Yd(),Qu(),Fu(),Qu(),md(),Yd(),Xd=e=>{let t=e.isStreamChunk()?8:0,n=e.getType(),r;switch(n){case Ku:r=32;break;case qu:r=512;break;case Yu:r=256;break;case Xu:case Zu:r=128;break;default:r=256}return 5+t+r},Zd=e=>{let t=new Ql(Xd(e));return t.writeUInt32BE(e.id),t.writeUInt8(e.flags),Q.encode(e.data,t),e.isStreamChunk()&&(t.writeUInt32BE(e.streamId),t.writeUInt32BE(e.streamIndex)),t.toBuffer()},Qd=e=>{let t=e instanceof Uint8Array?Hl.Buffer.from(e):e;if(t.byteLength<5)throw Du.decode(e,Error(`Packet too small: ${t.byteLength} bytes, minimum 5 bytes required`));let n=Ql.wrap(t),r=new fd(n.readUInt32BE());r.flags=n.readUInt8();let i=r.getType();if(i<0||i>7)throw Du.decode(e,Error(`Invalid packet type: 0x${i.toString(16)}. Expected 0x00-0x07`));try{r.data=Q.decode(n)}catch(t){throw Du.decode(e,t instanceof Error?t:void 0)}if(r.isStreamChunk()){let t=n.length;if(t<8)throw Du.decode(e,Error(`Incomplete stream metadata: ${t} bytes remaining, 8 bytes required`));r.streamId=n.readUInt32BE(),r.streamIndex=n.readUInt32BE()}return r}}}),ef={};du(ef,{WebSocketClient:()=>tf});var tf,nf=X({"src/client/ws-client.ts"(){Pd(),Fu(),Gd(),$d(),tf=class extends pc{ws=null;wsUrl;protocols;timeout;reconnectEnabled;reconnectInterval;maxReconnectAttempts;reconnectAttempts=0;reconnectTimeout;isManualDisconnect=!1;auth;middleware;serviceDefinitions;state=`disconnected`;pendingRequests=new Map;connectedAt;disconnectedAt;taskHandlers=new Map;handshakeComplete=!1;serverId=null;clientId;metrics={requestsSent:0,responsesReceived:0,errors:0,latencies:[]};constructor(e){super(),this.wsUrl=e.url.startsWith(`http`)?Md(e.url):e.url,this.protocols=e.protocols,this.timeout=e.timeout??3e4,this.reconnectEnabled=e.reconnect??!0,this.reconnectInterval=e.reconnectInterval??1e3,this.maxReconnectAttempts=e.maxReconnectAttempts??1/0,this.auth=e.auth,this.middleware=e.middleware||new Ld,this.serviceDefinitions=e.serviceDefinitions,this.clientId=crypto.randomUUID?.()||`browser-${Date.now()}-${Math.random().toString(36).slice(2)}`}async connect(){this.ws&&(this.ws.readyState===0||this.ws.readyState===1)||(this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),void 0),await new Promise((e,t)=>{try{this.isManualDisconnect=!1,this.handshakeComplete=!1,this.serverId=null,this.state=`connecting`,this.clientId=crypto.randomUUID?.()||`browser-${Date.now()}-${Math.random().toString(36).slice(2)}`;let n=typeof WebSocket<`u`?WebSocket:typeof globalThis<`u`&&globalThis.WebSocket?globalThis.WebSocket:null;if(!n)throw Error(`WebSocket is not available in this environment`);this.ws=new n(this.wsUrl,this.protocols),this.ws.binaryType=`arraybuffer`;let r=this.ws,i=!1;r.addEventListener(`open`,()=>{this.state=`connected`,this.connectedAt=Date.now(),this.reconnectAttempts=0,this.emit(`connect`),i=!0,e()}),r.addEventListener(`message`,e=>{this.handleMessage(e.data)}),r.addEventListener(`error`,e=>{let n=new Mu(`WebSocket error`);this.state=`failed`,this.emit(`error`,n),i||(i=!0,t(n))}),r.addEventListener(`close`,e=>{this.disconnectedAt=Date.now();for(let e of this.pendingRequests.values())e.reject(new Mu(`Connection closed`)),clearTimeout(e.timeout);this.pendingRequests.clear(),this.reconnectEnabled&&!this.isManualDisconnect?(this.state=`reconnecting`,this.emit(`disconnect`,e.reason),this.attemptReconnect()):(this.state=`disconnected`,this.emit(`disconnect`,e.reason))})}catch(e){this.state=`failed`,t(e)}}))}handleMessage(e){try{if(!this.handshakeComplete){let t=null;if(typeof e==`string`?t=e:e instanceof ArrayBuffer&&e.byteLength<512&&(t=new TextDecoder().decode(e)),t)try{let e=JSON.parse(t);if(e.type===`id`){this.serverId=e.id,this.ws?.send(JSON.stringify({type:`client-id`,id:this.clientId})),this.handshakeComplete=!0;return}}catch{}}let t=Qd(e instanceof ArrayBuffer?e:new TextEncoder().encode(e));this.emit(`packet`,t);let n=t.getImpulse()===1,r=t.getImpulse()===0,i=t.getError()===1;if(r||i&&!n){let e=this.pendingRequests.get(String(t.id));e&&(clearTimeout(e.timeout),this.pendingRequests.delete(String(t.id)),this.metrics.responsesReceived++,i?(this.metrics.errors++,e.reject(t.data)):e.resolve(t.data));return}if(n){let e=t.getType();(e===Ju||e===qu)&&this.handleIncomingTask(t)}}catch(e){this.emit(`error`,e)}}async handleIncomingTask(e){let[t,...n]=Array.isArray(e.data)?e.data:[e.data],r=this.taskHandlers.get(t);if(r)try{let t=await r(...n);this.sendResponse(e.id,t??null,!1)}catch(t){this.sendResponse(e.id,{message:t?.message??`Task handler error`},!0)}else this.emit(`task`,t,...n),this.sendResponse(e.id,null,!1)}sendResponse(e,t,n){try{let r=new fd(e);r.setImpulse(0),r.setType(qu),n&&r.setError(1),r.data=t,this.sendPacket(r)}catch{}}async invoke(e,t,n,r){if(!this.isConnected())throw new Mu(`WebSocket is not connected`);let i={service:e,method:t,args:n,request:{headers:{},timeout:r?.hints?.timeout||this.timeout,metadata:r?.context},timing:{start:performance.now(),middlewareTimes:new Map},metadata:new Map,transport:`websocket`};try{if(await this.middleware.execute(i,`pre-request`),i.skipRemaining)return i.response?.data;let r=fd.nextId(),a=i.request?.timeout||this.timeout,o={...i.request?.metadata};i.request?.headers&&(o.headers={...o.headers,...i.request.headers}),this.auth&&this.auth.isAuthenticated()&&!i.request?.headers?.Authorization&&(o.headers={...o.headers,...this.auth.getAuthHeaders()});let s=this.serviceDefinitions?.get(e)||e,c=new fd(r);return c.setType(qu),c.setImpulse(1),c.data=[s,t,...n],this.sendPacket(c),this.metrics.requestsSent++,i.response={data:await new Promise((e,t)=>{let n=setTimeout(()=>{this.pendingRequests.delete(String(r)),this.metrics.errors++,t(new Nu(`Request timeout after ${a}ms`))},a);this.pendingRequests.set(String(r),{resolve:e,reject:t,timeout:n})}),headers:{},metadata:{}},await this.middleware.execute(i,`post-response`),i.response.data}catch(e){i.error=e;try{await this.middleware.execute(i,`error`)}catch{}throw e}}sendPacket(e){if(!this.ws||this.ws.readyState!==1)throw new Mu(`WebSocket is not connected`);let t=Zd(e);this.ws.send(t)}onTask(e,t){return this.taskHandlers.set(e,t),this}offTask(e){return this.taskHandlers.delete(e),this}async disconnect(){this.isManualDisconnect=!0,this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),void 0),this.ws&&=((this.ws.readyState===1||this.ws.readyState===0)&&this.ws.close(1e3,`Manual disconnect`),null),this.state=`disconnected`,this.disconnectedAt=Date.now()}isConnected(){return this.ws!==null&&this.ws.readyState===1}getState(){return this.state}attemptReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts){this.state=`failed`,this.emit(`reconnect-failed`);return}this.state=`reconnecting`,this.reconnectAttempts++;let e=Nd(this.reconnectAttempts,this.reconnectInterval);this.emit(`reconnecting`,{attempt:this.reconnectAttempts,delay:e,maxAttempts:this.maxReconnectAttempts}),this.reconnectTimeout=setTimeout(async()=>{try{await this.connect(),this.emit(`reconnect`,{attempt:this.reconnectAttempts})}catch{}},e)}getReconnectAttempts(){return this.reconnectAttempts}setUrl(e){this.wsUrl=e.startsWith(`http`)?Md(e):e}getMetrics(){let e=this.metrics.latencies.length>0?this.metrics.latencies.reduce((e,t)=>e+t,0)/this.metrics.latencies.length:void 0;return{id:`ws-client`,url:this.wsUrl,state:this.state,transport:`websocket`,connectedAt:this.connectedAt,disconnectedAt:this.disconnectedAt,requestsSent:this.metrics.requestsSent,responsesReceived:this.metrics.responsesReceived,errors:this.metrics.errors,avgLatency:e}}getMiddleware(){return this.middleware}use(e,t,n){return this.middleware.use(e,t,n),this}}}});pu(),yd(),Vu(),_d(),Fu(),bd(),Dd(),pu(),yd(),Fu(),pu(),Dd(),yd(),Jd(),nf();var rf=class{name;config;baseUrl;fullUrl;transportType;client=null;auth;middleware;defaultTimeout;defaultHeaders;connected=!1;constructor(e){this.name=e.name,this.config=e.config,this.baseUrl=e.baseUrl.endsWith(`/`)?e.baseUrl.slice(0,-1):e.baseUrl,this.fullUrl=`${this.baseUrl}${e.config.path}`,this.transportType=e.config.transport||`http`,this.auth=e.auth,this.middleware=e.middleware,this.defaultTimeout=e.config.timeout||e.defaultTimeout||3e4,this.defaultHeaders={...e.defaultHeaders,...e.config.headers}}async initializeClient(){if(this.client)return this.client;let{HttpClient:e}=await Promise.resolve().then(()=>(Jd(),Kd)),{WebSocketClient:t}=await Promise.resolve().then(()=>(nf(),ef));return this.transportType===`websocket`?this.client=new t({url:this.fullUrl,protocols:this.config.websocket?.protocols,timeout:this.defaultTimeout,reconnect:this.config.websocket?.reconnect,reconnectInterval:this.config.websocket?.reconnectInterval,maxReconnectAttempts:this.config.websocket?.maxReconnectAttempts,auth:this.auth,middleware:this.middleware}):this.client=new e({url:this.fullUrl,timeout:this.defaultTimeout,headers:this.defaultHeaders,retry:this.config.http?.retry,maxRetries:this.config.http?.maxRetries,auth:this.auth,middleware:this.middleware}),this.client}async connect(){await(await this.initializeClient()).connect(),this.connected=!0}async disconnect(){this.client&&(await this.client.disconnect(),this.connected=!1)}service(e){return new Proxy({},{get:(t,n)=>{if(typeof n!=`symbol`)return async(...t)=>await this.invoke(e,n,t)}})}async invoke(e,t,n=[],r){let i=await this.initializeClient(),a={};return r?.context&&(a.context=r.context),(r?.hints||r?.timeout)&&(a.hints={...r?.hints,timeout:r?.timeout||r?.hints?.timeout}),r?.skipAuth&&(a.skipAuth=!0),await i.invoke(e,t,n,a)}getMetrics(){return this.client?{...this.client.getMetrics(),id:this.name}:{id:`${this.name}-not-connected`,url:this.fullUrl,state:`disconnected`,transport:this.transportType,requestsSent:0,responsesReceived:0,errors:0}}isConnected(){return this.client?`isConnected`in this.client&&typeof this.client.isConnected==`function`?this.client.isConnected():this.connected:!1}getPath(){return this.config.path}getTransportType(){return this.transportType}getName(){return this.name}getFullUrl(){return this.fullUrl}getClient(){return this.client}async destroy(){this.client&&=(await this.disconnect(),null)}},af=class{key;constructor(e=`netron_auth_token`){this.key=e}getToken(){try{return localStorage.getItem(this.key)}catch{return null}}setToken(e){try{localStorage.setItem(this.key,e)}catch{}}removeToken(){try{localStorage.removeItem(this.key)}catch{}}hasToken(){return this.getToken()!==null}getValue(e){try{return localStorage.getItem(e)}catch{return null}}setValue(e,t){try{localStorage.setItem(e,t)}catch{}}removeValue(e){try{localStorage.removeItem(e)}catch{}}},of=class{key;constructor(e=`netron_auth_token`){this.key=e}getToken(){try{return sessionStorage.getItem(this.key)}catch{return null}}setToken(e){try{sessionStorage.setItem(this.key,e)}catch{}}removeToken(){try{sessionStorage.removeItem(this.key)}catch{}}hasToken(){return this.getToken()!==null}getValue(e){try{return sessionStorage.getItem(e)}catch{return null}}setValue(e,t){try{sessionStorage.setItem(e,t)}catch{}}removeValue(e){try{sessionStorage.removeItem(e)}catch{}}},sf={storage:new af,storageKey:`netron_auth_token`,autoRefresh:!0,refreshThreshold:300*1e3,autoAttach:!0,inactivityConfig:{timeout:1800*1e3,events:[`click`,`keypress`,`mousemove`]},crossTabSync:{enabled:!0,syncKey:`netron_auth_sync`}},cf=class{options;state;refreshTimer;inactivityTimer;lastActivity=Date.now();eventHandlers=new Map;refreshPromise;storageListener;activityListener;constructor(e={}){this.options={storage:e.storage||(e.storageKey?new af(e.storageKey):sf.storage),storageKey:e.storageKey??sf.storageKey,autoRefresh:e.autoRefresh??sf.autoRefresh,refreshThreshold:e.refreshThreshold??sf.refreshThreshold,autoAttach:e.autoAttach??sf.autoAttach,refreshConfig:e.refreshConfig,logoutConfig:e.logoutConfig,inactivityConfig:{timeout:e.inactivityConfig?.timeout??sf.inactivityConfig.timeout,events:e.inactivityConfig?.events??sf.inactivityConfig.events,onInactivity:e.inactivityConfig?.onInactivity},crossTabSync:{enabled:e.crossTabSync?.enabled??sf.crossTabSync.enabled,syncKey:e.crossTabSync?.syncKey??sf.crossTabSync.syncKey}},this.state={authenticated:!1},this.restoreFromStorage(),this.options.crossTabSync.enabled&&this.enableCrossTabSync(),this.options.inactivityConfig.timeout&&this.options.inactivityConfig.timeout>0&&this.setupInactivityTracking()}getState(){return{...this.state}}isAuthenticated(){return this.state.authenticated&&!!this.state.context}getContext(){return this.state.context}getToken(){return this.state.token}getRefreshToken(){return this.state.refreshToken}getSessionMetadata(){return this.state.sessionMetadata}setAuth(e){if(!e.success||!e.context)return;let t=e.context.token?.type===`bearer`?this.extractTokenValue(e):void 0,n=e.metadata?.refreshToken,r=this.state.sessionMetadata||{sessionId:this.generateSessionId(),loginTime:new Date,deviceInfo:{userAgent:typeof navigator<`u`?navigator.userAgent:void 0,platform:typeof navigator<`u`?navigator.platform:void 0,language:typeof navigator<`u`?navigator.language:void 0}};this.state={authenticated:!0,context:e.context,token:t,expiresAt:e.context.token?.expiresAt?new Date(e.context.token.expiresAt):void 0,refreshToken:n,refreshTokenExpiresAt:e.metadata?.refreshTokenExpiresAt?new Date(e.metadata.refreshTokenExpiresAt):void 0,sessionMetadata:r},this.persistToStorage(),this.options.autoRefresh&&this.state.expiresAt&&this.scheduleRefresh(),this.resetInactivityTimer(),this.emit(`authenticated`,{context:e.context}),this.notifyCrossTabSync(`authenticated`)}setRefreshToken(e,t){this.state.refreshToken=e,this.state.refreshTokenExpiresAt=t,this.persistToStorage()}clearAuth(){this.state={authenticated:!1},this.clearStorage(),this.cancelRefresh(),this.cancelInactivityTimer(),this.emit(`unauthenticated`,{}),this.notifyCrossTabSync(`unauthenticated`)}async logout(){let e=this.options.logoutConfig;if(e)try{let t={"Content-Type":`application/json`,...e.headers};e.includeToken!==!1&&this.state.token&&(t.Authorization=`Bearer ${this.state.token}`);let n=await fetch(e.endpoint,{method:e.method||`POST`,headers:t});if(!n.ok)throw Error(`Logout failed: ${n.statusText}`)}catch(e){throw this.emit(`error`,{error:e,context:`logout`}),e}this.clearAuth()}async refreshToken(e){let t=e||this.state.refreshToken;if(!t)return{success:!1,error:`No refresh token available`};if(!this.options.refreshConfig)return{success:!1,error:`Refresh configuration not provided`};if(this.refreshPromise)return this.refreshPromise;this.refreshPromise=this.performTokenRefresh(t);try{return await this.refreshPromise}finally{this.refreshPromise=void 0}}async performTokenRefresh(e){let t=this.options.refreshConfig;try{let n={"Content-Type":`application/json`,...t.headers},r;r=t.buildBody?t.buildBody(e):{refreshToken:e};let i=await fetch(t.endpoint,{method:t.method||`POST`,headers:n,body:JSON.stringify(r)});if(!i.ok){this.clearAuth();let e={success:!1,error:`Token refresh failed: ${i.statusText}`};return this.emit(`error`,{error:e.error,context:`refresh`}),e}let a=await i.json();return a.success&&a.context&&(this.setAuth(a),this.emit(`token-refreshed`,{context:a.context})),a}catch(e){this.clearAuth();let t={success:!1,error:e instanceof Error?e.message:`Unknown error during token refresh`};return this.emit(`error`,{error:e,context:`refresh`}),t}}setToken(e,t){this.state={authenticated:!0,context:t,token:e,expiresAt:t?.token?.expiresAt,refreshToken:this.state.refreshToken,refreshTokenExpiresAt:this.state.refreshTokenExpiresAt,sessionMetadata:this.state.sessionMetadata||{sessionId:this.generateSessionId(),loginTime:new Date,deviceInfo:{userAgent:typeof navigator<`u`?navigator.userAgent:void 0,platform:typeof navigator<`u`?navigator.platform:void 0,language:typeof navigator<`u`?navigator.language:void 0}}},this.persistToStorage(),this.options.autoRefresh&&this.state.expiresAt&&this.scheduleRefresh(),this.resetInactivityTimer(),this.emit(`authenticated`,{context:t}),this.notifyCrossTabSync(`authenticated`)}getAuthHeaders(){return this.state.token?{Authorization:`Bearer ${this.state.token}`}:{}}isTokenExpired(){return this.state.expiresAt?Date.now()>=this.state.expiresAt.getTime():!1}isRefreshTokenExpired(){return this.state.refreshTokenExpiresAt?Date.now()>=this.state.refreshTokenExpiresAt.getTime():!1}needsRefresh(){return!this.state.expiresAt||!this.options.autoRefresh?!1:this.state.expiresAt.getTime()-Date.now()<=this.options.refreshThreshold}enableCrossTabSync(){typeof window>`u`||this.storageListener||(this.storageListener=e=>{if(e.key===this.options.crossTabSync.syncKey&&e.newValue)try{let t=JSON.parse(e.newValue);(t.type===`authenticated`||t.type===`unauthenticated`)&&(this.restoreFromStorage(),this.emit(`cross-tab-sync`,{type:t.type,timestamp:t.timestamp}))}catch(e){console.error(`Error processing cross-tab sync:`,e)}},window.addEventListener(`storage`,this.storageListener))}disableCrossTabSync(){typeof window<`u`&&this.storageListener&&(window.removeEventListener(`storage`,this.storageListener),this.storageListener=void 0)}setupInactivityTracking(){typeof window>`u`||this.activityListener||(this.activityListener=()=>{this.lastActivity=Date.now(),this.resetInactivityTimer()},(this.options.inactivityConfig.events||[`click`,`keypress`,`mousemove`]).forEach(e=>{window.addEventListener(e,this.activityListener,{passive:!0})}),this.resetInactivityTimer())}resetInactivityTimer(){this.cancelInactivityTimer(),!(!this.state.authenticated||!this.options.inactivityConfig.timeout)&&(this.inactivityTimer=setTimeout(()=>{this.handleInactivity()},this.options.inactivityConfig.timeout))}cancelInactivityTimer(){this.inactivityTimer!==void 0&&(clearTimeout(this.inactivityTimer),this.inactivityTimer=void 0)}handleInactivity(){this.emit(`inactivity`,{lastActivity:new Date(this.lastActivity)}),this.options.inactivityConfig.onInactivity&&this.options.inactivityConfig.onInactivity(),this.clearAuth()}on(e,t){this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),this.eventHandlers.get(e).add(t)}off(e,t){let n=this.eventHandlers.get(e);n&&n.delete(t)}emit(e,t){let n=this.eventHandlers.get(e);n&&n.forEach(n=>{try{n(t)}catch(t){console.error(`Error in ${e} handler:`,t)}})}extractTokenValue(e){if(e.metadata?.token)return e.metadata.token;if(e.context?.metadata?.token)return e.context.metadata.token}restoreFromStorage(){try{let e=this.options.storage.getValue(`${this.options.storageKey}_context`);if(e){let t=JSON.parse(e);this.state={authenticated:t.authenticated,context:t.context,token:t.token,expiresAt:t.expiresAt?new Date(t.expiresAt):void 0,refreshToken:t.refreshToken,refreshTokenExpiresAt:t.refreshTokenExpiresAt?new Date(t.refreshTokenExpiresAt):void 0,sessionMetadata:t.sessionMetadata?{...t.sessionMetadata,loginTime:new Date(t.sessionMetadata.loginTime)}:void 0},this.options.autoRefresh&&this.state.expiresAt&&this.scheduleRefresh();return}}catch(e){console.error(`Error restoring auth context from storage:`,e)}let e=this.options.storage.getToken();e&&(this.state={authenticated:!0,token:e})}persistToStorage(){try{this.state.token&&this.options.storage.setToken(this.state.token);let e={authenticated:this.state.authenticated,context:this.state.context,token:this.state.token,expiresAt:this.state.expiresAt?.toISOString(),refreshToken:this.state.refreshToken,refreshTokenExpiresAt:this.state.refreshTokenExpiresAt?.toISOString(),sessionMetadata:this.state.sessionMetadata?{...this.state.sessionMetadata,loginTime:this.state.sessionMetadata.loginTime.toISOString()}:void 0};this.options.storage.setValue(`${this.options.storageKey}_context`,JSON.stringify(e))}catch(e){console.error(`Error persisting auth state to storage:`,e)}}clearStorage(){this.options.storage.removeToken(),this.options.storage.removeValue(`${this.options.storageKey}_context`)}notifyCrossTabSync(e){if(!(!this.options.crossTabSync.enabled||typeof window>`u`))try{let t={type:e,timestamp:Date.now()};this.options.storage.setValue(this.options.crossTabSync.syncKey,JSON.stringify(t))}catch(e){console.error(`Error notifying cross-tab sync:`,e)}}scheduleRefresh(){if(this.cancelRefresh(),!this.state.expiresAt)return;let e=Math.max(0,this.state.expiresAt.getTime()-Date.now()-this.options.refreshThreshold);this.refreshTimer=setTimeout(async()=>{this.state.refreshToken&&this.options.refreshConfig?await this.refreshToken():this.emit(`token-refreshed`,{needsRefresh:!0})},e)}cancelRefresh(){this.refreshTimer!==void 0&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}generateSessionId(){return`${Date.now()}-${Math.random().toString(36).slice(2,11)}`}destroy(){this.cancelRefresh(),this.cancelInactivityTimer(),this.disableCrossTabSync(),typeof window<`u`&&this.activityListener&&((this.options.inactivityConfig.events||[`click`,`keypress`,`mousemove`]).forEach(e=>{window.removeEventListener(e,this.activityListener)}),this.activityListener=void 0),this.eventHandlers.clear()}},lf=class{baseUrl;backendConfigs;backendClients;poolEntries;auth;middleware;defaultTimeout;defaultHeaders;healthCheckInterval;healthCheckTimer;enableHealthChecks;constructor(e){this.baseUrl=e.baseUrl.endsWith(`/`)?e.baseUrl.slice(0,-1):e.baseUrl,this.backendConfigs=new Map(Object.entries(e.backends)),this.backendClients=new Map,this.poolEntries=new Map,this.auth=e.auth,this.middleware=e.middleware,this.defaultTimeout=e.defaultTimeout||3e4,this.defaultHeaders=e.defaultHeaders||{},this.healthCheckInterval=e.healthCheckInterval||3e4,this.enableHealthChecks=e.enableHealthChecks||!1;for(let[e,t]of this.backendConfigs)this.poolEntries.set(e,{name:e,config:t,connected:!1,healthy:!0});this.enableHealthChecks&&this.startHealthChecks()}get(e){let t=this.backendClients.get(e);if(t)return t;let n=this.backendConfigs.get(e);if(!n)throw Error(`Backend '${e}' not found in pool`);let r;return n.auth&&(r=n.auth instanceof cf?n.auth:new cf(n.auth)),t=new rf({name:e,config:n,baseUrl:this.baseUrl,auth:r||this.auth,middleware:this.middleware,defaultTimeout:this.defaultTimeout,defaultHeaders:this.defaultHeaders}),this.backendClients.set(e,t),t}has(e){return this.backendConfigs.has(e)}getNames(){return Array.from(this.backendConfigs.keys())}async connect(e){await this.get(e).connect();let t=this.poolEntries.get(e);t&&(t.connected=!0,t.healthy=!0)}async connectAll(){let e=Array.from(this.backendConfigs.keys()).map(e=>this.connect(e));await Promise.all(e)}async disconnect(e){let t=this.backendClients.get(e);if(t){await t.disconnect();let n=this.poolEntries.get(e);n&&(n.connected=!1)}}async disconnectAll(){let e=Array.from(this.backendClients.keys()).map(e=>this.disconnect(e));await Promise.all(e)}isConnected(e){return this.backendClients.get(e)?.isConnected()||!1}allConnected(){for(let e of this.backendConfigs.keys())if(!this.isConnected(e))return!1;return!0}getMetrics(e){let t=this.backendClients.get(e);if(t)return t.getMetrics();let n=this.backendConfigs.get(e);return{id:e,url:n?`${this.baseUrl}${n.path}`:this.baseUrl,state:`disconnected`,transport:n?.transport||`http`,requestsSent:0,responsesReceived:0,errors:0}}getAggregatedMetrics(){let e={},t=0,n=0,r=0,i=0,a=0;for(let o of this.backendConfigs.keys()){let s=this.getMetrics(o);e[o]=s,t+=s.requestsSent,n+=s.responsesReceived,r+=s.errors,s.avgLatency!==void 0&&(i+=s.avgLatency,a++)}return{backends:e,totalRequestsSent:t,totalResponsesReceived:n,totalErrors:r,avgLatency:a>0?i/a:0}}getPoolEntry(e){return this.poolEntries.get(e)}getAllPoolEntries(){return Array.from(this.poolEntries.values())}async checkHealth(e){let t=this.poolEntries.get(e);if(!t)return!1;try{let n=this.backendClients.get(e);if(!n)return t.healthy=!1,t.lastHealthCheck=Date.now(),!1;let r=n.isConnected();return t.healthy=r,t.lastHealthCheck=Date.now(),r}catch{return t.healthy=!1,t.lastHealthCheck=Date.now(),!1}}async checkAllHealth(){let e=new Map,t=Array.from(this.backendConfigs.keys()).map(async t=>{let n=await this.checkHealth(t);e.set(t,n)});return await Promise.all(t),e}getHealthyBackends(){return Array.from(this.poolEntries.values()).filter(e=>e.healthy).map(e=>e.name)}getUnhealthyBackends(){return Array.from(this.poolEntries.values()).filter(e=>!e.healthy).map(e=>e.name)}startHealthChecks(){this.healthCheckTimer||=setInterval(async()=>{await this.checkAllHealth()},this.healthCheckInterval)}stopHealthChecks(){this.healthCheckTimer&&=(clearInterval(this.healthCheckTimer),void 0)}addBackend(e,t){if(this.backendConfigs.has(e))throw Error(`Backend '${e}' already exists in pool`);this.backendConfigs.set(e,t),this.poolEntries.set(e,{name:e,config:t,connected:!1,healthy:!0})}async removeBackend(e){let t=this.backendClients.get(e);t&&(await t.destroy(),this.backendClients.delete(e)),this.backendConfigs.delete(e),this.poolEntries.delete(e)}async updateBackend(e,t){if(!this.backendConfigs.has(e))throw Error(`Backend '${e}' not found in pool`);let n=this.backendClients.get(e);n&&(await n.destroy(),this.backendClients.delete(e)),this.backendConfigs.set(e,t),this.poolEntries.set(e,{name:e,config:t,connected:!1,healthy:!0})}async destroy(){this.stopHealthChecks();let e=Array.from(this.backendClients.values()).map(e=>e.destroy());await Promise.all(e),this.backendClients.clear(),this.backendConfigs.clear(),this.poolEntries.clear()}},uf=class{config;defaultBackend;availableBackends;constructor(e,t,n){this.config=e,this.defaultBackend=t,this.availableBackends=new Set(n||[])}resolve(e){let t=this.parseServiceName(e);if(t.backend)return this.availableBackends.size>0&&!this.availableBackends.has(t.backend)?(console.warn(`ServiceRouter: Backend '${t.backend}' not found in available backends, using default backend '${this.defaultBackend}'`),this.defaultBackend):t.backend;let n=t.service;if(this.config.services?.[n])return this.config.services[n];if(this.config.patterns){for(let{pattern:e,backend:t}of this.config.patterns)if(this.matchPattern(n,e))return t}return this.defaultBackend}getServiceName(e){return this.parseServiceName(e).service}parseServiceName(e){let t=e.split(`.`);if(t.length>=2){let n=t[0];if((this.availableBackends.has(n)||this.config.services?.[e]===void 0)&&this.availableBackends.size>0&&this.availableBackends.has(n))return{backend:n,service:t.slice(1).join(`.`)}}return{service:e}}matchPattern(e,t){return t instanceof RegExp?t.test(e):e===t||e.startsWith(`${t}.`)||e.startsWith(t)}addServiceMapping(e,t){this.config.services||(this.config.services={}),this.config.services[e]=t}removeServiceMapping(e){return this.config.services?.[e]===void 0?!1:(delete this.config.services[e],!0)}addPattern(e,t){this.config.patterns||(this.config.patterns=[]),this.config.patterns.push({pattern:e,backend:t})}getConfig(){return this.config}getDefaultBackend(){return this.defaultBackend}setDefaultBackend(e){this.defaultBackend=e}setAvailableBackends(e){this.availableBackends=new Set(e)}isBackendAvailable(e){return this.availableBackends.size===0?!0:this.availableBackends.has(e)}};Rd();var df=class{baseUrl;pool;router;middleware;defaultBackend;backendNames;constructor(e){if(this.baseUrl=e.baseUrl.endsWith(`/`)?e.baseUrl.slice(0,-1):e.baseUrl,this.backendNames=Object.keys(e.backends),this.defaultBackend=e.defaultBackend||this.backendNames[0]||``,this.defaultBackend&&!this.backendNames.includes(this.defaultBackend))throw Error(`Default backend '${this.defaultBackend}' not found in backends configuration`);if(this.middleware=new Ld,e.shared?.middleware)for(let t of e.shared.middleware)this.middleware.use(async(e,t)=>{await t()},t);this.pool=new lf({baseUrl:this.baseUrl,backends:e.backends,auth:e.shared?.auth,middleware:this.middleware,defaultTimeout:e.shared?.timeout,defaultHeaders:e.shared?.headers}),this.router=new uf(e.routing||{},this.defaultBackend,this.backendNames)}backend(e){return this.pool.get(e)}service(e){let t=this.router.resolve(e),n=this.router.getServiceName(e);return this.pool.get(t).service(n)}async invoke(e,t,n,r=[],i){return await this.pool.get(e).invoke(t,n,r,i)}getMetrics(){return this.pool.getAggregatedMetrics()}isConnected(e){return e?this.pool.isConnected(e):this.pool.allConnected()}async connect(e){e?await this.pool.connect(e):await this.pool.connectAll()}async disconnect(e){e?await this.pool.disconnect(e):await this.pool.disconnectAll()}getMiddleware(){return this.middleware}async destroy(){await this.pool.destroy(),this.middleware.clear()}getRouter(){return this.router}getPool(){return this.pool}getBackendNames(){return[...this.backendNames]}getDefaultBackend(){return this.defaultBackend}getBaseUrl(){return this.baseUrl}use(e,t,n){return this.middleware.use(e,t,n),this}async getHealth(){return await this.pool.checkAllHealth()}getHealthyBackends(){return this.pool.getHealthyBackends()}getUnhealthyBackends(){return this.pool.getUnhealthyBackends()}};function ff(e){let t=new df(e);return new Proxy(t,{get(e,t){if(t in e||typeof t==`symbol`){let n=e[t];return typeof n==`function`?n.bind(e):n}if(e.getBackendNames().includes(t))return new Proxy({},{get(n,r){if(typeof r!=`symbol`)return e.backend(t).service(r)}})}})}Pd(),Fu(),$d(),Dd(),Fu(),$d(),Fu(),Fu(),Fu(),Fu(),Fu(),Fu(),Pd(),Td(),Fu(),Gd();var pf=`omnitron_token`,mf=new cf({storage:new of(pf),storageKey:pf,autoRefresh:!1,autoAttach:!0,crossTabSync:{enabled:!1},inactivityConfig:{timeout:0}}),$=ff({baseUrl:``,backends:{daemon:{path:``,auth:mf}},defaultBackend:`daemon`}),hf=$.daemon.OmnitronDaemon,gf=$.daemon.OmnitronAuth,_f=$.daemon.OmnitronLogs,vf=$.daemon.OmnitronFleet,yf=$.daemon.OmnitronAlerts,bf=$.daemon.OmnitronMetrics,xf=$.daemon.OmnitronInfra,Sf=$.daemon.OmnitronDeploy,Cf=$.daemon.OmnitronPipelines,wf=$.daemon.OmnitronTraces;$.daemon.OmnitronBackups,$.daemon.OmnitronKubernetes,$.daemon.OmnitronHealth,$.daemon.OmnitronDiscovery,$.daemon.OmnitronSecrets;var Tf=$.daemon.OmnitronProject,Ef=$.daemon.OmnitronSystemInfo,Df=$.daemon.OmnitronNodes;function Of(e,...t){let n=e===`signIn`||e===`validateToken`||e===`refreshSession`;return $.invoke(`daemon`,`OmnitronAuth`,e,t,n?{skipAuth:!0}:void 0)}function kf(e){try{let t=e.split(`.`);if(t.length!==3)return null;let n=atob(t[1].replace(/-/g,`+`).replace(/_/g,`/`));return JSON.parse(n)}catch{return null}}function Af(){let e=sessionStorage.getItem(pf);return e?kf(e)?.sid??null:null}function jf(e){mf.setToken(e)}function Mf(){mf.clearAuth()}export{U as $,ys as A,vn as At,_o as B,a as Bt,Ms as C,wr as Ct,Ss as D,gr as Dt,ws as E,vr as Et,Ro as F,At as Ft,lo as G,po as H,zo as I,yt as It,oo as J,co as K,Eo as L,xt as Lt,ms as M,Gt as Mt,fs as N,Ut as Nt,xs as O,mr as Ot,$o as P,kt as Pt,Qa as Q,To as R,Ge as Rt,Rs as S,L as St,Ts as T,br as Tt,fo as U,go as V,i as Vt,uo as W,to as X,ro as Y,eo as Z,Ef as _,Kr as _t,hf as a,Ka as at,$s as b,jr as bt,vf as c,ji as ct,_f as d,fi as dt,H as et,bf as f,pi as ft,jf as g,qr as gt,Tf as h,Jr as ht,Mf as i,qa as it,vs as j,N as jt,bs as k,yn as kt,Af as l,xi as lt,Cf as m,li as mt,gf as n,Ya as nt,$ as o,va as ot,Df as p,ai as pt,so as q,Of as r,Ja as rt,Sf as s,fa as st,yf as t,Xa as tt,xf as u,hi as ut,wf as v,Gr as vt,ks as w,Sr as wt,Zs as x,Ar as xt,ec as y,Wr as yt,Co as z,o as zt};