@abtnode/webapp 1.16.44-beta-20250524-065731-c62fd374 → 1.16.44-beta-20250527-130401-1b9ae926

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 (209) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Ya0Tkzui.js → AdapterDayjs-jFq0UWbd.js} +1 -1
  4. package/dist/assets/{Add-vyucM1MD.js → Add-DTqXwW0N.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-BVHo6VNz.js → ArrowDropDown-0HCdgPxM.js} +1 -1
  6. package/dist/assets/{Autocomplete-C_R7YtwM.js → Autocomplete-BYtQlJN2.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-eYOJXRep.js → Breadcrumbs-CgmOQ_4k.js} +1 -1
  8. package/dist/assets/{ButtonGroup-Cp8sWSdF.js → ButtonGroup-DqXuhqTn.js} +1 -1
  9. package/dist/assets/{CSSTransition-d6EHqfk8.js → CSSTransition-CSF6lDgV.js} +1 -1
  10. package/dist/assets/{CallMerge-nboKm4gG.js → CallMerge-BAR1CVFk.js} +1 -1
  11. package/dist/assets/{CardContent-DHc1AXCs.js → CardContent-BqJnOH3m.js} +1 -1
  12. package/dist/assets/{ChevronLeft-DmdgKXCA.js → ChevronLeft-CGdwfN-l.js} +1 -1
  13. package/dist/assets/{ChevronRight-DFxx5dFa.js → ChevronRight-Bj9Dx-t_.js} +1 -1
  14. package/dist/assets/{Clear-DrOnDNTP.js → Clear-CRBYarsa.js} +1 -1
  15. package/dist/assets/{Close-sya_c106.js → Close-C9PKpEMp.js} +1 -1
  16. package/dist/assets/{Community-BB0OHjQZ.js → Community-CBnFvaWW.js} +1 -1
  17. package/dist/assets/{Delete-D8DGfKnA.js → Delete-C3LWwjqe.js} +1 -1
  18. package/dist/assets/{Delete-D7UsMv75.js → Delete-DlSWg7eg.js} +1 -1
  19. package/dist/assets/{DeleteOutline-Dy3XN37O.js → DeleteOutline-5qAShT9Y.js} +1 -1
  20. package/dist/assets/{Done-BlReYZMv.js → Done-CFH2iz5e.js} +1 -1
  21. package/dist/assets/{Edit-DlDL6nlu.js → Edit-Co5BQerz.js} +1 -1
  22. package/dist/assets/{ErrorOutline-DGBTyuN9.js → ErrorOutline-QNgelF6z.js} +1 -1
  23. package/dist/assets/{HelpOutline-DQocqVbI.js → HelpOutline-DeEYOkJi.js} +1 -1
  24. package/dist/assets/{Holiday-SoNu_e3S.js → Holiday-CtZZm1wa.js} +1 -1
  25. package/dist/assets/{Launch-BcEtYwUN.js → Launch-BRFCKSJq.js} +1 -1
  26. package/dist/assets/{Link-DMAOQEaD.js → Link-CXQij6OR.js} +1 -1
  27. package/dist/assets/{ListItemButton-Cd86uA8s.js → ListItemButton-DzUr79Sz.js} +1 -1
  28. package/dist/assets/{ListSubheader-CWe8uMl_.js → ListSubheader-DQqgb2yu.js} +1 -1
  29. package/dist/assets/{LoadingButton-_33Wbcka.js → LoadingButton-D2TB2UiI.js} +1 -1
  30. package/dist/assets/{LockIcon-C1gMru9s.js → LockIcon-BPfDiFv0.js} +1 -1
  31. package/dist/assets/{Meeting-B_MOg78g.js → Meeting-BKSUCsIc.js} +1 -1
  32. package/dist/assets/{MoreHoriz-BVM6ZvkQ.js → MoreHoriz-Bx_Om50v.js} +1 -1
  33. package/dist/assets/{MoreVert-DrmdrfKG.js → MoreVert-w75snDQs.js} +1 -1
  34. package/dist/assets/{OffSick-CBf0VXpG.js → OffSick-D6cKjiM0.js} +1 -1
  35. package/dist/assets/{OpenInNew-TfvhaxfR.js → OpenInNew-CSKLA26V.js} +1 -1
  36. package/dist/assets/{Public-W3s_KxzH.js → Public-BhHHVMRE.js} +1 -1
  37. package/dist/assets/{Refresh-BdO98q14.js → Refresh-BwkLbOVU.js} +1 -1
  38. package/dist/assets/{SchemaReference.es-DGbTW6OP.js → SchemaReference.es-CokzFsv5.js} +1 -1
  39. package/dist/assets/{Search-DKuHv8M8.js → Search-YHtyGibW.js} +1 -1
  40. package/dist/assets/{Slider-DMP9Hffx.js → Slider-IbRqxtbE.js} +1 -1
  41. package/dist/assets/{Stepper-DdasaU2s.js → Stepper-CnVr1egz.js} +1 -1
  42. package/dist/assets/{Switch-DfGEjwNI.js → Switch-Dt84DR0H.js} +1 -1
  43. package/dist/assets/{TableRow-BDQ_dPBw.js → TableRow-Bvi-hC54.js} +1 -1
  44. package/dist/assets/{TableSearch-ChRlsNNH.js → TableSearch-3PXeI6hz.js} +1 -1
  45. package/dist/assets/{ToggleButtonGroup-BW1473-p.js → ToggleButtonGroup-CeXjKQIC.js} +1 -1
  46. package/dist/assets/{Verified-CZBfc5pw.js → Verified-CDTmywG7.js} +1 -1
  47. package/dist/assets/{VerifiedUser-DiU4MDB9.js → VerifiedUser-CFJTQaF3.js} +1 -1
  48. package/dist/assets/{ViewColumn-B7Xk5ARl.js → ViewColumn-lUXnk2yu.js} +1 -1
  49. package/dist/assets/{ViewList-B--u8ibW.js → ViewList-DRI2pLPW.js} +1 -1
  50. package/dist/assets/{WorkingRemotely-BCi7ND_X.js → WorkingRemotely-ny604xCG.js} +1 -1
  51. package/dist/assets/{_createAggregator-By4vHkC1.js → _createAggregator-ClP6Cm9L.js} +1 -1
  52. package/dist/assets/{actions-DvzQl_Or.js → actions-Bv8xSPmq.js} +1 -1
  53. package/dist/assets/{actions-BEYxITf3.js → actions-CuQoe9ro.js} +1 -1
  54. package/dist/assets/{agreement-CO1oaG4U.js → agreement-lauLYxz3.js} +1 -1
  55. package/dist/assets/api-Bwpwhvmw.js +1 -0
  56. package/dist/assets/{appearance-D4sr2Al-.js → appearance-R6pCalNk.js} +1 -1
  57. package/dist/assets/{audit-logs-DvNg1xOc.js → audit-logs-PeOew4LK.js} +1 -1
  58. package/dist/assets/{base-chart-BnAGSQiO.js → base-chart-BHYVZ1Je.js} +1 -1
  59. package/dist/assets/{blocklet-Du6aD5YD.js → blocklet-ztLpKfcq.js} +1 -1
  60. package/dist/assets/{brace-fold.es-BhsfDth6.js → brace-fold.es-D0r7X0ju.js} +1 -1
  61. package/dist/assets/{chain-CErzqG7n.js → chain-DGcvJwBH.js} +1 -1
  62. package/dist/assets/{click-to-copy-CncLv_eo.js → click-to-copy-C-Mvzzk0.js} +1 -1
  63. package/dist/assets/cloneDeep-CQRRTnm9.js +1 -0
  64. package/dist/assets/{closebrackets.es-h8XaKTaJ.js → closebrackets.es-DaqRgn_7.js} +1 -1
  65. package/dist/assets/{codemirror.es-DqB0S7L8.js → codemirror.es-CfIYuCsS.js} +1 -1
  66. package/dist/assets/{collapse-B_sprtzE.js → collapse-CtX6Q5OE.js} +1 -1
  67. package/dist/assets/{comment.es-hn2D835n.js → comment.es-Obb_rrHd.js} +1 -1
  68. package/dist/assets/config-navigation-d-hkol10.js +86 -0
  69. package/dist/assets/{connect-to-B7dWMR7-.js → connect-to-_sVZRdFn.js} +1 -1
  70. package/dist/assets/{delete-confirm-Dc4Idkhh.js → delete-confirm-8IsMhNfe.js} +1 -1
  71. package/dist/assets/{detail-Bcwuj-Z8.js → detail-uVfu7mmV.js} +3 -3
  72. package/dist/assets/{dialog.es-D6z5SXqy.js → dialog.es-SmbBknMt.js} +1 -1
  73. package/dist/assets/{domains-8LtEeVFd.js → domains-DVbEaFc-.js} +1 -1
  74. package/dist/assets/{download-_eNLnjej.js → download-BhaEzFmY.js} +1 -1
  75. package/dist/assets/emotion-react.browser.esm-C7FmDYVX.js +1 -0
  76. package/dist/assets/{foldgutter.es-By_AD9pY.js → foldgutter.es-CnQ7PIpm.js} +1 -1
  77. package/dist/assets/{get-safe-url-CDryGGz-.js → get-safe-url-BnKD7fjX.js} +1 -1
  78. package/dist/assets/{get-safe-url-_R_QaUZE.js → get-safe-url-CtJu_FcU.js} +1 -1
  79. package/dist/assets/getValidReactChildren-C169OtBB.js +1 -0
  80. package/dist/assets/{hint.es-BqOOmSp1.js → hint.es-gkCfoe9H.js} +1 -1
  81. package/dist/assets/{hint.es2-BGrgopbP.js → hint.es2-CwjbpV60.js} +1 -1
  82. package/dist/assets/{iframe-URPfOlK1.js → iframe-B5FbPH5I.js} +1 -1
  83. package/dist/assets/{index-CRtLd5UM.js → index-B0SCwFpt.js} +1 -1
  84. package/dist/assets/{index-B_i6fZH5.js → index-BBUEHNQ4.js} +1 -1
  85. package/dist/assets/{index-BSQHT_8r.js → index-BGANteup.js} +1 -1
  86. package/dist/assets/{index-BzbMPxHK.js → index-BOob6bmx.js} +5 -5
  87. package/dist/assets/{index-plNeco5d.js → index-BPPbe7Ly.js} +1 -1
  88. package/dist/assets/{index-BAH7Je7Q.js → index-BPe1hR7R.js} +3 -3
  89. package/dist/assets/{index-Du-Kz75O.js → index-BbonVJKD.js} +107 -107
  90. package/dist/assets/{index-BQNrdTnJ.js → index-Bk6_2RlM.js} +1 -1
  91. package/dist/assets/{index-CadaB0Sg.js → index-Bs8cSBPh.js} +1 -1
  92. package/dist/assets/{index-oK61Xy_F.js → index-BsFHSz5F.js} +1 -1
  93. package/dist/assets/{index-D3-rcHEU.js → index-C0SfTeU5.js} +1 -1
  94. package/dist/assets/{index-Y6I_8_UQ.js → index-C1Pho2dB.js} +1 -1
  95. package/dist/assets/{index-D9jgAYqW.js → index-CEhsrtIa.js} +1 -1
  96. package/dist/assets/{index-CrUuY0ZN.js → index-CJxcYJLK.js} +1 -1
  97. package/dist/assets/{index-75rQi1ga.js → index-CMsTph0_.js} +7 -7
  98. package/dist/assets/{index-B9ZlhfE8.js → index-CNVBgJcy.js} +1 -1
  99. package/dist/assets/{index-D3V8aaOn.js → index-CS2M01En.js} +1 -1
  100. package/dist/assets/{index-CRF1hEfq.js → index-CTjLU7vX.js} +1 -1
  101. package/dist/assets/{index-DYlwyXyK.js → index-CVOEL3Gp.js} +1 -1
  102. package/dist/assets/{index-CBcemQK9.js → index-C_84W9Fm.js} +1 -1
  103. package/dist/assets/{index-BqlDbLGQ.js → index-CaIW_cPG.js} +1 -1
  104. package/dist/assets/{index-CbZf7zfK.js → index-Cha8AEfb.js} +1 -1
  105. package/dist/assets/{index-vf9V55I2.js → index-Cotu4R77.js} +1 -1
  106. package/dist/assets/{index-CPNlNIfH.js → index-CtuwR1sA.js} +1 -1
  107. package/dist/assets/{index-C2lXYqTy.js → index-CxHMQs9m.js} +1 -1
  108. package/dist/assets/{index-BgVPijgr.js → index-CxYFOfNB.js} +1 -1
  109. package/dist/assets/{index-CZbEKds4.js → index-DA6HVDyx.js} +1 -1
  110. package/dist/assets/{index-BdwCPXSB.js → index-DFrfo67i.js} +1 -1
  111. package/dist/assets/{index-CYfBrDWV.js → index-DGB-iK2Y.js} +1 -1
  112. package/dist/assets/{index-CNFZ70Yt.js → index-DG_FSP3T.js} +1 -1
  113. package/dist/assets/index-DGa0JEU6.js +1 -0
  114. package/dist/assets/index-DJaOwfhS.js +41 -0
  115. package/dist/assets/{index-B1wgcA7Q.js → index-DJt958VA.js} +1 -1
  116. package/dist/assets/{index-BcahztlF.js → index-DLWDtECG.js} +1 -1
  117. package/dist/assets/{index-DodFq04o.js → index-DMWWH-Y9.js} +3 -3
  118. package/dist/assets/{index-BSer6KoU.js → index-DP9Hxqjf.js} +3 -3
  119. package/dist/assets/{index-DqzlTEMU.js → index-DUntKj7y.js} +1 -1
  120. package/dist/assets/{index-CgOsU395.js → index-DmtgaYFg.js} +1 -1
  121. package/dist/assets/{index-I8Mrhfm9.js → index-GIIeTjtx.js} +1 -1
  122. package/dist/assets/index-IK7f-_29.js +6 -0
  123. package/dist/assets/{index-D0p9tKn1.js → index-LVdFbQrm.js} +1 -1
  124. package/dist/assets/{index-CUGJ1qZT.js → index-YV1oiFK2.js} +1 -1
  125. package/dist/assets/{index-BrKxfyi1.js → index-Z8uAvilC.js} +1 -1
  126. package/dist/assets/{index-BAIJFZ2U.js → index-cgrbzc6D.js} +1 -1
  127. package/dist/assets/{index-Bw7DaP9t.js → index-dZUhu4al.js} +1 -1
  128. package/dist/assets/{index-91h1JdmF.js → index-igL_j9mT.js} +1 -1
  129. package/dist/assets/{index-D3q9UrEZ.js → index-oZ9KIv19.js} +1 -1
  130. package/dist/assets/{index-PNjifLZY.js → index-pKJXF5_b.js} +5 -5
  131. package/dist/assets/{index-aZZbb2zt.js → index-zzCN19ij.js} +1 -1
  132. package/dist/assets/{index.esm-BnBhQGIT.js → index.esm-DQhqo8hM.js} +1 -1
  133. package/dist/assets/{info-addon.es-BjL9U0_T.js → info-addon.es-DvIhfDpC.js} +1 -1
  134. package/dist/assets/{info.es-Bfdn-pDs.js → info.es-Bri-_MhX.js} +1 -1
  135. package/dist/assets/{install-from-url-DMqPrYH9.js → install-from-url-BO7wobBK.js} +1 -1
  136. package/dist/assets/{invitation-B-7WluTK.js → invitation-oNb4r7x5.js} +1 -1
  137. package/dist/assets/is-path-prefix-equal-Dcl3Dpc2.js +1 -0
  138. package/dist/assets/{item-DVcitmP8.js → item-BTj4eHCb.js} +1 -1
  139. package/dist/assets/{javascript.es-BAqxkbRv.js → javascript.es-Uakm0f2H.js} +1 -1
  140. package/dist/assets/{jump-to-line.es-BG7TvTwD.js → jump-to-line.es-CK5tO2wK.js} +1 -1
  141. package/dist/assets/{jump.es-rMFbYonC.js → jump.es-sXmaNAPB.js} +1 -1
  142. package/dist/assets/{lint.es-DljS5i_S.js → lint.es-ph9YB1LC.js} +1 -1
  143. package/dist/assets/{lint.es2-CJTlfZiV.js → lint.es2-QoEEHeh3.js} +1 -1
  144. package/dist/assets/{lint.es3-Di5-wq85.js → lint.es3-DPm8l1RE.js} +1 -1
  145. package/dist/assets/{list-header-B4-VEPl6.js → list-header-EIjqu6Bb.js} +1 -1
  146. package/dist/assets/{log-BT_krCGH.js → log-D7iyaOA3.js} +1 -1
  147. package/dist/assets/{lottie-react.esm-CpTSu2qB.js → lottie-react.esm--z6GyRUO.js} +1 -1
  148. package/dist/assets/{matchbrackets.es-Bsr4qYex.js → matchbrackets.es-BpNRzm5X.js} +1 -1
  149. package/dist/assets/{memory-B1tW_SnS.js → memory-_Cfdc6eg.js} +1 -1
  150. package/dist/assets/{metric-ur8uler1.js → metric-CEHee5mz.js} +1 -1
  151. package/dist/assets/{mode.es-Dcgic5iJ.js → mode.es-CPqJNtl_.js} +1 -1
  152. package/dist/assets/{mode.es2-n4_h16Ze.js → mode.es2-DSL_TIwg.js} +1 -1
  153. package/dist/assets/{mode.es3-BdoWtPu6.js → mode.es3-DGQgWSc2.js} +1 -1
  154. package/dist/assets/omit-BSmdwFJv.js +1 -0
  155. package/dist/assets/{onlineParser.es-CLngL2mF.js → onlineParser.es-BrkC1Rxw.js} +1 -1
  156. package/dist/assets/{overview-DmZroahw.js → overview-D1biLPCD.js} +1 -1
  157. package/dist/assets/{permission-AchwlrG-.js → permission-CWix4PtW.js} +1 -1
  158. package/dist/assets/{preference-58U0PhIe.js → preference-D99hgSUh.js} +3 -3
  159. package/dist/assets/{raf-schd.esm-DAp-_hmV.js → raf-schd.esm-Bg2vGkG6.js} +1 -1
  160. package/dist/assets/refType-zKgXx_ar.js +1 -0
  161. package/dist/assets/{resource-dialog-Dj_3VXk7.js → resource-dialog-CCtMXZiw.js} +19 -19
  162. package/dist/assets/{runtime-oYbzIvvg.js → runtime-CUQISXx6.js} +1 -1
  163. package/dist/assets/{schema-Cs56d_-m.js → schema-DA-E-9cd.js} +1 -1
  164. package/dist/assets/sdk-C-ut0VQ6.js +1 -0
  165. package/dist/assets/{search.es-BNozlwLe.js → search.es-vxqs3CoJ.js} +1 -1
  166. package/dist/assets/{searchcursor.es-CW-RnxlV.js → searchcursor.es-BIY3U3Jt.js} +1 -1
  167. package/dist/assets/{service-B-MdP5Cx.js → service-cI5sUn7i.js} +1 -1
  168. package/dist/assets/{shorten-label-B9dibze9.js → shorten-label-CrkBaee5.js} +1 -1
  169. package/dist/assets/{show-hint.es-hopi82oq.js → show-hint.es-BNALS2hN.js} +1 -1
  170. package/dist/assets/{simple-select-DOinE_-U.js → simple-select-DHpiGJRj.js} +1 -1
  171. package/dist/assets/{spaces-CYDsiiVR.js → spaces-DyBB-5Eg.js} +1 -1
  172. package/dist/assets/{status-BmZAW4-W.js → status-Bs7sjvnO.js} +1 -1
  173. package/dist/assets/{status-CNF7RY9O.js → status-DTKEarT9.js} +1 -1
  174. package/dist/assets/{sublime.es-VQowU9YH.js → sublime.es-B-ZAyGKa.js} +1 -1
  175. package/dist/assets/{switch-control-CicZouFd.js → switch-control-DpFXMKLS.js} +1 -1
  176. package/dist/assets/{table-icons-DXe7Y59w.js → table-icons-DU8hTbxC.js} +1 -1
  177. package/dist/assets/{table-tips-DsygR-9m.js → table-tips-D9nXnglU.js} +1 -1
  178. package/dist/assets/{team-Bn_mu75h.js → team-8WMHXK3a.js} +1 -1
  179. package/dist/assets/{toLower-DesEejDN.js → toLower-OpLhWDaq.js} +1 -1
  180. package/dist/assets/toUpper-B4jRVv5E.js +1 -0
  181. package/dist/assets/{traffic-Xiw20x8z.js → traffic-CRZc451k.js} +1 -1
  182. package/dist/assets/{url-evaluation-D1k7yWyZ.js → url-evaluation-CtyhxHau.js} +1 -1
  183. package/dist/assets/{url-join-D60KnGCq.js → url-join-DP1r7KXa.js} +1 -1
  184. package/dist/assets/{use-mobile-CH1DHqdi.js → use-mobile-7OX4w2nG.js} +1 -1
  185. package/dist/assets/{use-mobile-VA2iQpw1.js → use-mobile-iVwM_YK-.js} +1 -1
  186. package/dist/assets/{useAsync-nsT-XRz4.js → useAsync-DtAj-sLJ.js} +1 -1
  187. package/dist/assets/{useAsyncRetry-BbN54CC9.js → useAsyncRetry-De8O7cnw.js} +1 -1
  188. package/dist/assets/{useLocalStorage-CZW1YEkn.js → useLocalStorage-Bp8WWQpB.js} +1 -1
  189. package/dist/assets/{useThemeProps-AoXkQS51.js → useThemeProps-DmvmZB1-.js} +1 -1
  190. package/dist/assets/{util-DKybN9Xd.js → util-CAGtQj-e.js} +1 -1
  191. package/dist/assets/{wait-container-DQksv9rK.js → wait-container-BdSj3R09.js} +1 -1
  192. package/dist/assets/{withStyles-BBWMdyJE.js → withStyles-B62bDqhH.js} +1 -1
  193. package/dist/assets/{wrap-locale-B7P9J5-Q.js → wrap-locale-DOaCGmjV.js} +1 -1
  194. package/dist/index.html +1 -1
  195. package/dist/service-worker.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/assets/api-B8ivFeH7.js +0 -1
  198. package/dist/assets/cloneDeep-Cfgk56GP.js +0 -1
  199. package/dist/assets/config-navigation-31Obb9LH.js +0 -86
  200. package/dist/assets/emotion-react.browser.esm-GJuwMk60.js +0 -1
  201. package/dist/assets/getValidReactChildren-Be34RJxF.js +0 -1
  202. package/dist/assets/index-DWpLxO97.js +0 -1
  203. package/dist/assets/index-Lpnc-snP.js +0 -6
  204. package/dist/assets/index-gbjEZS9n.js +0 -41
  205. package/dist/assets/is-path-prefix-equal-tLtGnKj3.js +0 -1
  206. package/dist/assets/omit-CtkwWA8n.js +0 -1
  207. package/dist/assets/refType-C99Pk_DC.js +0 -1
  208. package/dist/assets/sdk-4xnxjHXn.js +0 -1
  209. package/dist/assets/toUpper-CNbBAA6C.js +0 -1
@@ -1 +0,0 @@
1
- import{d3 as e,fz as r,fA as s}from"./index-Du-Kz75O.js";const a=e(r),t=e(s);export{t as a,a as r};
@@ -1 +0,0 @@
1
- import{r}from"./index-Du-Kz75O.js";function a(t){return r.Children.toArray(t).filter(e=>r.isValidElement(e))}export{a as g};
@@ -1 +0,0 @@
1
- import{c6 as c,r as _,cu as f,i8 as S,cU as r}from"./index-Du-Kz75O.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],i=a[1],o=f(function(t){i(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,o]};export{d as u};
@@ -1,6 +0,0 @@
1
- import{c1 as Ge,c0 as et,b8 as te,cf as ee,r as y,c2 as tt,b$ as st,bZ as Le,j as e,c4 as ot,c5 as nt,M as V,bq as M,bs as rt,y as B,X,bi as w,gf as Me,aU as Ue,b as _,le as at,m as E,P as g,hD as it,w as ct,az as Ne,a2 as ge,an as lt,n as dt,k as C,e as ut,C as z,i as pt,al as mt,lf as J,h2 as G,lg as ft,K as j,aZ as W,aB as ye,A as R,g as ht,T as Q,du as gt,aP as je,aQ as be,Q as Y,aI as q,aa as H,a5 as xt,eo as St,b3 as yt,B as me,v as jt,G as Oe,Y as We,bD as xe,z as bt}from"./index-Du-Kz75O.js";import{T as Ct}from"./index-BQNrdTnJ.js";import{u as A}from"./blocklet-Du6aD5YD.js";import{u as kt}from"./use-mobile-VA2iQpw1.js";import{b as Dt,u as Bt,D as wt,c as fe,a as Tt}from"./index-91h1JdmF.js";import"./index-B_i6fZH5.js";import"./index-BojVbZw0.js";import"./api-B8ivFeH7.js";import{c as $e,b as Et,u as It,C as Rt,D as vt,a as zt}from"./connect-to-B7dWMR7-.js";import{d as At,a as Lt,g as Ot,i as Pt,e as Se,f as _t,h as Mt,j as Ut}from"./spaces-CYDsiiVR.js";import{I as Nt}from"./index-Y6I_8_UQ.js";import{R as Wt}from"./index-C2lXYqTy.js";import{d as $t}from"./HelpOutline-DQocqVbI.js";import{D as Kt}from"./index-BAIJFZ2U.js";import{x as Ft}from"./index-BJHGOv7L.js";import{d as Yt}from"./MoreHoriz-BVM6ZvkQ.js";import{f as qt}from"./actions-DvzQl_Or.js";import{d as Ht}from"./DeleteOutline-Dy3XN37O.js";import{g as Pe}from"./get-safe-url-_R_QaUZE.js";import{S as Qt}from"./switch-control-CicZouFd.js";import{L as _e}from"./list-header-B4-VEPl6.js";import"./OpenInNew-TfvhaxfR.js";import"./ButtonGroup-Cp8sWSdF.js";import"./getValidReactChildren-Be34RJxF.js";import"./TableRow-BDQ_dPBw.js";import"./useThemeProps-AoXkQS51.js";import"./emotion-react.browser.esm-GJuwMk60.js";import"./ViewColumn-B7Xk5ARl.js";import"./Search-DKuHv8M8.js";import"./Clear-DrOnDNTP.js";import"./Delete-D8DGfKnA.js";import"./index-CadaB0Sg.js";import"./MoreVert-DrmdrfKG.js";import"./TableSearch-ChRlsNNH.js";import"./useLocalStorage-CZW1YEkn.js";import"./url-evaluation-D1k7yWyZ.js";import"./permission-AchwlrG-.js";import"./index-BSQHT_8r.js";import"./Switch-DfGEjwNI.js";function Vt(t){return Ge("MuiIcon",t)}et("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Xt=["baseClassName","className","color","component","fontSize"],Zt=t=>{const{color:o,fontSize:n,classes:s}=t,a={root:["root",o!=="inherit"&&`color${ee(o)}`,`fontSize${ee(n)}`]};return nt(a,Vt,s)},Jt=te("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:n}=t;return[o.root,n.color!=="inherit"&&o[`color${ee(n.color)}`],o[`fontSize${ee(n.fontSize)}`]]}})(({theme:t,ownerState:o})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:t.typography.pxToRem(20),medium:t.typography.pxToRem(24),large:t.typography.pxToRem(36)}[o.fontSize],color:{primary:(t.vars||t).palette.primary.main,secondary:(t.vars||t).palette.secondary.main,info:(t.vars||t).palette.info.main,success:(t.vars||t).palette.success.main,warning:(t.vars||t).palette.warning.main,action:(t.vars||t).palette.action.active,error:(t.vars||t).palette.error.main,disabled:(t.vars||t).palette.action.disabled,inherit:void 0}[o.color]})),Ce=y.forwardRef(function(o,n){const s=tt({props:o,name:"MuiIcon"}),{baseClassName:a="material-icons",className:r,color:i="inherit",component:l="span",fontSize:u="medium"}=s,c=st(s,Xt),f=Le({},s,{baseClassName:a,color:i,component:l,fontSize:u}),p=Zt(f);return e.jsx(Jt,Le({as:l,className:ot(a,"notranslate",p.root,r),ownerState:f,"aria-hidden":!0,ref:n},c))});Ce.muiName="Icon";async function Gt({blockletDid:t,nodeApi:o,spaceGateways:n}){let s=!1;const a=await Promise.all(n.map(async r=>{let{name:i}=r;const l=await At(r.endpoint);return!V(l)&&l!==i&&(i=l,s=!0),{...r,name:i}}));return s&&await Promise.all(a.filter(r=>r.did).map(r=>o.updateBlockletSpaceGateway({input:{did:t,where:{did:r.did},spaceGateway:{...r}}}))),a}function es({refresh:t}={}){var a;const{blocklet:o}=A(),n=(a=o==null?void 0:o.meta)==null?void 0:a.did,{api:s}=M();return rt(async()=>{if(!n)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:n}});return await Gt({blockletDid:n,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){var i;(i=r==null?void 0:r.message)!=null&&i.includes("not logged")?console.warn(r):(console.error(r),B.error(X(r)))}})}function Ke({deps:t,setLoading:o,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){var f;const{blocklet:s}=A(),[a,r]=y.useState([]),{api:i}=M(),[l,u]=y.useMemo(()=>n?[w(n).startOf("day").toISOString(),w(n).endOf("day").toISOString()]:[w().startOf("year").toISOString(),w().endOf("day").toISOString()],[n]),c=Me(async()=>{try{if(o(!0),!s){r([]);return}const{backups:p}=await i.getBlockletBackups({input:{did:s.meta.did,startTime:l,endTime:u}});r(p??[])}catch(p){console.error(p),B.error(X(p))}finally{o(!1)}},1e3);return Ue(async()=>{c()},[(f=s==null?void 0:s.meta)==null?void 0:f.did].concat(t)),{backups:a}}function ts({appDid:t}){const{backups:o}=Ke(),[n,s]=y.useState({message:"",progress:0,completed:!1}),a=M(),{ws:{useSubscription:r}}=a;return r(_.BlockletEvents.backupProgress,i=>{t===(i==null?void 0:i.appDid)&&s(()=>({...i}))},[t]),y.useEffect(()=>{var i;if(o!=null&&o.length&&at((i=o[0])==null?void 0:i.status)){const[l]=o;s(()=>({message:l.message,progress:l.progress,completed:l.progress>=100}))}},[o]),n}function ss({deps:t=[],setLoading:o=()=>{}}={}){var l;const{blocklet:n}=A(),[s,a]=y.useState([]),{api:r}=M(),i=y.useCallback(Me(async()=>{var u;if(!r||!((u=n==null?void 0:n.meta)!=null&&u.did)){a([]);return}try{o(!0);const c=w(),f=c.subtract(1,"year"),{summary:p}=await r.getBlockletBackupSummary({input:{did:n.meta.did,startTime:f.toISOString(),endTime:c.toISOString()}});a(Array.isArray(p)?p:[])}catch(c){console.error("Failed to fetch backup summary:",c),B.error(X(c)),a([])}finally{o(!1)}},1e3),[]);return Ue(async()=>(await i(),()=>{i.cancel()}),[(l=n==null?void 0:n.meta)==null?void 0:l.did].concat(t)),{backupSummary:s}}const Fe=y.createContext({}),{Provider:os,Consumer:ao}=Fe;function ke({children:t}){var K;const{t:o}=E(),{api:n}=M(),{blocklet:s}=A(),[a,r]=y.useState(null),[i,l]=y.useState(!1),{data:u,loading:c,mutate:f}=es({refresh:i}),p=it(u),x=ts({appDid:s==null?void 0:s.appDid}),h=y.useMemo(()=>Lt(s==null?void 0:s.environments),[s==null?void 0:s.environments]),[b,D]=y.useState(!1),[S,d]=y.useState(!1),{backups:oe}=Ke({deps:[S,a],setLoading:D,backupDate:a}),[ne,re]=y.useState(!1),{backupSummary:ae}=ss({deps:[ne]}),[U,O]=y.useState(u==null?void 0:u.find(m=>m.endpoint===h)),I=(K=s==null?void 0:s.settings)==null?void 0:K.autoBackup,v=()=>{l(m=>!m)},ie=()=>{re(m=>!m)},ce=()=>{d(m=>!m)},$=async m=>{await n.updateAutoBackup({input:{did:s.meta.did,autoBackup:m}})},Z=async()=>{await n.abortBlockletBackup({input:{appPid:s.meta.did}})},le=async(m,N)=>{try{f(T=>{const P=[...T];return P.push({...m,loading:!0}),P}),await n.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:m}}),h!==N&&await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:N}]}}),O(m),v(),B.success(o("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"}))}catch(T){throw console.error(T),f(P=>[...P].filter(pe=>pe.did!==m.did)),T}},de=async m=>{m&&(m.endpoint===h&&(await n.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I!=null&&I.enabled&&await $({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:m==null?void 0:m.did}}),f(N=>{const T=[...N];return T.splice(T.indexOf(m),1),T}),O(m),v())},ue=async m=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:m.did},spaceGateway:m}}),h!==m.endpoint&&n.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:m.endpoint}]}})]),B.success(o("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"})),v()},k=m=>(m==null?void 0:m.endpoint)===h;return e.jsx(os,{value:{spaceGateways:u||[],selectedSpaceGateway:U,addSpaceGateway:le,deleteSpaceGateway:de,updateSpaceGateway:ue,refreshSpaceGateways:v,spaceGatewaysLoading:c,spaceGatewaysFirstLoading:p,spaceGatewayIsSelected:k,updateAutoBackup:$,abortBlockletBackup:Z,backupEndpoint:h,backupProgress:x,backups:oe,backupSummary:ae,refreshBackupSummary:ie,refreshBackups:ce,setBackupDate:r,backupsLoading:b,autoBackup:I},children:t})}ke.propTypes={children:g.any.isRequired};ke.defaultProps={};function L(){return y.useContext(Fe)}function se({...t}){const{blocklet:o}=A(),{info:n}=M(),{t:s}=E(),a=$e({blocklet:o}),r=ct(n),{spaceGateways:i,addSpaceGateway:l}=L(),u={checkFn:Ne.create({baseURL:ge(window.location.origin,lt())}).get,webWalletUrl:r,extraParams:{appPid:o.appPid,appDid:a.appDid,appName:a.appName,appDescription:a.appDescription,appUrl:a.appUrl,referrer:a.referrer,scopes:a.scopes,nodeDid:n.did}},c=async({endpoint:p,name:x,did:h})=>{const b=await Ot(p);if(!await Pt(b)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(i.some(d=>d.endpoint===p)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await l({name:x,did:h,url:b,endpoint:p},p)},f=async({spaceGateway:p})=>{try{await c(p)}catch(x){console.error(x),B.error(X(x))}};return e.jsx(Dt,{...t,options:u,onSuccess:f})}se.propTypes={};se.defaultProps={};function Ye({...t}){const{t:o}=y.useContext(ut),{blocklet:n,loadingDiskInfo:s,actions:a}=A();if(y.useEffect(()=>{a==null||a.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),n.diskInfo){const r=(u,c,f)=>e.jsxs(C,{children:[u," ",e.jsx("strong",{children:c?pt(c):"empty"})]}),i=n.environments.reduce((u,c)=>(u[c.key]=c.value,u),{}),l=[{key:"appDir",name:o("blocklet.diskInfo.appDir"),value:r(i.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:o("blocklet.diskInfo.dataDir"),value:r(i.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:o("blocklet.diskInfo.logDir"),value:r(i.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:o("blocklet.diskInfo.cacheDir"),value:r(i.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(ns,{component:"div",...t,children:l.map(u=>e.jsx(Nt,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.key))})}return s?e.jsx(z,{}):e.jsx(C,{children:o("blocklet.diskInfo.empty")})}const ns=dt(C)``;function De(){const{t}=E(),{setBackupDate:o,backupSummary:n}=L(),s=Bt({key:"lg"}),a=y.useRef(null),r=mt(),i=y.useCallback(c=>{o(c)},[o]),l=y.useMemo(()=>{const c=w().add(1,"day"),f=s?w().subtract(5,"month").startOf("month"):w().subtract(1,"year"),p=new Map(n.map(h=>[h.date,{date:h.date,successCount:h.successCount,errorCount:h.errorCount}])),x=[];for(let h=f.clone();w(h).isBefore(c);h=h.add(1,"day")){const b=h.format("YYYY-MM-DD");x.push(p.get(b)||{date:b,successCount:0,errorCount:0})}return x},[n,s]),u=y.useMemo(()=>({grid:{containLabel:!0,right:s?1:10,top:s?20:30,bottom:s?2:12},tooltip:{formatter:b=>{const{date:D,successCount:S,errorCount:d}=l[b.dataIndex]||{date:b.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${D}</div>`,`<div>${t("common.succeeded")}: ${S}</div>`,`<div>${t("common.failed")}: ${d}</div>`].join(`
2
- `)},backgroundColor:r.palette.background.paper,borderColor:r.palette.divider,textStyle:{color:r.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${r.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:J[600]},{min:-9,max:-6,color:J[500]},{min:-6,max:-3,color:J[400]},{min:-3,max:-1,color:J[300]},{min:0,max:0,color:r.palette.grey[200]},{min:1,max:3,color:G[300]},{min:3,max:6,color:G[400]},{min:6,max:9,color:G[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:G[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:r.palette.text.secondary,fontSize:12}},calendar:{top:s?20:30,left:s?15:42,right:s?1:5,bottom:s?2:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:s?2:4,borderColor:r.palette.background.default,borderRadius:0,color:r.palette.background.default},dayLabel:{show:!s,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:s?6:12,fontSize:s?11:14,color:r.palette.text.primary,fontWeight:"400",width:s?20:32},monthLabel:{show:!0,nameMap:"cn",align:"left",color:r.palette.text.primary,fontWeight:"400",fontSize:s?14:16,position:"start",margin:s?4:12,width:s?24:32,padding:s?[0,2]:[0,4]},yearLabel:{show:!1},range:[s?w().subtract(5,"month").startOf("month").format("YYYY-MM-DD"):w().subtract(1,"year").startOf("month").format("YYYY-MM-DD"),w().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:l.map(b=>[b.date,b.errorCount?-b.errorCount:b.successCount]),label:{show:!1},itemStyle:{borderWidth:s?.5:1.5,borderColor:r.palette.background.default,borderRadius:s?1:5},emphasis:{itemStyle:{borderWidth:2.5,borderColor:ft[200],color:"inherit"}}}}),[l,t,r,s]);return y.useEffect(()=>{a.current&&s&&setTimeout(()=>{a.current.scrollLeft=a.current.scrollWidth},100)},[s,l]),e.jsxs(e.Fragment,{children:[e.jsx(j,{ref:a,sx:{border:"1px solid",borderColor:"divider",padding:"8px"},children:e.jsx(j,{sx:{width:"100%",height:s?"150px":"240px",position:"relative"},children:e.jsx(Wt,{option:u,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:c=>{c.componentType==="series"&&c.data&&i(c.data[0])}}})})}),e.jsx(j,{display:"flex",justifyContent:"flex-end",mt:1,mr:s?2:5,mb:2,children:e.jsxs(W,{direction:s?"column":"row",spacing:s?2:1,width:"100%",justifyContent:s?"flex-start":"flex-end",alignItems:s?"flex-start":"center",children:[e.jsxs(W,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(j,{width:32,height:12,borderRadius:.5,sx:{background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(C,{variant:"body2",color:"text.secondary",children:t("storage.spaces.backup.failed")})]}),e.jsxs(W,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(j,{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}),e.jsx(C,{variant:"body2",color:"text.secondary",children:t("storage.spaces.backup.without")})]}),e.jsxs(W,{direction:"row",alignItems:"center",spacing:1,children:[e.jsx(j,{width:32,height:12,borderRadius:.5,sx:{background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(C,{variant:"body2",color:"text.secondary",children:t("storage.spaces.backup.succeeded")})]})]})})]})}De.propTypes={};const rs=te(({className:t,...o})=>e.jsx(ye,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Be({status:t,message:o,createdAt:n}){const{t:s}=E(),a=t===R.BACKUPS.STATUS.PROGRESS&&w().diff(n,"hours")>=R.BACKUPS.TIMEOUT_HOURS,r=a&&s("common.timeoutError"),i=t===R.BACKUPS.STATUS.PROGRESS&&!a,l=t===R.BACKUPS.STATUS.SUCCEEDED&&!a;return i?e.jsxs(C,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(z,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):l?e.jsx(Q,{type:"success",children:s("common.succeeded")}):e.jsxs(j,{display:"inline-flex",alignItems:"center",children:[e.jsx(Q,{type:"error",children:s("common.failed")}),"  ",e.jsx(ye,{style:{display:"flex",alignItems:"center",flexShrink:0},title:o||r,children:e.jsx(Ce,{children:e.jsx($t,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Be.propTypes={status:g.string.isRequired,message:g.string,createdAt:g.string.isRequired};Be.defaultProps={message:""};function we({metadata:t}){const{t:o}=E();if(V(t))return e.jsx(Q,{type:"success",children:o("common.succeeded")});const n=t.count||0,s=t.size||0,a=Ft(s,{iec:!0}),r=e.jsxs(j,{p:1,sx:{color:"black",backgroundColor:"white"},borderRadius:1,boxShadow:2,children:[e.jsxs(C,{variant:"body2",children:[o("common.fileCount"),": ",n]}),e.jsxs(C,{variant:"body2",children:[o("common.fileSize"),": ",a]})]});return e.jsxs(j,{display:"inline-flex",alignItems:"center",children:[e.jsx(Q,{type:"success",children:o("common.succeeded")})," ",e.jsx(rs,{title:r,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(Ce,{children:e.jsx(gt,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}we.propTypes={metadata:g.object};we.defaultProps={metadata:{}};function Te(){const{t,locale:o}=E(),{spaceGateways:n,backups:s,backupsLoading:a}=L(),r=y.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:l=>{var D;const{targetUrl:u,targetName:c,status:f,createdAt:p}=s[l],x=f===R.BACKUPS.STATUS.PROGRESS&&w().diff(p,"hours")>=R.BACKUPS.TIMEOUT_HOURS,h=f===R.BACKUPS.STATUS.SUCCEEDED&&!x,b=c||((D=n.find(S=>u==null?void 0:u.includes(Se(S==null?void 0:S.endpoint))))==null?void 0:D.name)||"Unknown DID Space";return h?e.jsx(ht,{fontSize:"16px",href:u,target:"_blank",children:b}):e.jsx(C,{variant:"body1",fontSize:"16px",children:b})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:l=>{const u=t(l===0?"common.auto":"common.manual");return e.jsx(Q,{children:u})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:l=>w(l).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:l=>V(l)?"":w(l).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:l=>{const u=(s==null?void 0:s[l])??{},{status:c,message:f,createdAt:p,metadata:x}=u,h=c===R.BACKUPS.STATUS.PROGRESS&&w().diff(p,"hours")>=R.BACKUPS.TIMEOUT_HOURS,b=c===R.BACKUPS.STATUS.PROGRESS&&!h,D=c===R.BACKUPS.STATUS.SUCCEEDED&&!h;return b?e.jsxs(C,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(z,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):D?e.jsx(we,{metadata:x}):e.jsx(Be,{status:c,message:f,createdAt:p})}}}],[s,n,t]),i=y.useMemo(()=>!(s!=null&&s.length),[s]);return e.jsx(e.Fragment,{children:i?e.jsx(j,{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:t("storage.spaces.record.emptyData")}):e.jsx(Kt,{title:"",loading:a,data:s,columns:r,emptyNode:t("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}Te.propTypes={};function qe(){const{t}=E();return e.jsxs(j,{children:[e.jsxs(j,{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"},children:[e.jsxs(j,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240,children:[e.jsx(wt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(C,{my:2,sx:{textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(se,{})]}),e.jsxs(j,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(j,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,children:e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.spaces.backup.records")})}),e.jsx(De,{})]})]}),e.jsx(Te,{sx:{marginTop:"24px"}}),e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(Ye,{})]})}qe.propTypes={};var Ee={},as=be;Object.defineProperty(Ee,"__esModule",{value:!0});var He=Ee.default=void 0,is=as(je()),cs=e;He=Ee.default=(0,is.default)((0,cs.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var Ie={},ls=be;Object.defineProperty(Ie,"__esModule",{value:!0});var Qe=Ie.default=void 0,ds=ls(je()),us=e;Qe=Ie.default=(0,ds.default)((0,us.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var Re={},ps=be;Object.defineProperty(Re,"__esModule",{value:!0});var Ve=Re.default=void 0,ms=ps(je()),fs=e;Ve=Re.default=(0,ms.default)((0,fs.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function ve({spaceGateway:t,onConfirm:o,onCancel:n}){const{t:s}=E(),[a,r]=y.useState(!1),[i,l]=y.useState(!1),u=(p,x)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),r(x)},c=async p=>{try{p==null||p.stopPropagation(),l(!0),await(o==null?void 0:o(t)),r(!1)}catch(x){console.error(x),B.error(`${s("storage.space.gateway.delete.failed")}: ${X(x)}`)}finally{r(!1),l(!1)}},f=p=>{u(p,!1),n==null||n(p)};return e.jsxs(e.Fragment,{children:[e.jsxs(Y,{color:"red",onClick:p=>u(p,!0),children:[e.jsx(q,{style:{minWidth:24,color:"red"},children:e.jsx(Ht,{fontSize:"small"})}),e.jsx(H,{style:{color:"red"},children:s("common.delete")})]}),e.jsx(xt,{title:s("storage.spaces.gateway.delete.title"),open:a,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:i}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:i}},onConfirm:c,onCancel:f,children:e.jsx(C,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}ve.propTypes={spaceGateway:g.shape({name:g.string.isRequired,url:g.string.isRequired,protected:g.bool}).isRequired,onConfirm:g.func,onCancel:g.func};ve.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function ze({spaceGateway:t,selected:o,onDelete:n,onConnect:s,enableSwitchToSpace:a,backupInProgress:r,...i}){const{abortBlockletBackup:l}=L(),[u,c]=y.useState(null),{t:f}=E(),[p,x]=y.useState(!1),h=(S,d)=>{S.stopPropagation(),S.preventDefault(),c(d&&S.currentTarget)},b=async S=>{try{x(!0),h(S,!1),await s(t)}catch(d){console.error(d),B.error(d.message)}finally{x(!1)}},D=async S=>{try{x(!0),h(S,!1),await l()}catch(d){console.error(d),B.error(d.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[p||t!=null&&t.loading?e.jsx(z,{sx:{ml:1},size:"24px"}):e.jsx(St,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:S=>h(S,!0),...i,children:e.jsx(Yt,{})}),e.jsxs(yt,{id:"simple-menu",anchorEl:u,keepMounted:!0,open:!!u,onClose:S=>h(S,!1),children:[e.jsxs(Y,{onClick:S=>{h(S,!1),window.open(Pe(t.endpoint?_t(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(q,{style:{minWidth:24},children:e.jsx(He,{fontSize:"small"})}),e.jsx(H,{children:f("common.open")})]}),e.jsxs(Y,{onClick:S=>{h(S,!1),window.open(Pe(Mt(t.endpoint),{allowDomains:null}))},children:[e.jsx(q,{style:{minWidth:24},children:e.jsx(Ve,{fontSize:"small"})}),e.jsx(H,{children:f("storage.spaces.strategy.viewBackupFiles")})]}),!o&&a&&e.jsxs(Y,{onClick:b,children:[e.jsx(q,{style:{minWidth:24},children:e.jsx(Qe,{fontSize:"small"})}),e.jsx(H,{children:f("storage.spaces.connect.switchToSpace")})]}),r&&e.jsxs(Y,{onClick:D,children:[e.jsx(q,{style:{minWidth:24},children:e.jsx(qt,{fontSize:"small"})}),e.jsx(H,{children:f("storage.spaces.connect.abortBlockletBackup")})]}),!r&&e.jsx(ve,{spaceGateway:t,onConfirm:async()=>{c(null),await(n==null?void 0:n(t))},onCancel:()=>c(null)})]})]})}ze.propTypes={spaceGateway:g.shape({name:g.string.isRequired,url:g.string.isRequired,protected:g.bool,endpoint:g.string.isRequired,loading:g.bool}).isRequired,selected:g.bool.isRequired,enableSwitchToSpace:g.bool,onDelete:g.func,onConnect:g.func,backupInProgress:g.bool};ze.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};const hs=te(({className:t,...o})=>e.jsx(ye,{...o,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Ae({spaceGateway:t,spaceStatus:o,selected:n,onConnected:s,onDeleted:a,onBackedUp:r}){const{t:i,locale:l}=E(),{blocklet:u}=A(),{api:c,info:{did:f}}=M(),{appDid:p,appName:x,appDescription:h,scopes:b,appUrl:D,referrer:S}=$e({blocklet:u}),{backupProgress:d,updateSpaceGateway:oe,deleteSpaceGateway:ne,refreshBackupSummary:re,refreshBackups:ae}=L(),[U,O]=y.useState(!1),[I,v]=y.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:i("storage.spaces.authorize.title",{appName:x},l),scan:i("storage.spaces.authorize.scan",{appName:x},l),confirm:"",success:e.jsx(C,{gutterBottom:!0,children:i("storage.spaces.authorize.success")})},onClose:()=>{v(k=>({...k,open:!1}))}}),ie=n&&!U&&o===fe.DISCONNECTED,ce=n&&!U&&!t.loading&&o===fe.CONNECTED,$=n&&U&&o===fe.CONNECTED&&(d==null?void 0:d.progress)>=0,Z=async()=>{try{if(await Ut(t==null?void 0:t.endpoint)){await c.configBlocklet({input:{did:[u.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(i("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),s==null||s(null,t);return}}catch(k){console.error(k),s==null||s(k,t);return}v(k=>({...k,open:!0,prefix:ge(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:Ne.create({baseURL:ge(t.url,"space")}).get,extraParams:{appDid:p,appName:x,appDescription:h,scopes:b,appUrl:D,referrer:S,nodeDid:f,spaceDid:t.did}}))},le=async(k,K)=>{const m=K(k.endpoint),N=Se(m),T=k.space?K(k.space):{};if(t.did&&N!==t.did){v(pe=>({...pe,open:!1}));const F=i("storage.spaces.gateway.switch.failedForMismatchSpace",{name:T!=null&&T.name?T.name:""});B.error(F),s==null||s(new Error(F),t);return}const P={...t,name:T.name??"DID Space",did:T.did??Se(m),endpoint:m};await oe(P),v(F=>({...F,open:!1})),s==null||s(null,P)},de=async()=>{try{if(U)return;O(!0),await c.backupBlocklet({input:{appDid:u.appDid,to:"spaces"}})}catch(k){console.error(k),B.error(k.message),r==null||r(k,t)}finally{O(!0)}},ue=async()=>{try{await ne(t),B.success(i("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),a==null||a(null,t)}catch(k){console.error(k),a==null||a(k,t)}};return y.useEffect(()=>{d!=null&&d.completed?(n&&((d==null?void 0:d.progress)===100?(B.success(i("storage.spaces.backupSuccessfully")),r==null||r(null,t)):d.message&&(r==null||r(new Error(d==null?void 0:d.message),t)),d.progress=0,d.message=""),O(!1),setTimeout(()=>{re(),ae()},1e3)):d.progress&&O(!0)},[d]),e.jsxs(e.Fragment,{children:[e.jsxs(j,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[ce&&e.jsx(me,{className:"action-btn",variant:"outlined",size:"small",onClick:de,children:i("storage.spaces.strategy.backupNow")}),ie&&e.jsx(me,{className:"action-btn",variant:"outlined",size:"small",onClick:Z,children:i("storage.spaces.disconnected.reconnectNow")}),$&&e.jsx(hs,{title:(d==null?void 0:d.message)&&e.jsx(j,{p:1,sx:{color:"black",backgroundColor:"white"},borderRadius:1,boxShadow:2,children:e.jsx(C,{variant:"body2",children:d.message})}),children:e.jsxs(me,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(z,{variant:"determinate",value:d==null?void 0:d.progress,size:14,sx:{mr:1}}),d==null?void 0:d.progress,"%"]})}),e.jsx(jt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:le,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:l},"get-endpoint")]}),e.jsx(ze,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:ue,onConnect:Z,enableSwitchToSpace:(d==null?void 0:d.completed)||V(d==null?void 0:d.message),backupInProgress:$})]})}Ae.propTypes={spaceGateway:g.shape({did:g.string.isRequired,name:g.string.isRequired,url:g.string.isRequired,endpoint:g.string.isRequired,protected:g.bool,loading:g.bool}).isRequired,spaceStatus:g.string.isRequired,selected:g.bool.isRequired,onConnected:g.func,onDeleted:g.func,onBackedUp:g.func};Ae.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Xe({...t}){const{t:o}=E();return e.jsxs(j,{...t,children:[e.jsx(j,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3,children:e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",children:o("storage.spaces.backup.records")})}),e.jsx(De,{}),e.jsx(Te,{})]})}Xe.propTypes={};function Ze({...t}){const{t:o}=E(),{autoBackup:n,updateAutoBackup:s}=L(),a=async()=>{try{const r=!(n!=null&&n.enabled);await s({enabled:r}),B.success(o(r?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(r){B.error(r.message)}};return e.jsx(Qt,{checked:!!(n!=null&&n.enabled),onChange:a,name:"enableWelcomePage",labelProps:{label:e.jsx(C,{marginRight:"8px",children:e.jsx("span",{children:o("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Ze.propTypes={};function gs(){const{t}=E(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:s}=L(),a=n&&!(o!=null&&o.length),r=({spaceGateway:i,spaceStatus:l,selected:u,refresh:c})=>e.jsx(Ae,{spaceGateway:i,spaceStatus:l,selected:u,onConnected:()=>c(),onBackedUp:f=>f&&c()});return e.jsxs(j,{display:"flex",flexDirection:"column",children:[e.jsxs(j,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Ze,{}),e.jsx(se,{})]}),e.jsx(j,{mt:2,children:a?e.jsx(j,{display:"flex",justifyContent:"center",children:e.jsx(z,{})}):e.jsx(Oe,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:o.map(i=>e.jsx(Oe,{item:!0,xs:12,md:6,children:e.jsx(Tt,{endpoint:i.endpoint,selected:s(i),action:r},i.endpoint)}))})})}),e.jsx(Xe,{sx:{marginTop:"24px"}}),e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(Ye,{})]})}function xs(){const{spaceGatewaysFirstLoading:t,spaceGateways:o}=L();return t?e.jsx(We,{relative:"parent",children:e.jsx(z,{})}):V(o)?e.jsx(qe,{}):e.jsx(gs,{})}function Ss(){return e.jsx(ke,{children:e.jsx(xs,{})})}function ys(){const{spaceGateway:t,settingStorageEndpoint:o,updateSpaceGateway:n,hasStorageEndpoint:s,loading:a,storageEndpoint:r}=It(),i=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return a?e.jsx(We,{relative:"parent",children:e.jsx(z,{})}):e.jsxs(j,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(Rt,{spaceGateway:t,settingStorageEndpoint:o}):e.jsx(vt,{}),e.jsx(j,{sx:i,children:e.jsx(zt,{onConnect:n,storageEndpoint:r})})]})}function js(){const{t}=E();return e.jsxs(Et,{children:[e.jsxs(W,{spacing:1,marginBottom:2,children:[e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(C,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx(ys,{})]})}function Je({navOrientation:t,...o}){const{t:n,locale:s}=E(),{blocklet:a}=A(),r=kt({key:"md"}),[i,l]=bt(),u=i.get("tab")||"backup",c=r?"horizontal":t,f=xe(()=>{var d;const D=[{label:n("common.backup"),value:"backup"}],S=(d=a==null?void 0:a.capabilities)==null?void 0:d.didSpace;return(S===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||S===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&D.push({label:n("common.storage"),value:"storage"}),D},[s,c]),x=xe(()=>({backup:e.jsx(Ss,{}),storage:e.jsx(js,{})}))[u],h=D=>{l(S=>(D==="backup"?S.delete("tab"):S.set("tab",D),S))};if(f.length<=1)return e.jsx(he,{children:x});const b=e.jsx(Ct,{tabs:f,current:u,orientation:c,onChange:h,sx:[{borderRight:1,height:"100%",borderColor:"divider"},c==="horizontal"&&{borderRight:0}]});if(c==="vertical")return e.jsx(j,{...o,children:e.jsxs(W,{direction:{md:"column",lg:"row"},gap:2,children:[e.jsx(j,{sx:{flexShrink:0},children:e.jsx(_e,{left:b})}),e.jsx(j,{sx:{flexGrow:1,minWidth:0},children:e.jsx(he,{sx:{mt:1},children:x})})]})});if(c==="horizontal")return e.jsxs(j,{...o,children:[e.jsx(_e,{left:b}),e.jsx(he,{sx:{mt:2},children:x})]})}Je.propTypes={navOrientation:g.oneOf(["vertical","horizontal"])};Je.defaultProps={navOrientation:"vertical"};const he=te(j)`
3
- position: relative;
4
- min-height: 66vh;
5
- overflow: hidden;
6
- `;export{Je as default};
@@ -1,41 +0,0 @@
1
- import{ke as ie,bl as ne,kf as he,kg as pe,kh as ge,ki as ve,P as M,n as ae,K as P,j as e,aZ as U,k as je,bq as oe,m as le,gJ as ce,fO as ue,aT as de,cu as b,y as O,t as F,kj as Q,aY as Y,N as T,aB as _e,B as $,cH as ye,a2 as be,r as B,e as we,bD as Ee}from"./index-Du-Kz75O.js";import{T as Re}from"./index-BQNrdTnJ.js";import{u as fe,C as E}from"./index.esm-BnBhQGIT.js";import{A as Fe,a as Se,d as Te,b as Pe}from"./collapse-B_sprtzE.js";import{f as Ce}from"./index-BAIJFZ2U.js";import{u as me}from"./blocklet-Du6aD5YD.js";import{S as Z}from"./Switch-DfGEjwNI.js";var X={exports:{}},G={exports:{}};(function(f,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=g;var r=x(ie);function x(_){return _&&_.__esModule?_:{default:_}}function p(_){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},p(_)}function g(_,v){(0,r.default)(_);var n,a;p(v)==="object"?(n=v.min||0,a=v.max):(n=arguments[1],a=arguments[2]);var C=encodeURI(_).split(/%..|./).length-1;return C>=n&&(typeof a>"u"||C<=a)}f.exports=i.default,f.exports.default=i.default})(G,G.exports);var qe=G.exports;(function(f,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=I;var r=n(ie),x=n(he),p=n(qe),g=n(pe),_=n(ge),v=n(ve);function n(j){return j&&j.__esModule?j:{default:j}}var a={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},C=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,K=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,m=/^[a-z\d]+$/,c=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,z=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,W=254;function A(j){var l=j.replace(/^"(.+)"$/,"$1");if(!l.trim())return!1;var L=/[\.";<>]/.test(l);if(L){if(l===j)return!1;var o=l.split('"').length===l.split('\\"').length;if(!o)return!1}return!0}function I(j,l){if((0,r.default)(j),l=(0,v.default)(l,a),l.require_display_name||l.allow_display_name){var L=j.match(C);if(L){var o=L[1];if(j=j.replace(o,"").replace(/(^<|>$)/g,""),o.endsWith(" ")&&(o=o.slice(0,-1)),!A(o))return!1}else if(l.require_display_name)return!1}if(!l.ignore_max_length&&j.length>W)return!1;var h=j.split("@"),u=h.pop(),R=u.toLowerCase();if(l.host_blacklist.length>0&&(0,x.default)(R,l.host_blacklist)||l.host_whitelist.length>0&&!(0,x.default)(R,l.host_whitelist))return!1;var d=h.join("@");if(l.domain_specific_validation&&(R==="gmail.com"||R==="googlemail.com")){d=d.toLowerCase();var y=d.split("+")[0];if(!(0,p.default)(y.replace(/\./g,""),{min:6,max:30}))return!1;for(var t=y.split("."),s=0;s<t.length;s++)if(!m.test(t[s]))return!1}if(l.ignore_max_length===!1&&(!(0,p.default)(d,{max:64})||!(0,p.default)(u,{max:254})))return!1;if(!(0,g.default)(u,{require_tld:l.require_tld,ignore_max_length:l.ignore_max_length,allow_underscores:l.allow_underscores})){if(!l.allow_ip_domain)return!1;if(!(0,_.default)(u)){if(!u.startsWith("[")||!u.endsWith("]"))return!1;var S=u.slice(1,-1);if(S.length===0||!(0,_.default)(S))return!1}}if(l.blacklisted_chars&&d.search(new RegExp("[".concat(l.blacklisted_chars,"]+"),"g"))!==-1)return!1;if(d[0]==='"'&&d[d.length-1]==='"')return d=d.slice(1,d.length-1),l.allow_utf8_local_part?z.test(d):c.test(d);for(var q=l.allow_utf8_local_part?D:K,N=d.split("."),k=0;k<N.length;k++)if(!q.test(N[k]))return!1;return!0}f.exports=i.default,f.exports.default=i.default})(X,X.exports);var ke=X.exports;const H=ne(ke);function w({title:f,desc:i,sectionLeftSx:r,sectionRightSx:x,children:p,...g}){return e.jsx(De,{...g,children:e.jsxs(U,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[e.jsxs(P,{className:"section-left",sx:r,children:[e.jsx(je,{className:"section-title",dangerouslySetInnerHTML:{__html:f}}),e.jsx(P,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:i}})]}),e.jsx(U,{className:"section-content",direction:"column",sx:{width:"100%",...x},children:p})]})})}w.propTypes={title:M.string.isRequired,children:M.node.isRequired,desc:M.string,sectionLeftSx:M.object,sectionRightSx:M.object};w.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const De=ae(P)`
2
- display: flex;
3
- align-items: flex-start;
4
- width: 100%;
5
-
6
- .section {
7
- width: 100%;
8
-
9
- .section-left {
10
- flex-shrink: 0;
11
- flex-grow: 0;
12
- }
13
-
14
- .section-title {
15
- font-weight: 500;
16
- line-height: 32px;
17
- }
18
-
19
- .section-desc {
20
- font-weight: normal;
21
- font-size: 12px;
22
- white-space: pre-line;
23
- }
24
-
25
- .section-content {
26
- flex-grow: 1;
27
- width: 0;
28
- align-self: center;
29
- }
30
- }
31
-
32
- @media (max-width: 900px) {
33
- .section-left {
34
- width: 100%;
35
- }
36
-
37
- .section-content {
38
- width: 100% !important;
39
- }
40
- }
41
- `;var ee={exports:{}},te={exports:{}},re={exports:{}};(function(f,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=r;function r(x){return x==null}f.exports=i.default,f.exports.default=i.default})(re,re.exports);var Le=re.exports;(function(f,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=v;var r=p(ie),x=p(Le);function p(n){return n&&n.__esModule?n:{default:n}}var g=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,_=/^[-+]?[0-9]+$/;function v(n,a){(0,r.default)(n),a=a||{};var C=a.allow_leading_zeroes===!1?g:_,K=!a.hasOwnProperty("min")||(0,x.default)(a.min)||n>=a.min,m=!a.hasOwnProperty("max")||(0,x.default)(a.max)||n<=a.max,c=!a.hasOwnProperty("lt")||(0,x.default)(a.lt)||n<a.lt,D=!a.hasOwnProperty("gt")||(0,x.default)(a.gt)||n>a.gt;return C.test(n)&&K&&m&&c&&D}f.exports=i.default,f.exports.default=i.default})(te,te.exports);var Ne=te.exports;(function(f,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=p;var r=x(Ne);function x(g){return g&&g.__esModule?g:{default:g}}function p(g){return(0,r.default)(g,{allow_leading_zeroes:!1,min:0,max:65535})}f.exports=i.default,f.exports.default=i.default})(ee,ee.exports);var Oe=ee.exports;const Ke=ne(Oe),V={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function ze(){var R,d,y;const{api:f}=oe(),{blocklet:i}=me(),{t:r}=le(),{confirmApi:x,confirmHolder:p}=ce(),g=(R=i==null?void 0:i.meta)==null?void 0:R.did,_=Object.assign({...V},((y=(d=i==null?void 0:i.settings)==null?void 0:d.notification)==null?void 0:y.email)||{}),{handleSubmit:v,control:n,formState:a,watch:C,reset:K}=fe({defaultValues:ue(_,Object.keys(V))}),m=de({testReceiver:"",testReceiverError:""}),c=C("enabled"),D=b(async(t,s,S=!0)=>{var q,N;try{const{blocklet:k}=await f.configNotification({input:{did:g,notification:JSON.stringify({email:t})}}),xe=Object.assign({...V},((N=(q=k==null?void 0:k.settings)==null?void 0:q.notification)==null?void 0:N.email)||{});K(xe),S&&O.success(r("oauth.saveSuccess"))}catch(k){if(S)O.error(k.message||r("oauth.saveFailed"));else throw k}}),z=b(async(t,s,S)=>{try{a.isDirty&&await D(t,s,!1),await f.sendEmail({input:{did:g,receiver:S,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),O.success(r("notification.email.testSuccess"))}catch(q){O.error(q.message||r("notification.email.testfailed"))}}),W=b((t,s)=>{m.testReceiver="",m.testReceiverError="",x.open({title:r("notification.email.testSendEmail"),content:()=>e.jsx(P,{sx:{width:"300px"},children:e.jsx(F,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:r("notification.email.inputTestReceiver"),value:m.testReceiver,onChange:S=>{m.testReceiver=S.target.value},error:!!m.testReceiverError,helperText:m.testReceiverError||" "})}),confirmButtonText:r("common.confirm"),cancelButtonText:r("common.cancel"),async onConfirm(S){var N;const q=(N=m.testReceiver)==null?void 0:N.trim();if(!q){m.testReceiverError=r("notification.email.receiverRequired");return}if(!H(q)){m.testReceiverError=r("notification.email.receiverInvalid");return}m.testReceiverError="",await z(t,s,q),S()}})}),A=b(t=>{const s=t==null?void 0:t.trim();return s?H(s)?!0:r("notification.email.fromInvalid"):r("notification.email.fromRequired")}),I=b(t=>{const s=t==null?void 0:t.trim();return s?Q(s,{require_host:!1,protocols:[]})?!0:r("notification.email.hostInvalid"):r("notification.email.hostRequired")}),j=b(t=>t?Ke(t)?!0:r("notification.email.portInvalid"):r("notification.email.portRequired")),l=b(t=>t!=null&&t.trim()?!0:r("notification.email.userRequired")),L=b(t=>t!=null&&t.trim()?!0:r("notification.email.passwordRequired")),o=b(t=>t!=null&&t.trim()&&!Q(t,{protocols:["http","https"],require_protocol:!0})?r("notification.email.linkInvalid"):!0),h=b(t=>t!=null&&t.trim()&&!H(t)?r("notification.email.emailInvalid"):!0),u=b(()=>!0);return e.jsxs(P,{children:[e.jsxs(We,{component:"form",onSubmit:v(D),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(w,{title:r("notification.email.enable"),my:2.5,children:e.jsx(E,{name:"enabled",control:n,render:({field:t})=>e.jsx(Y,{control:e.jsx(Z,{checked:t.value,...t})})})}),e.jsx(w,{title:r("notification.email.from"),children:e.jsx(E,{name:"from",control:n,rules:{validate:c?A:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",required:!0,label:r("notification.email.from"),error:!!a.errors[t.name],helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.host"),children:e.jsx(E,{name:"host",control:n,rules:{validate:c?I:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",required:!0,error:!!a.errors[t.name],label:r("notification.email.host"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.port"),children:e.jsx(E,{name:"port",control:n,rules:{validate:c?j:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",required:!0,type:"number",error:!!a.errors[t.name],label:r("notification.email.port"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.user"),children:e.jsx(E,{name:"user",control:n,rules:{validate:c?l:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",required:!0,error:!!a.errors[t.name],label:r("notification.email.user"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.password"),children:e.jsx(E,{name:"password",control:n,rules:{validate:c?L:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",required:!0,type:"password",error:!!a.errors[t.name],label:r("notification.email.password"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.secure"),children:e.jsx(E,{name:"secure",control:n,rules:{validate:u},render:({field:t})=>e.jsx(T,{fullWidth:!0,children:e.jsx(Y,{control:e.jsx(Z,{checked:t.value,...t,disabled:!c})})})})}),e.jsxs(Fe,{children:[e.jsxs(Se,{expandIcon:e.jsx(Te,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[r("notification.email.signature"),e.jsx(_e,{title:r("notification.email.signatureTooltip"),children:e.jsx(Ce,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(Pe,{children:[e.jsx(w,{title:r("notification.email.companyName"),children:e.jsx(E,{name:"companyName",control:n,rules:{validate:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",error:!!a.errors[t.name],label:r("notification.email.companyName"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.companyLink"),children:e.jsx(E,{name:"companyLink",control:n,rules:{validate:c?o:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",error:!!a.errors[t.name],label:r("notification.email.companyLink"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.companyAddress"),children:e.jsx(E,{name:"companyAddress",control:n,rules:{validate:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",error:!!a.errors[t.name],label:r("notification.email.companyAddress"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})}),e.jsx(w,{title:r("notification.email.supportEmail"),children:e.jsx(E,{name:"supportEmail",control:n,rules:{validate:c?h:u},render:({field:t})=>{var s;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...t,size:"small",type:"email",error:!!a.errors[t.name],label:r("notification.email.supportEmail"),helperText:((s=a.errors[t.name])==null?void 0:s.message)||" ",disabled:!c})})}})})]})]}),e.jsxs(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx($,{variant:"outlined",color:"warning",onClick:v(W),disabled:!c,children:r("oauth.runTest")}),e.jsx($,{type:"submit",variant:"contained",disabled:!a.isDirty,children:r("oauth.save")})]})]}),p]})}const We=ae(U)``,J={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Ae(){var j,l,L;const{api:f}=oe(),{blocklet:i}=me(),{t:r}=le(),{confirmApi:x,confirmHolder:p}=ce(),g=(j=i==null?void 0:i.meta)==null?void 0:j.did,_=Object.assign({...J},((L=(l=i==null?void 0:i.settings)==null?void 0:l.notification)==null?void 0:L.pushKit)||{}),{handleSubmit:v,control:n,formState:a,watch:C,reset:K}=fe({defaultValues:ue(_,Object.keys(J))}),m=de({testReceiver:"",testReceiverError:""}),c=C("enabled"),D=b(async(o,h,u=!0)=>{var R,d;try{const{blocklet:y}=await f.configNotification({input:{did:g,notification:JSON.stringify({pushKit:o})}}),t=Object.assign({...J},((d=(R=y==null?void 0:y.settings)==null?void 0:R.notification)==null?void 0:d.pushKit)||{});K(t),u&&O.success(r("oauth.saveSuccess"))}catch(y){if(u)O.error(y.message||r("oauth.saveFailed"));else throw y}}),z=b(async(o,h)=>{var u,R,d;try{a.isDirty&&await D(o,h,!1);const y=(u=((i==null?void 0:i.configs)||[]).find(S=>S.key==="BLOCKLET_APP_URL"))==null?void 0:u.value,t=ye(be(y,"/.well-known/service/blocklet/logo"),{v:(R=i==null?void 0:i.meta)==null?void 0:R.version,t:new Date((i==null?void 0:i.updatedAt)||0).getTime()}),s={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:i==null?void 0:i.appDid,fullName:(d=i==null?void 0:i.meta)==null?void 0:d.title,avatar:t}}}};await f.sendPush({input:{did:g,receiver:m.testReceiver,notification:JSON.stringify(s)}}),O.success(r("notification.pushKit.testSuccess"))}catch(y){O.error(y.message||r("notification.pushKit.testfailed"))}}),W=b((o,h)=>{m.testReceiverError="",x.open({title:r("notification.pushKit.testSend"),content:()=>e.jsx(P,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(F,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:r("notification.pushKit.inputTestReceiver"),value:m.testReceiver,onChange:u=>{m.testReceiver=u.target.value},error:!!m.testReceiverError,helperText:m.testReceiverError||" "})}),confirmButtonText:r("common.confirm"),cancelButtonText:r("common.cancel"),async onConfirm(u){var d;if(!((d=m.testReceiver)==null?void 0:d.trim())){m.testReceiverError=r("notification.pushKit.receiverRequired");return}m.testReceiverError="",await z(o,h),u()}})}),A=b(o=>{const h=o==null?void 0:o.trim();return h?Q(h)?!0:r("notification.pushKit.endpointInvalid"):r("notification.pushKit.endpointRequired")}),I=b(()=>!0);return e.jsxs(P,{children:[e.jsxs(Ie,{component:"form",onSubmit:v(D),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(w,{title:r("notification.pushKit.enable"),my:2.5,children:e.jsx(E,{name:"enabled",control:n,render:({field:o})=>e.jsx(Y,{control:e.jsx(Z,{checked:o.value,...o})})})}),e.jsx(w,{title:r("notification.pushKit.endpoint"),children:e.jsx(E,{name:"endpoint",control:n,rules:{validate:c?A:I},render:({field:o})=>{var h;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...o,size:"small",required:!0,label:r("notification.pushKit.endpoint"),error:!!a.errors[o.name],helperText:((h=a.errors[o.name])==null?void 0:h.message)||" ",disabled:!c})})}})}),e.jsxs(w,{title:r("notification.pushKit.customOptions"),children:[e.jsx(E,{name:"did",control:n,render:({field:o})=>{var h;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...o,size:"small",label:r("notification.pushKit.did"),error:!!a.errors[o.name],helperText:((h=a.errors[o.name])==null?void 0:h.message)||" ",disabled:!c})})}}),e.jsx(E,{name:"pushPath",control:n,render:({field:o})=>{var h;return e.jsx(T,{fullWidth:!0,children:e.jsx(F,{...o,size:"small",label:r("notification.pushKit.pushPath"),error:!!a.errors[o.name],helperText:((h=a.errors[o.name])==null?void 0:h.message)||" ",disabled:!c})})}})]}),e.jsxs(P,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx($,{variant:"outlined",color:"warning",onClick:v(W),disabled:!c,children:r("oauth.runTest")}),e.jsx($,{type:"submit",variant:"contained",disabled:!a.isDirty,children:r("oauth.save")})]})]}),p]})}const Ie=ae(U)``,se=[{label:e.jsx(P,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:e.jsx(P,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function Qe(){const[f,i]=B.useState(se[0].value),{locale:r}=B.useContext(we),x=Ee(()=>({email:e.jsx(ze,{}),pushKit:e.jsx(Ae,{})}),[r]),p=B.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(P,{children:[e.jsx(Re,{tabs:se,current:f,onChange:i}),e.jsx(P,{style:p,children:x[f]})]})}export{Qe as B,w as S};
@@ -1 +0,0 @@
1
- import{bl as i,ga as e}from"./index-Du-Kz75O.js";const a=e;var o=(r,t)=>a(r)===a(t);const P=i(o);export{P as i};
@@ -1 +0,0 @@
1
- import{d3 as e,i9 as r}from"./index-Du-Kz75O.js";const a=e(r);export{a as r};
@@ -1 +0,0 @@
1
- import{P as e}from"./index-Du-Kz75O.js";const p=e.oneOfType([e.func,e.object]);export{p as r};
@@ -1 +0,0 @@
1
- import{hz as o}from"./index-Du-Kz75O.js";const t=o(),c=t;export{c as b};
@@ -1 +0,0 @@
1
- import{fE as r}from"./index-Du-Kz75O.js";function p(t){return r(t).toUpperCase()}export{p as t};