conflux-devkit 0.1.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 (176) hide show
  1. package/README.md +102 -0
  2. package/dist/cli.js +16338 -0
  3. package/package.json +55 -0
  4. package/ui/out/404/index.html +1 -0
  5. package/ui/out/404.html +1 -0
  6. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_buildManifest.js +1 -0
  7. package/ui/out/_next/static/--YsNpX1nEj74gOnGiYDR/_ssgManifest.js +1 -0
  8. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_buildManifest.js +1 -0
  9. package/ui/out/_next/static/-7MZn09F75tC02XxCAzYQ/_ssgManifest.js +1 -0
  10. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_buildManifest.js +1 -0
  11. package/ui/out/_next/static/-Yup9TU2qbfFuEoVK7cV3/_ssgManifest.js +1 -0
  12. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_buildManifest.js +1 -0
  13. package/ui/out/_next/static/2FNwKfitLrla-BD4Pvi7U/_ssgManifest.js +1 -0
  14. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_buildManifest.js +1 -0
  15. package/ui/out/_next/static/3dg2q5Zn_zf7tMeBD4-2x/_ssgManifest.js +1 -0
  16. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_buildManifest.js +1 -0
  17. package/ui/out/_next/static/EMBrL2fIteEXHVOa9QqbR/_ssgManifest.js +1 -0
  18. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_buildManifest.js +1 -0
  19. package/ui/out/_next/static/HC9l66u-S82fZ45n1NJvV/_ssgManifest.js +1 -0
  20. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_buildManifest.js +1 -0
  21. package/ui/out/_next/static/JDizq7Hn5WLnElAxCtqyg/_ssgManifest.js +1 -0
  22. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_buildManifest.js +1 -0
  23. package/ui/out/_next/static/KVufTmdF91v3IsRvyub2i/_ssgManifest.js +1 -0
  24. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_buildManifest.js +1 -0
  25. package/ui/out/_next/static/UVWp8ZgmXIqxga6tJZU2j/_ssgManifest.js +1 -0
  26. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_buildManifest.js +1 -0
  27. package/ui/out/_next/static/WVZ0izyd9YpKZhSNF1OSe/_ssgManifest.js +1 -0
  28. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_buildManifest.js +1 -0
  29. package/ui/out/_next/static/_jTgcoBsv_xqKZx36-jrD/_ssgManifest.js +1 -0
  30. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_buildManifest.js +1 -0
  31. package/ui/out/_next/static/_tUKGLiPpF-Ioygkq7-R9/_ssgManifest.js +1 -0
  32. package/ui/out/_next/static/chunks/205-997c9580ac2ccb04.js +1 -0
  33. package/ui/out/_next/static/chunks/238-baf384d341a98f9f.js +1 -0
  34. package/ui/out/_next/static/chunks/363-11ecfe8307834c37.js +1 -0
  35. package/ui/out/_next/static/chunks/363-fd3f659dc66a2545.js +1 -0
  36. package/ui/out/_next/static/chunks/383-30e544e3db85d4b4.js +1 -0
  37. package/ui/out/_next/static/chunks/396-0d45f2627ca2432c.js +1 -0
  38. package/ui/out/_next/static/chunks/396-de3171781a3c5f52.js +1 -0
  39. package/ui/out/_next/static/chunks/476-1a499832716820dd.js +1 -0
  40. package/ui/out/_next/static/chunks/5b8f0dd8-7fc232be3e483640.js +1 -0
  41. package/ui/out/_next/static/chunks/5b8f0dd8-f9bbf8f44d8e6302.js +1 -0
  42. package/ui/out/_next/static/chunks/606-d510a7806cc50e18.js +1 -0
  43. package/ui/out/_next/static/chunks/628-ae8f2280d891101c.js +1 -0
  44. package/ui/out/_next/static/chunks/69-a23845cfa4a23071.js +1 -0
  45. package/ui/out/_next/static/chunks/706-142eb06ca4e1b468.js +1 -0
  46. package/ui/out/_next/static/chunks/749-27e561f3f17b1ad3.js +2 -0
  47. package/ui/out/_next/static/chunks/749-bd8c206e8e58f8b0.js +2 -0
  48. package/ui/out/_next/static/chunks/781-7af4662532da98ca.js +1 -0
  49. package/ui/out/_next/static/chunks/815-ab30cec2ff88e700.js +1 -0
  50. package/ui/out/_next/static/chunks/826-c38d836f8f2bac38.js +1 -0
  51. package/ui/out/_next/static/chunks/903-2887fe814dfa6d5e.js +1 -0
  52. package/ui/out/_next/static/chunks/app/_not-found/page-1a3d8ff7bd6fafe6.js +1 -0
  53. package/ui/out/_next/static/chunks/app/_not-found/page-fe94df087cbbeedb.js +1 -0
  54. package/ui/out/_next/static/chunks/app/accounts/page-21a02cc8bbbce9cf.js +1 -0
  55. package/ui/out/_next/static/chunks/app/accounts/page-2bf2eeddfcc46fd2.js +1 -0
  56. package/ui/out/_next/static/chunks/app/accounts/page-4fb77d9b03c79ef0.js +1 -0
  57. package/ui/out/_next/static/chunks/app/accounts/page-840e013892222293.js +1 -0
  58. package/ui/out/_next/static/chunks/app/accounts/page-8828d6c27ee45d5e.js +1 -0
  59. package/ui/out/_next/static/chunks/app/accounts/page-a5a4d066c57c6eba.js +1 -0
  60. package/ui/out/_next/static/chunks/app/accounts/page-cd6edb16de77e73a.js +1 -0
  61. package/ui/out/_next/static/chunks/app/accounts/page-ce44f544affcbb2e.js +1 -0
  62. package/ui/out/_next/static/chunks/app/accounts/page-f26a4c8967b60c31.js +1 -0
  63. package/ui/out/_next/static/chunks/app/accounts/page-fc53feb7e5bf6a0b.js +1 -0
  64. package/ui/out/_next/static/chunks/app/accounts/page-fe5a9daa4d22e115.js +1 -0
  65. package/ui/out/_next/static/chunks/app/contracts/page-091eba53f5dcb62b.js +1 -0
  66. package/ui/out/_next/static/chunks/app/contracts/page-265c4f26532b42ce.js +1 -0
  67. package/ui/out/_next/static/chunks/app/contracts/page-26c527bf8b829de6.js +1 -0
  68. package/ui/out/_next/static/chunks/app/contracts/page-53e2d2d715f76290.js +1 -0
  69. package/ui/out/_next/static/chunks/app/contracts/page-56d74025e6315a3d.js +1 -0
  70. package/ui/out/_next/static/chunks/app/contracts/page-844c9f55a6ec9218.js +1 -0
  71. package/ui/out/_next/static/chunks/app/contracts/page-88416cc33eabdddb.js +1 -0
  72. package/ui/out/_next/static/chunks/app/contracts/page-9361399f80e19ab7.js +1 -0
  73. package/ui/out/_next/static/chunks/app/contracts/page-afebd14c1ae73ec9.js +1 -0
  74. package/ui/out/_next/static/chunks/app/contracts/page-b0f74db982762c7e.js +1 -0
  75. package/ui/out/_next/static/chunks/app/contracts/page-d88227b11f5ac4f6.js +1 -0
  76. package/ui/out/_next/static/chunks/app/contracts/page-e454dad9b03f36df.js +1 -0
  77. package/ui/out/_next/static/chunks/app/contracts/page-f269686063be5d4b.js +1 -0
  78. package/ui/out/_next/static/chunks/app/layout-0bf0ed51d0d1d3e8.js +1 -0
  79. package/ui/out/_next/static/chunks/app/layout-56f011c6a6b2930f.js +1 -0
  80. package/ui/out/_next/static/chunks/app/layout-7422dc714ea7b763.js +1 -0
  81. package/ui/out/_next/static/chunks/app/layout-88938a963d68eb45.js +1 -0
  82. package/ui/out/_next/static/chunks/app/layout-a1d424de4fc1d283.js +1 -0
  83. package/ui/out/_next/static/chunks/app/layout-add77f8e78dbfbf5.js +1 -0
  84. package/ui/out/_next/static/chunks/app/layout-c087511efc77c1ef.js +1 -0
  85. package/ui/out/_next/static/chunks/app/layout-eaaaddaebabc1e84.js +1 -0
  86. package/ui/out/_next/static/chunks/app/layout-ecbbc3f527378bf4.js +1 -0
  87. package/ui/out/_next/static/chunks/app/layout-f8c5fec65e6ca0ff.js +1 -0
  88. package/ui/out/_next/static/chunks/app/mining/page-14579efdb2e8f6c3.js +1 -0
  89. package/ui/out/_next/static/chunks/app/mining/page-1e273a4949e2b650.js +1 -0
  90. package/ui/out/_next/static/chunks/app/mining/page-2d151bdd475474f6.js +1 -0
  91. package/ui/out/_next/static/chunks/app/mining/page-43cfe0d01f696e96.js +1 -0
  92. package/ui/out/_next/static/chunks/app/mining/page-4ab3daab428e05f1.js +1 -0
  93. package/ui/out/_next/static/chunks/app/mining/page-64c88d55a5788e20.js +1 -0
  94. package/ui/out/_next/static/chunks/app/mining/page-79e2f952fc54ff89.js +1 -0
  95. package/ui/out/_next/static/chunks/app/mining/page-8305d73847b829c9.js +1 -0
  96. package/ui/out/_next/static/chunks/app/mining/page-ab0458f12921230c.js +1 -0
  97. package/ui/out/_next/static/chunks/app/mining/page-ac2a555e62327efe.js +1 -0
  98. package/ui/out/_next/static/chunks/app/mining/page-bb3068075a8088dd.js +1 -0
  99. package/ui/out/_next/static/chunks/app/mining/page-d4bad0ff79dd463a.js +1 -0
  100. package/ui/out/_next/static/chunks/app/network/page-3d5fbcf1eb37e0c5.js +1 -0
  101. package/ui/out/_next/static/chunks/app/network/page-4b692d29a3e609a8.js +1 -0
  102. package/ui/out/_next/static/chunks/app/network/page-5e33fbeb3a40de20.js +1 -0
  103. package/ui/out/_next/static/chunks/app/network/page-62a4488ea3bc2526.js +1 -0
  104. package/ui/out/_next/static/chunks/app/network/page-97cebccc451eb5c6.js +1 -0
  105. package/ui/out/_next/static/chunks/app/network/page-a50ebf9988b322b5.js +1 -0
  106. package/ui/out/_next/static/chunks/app/network/page-d7c0ceaa242f38f9.js +1 -0
  107. package/ui/out/_next/static/chunks/app/network/page-e152fafa7a4d7361.js +1 -0
  108. package/ui/out/_next/static/chunks/app/network/page-eea297c1ae180bda.js +1 -0
  109. package/ui/out/_next/static/chunks/app/network/page-f3c51db982b5a388.js +1 -0
  110. package/ui/out/_next/static/chunks/app/network/page-f51d9ab619db1c20.js +1 -0
  111. package/ui/out/_next/static/chunks/app/network/page-f6b4c10c7d87957f.js +1 -0
  112. package/ui/out/_next/static/chunks/app/page-165b6a1747a64947.js +1 -0
  113. package/ui/out/_next/static/chunks/app/page-348c96e8d45c2559.js +1 -0
  114. package/ui/out/_next/static/chunks/app/page-3632f4f09f69c905.js +1 -0
  115. package/ui/out/_next/static/chunks/app/page-36afbe5e1cb8094f.js +1 -0
  116. package/ui/out/_next/static/chunks/app/page-557bd6270c5ad579.js +1 -0
  117. package/ui/out/_next/static/chunks/app/page-6d79f31ac0288bac.js +1 -0
  118. package/ui/out/_next/static/chunks/app/page-71fcaf2853c53e30.js +1 -0
  119. package/ui/out/_next/static/chunks/app/page-90d8520902c1a7b0.js +1 -0
  120. package/ui/out/_next/static/chunks/app/page-c430d30cb894c926.js +1 -0
  121. package/ui/out/_next/static/chunks/app/page-ce0f985468520dbc.js +1 -0
  122. package/ui/out/_next/static/chunks/app/page-f0dced734181e611.js +1 -0
  123. package/ui/out/_next/static/chunks/app/page-f27633bfbc515249.js +1 -0
  124. package/ui/out/_next/static/chunks/app/page-f7be59ea4e13f436.js +1 -0
  125. package/ui/out/_next/static/chunks/app/wallet/page-11fb46a5f4a8b0be.js +1 -0
  126. package/ui/out/_next/static/chunks/app/wallet/page-26003843604c7c8c.js +1 -0
  127. package/ui/out/_next/static/chunks/app/wallet/page-7041ba96cf94b9d6.js +1 -0
  128. package/ui/out/_next/static/chunks/app/wallet/page-716e9207662cbb13.js +1 -0
  129. package/ui/out/_next/static/chunks/app/wallet/page-74cdd3297d391701.js +1 -0
  130. package/ui/out/_next/static/chunks/app/wallet/page-766c3286d7fc1fbb.js +1 -0
  131. package/ui/out/_next/static/chunks/app/wallet/page-a3e3f3f091deed13.js +1 -0
  132. package/ui/out/_next/static/chunks/app/wallet/page-fb7030a6672345f4.js +1 -0
  133. package/ui/out/_next/static/chunks/app/wallet/page-feeafe9afcd3702d.js +1 -0
  134. package/ui/out/_next/static/chunks/framework-bef83a85c94ff7de.js +1 -0
  135. package/ui/out/_next/static/chunks/main-764c1d152dd64cdb.js +1 -0
  136. package/ui/out/_next/static/chunks/main-app-565ce517a559065d.js +1 -0
  137. package/ui/out/_next/static/chunks/pages/_app-32ee63fa91347547.js +1 -0
  138. package/ui/out/_next/static/chunks/pages/_error-79ee453ce9bad74d.js +1 -0
  139. package/ui/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  140. package/ui/out/_next/static/chunks/webpack-ea02740f160b546a.js +1 -0
  141. package/ui/out/_next/static/css/0f4a493f8c2c55db.css +3 -0
  142. package/ui/out/_next/static/css/4169c0d861da624d.css +3 -0
  143. package/ui/out/_next/static/css/42c642225833b63d.css +3 -0
  144. package/ui/out/_next/static/css/4ec6b37afd49be73.css +3 -0
  145. package/ui/out/_next/static/css/6a8f3e28ef1137c2.css +3 -0
  146. package/ui/out/_next/static/css/6bbaea3800a74df9.css +3 -0
  147. package/ui/out/_next/static/css/73f87001fc8b2a52.css +3 -0
  148. package/ui/out/_next/static/css/90ccf9db21744740.css +3 -0
  149. package/ui/out/_next/static/css/9f0d4e440a0f0806.css +3 -0
  150. package/ui/out/_next/static/css/b1a2c26b7bd10f8d.css +3 -0
  151. package/ui/out/_next/static/css/c97b9630f605a98b.css +3 -0
  152. package/ui/out/_next/static/css/e5751e31c7620a6e.css +3 -0
  153. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_buildManifest.js +1 -0
  154. package/ui/out/_next/static/ezlluEQnUi2an273EFR3C/_ssgManifest.js +1 -0
  155. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_buildManifest.js +1 -0
  156. package/ui/out/_next/static/ghzWYfWuW8Y8XavA7qfLx/_ssgManifest.js +1 -0
  157. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_buildManifest.js +1 -0
  158. package/ui/out/_next/static/hzvSbCbk7BhWq0LE5xqx1/_ssgManifest.js +1 -0
  159. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_buildManifest.js +1 -0
  160. package/ui/out/_next/static/p4x_NRy3wdFgXa-RI9_BQ/_ssgManifest.js +1 -0
  161. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_buildManifest.js +1 -0
  162. package/ui/out/_next/static/uKnkegMpJr2nHM4qD8J3D/_ssgManifest.js +1 -0
  163. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_buildManifest.js +1 -0
  164. package/ui/out/_next/static/vAN91b7edxmzrsDueacJ6/_ssgManifest.js +1 -0
  165. package/ui/out/accounts/index.html +1 -0
  166. package/ui/out/accounts/index.txt +9 -0
  167. package/ui/out/contracts/index.html +1 -0
  168. package/ui/out/contracts/index.txt +9 -0
  169. package/ui/out/index.html +1 -0
  170. package/ui/out/index.txt +9 -0
  171. package/ui/out/mining/index.html +1 -0
  172. package/ui/out/mining/index.txt +9 -0
  173. package/ui/out/network/index.html +1 -0
  174. package/ui/out/network/index.txt +9 -0
  175. package/ui/out/wallet/index.html +1 -0
  176. package/ui/out/wallet/index.txt +9 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[383],{3035:function(t,e,i){i.d(e,{Z:function(){return u}});var n=i(4254);let s=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.filter((t,e,i)=>!!t&&""!==t.trim()&&i.indexOf(t)===e).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,n.forwardRef)((t,e)=>{let{color:i="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:u,className:c="",children:h,iconNode:l,...d}=t;return(0,n.createElement)("svg",{ref:e,...o,width:s,height:s,stroke:i,strokeWidth:u?24*Number(a)/Number(s):a,className:r("lucide",c),...d},[...l.map(t=>{let[e,i]=t;return(0,n.createElement)(e,i)}),...Array.isArray(h)?h:[h]])}),u=(t,e)=>{let i=(0,n.forwardRef)((i,o)=>{let{className:u,...c}=i;return(0,n.createElement)(a,{ref:o,iconNode:e,className:r("lucide-".concat(s(t)),u),...c})});return i.displayName="".concat(t),i}},8909:function(t,e,i){i.d(e,{j:function(){return r}});var n=i(8529),s=i(318),r=new class extends n.l{#t;#e;#i;constructor(){super(),this.#i=t=>{if(!s.sk&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#i=t,this.#e?.(),this.#e=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#t?this.#t:globalThis.document?.visibilityState!=="hidden"}}},7332:function(t,e,i){i.d(e,{R:function(){return a},m:function(){return o}});var n=i(658),s=i(9648),r=i(437),o=class extends s.F{#n;#s;#r;#o;constructor(t){super(),this.#n=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#s=[],this.state=t.state||a(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#s.includes(t)||(this.#s.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#s=this.#s.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#s.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#a({type:"continue"})},i={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,s=!this.#o.canStart();try{if(n)e();else{this.#a({type:"pending",variables:t,isPaused:s}),this.#r.config.onMutate&&await this.#r.config.onMutate(t,this,i);let e=await this.options.onMutate?.(t,i);e!==this.state.context&&this.#a({type:"pending",context:e,variables:t,isPaused:s})}let r=await this.#o.start();return await this.#r.config.onSuccess?.(r,t,this.state.context,this,i),await this.options.onSuccess?.(r,t,this.state.context,i),await this.#r.config.onSettled?.(r,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(r,null,t,this.state.context,i),this.#a({type:"success",data:r}),r}catch(e){try{await this.#r.config.onError?.(e,t,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,i)}catch(t){Promise.reject(t)}try{await this.#r.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,i)}catch(t){Promise.reject(t)}throw this.#a({type:"error",error:e}),e}finally{this.#r.runNext(this)}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),n.Vr.batch(()=>{this.#s.forEach(e=>{e.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},658:function(t,e,i){i.d(e,{Vr:function(){return s}});var n=i(3795).Hp,s=function(){let t=[],e=0,i=t=>{t()},s=t=>{t()},r=n,o=n=>{e?t.push(n):r(()=>{i(n)})},a=()=>{let e=t;t=[],e.length&&r(()=>{s(()=>{e.forEach(t=>{i(t)})})})};return{batch:t=>{let i;e++;try{i=t()}finally{--e||a()}return i},batchCalls:t=>(...e)=>{o(()=>{t(...e)})},schedule:o,setNotifyFunction:t=>{i=t},setBatchNotifyFunction:t=>{s=t},setScheduler:t=>{r=t}}}()},6583:function(t,e,i){i.d(e,{N:function(){return r}});var n=i(8529),s=i(318),r=new class extends n.l{#u=!0;#e;#i;constructor(){super(),this.#i=t=>{if(!s.sk&&window.addEventListener){let e=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#e||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#i=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#u!==t&&(this.#u=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#u}}},833:function(t,e,i){i.d(e,{A:function(){return a},z:function(){return u}});var n=i(318),s=i(658),r=i(437),o=i(9648),a=class extends o.F{#c;#h;#l;#n;#o;#d;#f;constructor(t){super(),this.#f=!1,this.#d=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#n=t.client,this.#l=this.#n.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#c=h(this.options),this.state=t.state??this.#c,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(t){if(this.options={...this.#d,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=h(this.options);void 0!==t.data&&(this.setState(c(t.data,t.dataUpdatedAt)),this.#c=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#l.remove(this)}setData(t,e){let i=(0,n.oE)(this.state.data,t,this.options);return this.#a({data:i,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),i}setState(t,e){this.#a({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#o?.promise;return this.#o?.cancel(t),e?e.then(n.ZT).catch(n.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#c)}isActive(){return this.observers.some(t=>!1!==(0,n.Nc)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,n.KC)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,n.Kp)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#l.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#o&&(this.#f?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#l.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&this.#o?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let i=new AbortController,s=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#f=!0,i.signal)})},o=()=>{let t=(0,n.cG)(this.options,e),i=(()=>{let t={client:this.#n,queryKey:this.queryKey,meta:this.meta};return s(t),t})();return(this.#f=!1,this.options.persister)?this.options.persister(t,i,this):t(i)},a=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:o};return s(t),t})();this.options.behavior?.onFetch(a,this),this.#h=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#a({type:"fetch",meta:a.fetchOptions?.meta}),this.#o=(0,r.Mz)({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:t=>{t instanceof r.p8&&t.revert&&this.setState({...this.#h,fetchStatus:"idle"}),i.abort()},onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let t=await this.#o.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#l.config.onSuccess?.(t,this),this.#l.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof r.p8){if(t.silent)return this.#o.promise;if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#a({type:"error",error:t}),this.#l.config.onError?.(t,this),this.#l.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...u(e.data,this.options),fetchMeta:t.meta??null};case"success":let i={...e,...c(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#h=t.manual?i:void 0,i;case"error":let n=t.error;return{...e,error:n,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),s.Vr.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#l.notify({query:this,type:"updated",action:t})})}};function u(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,r.Kw)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function c(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function h(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,i=void 0!==e,n=i?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}},9648:function(t,e,i){i.d(e,{F:function(){return r}});var n=i(3795),s=i(318),r=class{#p;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,s.PN)(this.gcTime)&&(this.#p=n.mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(s.sk?1/0:3e5))}clearGcTimeout(){this.#p&&(n.mr.clearTimeout(this.#p),this.#p=void 0)}}},437:function(t,e,i){i.d(e,{Kw:function(){return u},Mz:function(){return h},p8:function(){return c}});var n=i(8909),s=i(6583),r=i(6798),o=i(318);function a(t){return Math.min(1e3*2**t,3e4)}function u(t){return(t??"online")!=="online"||s.N.isOnline()}var c=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function h(t){let e,i=!1,h=0,l=(0,r.O)(),d=()=>"pending"!==l.status,f=()=>n.j.isFocused()&&("always"===t.networkMode||s.N.isOnline())&&t.canRun(),p=()=>u(t.networkMode)&&t.canRun(),y=t=>{d()||(e?.(),l.resolve(t))},v=t=>{d()||(e?.(),l.reject(t))},m=()=>new Promise(i=>{e=t=>{(d()||f())&&i(t)},t.onPause?.()}).then(()=>{e=void 0,d()||t.onContinue?.()}),b=()=>{let e;if(d())return;let n=0===h?t.initialPromise:void 0;try{e=n??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(y).catch(e=>{if(d())return;let n=t.retry??(o.sk?0:3),s=t.retryDelay??a,r="function"==typeof s?s(h,e):s,u=!0===n||"number"==typeof n&&h<n||"function"==typeof n&&n(h,e);if(i||!u){v(e);return}h++,t.onFail?.(h,e),(0,o._v)(r).then(()=>f()?void 0:m()).then(()=>{i?v(e):b()})})};return{promise:l,status:()=>l.status,cancel:e=>{if(!d()){let i=new c(e);v(i),t.onCancel?.(i)}},continue:()=>(e?.(),l),cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1},canStart:p,start:()=>(p()?b():m().then(b),l)}}},8529:function(t,e,i){i.d(e,{l:function(){return n}});var n=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},6798:function(t,e,i){i.d(e,{O:function(){return n}});function n(){let t,e;let i=new Promise((i,n)=>{t=i,e=n});function n(t){Object.assign(i,t),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=e=>{n({status:"fulfilled",value:e}),t(e)},i.reject=t=>{n({status:"rejected",reason:t}),e(t)},i}},3795:function(t,e,i){i.d(e,{Hp:function(){return r},mr:function(){return s}});var n={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},s=new class{#y=n;#v=!1;setTimeoutProvider(t){this.#y=t}setTimeout(t,e){return this.#y.setTimeout(t,e)}clearTimeout(t){this.#y.clearTimeout(t)}setInterval(t,e){return this.#y.setInterval(t,e)}clearInterval(t){this.#y.clearInterval(t)}};function r(t){setTimeout(t,0)}},318:function(t,e,i){i.d(e,{CN:function(){return P},Ht:function(){return F},I4:function(){return E},KC:function(){return c},Kp:function(){return u},L3:function(){return j},Nc:function(){return h},PN:function(){return a},Rm:function(){return f},SE:function(){return o},VS:function(){return m},VX:function(){return O},X7:function(){return d},Ym:function(){return p},ZT:function(){return r},_v:function(){return C},_x:function(){return l},cG:function(){return T},oE:function(){return S},sk:function(){return s},to:function(){return y}});var n=i(3795),s="undefined"==typeof window||"Deno"in globalThis;function r(){}function o(t,e){return"function"==typeof t?t(e):t}function a(t){return"number"==typeof t&&t>=0&&t!==1/0}function u(t,e){return Math.max(t+(e||0)-Date.now(),0)}function c(t,e){return"function"==typeof t?t(e):t}function h(t,e){return"function"==typeof t?t(e):t}function l(t,e){let{type:i="all",exact:n,fetchStatus:s,predicate:r,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==f(o,e.options))return!1}else if(!y(e.queryKey,o))return!1}if("all"!==i){let t=e.isActive();if("active"===i&&!t||"inactive"===i&&t)return!1}return("boolean"!=typeof a||e.isStale()===a)&&(!s||s===e.state.fetchStatus)&&(!r||!!r(e))}function d(t,e){let{exact:i,status:n,predicate:s,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(i){if(p(e.options.mutationKey)!==p(r))return!1}else if(!y(e.options.mutationKey,r))return!1}return(!n||e.state.status===n)&&(!s||!!s(e))}function f(t,e){return(e?.queryKeyHashFn||p)(t)}function p(t){return JSON.stringify(t,(t,e)=>g(e)?Object.keys(e).sort().reduce((t,i)=>(t[i]=e[i],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(i=>y(t[i],e[i]))}var v=Object.prototype.hasOwnProperty;function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(t[i]!==e[i])return!1;return!0}function b(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g(t){if(!w(t))return!1;let e=t.constructor;if(void 0===e)return!0;let i=e.prototype;return!!(w(i)&&i.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(t)===Object.prototype}function w(t){return"[object Object]"===Object.prototype.toString.call(t)}function C(t){return new Promise(e=>{n.mr.setTimeout(e,t)})}function S(t,e,i){return"function"==typeof i.structuralSharing?i.structuralSharing(t,e):!1!==i.structuralSharing?function t(e,i,n=0){if(e===i)return e;if(n>500)return i;let s=b(e)&&b(i);if(!s&&!(g(e)&&g(i)))return i;let r=(s?e:Object.keys(e)).length,o=s?i:Object.keys(i),a=o.length,u=s?Array(a):{},c=0;for(let h=0;h<a;h++){let a=s?h:o[h],l=e[a],d=i[a];if(l===d){u[a]=l,(s?h<r:v.call(e,a))&&c++;continue}if(null===l||null===d||"object"!=typeof l||"object"!=typeof d){u[a]=d;continue}let f=t(l,d,n+1);u[a]=f,f===l&&c++}return r===a&&c===r?e:u}(t,e):e}function O(t,e,i=0){let n=[...t,e];return i&&n.length>i?n.slice(1):n}function F(t,e,i=0){let n=[e,...t];return i&&n.length>i?n.slice(0,-1):n}var P=Symbol();function T(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==P?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function j(t,e){return"function"==typeof t?t(...e):!!t}function E(t,e,i){let n,s=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(n??=e(),s||(s=!0,n.aborted?i():n.addEventListener("abort",i,{once:!0})),n)}),t}},4852:function(t,e,i){i.d(e,{NL:function(){return o},aH:function(){return a}});var n=i(4254),s=i(5853),r=n.createContext(void 0),o=t=>{let e=n.useContext(r);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},a=t=>{let{client:e,children:i}=t;return n.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(r.Provider,{value:e,children:i})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[396],{4396:function(e,t,s){s.d(t,{M:function(){return b}});var r=s(5853),n=s(4852),a=s(6632),l=s(9928),o=s(3264),i=s(9754),c=s(6475),d=s(5061),u=s(4254),f=s(8144),m=s(3368),x=s(5570),p=s(2566),h=s(9510);function g(e){let{text:t}=e,[s,n]=(0,u.useState)(!1);return(0,r.jsx)("button",{type:"button",title:"Copy",className:"rounded p-1.5 text-slate-400 hover:bg-slate-800 hover:text-white transition-colors",onClick:async()=>{await navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),1500)},children:s?(0,r.jsx)(l.Z,{className:"h-4 w-4 text-green-400"}):(0,r.jsx)(o.Z,{className:"h-4 w-4"})})}function b(e){var t;let{onDone:s}=e,l=(0,n.NL)(),[o,b]=(0,u.useState)("choose"),[v,y]=(0,u.useState)(""),[w,j]=(0,u.useState)(""),[N,k]=(0,u.useState)("Default"),[C,S]=(0,u.useState)(""),[_,T]=(0,u.useState)(""),[E,P]=(0,u.useState)(""),[R,I]=(0,u.useState)(!1),W=(0,a.D)({mutationFn:f.SC.generate,onSuccess:e=>{y(e.mnemonic),j(e.mnemonic),b("confirm")}}),z=(0,a.D)({mutationFn:()=>{if(C&&C!==_)throw Error("Passwords do not match");return f.SC.setup({mnemonic:w.trim(),label:N.trim()||"Default",password:C||void 0})},onSuccess:()=>{l.invalidateQueries({queryKey:["keystore"]}),null==s||s()},onError:e=>P(e.message)});return(0,r.jsx)("div",{className:"flex w-full justify-center p-4",children:(0,r.jsxs)(x.Zb,{className:"w-full max-w-lg border-cfx-500/20 shadow-[0_0_30px_-10px_rgba(14,165,233,0.15)]",children:[(0,r.jsxs)(x.Ol,{children:[(0,r.jsx)(x.ll,{className:"text-xl",children:"First-time Setup"}),(0,r.jsx)(x.SZ,{children:"Create or import a mnemonic to derive genesis accounts for your local Conflux node. The mnemonic is stored encrypted on disk."})]}),(0,r.jsx)(x.aY,{children:"choose"===o?(0,r.jsxs)("div",{className:"flex flex-col gap-4 py-4",children:[(0,r.jsxs)(m.z,{size:"lg",className:"w-full flex items-center justify-center gap-2",disabled:W.isPending,onClick:()=>W.mutate(),children:[(0,r.jsx)(i.Z,{className:"h-5 w-5 ".concat(W.isPending?"animate-spin":"")}),"Generate New Mnemonic"]}),(0,r.jsxs)("div",{className:"relative my-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("span",{className:"w-full border-t border-slate-800"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,r.jsx)("span",{className:"bg-slate-900/50 px-2 text-slate-500",children:"Or integrate your own"})})]}),(0,r.jsxs)(m.z,{variant:"outline",size:"lg",className:"w-full flex items-center justify-center gap-2",onClick:()=>{y(""),j(""),b("confirm")},children:[(0,r.jsx)(c.Z,{className:"h-5 w-5"}),"Import Existing Mnemonic"]})]}):(0,r.jsxs)("div",{className:"space-y-6",children:[v?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-cfx-500/30 bg-cfx-900/10 p-4 shadow-inner",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium text-cfx-400",children:[(0,r.jsx)(d.Z,{className:"h-4 w-4"})," Secret Recovery Phrase"]}),(0,r.jsx)(g,{text:v})]}),(0,r.jsx)("p",{className:"rounded-md border border-slate-800 bg-slate-950 p-3 text-center font-mono text-sm leading-relaxed tracking-wide text-slate-200",children:v})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-md border border-slate-700 bg-slate-800/50 px-4 py-3 text-sm text-slate-300 transition-colors hover:bg-slate-800",children:[(0,r.jsx)("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-slate-600 bg-slate-900 text-cfx-500 focus:ring-cfx-500 focus:ring-offset-slate-900",checked:R,onChange:e=>I(e.target.checked)}),"I have securely saved this mnemonic phrase"]})]}):(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Recovery Phrase (12 or 24 words)"}),(0,r.jsx)("textarea",{className:"flex min-h-[80px] w-full rounded-md border border-slate-700 bg-slate-950 px-3 py-2 font-mono text-sm text-blue-100 placeholder:text-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cfx-500",value:w,onChange:e=>j(e.target.value),placeholder:"word1 word2 word3 …"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Wallet Label"}),(0,r.jsx)(p.I,{value:N,onChange:e=>k(e.target.value),placeholder:"Main Wallet"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)(h._,{children:["Encrypt with password ",(0,r.jsx)("span",{className:"font-normal text-slate-500",children:"(optional)"})]}),(0,r.jsx)(p.I,{type:"password",value:C,onChange:e=>S(e.target.value),placeholder:"Leave blank for none"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Confirm password"}),(0,r.jsx)(p.I,{type:"password",value:_,onChange:e=>T(e.target.value)})]})]}),(E||z.error)&&(0,r.jsx)("div",{className:"rounded-md border border-red-900/50 bg-red-950/30 p-3 text-sm text-red-500",children:E||(null===(t=z.error)||void 0===t?void 0:t.message)})]})}),"confirm"===o&&(0,r.jsxs)(x.eW,{className:"flex justify-between border-t border-slate-800 bg-slate-900/30 pt-6",children:[(0,r.jsx)(m.z,{variant:"ghost",onClick:()=>{b("choose"),y(""),j(""),P(""),I(!1)},children:"Back"}),(0,r.jsx)(m.z,{disabled:!v&&!w.trim()||!!v&&!R||z.isPending,onClick:()=>z.mutate(),children:z.isPending?"Setting up…":"Complete Setup"})]})]})})}},3368:function(e,t,s){s.d(t,{z:function(){return c}});var r=s(5853),n=s(4254),a=s(1145),l=s(5460),o=s(8337);let i=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-cfx-500 text-white hover:bg-cfx-600",destructive:"bg-red-500 text-destructive-foreground hover:bg-red-500/90",outline:"border border-slate-700 bg-transparent hover:bg-slate-800 text-white",secondary:"bg-slate-800 text-slate-100 hover:bg-slate-700",ghost:"hover:bg-slate-800 hover:text-slate-100",link:"text-cfx-500 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>{let{className:s,variant:n,size:l,asChild:c=!1,...d}=e,u=c?a.g7:"button";return(0,r.jsx)(u,{className:(0,o.cn)(i({variant:n,size:l,className:s})),ref:t,...d})});c.displayName="Button"},5570:function(e,t,s){s.d(t,{Ol:function(){return o},SZ:function(){return c},Zb:function(){return l},aY:function(){return d},eW:function(){return u},ll:function(){return i}});var r=s(5853),n=s(4254),a=s(8337);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-xl border border-slate-800 bg-slate-900/50 text-slate-100 shadow",s),...n})});l.displayName="Card";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",s),...n})});o.displayName="CardHeader";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,a.cn)("font-semibold leading-none tracking-tight",s),...n})});i.displayName="CardTitle";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,a.cn)("text-sm text-slate-400",s),...n})});c.displayName="CardDescription";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",s),...n})});d.displayName="CardContent";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",s),...n})});u.displayName="CardFooter"},2566:function(e,t,s){s.d(t,{I:function(){return l}});var r=s(5853),n=s(4254),a=s(8337);let l=n.forwardRef((e,t)=>{let{className:s,type:n,...l}=e;return(0,r.jsx)("input",{type:n,className:(0,a.cn)("flex h-10 w-full rounded-md border border-slate-700 bg-slate-950 px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cfx-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...l})});l.displayName="Input"},9510:function(e,t,s){s.d(t,{_:function(){return c}});var r=s(5853),n=s(4254),a=s(5307),l=s(5460),o=s(8337);let i=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-slate-300"),c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)(a.f,{ref:t,className:(0,o.cn)(i(),s),...n})});c.displayName=a.f.displayName},8144:function(e,t,s){s.d(t,{N9:function(){return f},SC:function(){return g},SX:function(){return m},Vp:function(){return x},fA:function(){return h},mI:function(){return p},pJ:function(){return b}});var r,n=s(2608);let a="".concat(null!==(r=n.env.NEXT_PUBLIC_API_URL)&&void 0!==r?r:"","/api");async function l(e,t,s){let r=await fetch("".concat(a).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!r.ok){var n;throw Error(null!==(n=(await r.json().catch(()=>({error:r.statusText}))).error)&&void 0!==n?n:r.statusText)}return r.json()}let o=e=>l("GET",e),i=(e,t)=>l("POST",e,t),c=e=>l("DELETE",e),d=(e,t)=>l("PUT",e,t),u=(e,t)=>l("PATCH",e,t),f={status:()=>o("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},m={list:()=>o("/accounts"),faucet:()=>o("/accounts/faucet"),fund:(e,t,s)=>i("/accounts/fund",{address:e,amount:t,chain:s})},x={templates:()=>o("/contracts/templates"),template:e=>o("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>o("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>c("/contracts/deployed/".concat(e)),call:(e,t,s,r)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:r})},p={status:()=>o("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},h={config:()=>o("/network/config"),updateConfig:e=>d("/network/config",e),rpcUrls:()=>o("/network/rpc-urls")},g={status:()=>o("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>o("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),renameWallet:(e,t)=>u("/keystore/wallets/".concat(e),{label:t}),deleteWallet:e=>c("/keystore/wallets/".concat(e))},b={get:()=>o("/settings")}},8337:function(e,t,s){s.d(t,{cn:function(){return a}});var r=s(4685),n=s(4004);function a(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,n.m6)((0,r.W)(t))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[396],{4396:function(e,t,s){s.d(t,{M:function(){return b}});var r=s(5853),n=s(4852),a=s(6632),l=s(9928),o=s(3264),i=s(9754),c=s(6475),d=s(5061),u=s(4254),f=s(8144),m=s(3368),x=s(5570),p=s(2566),h=s(9510);function g(e){let{text:t}=e,[s,n]=(0,u.useState)(!1);return(0,r.jsx)("button",{type:"button",title:"Copy",className:"rounded p-1.5 text-slate-400 hover:bg-slate-800 hover:text-white transition-colors",onClick:async()=>{await navigator.clipboard.writeText(t),n(!0),setTimeout(()=>n(!1),1500)},children:s?(0,r.jsx)(l.Z,{className:"h-4 w-4 text-green-400"}):(0,r.jsx)(o.Z,{className:"h-4 w-4"})})}function b(e){var t;let{onDone:s}=e,l=(0,n.NL)(),[o,b]=(0,u.useState)("choose"),[v,y]=(0,u.useState)(""),[w,j]=(0,u.useState)(""),[N,k]=(0,u.useState)("Default"),[C,S]=(0,u.useState)(""),[_,T]=(0,u.useState)(""),[P,E]=(0,u.useState)(""),[R,I]=(0,u.useState)(!1),W=(0,a.D)({mutationFn:f.SC.generate,onSuccess:e=>{y(e.mnemonic),j(e.mnemonic),b("confirm")}}),z=(0,a.D)({mutationFn:()=>{if(C&&C!==_)throw Error("Passwords do not match");return f.SC.setup({mnemonic:w.trim(),label:N.trim()||"Default",password:C||void 0})},onSuccess:()=>{l.invalidateQueries({queryKey:["keystore"]}),null==s||s()},onError:e=>E(e.message)});return(0,r.jsx)("div",{className:"flex w-full justify-center p-4",children:(0,r.jsxs)(x.Zb,{className:"w-full max-w-lg border-cfx-500/20 shadow-[0_0_30px_-10px_rgba(14,165,233,0.15)]",children:[(0,r.jsxs)(x.Ol,{children:[(0,r.jsx)(x.ll,{className:"text-xl",children:"First-time Setup"}),(0,r.jsx)(x.SZ,{children:"Create or import a mnemonic to derive genesis accounts for your local Conflux node. The mnemonic is stored encrypted on disk."})]}),(0,r.jsx)(x.aY,{children:"choose"===o?(0,r.jsxs)("div",{className:"flex flex-col gap-4 py-4",children:[(0,r.jsxs)(m.z,{size:"lg",className:"w-full flex items-center justify-center gap-2",disabled:W.isPending,onClick:()=>W.mutate(),children:[(0,r.jsx)(i.Z,{className:"h-5 w-5 ".concat(W.isPending?"animate-spin":"")}),"Generate New Mnemonic"]}),(0,r.jsxs)("div",{className:"relative my-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("span",{className:"w-full border-t border-slate-800"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-xs uppercase",children:(0,r.jsx)("span",{className:"bg-slate-900/50 px-2 text-slate-500",children:"Or integrate your own"})})]}),(0,r.jsxs)(m.z,{variant:"outline",size:"lg",className:"w-full flex items-center justify-center gap-2",onClick:()=>{y(""),j(""),b("confirm")},children:[(0,r.jsx)(c.Z,{className:"h-5 w-5"}),"Import Existing Mnemonic"]})]}):(0,r.jsxs)("div",{className:"space-y-6",children:[v?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-cfx-500/30 bg-cfx-900/10 p-4 shadow-inner",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-medium text-cfx-400",children:[(0,r.jsx)(d.Z,{className:"h-4 w-4"})," Secret Recovery Phrase"]}),(0,r.jsx)(g,{text:v})]}),(0,r.jsx)("p",{className:"rounded-md border border-slate-800 bg-slate-950 p-3 text-center font-mono text-sm leading-relaxed tracking-wide text-slate-200",children:v})]}),(0,r.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-md border border-slate-700 bg-slate-800/50 px-4 py-3 text-sm text-slate-300 transition-colors hover:bg-slate-800",children:[(0,r.jsx)("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-slate-600 bg-slate-900 text-cfx-500 focus:ring-cfx-500 focus:ring-offset-slate-900",checked:R,onChange:e=>I(e.target.checked)}),"I have securely saved this mnemonic phrase"]})]}):(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Recovery Phrase (12 or 24 words)"}),(0,r.jsx)("textarea",{className:"flex min-h-[80px] w-full rounded-md border border-slate-700 bg-slate-950 px-3 py-2 font-mono text-sm text-blue-100 placeholder:text-slate-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cfx-500",value:w,onChange:e=>j(e.target.value),placeholder:"word1 word2 word3 …"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Wallet Label"}),(0,r.jsx)(p.I,{value:N,onChange:e=>k(e.target.value),placeholder:"Main Wallet"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)(h._,{children:["Encrypt with password ",(0,r.jsx)("span",{className:"font-normal text-slate-500",children:"(optional)"})]}),(0,r.jsx)(p.I,{type:"password",value:C,onChange:e=>S(e.target.value),placeholder:"Leave blank for none"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(h._,{children:"Confirm password"}),(0,r.jsx)(p.I,{type:"password",value:_,onChange:e=>T(e.target.value)})]})]}),(P||z.error)&&(0,r.jsx)("div",{className:"rounded-md border border-red-900/50 bg-red-950/30 p-3 text-sm text-red-500",children:P||(null===(t=z.error)||void 0===t?void 0:t.message)})]})}),"confirm"===o&&(0,r.jsxs)(x.eW,{className:"flex justify-between border-t border-slate-800 bg-slate-900/30 pt-6",children:[(0,r.jsx)(m.z,{variant:"ghost",onClick:()=>{b("choose"),y(""),j(""),E(""),I(!1)},children:"Back"}),(0,r.jsx)(m.z,{disabled:!v&&!w.trim()||!!v&&!R||z.isPending,onClick:()=>z.mutate(),children:z.isPending?"Setting up…":"Complete Setup"})]})]})})}},3368:function(e,t,s){s.d(t,{z:function(){return c}});var r=s(5853),n=s(4254),a=s(1145),l=s(5460),o=s(8337);let i=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-cfx-500 text-white hover:bg-cfx-600",destructive:"bg-red-500 text-destructive-foreground hover:bg-red-500/90",outline:"border border-slate-700 bg-transparent hover:bg-slate-800 text-white",secondary:"bg-slate-800 text-slate-100 hover:bg-slate-700",ghost:"hover:bg-slate-800 hover:text-slate-100",link:"text-cfx-500 underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>{let{className:s,variant:n,size:l,asChild:c=!1,...d}=e,u=c?a.g7:"button";return(0,r.jsx)(u,{className:(0,o.cn)(i({variant:n,size:l,className:s})),ref:t,...d})});c.displayName="Button"},5570:function(e,t,s){s.d(t,{Ol:function(){return o},SZ:function(){return c},Zb:function(){return l},aY:function(){return d},eW:function(){return u},ll:function(){return i}});var r=s(5853),n=s(4254),a=s(8337);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("rounded-xl border border-slate-800 bg-slate-900/50 text-slate-100 shadow",s),...n})});l.displayName="Card";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-6",s),...n})});o.displayName="CardHeader";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("h3",{ref:t,className:(0,a.cn)("font-semibold leading-none tracking-tight",s),...n})});i.displayName="CardTitle";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("p",{ref:t,className:(0,a.cn)("text-sm text-slate-400",s),...n})});c.displayName="CardDescription";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("p-6 pt-0",s),...n})});d.displayName="CardContent";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,a.cn)("flex items-center p-6 pt-0",s),...n})});u.displayName="CardFooter"},2566:function(e,t,s){s.d(t,{I:function(){return l}});var r=s(5853),n=s(4254),a=s(8337);let l=n.forwardRef((e,t)=>{let{className:s,type:n,...l}=e;return(0,r.jsx)("input",{type:n,className:(0,a.cn)("flex h-10 w-full rounded-md border border-slate-700 bg-slate-950 px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cfx-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...l})});l.displayName="Input"},9510:function(e,t,s){s.d(t,{_:function(){return c}});var r=s(5853),n=s(4254),a=s(5307),l=s(5460),o=s(8337);let i=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-slate-300"),c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,r.jsx)(a.f,{ref:t,className:(0,o.cn)(i(),s),...n})});c.displayName=a.f.displayName},8144:function(e,t,s){s.d(t,{N9:function(){return f},SC:function(){return g},SX:function(){return m},Vp:function(){return x},fA:function(){return h},mI:function(){return p},pJ:function(){return b}});var r,n=s(2608);let a="".concat(null!==(r=n.env.NEXT_PUBLIC_API_URL)&&void 0!==r?r:"","/api");async function l(e,t,s){let r=await fetch("".concat(a).concat(t),{method:e,headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0});if(!r.ok){var n;throw Error(null!==(n=(await r.json().catch(()=>({error:r.statusText}))).error)&&void 0!==n?n:r.statusText)}return r.json()}let o=e=>l("GET",e),i=(e,t)=>l("POST",e,t),c=e=>l("DELETE",e),d=(e,t)=>l("PUT",e,t),u=(e,t)=>l("PATCH",e,t),f={status:()=>o("/node/status"),start:()=>i("/node/start"),stop:()=>i("/node/stop"),restart:()=>i("/node/restart"),restartWipe:()=>i("/node/restart-wipe"),wipe:()=>i("/node/wipe")},m={list:()=>o("/accounts"),faucet:()=>o("/accounts/faucet"),fund:async(e,t,s)=>{let r=await fetch("/api/accounts/fund",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({address:e,amount:t,chain:s})});return await r.json()}},x={templates:()=>o("/contracts/templates"),template:e=>o("/contracts/templates/".concat(e)),compile:(e,t)=>i("/contracts/compile",{source:e,contractName:t}),deploy:e=>i("/contracts/deploy",e),deployed:e=>o("/contracts/deployed".concat(e?"?chain=".concat(e):"")),deleteDeployed:e=>c("/contracts/deployed/".concat(e)),call:(e,t,s,r)=>i("/contracts/".concat(e,"/call"),{functionName:t,args:s,accountIndex:r})},p={status:()=>o("/mining/status"),mine:e=>i("/mining/mine",{blocks:e}),start:e=>i("/mining/start",{intervalMs:e}),stop:()=>i("/mining/stop")},h={config:()=>o("/network/config"),updateConfig:e=>d("/network/config",e),rpcUrls:()=>o("/network/rpc-urls")},g={status:()=>o("/keystore/status"),generate:()=>i("/keystore/generate"),setup:e=>i("/keystore/setup",e),unlock:e=>i("/keystore/unlock",{password:e}),lock:()=>i("/keystore/lock"),wallets:()=>o("/keystore/wallets"),addWallet:(e,t)=>i("/keystore/wallets",{mnemonic:e,label:t}),activateWallet:e=>i("/keystore/wallets/".concat(e,"/activate")),renameWallet:(e,t)=>u("/keystore/wallets/".concat(e),{label:t}),deleteWallet:e=>c("/keystore/wallets/".concat(e))},b={get:()=>o("/settings")}},8337:function(e,t,s){s.d(t,{cn:function(){return a}});var r=s(4685),n=s(4004);function a(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,n.m6)((0,r.W)(t))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[476],{5710:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},758:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},6970:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},1494:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]])},5227:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},9924:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},1464:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},8386:function(e,t,r){r.d(t,{Z:function(){return n}});let n=(0,r(3035).Z)("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},3916:function(e,t,r){function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e){return function t(){for(var r=this,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function c(e){return({}).toString.call(e).includes("Object")}function a(e){return"function"==typeof e}r.d(t,{ZP:function(){return U}});var l,d,s=u(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),f=function(e,t){return c(t)||s("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&s("changeField"),t},h=function(e){a(e)||s("selectorType")},p=function(e){a(e)||c(e)||s("handlerType"),c(e)&&Object.values(e).some(function(e){return!a(e)})&&s("handlersType")},g=function(e){e||s("initialIsRequired"),c(e)||s("initialType"),Object.keys(e).length||s("initialContent")};function y(e,t){return a(t)?t(e.current):t}function m(e,t){return e.current=i(i({},e.current),t),t}function v(e,t,r){return a(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null===(n=t[r])||void 0===n?void 0:n.call(t,e.current[r])}),r}(l=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=l.length?l.apply(this,n):function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})({configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "});var b=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},w={type:"cancelation",msg:"operation is manually canceled"};function M(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(w):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var k=function(e){if(Array.isArray(e))return e}(d=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(e),p(t);var r={current:e},n=u(v)(r,t),o=u(m)(r),i=u(f)(e),c=u(y)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return h(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,o,i,c)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,u,c=[],a=!0,l=!1;try{for(i=(r=r.call(e)).next;!(a=(n=i.call(r)).done)&&(c.push(n.value),2!==c.length);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return c}}(d,2)||function(e,t){if(e){if("string"==typeof e)return n(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,2):void 0}}(d,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),j=k[0],O=k[1];function E(e){return document.body.appendChild(e)}function R(e){var t,r,n=j(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function x(){var e=j(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var r=t.m||t;C(r),e.resolve(r)},function(t){e.reject(t)})}function C(e){j().monaco||O({monaco:e})}var P=new Promise(function(e,t){return O({resolve:e,reject:t})}),S=function(){var e=j(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(O({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),M(P);if(window.monaco&&window.monaco.editor)return C(window.monaco),e.resolve(window.monaco),M(P);b(E,R)(x)}return M(P)},T=r(4254),V={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},A={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},Z=function({children:e}){return T.createElement("div",{style:A},e)},L=(0,T.memo)(function({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:u}){return T.createElement("section",{style:{...V.wrapper,width:e,height:t},...u},!r&&T.createElement(Z,null,n),T.createElement("div",{ref:o,style:{...V.fullWidth,...!r&&V.hide},className:i}))}),I=function(e){(0,T.useEffect)(e,[])},z=function(e,t,r=!0){let n=(0,T.useRef)(!0);(0,T.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function q(){}function D(e,t,r,n){return e.editor.getModel(N(e,n))||e.editor.createModel(t,r,n?N(e,n):void 0)}function N(e,t){return e.Uri.parse(t)}(0,T.memo)(function({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:u,keepCurrentOriginalModel:c=!1,keepCurrentModifiedModel:a=!1,theme:l="light",loading:d="Loading...",options:s={},height:f="100%",width:h="100%",className:p,wrapperProps:g={},beforeMount:y=q,onMount:m=q}){let[v,b]=(0,T.useState)(!1),[w,M]=(0,T.useState)(!0),k=(0,T.useRef)(null),j=(0,T.useRef)(null),O=(0,T.useRef)(null),E=(0,T.useRef)(m),R=(0,T.useRef)(y),x=(0,T.useRef)(!1);I(()=>{let e=S();return e.then(e=>(j.current=e)&&M(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return k.current?(t=k.current?.getModel(),void(c||t?.original?.dispose(),a||t?.modified?.dispose(),k.current?.dispose())):e.cancel()}}),z(()=>{if(k.current&&j.current){let t=k.current.getOriginalEditor(),o=D(j.current,e||"",n||r||"text",i||"");o!==t.getModel()&&t.setModel(o)}},[i],v),z(()=>{if(k.current&&j.current){let e=k.current.getModifiedEditor(),n=D(j.current,t||"",o||r||"text",u||"");n!==e.getModel()&&e.setModel(n)}},[u],v),z(()=>{let e=k.current.getModifiedEditor();e.getOption(j.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],v),z(()=>{k.current?.getModel()?.original.setValue(e||"")},[e],v),z(()=>{let{original:e,modified:t}=k.current.getModel();j.current.editor.setModelLanguage(e,n||r||"text"),j.current.editor.setModelLanguage(t,o||r||"text")},[r,n,o],v),z(()=>{j.current?.editor.setTheme(l)},[l],v),z(()=>{k.current?.updateOptions(s)},[s],v);let C=(0,T.useCallback)(()=>{if(!j.current)return;R.current(j.current);let c=D(j.current,e||"",n||r||"text",i||""),a=D(j.current,t||"",o||r||"text",u||"");k.current?.setModel({original:c,modified:a})},[r,t,o,e,n,i,u]),P=(0,T.useCallback)(()=>{!x.current&&O.current&&(k.current=j.current.editor.createDiffEditor(O.current,{automaticLayout:!0,...s}),C(),j.current?.editor.setTheme(l),b(!0),x.current=!0)},[s,l,C]);return(0,T.useEffect)(()=>{v&&E.current(k.current,j.current)},[v]),(0,T.useEffect)(()=>{w||v||P()},[w,v,P]),T.createElement(L,{width:h,height:f,isEditorReady:v,loading:d,_ref:O,className:p,wrapperProps:g})});var _=function(e){let t=(0,T.useRef)();return(0,T.useEffect)(()=>{t.current=e},[e]),t.current},F=new Map,U=(0,T.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:u="light",line:c,loading:a="Loading...",options:l={},overrideServices:d={},saveViewState:s=!0,keepCurrentModel:f=!1,width:h="100%",height:p="100%",className:g,wrapperProps:y={},beforeMount:m=q,onMount:v=q,onChange:b,onValidate:w=q}){let[M,k]=(0,T.useState)(!1),[j,O]=(0,T.useState)(!0),E=(0,T.useRef)(null),R=(0,T.useRef)(null),x=(0,T.useRef)(null),C=(0,T.useRef)(v),P=(0,T.useRef)(m),V=(0,T.useRef)(),A=(0,T.useRef)(n),Z=_(i),N=(0,T.useRef)(!1),U=(0,T.useRef)(!1);I(()=>{let e=S();return e.then(e=>(E.current=e)&&O(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>R.current?void(V.current?.dispose(),f?s&&F.set(i,R.current.saveViewState()):R.current.getModel()?.dispose(),R.current.dispose()):e.cancel()}),z(()=>{let u=D(E.current,e||n||"",t||o||"",i||r||"");u!==R.current?.getModel()&&(s&&F.set(Z,R.current?.saveViewState()),R.current?.setModel(u),s&&R.current?.restoreViewState(F.get(i)))},[i],M),z(()=>{R.current?.updateOptions(l)},[l],M),z(()=>{R.current&&void 0!==n&&(R.current.getOption(E.current.editor.EditorOption.readOnly)?R.current.setValue(n):n===R.current.getValue()||(U.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),R.current.pushUndoStop(),U.current=!1))},[n],M),z(()=>{let e=R.current?.getModel();e&&o&&E.current?.editor.setModelLanguage(e,o)},[o],M),z(()=>{void 0!==c&&R.current?.revealLine(c)},[c],M),z(()=>{E.current?.editor.setTheme(u)},[u],M);let H=(0,T.useCallback)(()=>{if(!(!x.current||!E.current)&&!N.current){P.current(E.current);let a=i||r,f=D(E.current,n||e||"",t||o||"",a||"");R.current=E.current?.editor.create(x.current,{model:f,automaticLayout:!0,...l},d),s&&R.current.restoreViewState(F.get(a)),E.current.editor.setTheme(u),void 0!==c&&R.current.revealLine(c),k(!0),N.current=!0}},[e,t,r,n,o,i,l,d,s,u,c]);return(0,T.useEffect)(()=>{M&&C.current(R.current,E.current)},[M]),(0,T.useEffect)(()=>{j||M||H()},[j,M,H]),A.current=n,(0,T.useEffect)(()=>{M&&b&&(V.current?.dispose(),V.current=R.current?.onDidChangeModelContent(e=>{U.current||b(R.current.getValue(),e)}))},[M,b]),(0,T.useEffect)(()=>{if(M){let e=E.current.editor.onDidChangeMarkers(e=>{let t=R.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=E.current.editor.getModelMarkers({resource:t});w?.(e)}});return()=>{e?.dispose()}}return()=>{}},[M,w]),T.createElement(L,{width:h,height:p,isEditorReady:M,loading:a,_ref:x,className:g,wrapperProps:y})})}}]);