@abtnode/blocklet-services 1.16.44 → 1.16.45-beta-20250609-082716-b6b0592b

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 (157) hide show
  1. package/api/cache.js +122 -138
  2. package/api/index.js +6 -9
  3. package/api/libs/email.js +1 -1
  4. package/api/libs/jwt.js +1 -1
  5. package/api/routes/dns-resolver.js +11 -10
  6. package/api/services/auth/session.js +6 -2
  7. package/api/util/attach-shared-utils.js +15 -21
  8. package/dist/assets/{AdapterDayjs-eMGLd9qK.js → AdapterDayjs-BXVfASrK.js} +1 -1
  9. package/dist/assets/{ArrowDropDown-QAD1r6CI.js → ArrowDropDown-Ce8TY3aP.js} +1 -1
  10. package/dist/assets/{CheckCircle-DKl6wFCW.js → CheckCircle-M9NlpTm_.js} +1 -1
  11. package/dist/assets/{ChevronLeft-BTvoFtZ-.js → ChevronLeft-02OWcWpH.js} +1 -1
  12. package/dist/assets/{ChevronRight-CB-tzzK0.js → ChevronRight-CB8w0u2n.js} +1 -1
  13. package/dist/assets/{DeleteOutline-D--wbiEJ.js → DeleteOutline-1-hBNY1U.js} +1 -1
  14. package/dist/assets/{Done-D5w4g3Ux.js → Done-CcJLRcBY.js} +1 -1
  15. package/dist/assets/{Download-CSPVh6pQ.js → Download-HHknpEZd.js} +1 -1
  16. package/dist/assets/{Edit-Dp6PSucO.js → Edit-hd-cDU5C.js} +1 -1
  17. package/dist/assets/{Error-7F2F0yXi.js → Error-D0rGqAKE.js} +1 -1
  18. package/dist/assets/{ExpandLess-BiXZAaWu.js → ExpandLess-Fb-uW6u_.js} +1 -1
  19. package/dist/assets/{Google-B-pSveIB.js → Google-WGwK551e.js} +1 -1
  20. package/dist/assets/{Home-BxZHmRym.js → Home-DeTVRhMG.js} +1 -1
  21. package/dist/assets/{InfoOutlined-Bpx0eOkP.js → InfoOutlined-CLiL5VeK.js} +1 -1
  22. package/dist/assets/{Launch-akp2B3sE.js → Launch-BwVeOcBz.js} +1 -1
  23. package/dist/assets/{LaunchOutlined-BorUV5ev.js → LaunchOutlined-CPurmWuM.js} +1 -1
  24. package/dist/assets/{MoreHoriz-B0f55Tf5.js → MoreHoriz-9E3q8aHi.js} +1 -1
  25. package/dist/assets/{PlayArrow-RuC30CX1.js → PlayArrow-B_ZNrQDa.js} +1 -1
  26. package/dist/assets/{TuneOutlined-D5FWo3d6.js → TuneOutlined-0oMZE8a4.js} +1 -1
  27. package/dist/assets/{ViewList-BqZC98em.js → ViewList-ColSGL1_.js} +1 -1
  28. package/dist/assets/{access-control-f_Q0xNEr.js → access-control-Bu9cwoFT.js} +1 -1
  29. package/dist/assets/{actions-DBL5WgL-.js → actions-DtL6bYnA.js} +1 -1
  30. package/dist/assets/{add-component-core-lxVDVv-g.js → add-component-core-CsW-bf6w.js} +1 -1
  31. package/dist/assets/{add-resource-DHuVcGqm.js → add-resource-D1GK1xW7.js} +1 -1
  32. package/dist/assets/{addon-DPZv8EDi.js → addon-e-JO0VU3.js} +1 -1
  33. package/dist/assets/advanced-BSxn1YDX.js +14 -0
  34. package/dist/assets/api-CQoRx33p.js +1 -0
  35. package/dist/assets/{appearance-CjjdXxDr.js → appearance-rcoe4DP4.js} +1 -1
  36. package/dist/assets/{audit-logs-9UAh1pea.js → audit-logs-XAopC8XN.js} +1 -1
  37. package/dist/assets/{authorize-f7rwXyK0.js → authorize-DNwNxF9-.js} +1 -1
  38. package/dist/assets/{base-chart-C6ehpmPk.js → base-chart-BYonGucU.js} +1 -1
  39. package/dist/assets/{base32-BwYE-4Kz.js → base32-CmYq1ikq.js} +1 -1
  40. package/dist/assets/{branding-DgYdp8Fj.js → branding-DpIlP_xM.js} +1 -1
  41. package/dist/assets/{branding-DyNgn-Bl.js → branding-moJCZl3a.js} +2 -2
  42. package/dist/assets/{bundle-avatar-eYIyRJCN.js → bundle-avatar-D28BGkcC.js} +1 -1
  43. package/dist/assets/{button-BJsVm63u.js → button-C0Vra3Ak.js} +1 -1
  44. package/dist/assets/{click-to-copy-BBibsDSl.js → click-to-copy-BUVqg1RQ.js} +1 -1
  45. package/dist/assets/{cloneDeep-IATUBtZS.js → cloneDeep-ro06l5HL.js} +1 -1
  46. package/dist/assets/{collapse-C0MB7y7w.js → collapse--nd2JDBL.js} +1 -1
  47. package/dist/assets/{complete-x6sLfw6B.js → complete-C6_ojDUa.js} +1 -1
  48. package/dist/assets/{component-B-zaossI.js → component-OYgpJSh4.js} +1 -1
  49. package/dist/assets/{config-BedCVCOB.js → config-C_hb7xhJ.js} +1 -1
  50. package/dist/assets/{config-kZ6x7NWW.js → config-QpBBpp7d.js} +1 -1
  51. package/dist/assets/{config-navigation-DWYn0QbT.js → config-navigation-VPQM3i1K.js} +3 -3
  52. package/dist/assets/{config-space-BKyIMqyn.js → config-space-CBoUabjP.js} +1 -1
  53. package/dist/assets/{confirm-W9aiB3ZK.js → confirm-BjCmRSAF.js} +1 -1
  54. package/dist/assets/{connect-BDcfioWR.js → connect-B6S3YIgF.js} +1 -1
  55. package/dist/assets/{connect-7xjSPaIL.js → connect-CQ-AWW94.js} +1 -1
  56. package/dist/assets/{connect-to-CjAmbMcq.js → connect-to-kM9lCXLX.js} +1 -1
  57. package/dist/assets/{dashboard-DTpUsE7s.js → dashboard-B7qE-Md0.js} +3 -3
  58. package/dist/assets/{delete-confirm-CR9GWuZW.js → delete-confirm-Dow_C0jR.js} +1 -1
  59. package/dist/assets/{did-address-C3GRjuMv.js → did-address-bJAfhuZx.js} +1 -1
  60. package/dist/assets/{domain-C5GTtUcW.js → domain-B8NapX5o.js} +1 -1
  61. package/dist/assets/{domain-action-card-DZFY_-cJ.js → domain-action-card-CCtkcxNz.js} +1 -1
  62. package/dist/assets/domains-DzI4bWdK.js +1 -0
  63. package/dist/assets/{dot-DGdAPqTT.js → dot-BID2dzD_.js} +1 -1
  64. package/dist/assets/{email-0L0UoCI5.js → email-DDPCqu4Z.js} +1 -1
  65. package/dist/assets/{exchange-passport-Cz76Mvqo.js → exchange-passport-xdsOlfWE.js} +1 -1
  66. package/dist/assets/{fuel-H0bbfYDc.js → fuel-D1fw-gpI.js} +1 -1
  67. package/dist/assets/{gen-access-key-CVMgx_Do.js → gen-access-key-R0_DUG_D.js} +1 -1
  68. package/dist/assets/{get-safe-url-CISc2x16.js → get-safe-url-BWDUV79Q.js} +1 -1
  69. package/dist/assets/{get-safe-url-DvHrYSqa.js → get-safe-url-CwT4-jkw.js} +1 -1
  70. package/dist/assets/{home-frxjPVWF.js → home-D1kBU1RC.js} +1 -1
  71. package/dist/assets/{iframe-BiCAYvW4.js → iframe-DsIqy16E.js} +1 -1
  72. package/dist/assets/{index-C0jIKgVd.js → index-At5NExT-.js} +1 -1
  73. package/dist/assets/{index-CsOtcFM5.js → index-B-K0Nvyz.js} +1 -1
  74. package/dist/assets/{index-BFxPxs1o.js → index-B4FABIlz.js} +1 -1
  75. package/dist/assets/{index-C9xycxde.js → index-BBuUqC0B.js} +1 -1
  76. package/dist/assets/{index-Bp39ibX1.js → index-BDw54V1q.js} +1 -1
  77. package/dist/assets/{index-CTJ98R3F.js → index-BSiKOdsD.js} +1 -1
  78. package/dist/assets/{index-CmGpTnGy.js → index-BY-e9TG4.js} +1 -1
  79. package/dist/assets/{index-Dsf-Dx7V.js → index-BnR8uU0R.js} +1 -1
  80. package/dist/assets/{index-DZ-_hefE.js → index-BpvW-cUy.js} +1 -1
  81. package/dist/assets/{index-NqsjhbFu.js → index-Brd3-BIC.js} +1 -1
  82. package/dist/assets/{index-CXZIC-uq.js → index-By1VEzOz.js} +1 -1
  83. package/dist/assets/{index-D2TrKFIL.js → index-CCrgDhTM.js} +1 -1
  84. package/dist/assets/{index-BPMh7nrj.js → index-CZgWTJXl.js} +1 -1
  85. package/dist/assets/{index-Rx6rf5TL.js → index-DQjZ74P0.js} +43 -43
  86. package/dist/assets/{index-DVfId0OB.js → index-DVLOAsDQ.js} +1 -1
  87. package/dist/assets/{index-CNP49TJ1.js → index-DWZfwLDs.js} +1 -1
  88. package/dist/assets/{index-DtuVp5SU.js → index-DnDFazyx.js} +3 -3
  89. package/dist/assets/{index-KHBjePpP.js → index-Dntq1ezd.js} +1 -1
  90. package/dist/assets/{index-Ch5CE_Xo.js → index-Drni9chH.js} +1 -1
  91. package/dist/assets/{index-B778V4Al.js → index-Hs7lhrID.js} +4 -4
  92. package/dist/assets/{index-CqQ_qPcW.js → index-NE1bWD-Q.js} +1 -1
  93. package/dist/assets/{invitation-BrPENaxX.js → invitation-Sx6eoeir.js} +1 -1
  94. package/dist/assets/{invite-B0YEiWAC.js → invite-CZ68j_lY.js} +1 -1
  95. package/dist/assets/{issue-passport-Dz3BWjAa.js → issue-passport-IkLenFGe.js} +1 -1
  96. package/dist/assets/{item-CALJuG3t.js → item-RUDvbSOI.js} +1 -1
  97. package/dist/assets/{layout-BpG5xw8B.js → layout-BCvTd67o.js} +1 -1
  98. package/dist/assets/{list-DyU1G1ER.js → list-BeFxJZxl.js} +1 -1
  99. package/dist/assets/{list-BZl1XCaf.js → list-DjvUHEwY.js} +2 -2
  100. package/dist/assets/localization-BNjdHo-G.js +1 -0
  101. package/dist/assets/{log-CTKJhZ_E.js → log-BGQO-I2s.js} +1 -1
  102. package/dist/assets/{logger-DAjuoBTQ.js → logger-KwxABgLK.js} +1 -1
  103. package/dist/assets/{login-Cg8geEoU.js → login-BF0iOJJn.js} +1 -1
  104. package/dist/assets/{login-oauth-callback-HckguQey.js → login-oauth-callback-Dt9V4GRH.js} +1 -1
  105. package/dist/assets/{logo-uploader-oD7wBJlZ.js → logo-uploader-BecsVnr8.js} +3 -3
  106. package/dist/assets/{lost-passport-BxZlOTiO.js → lost-passport-CaF7MO2m.js} +1 -1
  107. package/dist/assets/{omit-CsI4VeYr.js → omit-O1pUD7ku.js} +1 -1
  108. package/dist/assets/{open-window-Ct0k45Ir.js → open-window-Dn44K3ur.js} +1 -1
  109. package/dist/assets/overview-DwmambxV.js +85 -0
  110. package/dist/assets/{page-header-CVBmdH9B.js → page-header-JH9JWGMg.js} +1 -1
  111. package/dist/assets/{passport-item-D1UYvMW_.js → passport-item-DEX2NwJD.js} +1 -1
  112. package/dist/assets/{permission-CMjo9z-z.js → permission-B7ZHEOJv.js} +1 -1
  113. package/dist/assets/{preferences-Dtk7H5V2.js → preferences-DUSp_pAb.js} +1 -1
  114. package/dist/assets/{profile-embed-yHOg7opg.js → profile-embed-BIjwkrGW.js} +1 -1
  115. package/dist/assets/publish-resource-Bk548CMo.js +1 -0
  116. package/dist/assets/{react-beautiful-dnd.esm-CaWQHB2l.js → react-beautiful-dnd.esm-DCPrD7-r.js} +1 -1
  117. package/dist/assets/{runtime-BGMX9PTT.js → runtime-xdMFSsvP.js} +1 -1
  118. package/dist/assets/{sanitize-qIr4ImjO.js → sanitize-DbZs1H_T.js} +1 -1
  119. package/dist/assets/sdk-BJQcHaGO.js +1 -0
  120. package/dist/assets/{security-DDqACA_P.js → security-DCYPNDg3.js} +1 -1
  121. package/dist/assets/{session-N9ogZkBO.js → session-1k8BRnYA.js} +1 -1
  122. package/dist/assets/{setup--FMKBbd7.js → setup-CQ7O7nI0.js} +3 -3
  123. package/dist/assets/{spaces-ClWdZraZ.js → spaces-CpSu6mVL.js} +1 -1
  124. package/dist/assets/{start-D7GkMfm4.js → start-t5ebRJzD.js} +1 -1
  125. package/dist/assets/{starting-progress-COPiu29g.js → starting-progress-a7uoLG-L.js} +1 -1
  126. package/dist/assets/{status-D5ypXFOB.js → status-C4-MBX3k.js} +1 -1
  127. package/dist/assets/{step-actions-X0m-Hu2A.js → step-actions-Brohu3S-.js} +1 -1
  128. package/dist/assets/{studio-LXKuDXYf.js → studio-Cua13-ul.js} +1 -1
  129. package/dist/assets/{switch-control-ByXecLFy.js → switch-control-CzaI2YNK.js} +1 -1
  130. package/dist/assets/{table-tips-CbVGFubR.js → table-tips-Czrj7r52.js} +1 -1
  131. package/dist/assets/{traffic-GgX3Erg7.js → traffic-BI_ofO44.js} +1 -1
  132. package/dist/assets/{transfer-Dq6dS0l-.js → transfer-SwfyIGYE.js} +1 -1
  133. package/dist/assets/{unsubscribe-BZAVKPXL.js → unsubscribe-DFPfNrme.js} +1 -1
  134. package/dist/assets/{use-blocklet-logo-CmMzePwG.js → use-blocklet-logo-6YMz11ob.js} +1 -1
  135. package/dist/assets/use-server-logo-BbYHFDuK.js +1 -1
  136. package/dist/assets/{useAsync-QkUcWOv0.js → useAsync-B6ZHbOEG.js} +1 -1
  137. package/dist/assets/{useLocalStorage-COrhSWV-.js → useLocalStorage-BF3BqN1O.js} +1 -1
  138. package/dist/assets/{user-center-DVO5FZd_.js → user-center-BjGMsOGg.js} +3 -3
  139. package/dist/assets/{util-DZiavuQJ.js → util-BBMAZSVn.js} +1 -1
  140. package/dist/assets/{util-Ayf5_DBX.js → util-CS4PqVkK.js} +1 -1
  141. package/dist/assets/{vendor-arcblock-CATQui2x.js → vendor-arcblock-B4hgrXYM.js} +74 -74
  142. package/dist/assets/{vendor-hooks-TMGmpw5W.js → vendor-hooks-BCm626KH.js} +1 -1
  143. package/dist/assets/vendor-utils-B3iZkn2R.js +208 -0
  144. package/dist/assets/vendor-ux-did-connect-CX7qG3_M.js +2305 -0
  145. package/dist/assets/{wrap-locale-BD27EgAf.js → wrap-locale-378mdIBS.js} +1 -1
  146. package/dist/index.html +5 -5
  147. package/dist/service-worker.js +1 -1
  148. package/package.json +45 -45
  149. package/dist/assets/advanced-iHTV3yj0.js +0 -14
  150. package/dist/assets/api-DB7tZ-Xo.js +0 -1
  151. package/dist/assets/domains-BjYCkCPj.js +0 -1
  152. package/dist/assets/localization-BpRT0W0W.js +0 -1
  153. package/dist/assets/overview-B_ZqHpwj.js +0 -85
  154. package/dist/assets/publish-resource-H3WaTgcl.js +0 -1
  155. package/dist/assets/sdk-b4mKK9kW.js +0 -1
  156. package/dist/assets/vendor-utils-CxrPpJZS.js +0 -208
  157. package/dist/assets/vendor-ux-did-connect-Bh011lgb.js +0 -2305
@@ -1 +1 @@
1
- import{w as b}from"./vendor-utils-CxrPpJZS.js";function c(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,l=-1,t=0,n,f=0;f<=o.length;++f){if(f<o.length)n=o.charCodeAt(f);else{if(n===47)break;n=47}if(n===47){if(!(l===f-1||t===1))if(l!==f-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),l=f,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,l=f,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(l+1,f):r=o.slice(l+1,f),i=f-l-1;l=f,t=0}else n===46&&t!==-1?++t:t=-1}return r}function h(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,l=arguments.length-1;l>=-1&&!r;l--){var t;l>=0?t=arguments[l]:(i===void 0&&(i=b.cwd()),t=i),c(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(c(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return c(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];c(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(c(e),c(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var l=e.length,t=l-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var f=r.length,s=f-n,v=t<s?t:s,u=-1,a=0;a<=v;++a){if(a===v){if(s>v){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>v&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var m=e.charCodeAt(i+a),C=r.charCodeAt(n+a);if(m!==C)break;m===47&&(u=a)}var d="";for(a=i+u+1;a<=l;++a)(a===l||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(c(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,l=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){l=n;break}}else t=!1;return l===-1?i?"/":".":i&&l===1?"//":e.slice(0,l)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');c(e);var i=0,l=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var v=e.charCodeAt(n);if(v===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),f>=0&&(v===r.charCodeAt(f)?--f===-1&&(l=n):(f=-1,l=s))}return i===l?l=s:l===-1&&(l=e.length),e.slice(i,l)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else l===-1&&(t=!1,l=n+1);return l===-1?"":e.slice(i,l)}},extname:function(e){c(e);for(var r=-1,i=0,l=-1,t=!0,n=0,f=e.length-1;f>=0;--f){var s=e.charCodeAt(f);if(s===47){if(!t){i=f+1;break}continue}l===-1&&(t=!1,l=f+1),s===46?r===-1?r=f:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||l===-1||n===0||n===1&&r===l-1&&r===i+1?"":e.slice(r,l)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return h("/",e)},parse:function(e){c(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),l=i===47,t;l?(r.root="/",t=1):t=0;for(var n=-1,f=0,s=-1,v=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!v){f=u+1;break}continue}s===-1&&(v=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===f+1?s!==-1&&(f===0&&l?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(f,s)):(f===0&&l?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(f,n),r.base=e.slice(f,s)),r.ext=e.slice(n,s)),f>0?r.dir=e.slice(0,f-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g;var w=g;export{w as p};
1
+ import{v as b}from"./vendor-utils-B3iZkn2R.js";function c(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,l=-1,t=0,n,f=0;f<=o.length;++f){if(f<o.length)n=o.charCodeAt(f);else{if(n===47)break;n=47}if(n===47){if(!(l===f-1||t===1))if(l!==f-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),l=f,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,l=f,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(l+1,f):r=o.slice(l+1,f),i=f-l-1;l=f,t=0}else n===46&&t!==-1?++t:t=-1}return r}function h(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,l=arguments.length-1;l>=-1&&!r;l--){var t;l>=0?t=arguments[l]:(i===void 0&&(i=b.cwd()),t=i),c(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(c(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return c(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];c(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(c(e),c(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var l=e.length,t=l-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var f=r.length,s=f-n,v=t<s?t:s,u=-1,a=0;a<=v;++a){if(a===v){if(s>v){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>v&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var m=e.charCodeAt(i+a),C=r.charCodeAt(n+a);if(m!==C)break;m===47&&(u=a)}var d="";for(a=i+u+1;a<=l;++a)(a===l||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(c(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,l=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){l=n;break}}else t=!1;return l===-1?i?"/":".":i&&l===1?"//":e.slice(0,l)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');c(e);var i=0,l=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var v=e.charCodeAt(n);if(v===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),f>=0&&(v===r.charCodeAt(f)?--f===-1&&(l=n):(f=-1,l=s))}return i===l?l=s:l===-1&&(l=e.length),e.slice(i,l)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else l===-1&&(t=!1,l=n+1);return l===-1?"":e.slice(i,l)}},extname:function(e){c(e);for(var r=-1,i=0,l=-1,t=!0,n=0,f=e.length-1;f>=0;--f){var s=e.charCodeAt(f);if(s===47){if(!t){i=f+1;break}continue}l===-1&&(t=!1,l=f+1),s===46?r===-1?r=f:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||l===-1||n===0||n===1&&r===l-1&&r===i+1?"":e.slice(r,l)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return h("/",e)},parse:function(e){c(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),l=i===47,t;l?(r.root="/",t=1):t=0;for(var n=-1,f=0,s=-1,v=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!v){f=u+1;break}continue}s===-1&&(v=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===f+1?s!==-1&&(f===0&&l?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(f,s)):(f===0&&l?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(f,n),r.base=e.slice(f,s)),r.ext=e.slice(n,s)),f>0?r.dir=e.slice(0,f-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g;var y=g;export{y as p};
@@ -1 +1 @@
1
- import{j as t,ah as r}from"./vendor-mui-core-wlbruq2I.js";import{r as s}from"./vendor-react-DEoibe3W.js";import{bb as a}from"./vendor-ux-did-connect-Bh011lgb.js";import{R as e}from"./vendor-arcblock-CATQui2x.js";import"./vendor-utils-CxrPpJZS.js";import"./vendor-hooks-TMGmpw5W.js";import"./lottie-web-jYmAQWuC.js";function x(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{x as default};
1
+ import{j as t,ah as r}from"./vendor-mui-core-wlbruq2I.js";import{r as s}from"./vendor-react-DEoibe3W.js";import{bb as a}from"./vendor-ux-did-connect-CX7qG3_M.js";import{R as e}from"./vendor-arcblock-B4hgrXYM.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";function x(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{x as default};
@@ -1,4 +1,4 @@
1
- import{j as t,ab as S,aa as c,H as d,ah as g}from"./vendor-mui-core-wlbruq2I.js";import{r as y}from"./vendor-react-DEoibe3W.js";import{bb as v,F as w,B as m}from"./vendor-ux-did-connect-Bh011lgb.js";import{P}from"./page-header-CVBmdH9B.js";import{G as T}from"./index-Rx6rf5TL.js";import{u as b}from"./config-space-BKyIMqyn.js";import{C as B,D as E,a as D}from"./connect-to-CjAmbMcq.js";import{S as u}from"./step-actions-X0m-Hu2A.js";import{S as G}from"./layout-BpG5xw8B.js";import"./vendor-utils-CxrPpJZS.js";import"./vendor-hooks-TMGmpw5W.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-CATQui2x.js";import"./spaces-ClWdZraZ.js";import"./api-DB7tZ-Xo.js";import"./index-8eXqqyHQ.js";import"./DeleteOutline-D--wbiEJ.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";function l({onNext:a,onPrevious:x}){var n,r,p;const{t:i}=y.useContext(v),{blocklet:e}=T(),{spaceGateway:f,settingStorageEndpoint:j,updateSpaceGateway:C,hasStorageEndpoint:h,loading:o,storageEndpoint:s}=b();return o?t.jsx(w,{relative:"parent",children:t.jsx(S,{})}):t.jsxs(N,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:i("setup.didSpace.title"),subTitle:i("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:h?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:j}):t.jsx(E,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(D,{onConnect:C,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:o,variant:"contained",disabled:o||!s,onClick:()=>a(),children:i("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>a("complete"),children:t.jsx(m,{className:"start-now",loading:o,variant:"contained",disabled:o,onClick:()=>a(),children:i(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const N=g(G)`
1
+ import{j as t,ab as S,aa as c,H as d,ah as g}from"./vendor-mui-core-wlbruq2I.js";import{r as y}from"./vendor-react-DEoibe3W.js";import{bb as v,F as w,B as m}from"./vendor-ux-did-connect-CX7qG3_M.js";import{P}from"./page-header-JH9JWGMg.js";import{G as T}from"./index-DQjZ74P0.js";import{u as b}from"./config-space-CBoUabjP.js";import{C as B,D as E,a as D}from"./connect-to-kM9lCXLX.js";import{S as u}from"./step-actions-Brohu3S-.js";import{S as G}from"./layout-BCvTd67o.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./index-8eXqqyHQ.js";import"./DeleteOutline-1-hBNY1U.js";import"./use-mobile-CXU9YBvX.js";import"./content-layout-DuPlKBe3.js";function l({onNext:a,onPrevious:x}){var n,r,p;const{t:i}=y.useContext(v),{blocklet:e}=T(),{spaceGateway:f,settingStorageEndpoint:j,updateSpaceGateway:C,hasStorageEndpoint:h,loading:o,storageEndpoint:s}=b();return o?t.jsx(w,{relative:"parent",children:t.jsx(S,{})}):t.jsxs(N,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:i("setup.didSpace.title"),subTitle:i("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:h?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:j}):t.jsx(E,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(D,{onConnect:C,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:o,variant:"contained",disabled:o||!s,onClick:()=>a(),children:i("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>a("complete"),children:t.jsx(m,{className:"start-now",loading:o,variant:"contained",disabled:o,onClick:()=>a(),children:i(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const N=g(G)`
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
4
  `;export{l as default};
@@ -1,4 +1,4 @@
1
- import{j as e,H as h,ah as Je,T as C,ab as A,e as Ze,cD as Z,ae as G,cE as Ge,aa as j,al as W,s as ge,ad as Se,ap as et,cF as ze,a9 as ye,q,b8 as Y,b9 as H,y as tt,at as st,as as Ae}from"./vendor-mui-core-wlbruq2I.js";import{l as nt,i as Pe,b as fe}from"./vendor-hooks-TMGmpw5W.js";import{r as y,h as ot}from"./vendor-react-DEoibe3W.js";import{c as _,y as rt,W as at,J as it,X as ct,l as lt,w as dt,Y as ue,x as ut}from"./vendor-arcblock-CATQui2x.js";import{a3 as B,a as T,bb as pt,k as R,bg as V,ac as mt,r as je,bE as ft,B as pe,at as ht,F as _e,ax as xt}from"./vendor-ux-did-connect-Bh011lgb.js";import{G as O,D as M,y as w,a3 as gt,af as St,aF as yt}from"./index-Rx6rf5TL.js";import{u as jt}from"./use-mobile-CXU9YBvX.js";import{b as Q,d as Me,a8 as bt,I as Ct,E as Ue,A as he}from"./vendor-utils-CxrPpJZS.js";import"./api-DB7tZ-Xo.js";import{u as Ne,C as kt,D as Dt,a as Bt}from"./connect-to-CjAmbMcq.js";import{b as Et,c as wt,d as Tt,i as It,e as xe,f as Rt,h as vt,j as At}from"./spaces-ClWdZraZ.js";import{f as X}from"./index-8eXqqyHQ.js";import{I as Ot}from"./index-Dsf-Dx7V.js";import{R as Lt}from"./index-KHBjePpP.js";import{d as zt}from"./MoreHoriz-B0f55Tf5.js";import{c as Pt}from"./dashboard-DTpUsE7s.js";import{d as _t}from"./DeleteOutline-D--wbiEJ.js";import{g as Oe}from"./get-safe-url-DvHrYSqa.js";import{S as Mt}from"./switch-control-ByXecLFy.js";import{C as Ut,u as Nt}from"./config-space-BKyIMqyn.js";import{L as Le}from"./list-header-D976e09p.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-COrhSWV-.js";import"./confirm-W9aiB3ZK.js";import"./PlayArrow-RuC30CX1.js";import"./session-N9ogZkBO.js";import"./use-blocklet-logo-CmMzePwG.js";import"./InfoOutlined-Bpx0eOkP.js";import"./dot-DGdAPqTT.js";import"./useAsync-QkUcWOv0.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CiFFAdJf.js";async function Wt({blockletDid:t,nodeApi:r,spaceGateways:o}){let s=!1;const i=await Promise.all(o.map(async n=>{let{name:a}=n;const d=await Et(n.endpoint);return!Q(d)&&d!==a&&(a=d,s=!0),{...n,name:a}}));return s&&await Promise.all(i.filter(n=>n.did).map(n=>r.updateBlockletSpaceGateway({input:{did:t,where:{did:n.did},spaceGateway:{...n}}}))),i}function Ft({refresh:t}={}){var i;const{blocklet:r}=O(),o=(i=r==null?void 0:r.meta)==null?void 0:i.did,{api:s}=M();return nt(async()=>{if(!o)return[];const{spaceGateways:n}=await s.getBlockletSpaceGateways({input:{did:o}});return await Wt({blockletDid:o,nodeApi:s,spaceGateways:n})??[]},{refreshDeps:[o,t],onError(n){var a;(a=n==null?void 0:n.message)!=null&&a.includes("not logged")?console.warn(n):(console.error(n),B.error(X(n)))}})}function We({deps:t,setLoading:r,backupDate:o}={deps:[],setLoading:()=>{},backupDate:new Date}){var x;const{blocklet:s}=O(),[i,n]=y.useState([]),{api:a}=M(),[d,u]=y.useMemo(()=>o?[w(o).startOf("day").toISOString(),w(o).endOf("day").toISOString()]:[w().startOf("year").toISOString(),w().endOf("day").toISOString()],[o]),c=Me(async()=>{try{if(r(!0),!s){n([]);return}const{backups:p}=await a.getBlockletBackups({input:{did:s.meta.did,startTime:d,endTime:u}});n(p??[])}catch(p){console.error(p),B.error(X(p))}finally{r(!1)}},1e3);return Pe(async()=>{c()},[(x=s==null?void 0:s.meta)==null?void 0:x.did].concat(t)),{backups:i}}function Kt({appDid:t}){const{backups:r}=We(),[o,s]=y.useState({message:"",progress:0,completed:!1}),i=M(),{ws:{useSubscription:n}}=i;return n(_.BlockletEvents.backupProgress,a=>{t===(a==null?void 0:a.appDid)&&s(()=>({...a}))},[t]),y.useEffect(()=>{var a;if(r!=null&&r.length&&bt((a=r[0])==null?void 0:a.status)){const[d]=r;s(()=>({message:d.message,progress:d.progress,completed:d.progress>=100}))}},[r]),o}function $t({deps:t=[],setLoading:r=()=>{}}={}){var d;const{blocklet:o}=O(),[s,i]=y.useState([]),{api:n}=M(),a=y.useCallback(Me(async()=>{var u;if(!n||!((u=o==null?void 0:o.meta)!=null&&u.did)){i([]);return}try{r(!0);const c=w(),x=c.subtract(1,"year"),{summary:p}=await n.getBlockletBackupSummary({input:{did:o.meta.did,startTime:x.toISOString(),endTime:c.toISOString()}});i(Array.isArray(p)?p:[])}catch(c){console.error("Failed to fetch backup summary:",c),B.error(X(c)),i([])}finally{r(!1)}},1e3),[]);return Pe(async()=>(await a(),()=>{a.cancel()}),[(d=o==null?void 0:o.meta)==null?void 0:d.did].concat(t)),{backupSummary:s}}const Fe=y.createContext({}),{Provider:qt,Consumer:Ws}=Fe;function be({children:t}){var K;const{t:r}=T(),{api:o}=M(),{blocklet:s}=O(),[i,n]=y.useState(null),[a,d]=y.useState(!1),{data:u,loading:c,mutate:x}=Ft({refresh:a}),p=Ct(u),g=Kt({appDid:s==null?void 0:s.appDid}),f=y.useMemo(()=>wt(s==null?void 0:s.environments),[s==null?void 0:s.environments]),[b,D]=y.useState(!1),[S,l]=y.useState(!1),{backups:te}=We({deps:[S,i],setLoading:D,backupDate:i}),[se,ne]=y.useState(!1),{backupSummary:oe}=$t({deps:[se]}),[U,z]=y.useState(u==null?void 0:u.find(m=>m.endpoint===f)),I=(K=s==null?void 0:s.settings)==null?void 0:K.autoBackup,v=()=>{d(m=>!m)},re=()=>{ne(m=>!m)},ae=()=>{l(m=>!m)},F=async m=>{await o.updateAutoBackup({input:{did:s.meta.did,autoBackup:m}})},J=async()=>{await o.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(m,N)=>{try{x(E=>{const P=[...E];return P.push({...m,loading:!0}),P}),await o.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:m}}),f!==N&&await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:N}]}}),z(m),v(),B.success(r("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"}))}catch(E){throw console.error(E),x(P=>[...P].filter(de=>de.did!==m.did)),E}},ce=async m=>{m&&(m.endpoint===f&&(await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I!=null&&I.enabled&&await F({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:m==null?void 0:m.did}}),x(N=>{const E=[...N];return E.splice(E.indexOf(m),1),E}),z(m),v())},le=async m=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:m.did},spaceGateway:m}}),f!==m.endpoint&&o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:m.endpoint}]}})]),B.success(r("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"})),v()},k=m=>(m==null?void 0:m.endpoint)===f;return e.jsx(qt,{value:{spaceGateways:u||[],selectedSpaceGateway:U,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:v,spaceGatewaysLoading:c,spaceGatewaysFirstLoading:p,spaceGatewayIsSelected:k,updateAutoBackup:F,abortBlockletBackup:J,backupEndpoint:f,backupProgress:g,backups:te,backupSummary:oe,refreshBackupSummary:re,refreshBackups:ae,setBackupDate:n,backupsLoading:b,autoBackup:I},children:t})}be.propTypes={children:h.any.isRequired};be.defaultProps={};function L(){return y.useContext(Fe)}function ee({...t}){const{blocklet:r}=O(),{info:o}=M(),{t:s}=T(),i=Ne({blocklet:r}),n=gt(o),{spaceGateways:a,addSpaceGateway:d}=L(),u={checkFn:Ue.create({baseURL:he(window.location.origin,St())}).get,webWalletUrl:n,extraParams:{appPid:r.appPid,appDid:i.appDid,appName:i.appName,appDescription:i.appDescription,appUrl:i.appUrl,referrer:i.referrer,scopes:i.scopes,nodeDid:o.did}},c=async({endpoint:p,name:g,did:f})=>{const b=await Tt(p);if(!await It(b)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(a.some(l=>l.endpoint===p)){B.error(s("storage.spaces.gateway.add.duplicate",{name:g}));return}await d({name:g,did:f,url:b,endpoint:p},p)},x=async({spaceGateway:p})=>{try{await c(p)}catch(g){console.error(g),B.error(X(g))}};return e.jsx(rt,{...t,connectScope:"app",options:u,onSuccess:x})}ee.propTypes={};ee.defaultProps={};function Ke({...t}){const{t:r}=y.useContext(pt),{blocklet:o,loadingDiskInfo:s,actions:i}=O();if(y.useEffect(()=>{i==null||i.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),o.diskInfo){const n=(u,c,x)=>e.jsxs(C,{children:[u," ",e.jsx("strong",{children:c?yt(c):"empty"})]}),a=o.environments.reduce((u,c)=>(u[c.key]=c.value,u),{}),d=[{key:"appDir",name:r("blocklet.diskInfo.appDir"),value:n(a.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:r("blocklet.diskInfo.dataDir"),value:n(a.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:r("blocklet.diskInfo.logDir"),value:n(a.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:r("blocklet.diskInfo.cacheDir"),value:n(a.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Yt,{component:"div",...t,children:d.map(u=>e.jsx(Ot,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.key))})}return s?e.jsx(A,{}):e.jsx(C,{children:r("blocklet.diskInfo.empty")})}const Yt=Je(C)``;function Ce(){const{t}=T(),{setBackupDate:r,backupSummary:o}=L(),s=at({key:"lg"}),i=y.useRef(null),n=Ze(),a=y.useCallback(c=>{r(c)},[r]),d=y.useMemo(()=>{const c=w().add(1,"day"),x=w().subtract(11,"month").startOf("month"),p=new Map(o.map(f=>[f.date,{date:f.date,successCount:f.successCount,errorCount:f.errorCount}])),g=[];for(let f=x.clone();w(f).isBefore(c);f=f.add(1,"day")){const b=f.format("YYYY-MM-DD");g.push(p.get(b)||{date:b,successCount:0,errorCount:0})}return g},[o]),u=y.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:b=>{const{date:D,successCount:S,errorCount:l}=d[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")}: ${l}</div>`].join(`
1
+ import{j as e,H as h,ah as Je,T as C,ab as A,e as Ze,cD as Z,ae as G,cE as Ge,aa as j,al as W,s as ge,ad as Se,ap as et,cF as ze,a9 as ye,q,b8 as Y,b9 as H,y as tt,at as st,as as Ae}from"./vendor-mui-core-wlbruq2I.js";import{l as nt,i as Pe,b as fe}from"./vendor-hooks-BCm626KH.js";import{r as y,h as ot}from"./vendor-react-DEoibe3W.js";import{c as _,y as rt,W as at,J as it,X as ct,l as lt,w as dt,Y as ue,x as ut}from"./vendor-arcblock-B4hgrXYM.js";import{a3 as B,a as T,bb as pt,k as R,bg as V,ac as mt,r as je,bE as ft,B as pe,at as ht,F as _e,ax as xt}from"./vendor-ux-did-connect-CX7qG3_M.js";import{G as O,D as M,y as w,a3 as gt,af as St,aF as yt}from"./index-DQjZ74P0.js";import{u as jt}from"./use-mobile-CiFFAdJf.js";import{b as Q,d as Me,a8 as bt,I as Ct,E as Ue,A as he}from"./vendor-utils-B3iZkn2R.js";import"./api-CQoRx33p.js";import{u as Ne,C as kt,D as Dt,a as Bt}from"./connect-to-kM9lCXLX.js";import{b as Et,c as wt,d as Tt,i as It,e as xe,f as Rt,h as vt,j as At}from"./spaces-CpSu6mVL.js";import{f as X}from"./index-8eXqqyHQ.js";import{I as Ot}from"./index-BnR8uU0R.js";import{R as Lt}from"./index-Dntq1ezd.js";import{d as zt}from"./MoreHoriz-9E3q8aHi.js";import{c as Pt}from"./dashboard-B7qE-Md0.js";import{d as _t}from"./DeleteOutline-1-hBNY1U.js";import{g as Oe}from"./get-safe-url-CwT4-jkw.js";import{S as Mt}from"./switch-control-CzaI2YNK.js";import{C as Ut,u as Nt}from"./config-space-CBoUabjP.js";import{L as Le}from"./list-header-D976e09p.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./InfoOutlined-CLiL5VeK.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";async function Wt({blockletDid:t,nodeApi:r,spaceGateways:o}){let s=!1;const i=await Promise.all(o.map(async n=>{let{name:a}=n;const d=await Et(n.endpoint);return!Q(d)&&d!==a&&(a=d,s=!0),{...n,name:a}}));return s&&await Promise.all(i.filter(n=>n.did).map(n=>r.updateBlockletSpaceGateway({input:{did:t,where:{did:n.did},spaceGateway:{...n}}}))),i}function Ft({refresh:t}={}){var i;const{blocklet:r}=O(),o=(i=r==null?void 0:r.meta)==null?void 0:i.did,{api:s}=M();return nt(async()=>{if(!o)return[];const{spaceGateways:n}=await s.getBlockletSpaceGateways({input:{did:o}});return await Wt({blockletDid:o,nodeApi:s,spaceGateways:n})??[]},{refreshDeps:[o,t],onError(n){var a;(a=n==null?void 0:n.message)!=null&&a.includes("not logged")?console.warn(n):(console.error(n),B.error(X(n)))}})}function We({deps:t,setLoading:r,backupDate:o}={deps:[],setLoading:()=>{},backupDate:new Date}){var x;const{blocklet:s}=O(),[i,n]=y.useState([]),{api:a}=M(),[d,u]=y.useMemo(()=>o?[w(o).startOf("day").toISOString(),w(o).endOf("day").toISOString()]:[w().startOf("year").toISOString(),w().endOf("day").toISOString()],[o]),c=Me(async()=>{try{if(r(!0),!s){n([]);return}const{backups:p}=await a.getBlockletBackups({input:{did:s.meta.did,startTime:d,endTime:u}});n(p??[])}catch(p){console.error(p),B.error(X(p))}finally{r(!1)}},1e3);return Pe(async()=>{c()},[(x=s==null?void 0:s.meta)==null?void 0:x.did].concat(t)),{backups:i}}function Kt({appDid:t}){const{backups:r}=We(),[o,s]=y.useState({message:"",progress:0,completed:!1}),i=M(),{ws:{useSubscription:n}}=i;return n(_.BlockletEvents.backupProgress,a=>{t===(a==null?void 0:a.appDid)&&s(()=>({...a}))},[t]),y.useEffect(()=>{var a;if(r!=null&&r.length&&bt((a=r[0])==null?void 0:a.status)){const[d]=r;s(()=>({message:d.message,progress:d.progress,completed:d.progress>=100}))}},[r]),o}function $t({deps:t=[],setLoading:r=()=>{}}={}){var d;const{blocklet:o}=O(),[s,i]=y.useState([]),{api:n}=M(),a=y.useCallback(Me(async()=>{var u;if(!n||!((u=o==null?void 0:o.meta)!=null&&u.did)){i([]);return}try{r(!0);const c=w(),x=c.subtract(1,"year"),{summary:p}=await n.getBlockletBackupSummary({input:{did:o.meta.did,startTime:x.toISOString(),endTime:c.toISOString()}});i(Array.isArray(p)?p:[])}catch(c){console.error("Failed to fetch backup summary:",c),B.error(X(c)),i([])}finally{r(!1)}},1e3),[]);return Pe(async()=>(await a(),()=>{a.cancel()}),[(d=o==null?void 0:o.meta)==null?void 0:d.did].concat(t)),{backupSummary:s}}const Fe=y.createContext({}),{Provider:qt,Consumer:Ws}=Fe;function be({children:t}){var K;const{t:r}=T(),{api:o}=M(),{blocklet:s}=O(),[i,n]=y.useState(null),[a,d]=y.useState(!1),{data:u,loading:c,mutate:x}=Ft({refresh:a}),p=Ct(u),g=Kt({appDid:s==null?void 0:s.appDid}),f=y.useMemo(()=>wt(s==null?void 0:s.environments),[s==null?void 0:s.environments]),[b,D]=y.useState(!1),[S,l]=y.useState(!1),{backups:te}=We({deps:[S,i],setLoading:D,backupDate:i}),[se,ne]=y.useState(!1),{backupSummary:oe}=$t({deps:[se]}),[U,z]=y.useState(u==null?void 0:u.find(m=>m.endpoint===f)),I=(K=s==null?void 0:s.settings)==null?void 0:K.autoBackup,v=()=>{d(m=>!m)},re=()=>{ne(m=>!m)},ae=()=>{l(m=>!m)},F=async m=>{await o.updateAutoBackup({input:{did:s.meta.did,autoBackup:m}})},J=async()=>{await o.abortBlockletBackup({input:{appPid:s.meta.did}})},ie=async(m,N)=>{try{x(E=>{const P=[...E];return P.push({...m,loading:!0}),P}),await o.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:m}}),f!==N&&await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:N}]}}),z(m),v(),B.success(r("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"}))}catch(E){throw console.error(E),x(P=>[...P].filter(de=>de.did!==m.did)),E}},ce=async m=>{m&&(m.endpoint===f&&(await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I!=null&&I.enabled&&await F({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:m==null?void 0:m.did}}),x(N=>{const E=[...N];return E.splice(E.indexOf(m),1),E}),z(m),v())},le=async m=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:m.did},spaceGateway:m}}),f!==m.endpoint&&o.configBlocklet({input:{did:[s.meta.did],configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:m.endpoint}]}})]),B.success(r("storage.spaces.connectedWithName",{name:(m==null?void 0:m.name)??"DID Spaces"})),v()},k=m=>(m==null?void 0:m.endpoint)===f;return e.jsx(qt,{value:{spaceGateways:u||[],selectedSpaceGateway:U,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:v,spaceGatewaysLoading:c,spaceGatewaysFirstLoading:p,spaceGatewayIsSelected:k,updateAutoBackup:F,abortBlockletBackup:J,backupEndpoint:f,backupProgress:g,backups:te,backupSummary:oe,refreshBackupSummary:re,refreshBackups:ae,setBackupDate:n,backupsLoading:b,autoBackup:I},children:t})}be.propTypes={children:h.any.isRequired};be.defaultProps={};function L(){return y.useContext(Fe)}function ee({...t}){const{blocklet:r}=O(),{info:o}=M(),{t:s}=T(),i=Ne({blocklet:r}),n=gt(o),{spaceGateways:a,addSpaceGateway:d}=L(),u={checkFn:Ue.create({baseURL:he(window.location.origin,St())}).get,webWalletUrl:n,extraParams:{appPid:r.appPid,appDid:i.appDid,appName:i.appName,appDescription:i.appDescription,appUrl:i.appUrl,referrer:i.referrer,scopes:i.scopes,nodeDid:o.did}},c=async({endpoint:p,name:g,did:f})=>{const b=await Tt(p);if(!await It(b)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(a.some(l=>l.endpoint===p)){B.error(s("storage.spaces.gateway.add.duplicate",{name:g}));return}await d({name:g,did:f,url:b,endpoint:p},p)},x=async({spaceGateway:p})=>{try{await c(p)}catch(g){console.error(g),B.error(X(g))}};return e.jsx(rt,{...t,connectScope:"app",options:u,onSuccess:x})}ee.propTypes={};ee.defaultProps={};function Ke({...t}){const{t:r}=y.useContext(pt),{blocklet:o,loadingDiskInfo:s,actions:i}=O();if(y.useEffect(()=>{i==null||i.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),o.diskInfo){const n=(u,c,x)=>e.jsxs(C,{children:[u," ",e.jsx("strong",{children:c?yt(c):"empty"})]}),a=o.environments.reduce((u,c)=>(u[c.key]=c.value,u),{}),d=[{key:"appDir",name:r("blocklet.diskInfo.appDir"),value:n(a.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:r("blocklet.diskInfo.dataDir"),value:n(a.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:r("blocklet.diskInfo.logDir"),value:n(a.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:r("blocklet.diskInfo.cacheDir"),value:n(a.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Yt,{component:"div",...t,children:d.map(u=>e.jsx(Ot,{valueComponent:"div",nameWidth:120,name:u.name,children:u.value},u.key))})}return s?e.jsx(A,{}):e.jsx(C,{children:r("blocklet.diskInfo.empty")})}const Yt=Je(C)``;function Ce(){const{t}=T(),{setBackupDate:r,backupSummary:o}=L(),s=at({key:"lg"}),i=y.useRef(null),n=Ze(),a=y.useCallback(c=>{r(c)},[r]),d=y.useMemo(()=>{const c=w().add(1,"day"),x=w().subtract(11,"month").startOf("month"),p=new Map(o.map(f=>[f.date,{date:f.date,successCount:f.successCount,errorCount:f.errorCount}])),g=[];for(let f=x.clone();w(f).isBefore(c);f=f.add(1,"day")){const b=f.format("YYYY-MM-DD");g.push(p.get(b)||{date:b,successCount:0,errorCount:0})}return g},[o]),u=y.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:b=>{const{date:D,successCount:S,errorCount:l}=d[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")}: ${l}</div>`].join(`
2
2
  `)},backgroundColor:n.palette.background.paper,borderColor:n.palette.divider,textStyle:{color:n.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${n.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:Z[600]},{min:-9,max:-6,color:Z[500]},{min:-6,max:-3,color:Z[400]},{min:-3,max:-1,color:Z[300]},{min:0,max:0,color:n.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:n.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:n.palette.background.default,color:n.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:n.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:n.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[w().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),w().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:d.map(b=>[b.date,b.errorCount?-b.errorCount:b.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:n.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:Ge[200],color:"inherit"}}}}),[d,t,n]);return e.jsxs(e.Fragment,{children:[e.jsx(j,{ref:i,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(j,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(Lt,{option:u,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:c=>{c.componentType==="series"&&c.data&&a(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:"flex-start",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")})]})]})})]})}Ce.propTypes={};const Ht=ge(({className:t,...r})=>e.jsx(Se,{...r,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function ke({status:t,message:r,createdAt:o}){const{t:s}=T(),i=t===R.BACKUPS.STATUS.PROGRESS&&w().diff(o,"hours")>=R.BACKUPS.TIMEOUT_HOURS,n=i&&s("common.timeoutError"),a=t===R.BACKUPS.STATUS.PROGRESS&&!i,d=t===R.BACKUPS.STATUS.SUCCEEDED&&!i;return a?e.jsxs(C,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(A,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):d?e.jsx(V,{type:"success",children:s("common.succeeded")}):e.jsxs(j,{display:"inline-flex",alignItems:"center",children:[e.jsx(V,{type:"error",children:s("common.failed")}),"  ",e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:r||n,children:e.jsx(ze,{children:e.jsx(it,{style:{width:"24px",height:"24px"},color:"error"})})})]})}ke.propTypes={status:h.string.isRequired,message:h.string,createdAt:h.string.isRequired};ke.defaultProps={message:""};function De({metadata:t}){const{t:r}=T();if(Q(t))return e.jsx(V,{type:"success",children:r("common.succeeded")});const o=t.count||0,s=t.size||0,i=ct(s,{iec:!0}),n=e.jsxs(j,{p:1,sx:{color:"black",backgroundColor:"white"},borderRadius:1,boxShadow:2,children:[e.jsxs(C,{variant:"body2",children:[r("common.fileCount"),": ",o]}),e.jsxs(C,{variant:"body2",children:[r("common.fileSize"),": ",i]})]});return e.jsxs(j,{display:"inline-flex",alignItems:"center",children:[e.jsx(V,{type:"success",children:r("common.succeeded")})," ",e.jsx(Ht,{title:n,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ze,{children:e.jsx(lt,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}De.propTypes={metadata:h.object};De.defaultProps={metadata:{}};function Be(){const{t,locale:r}=T(),{spaceGateways:o,backups:s,backupsLoading:i}=L(),n=y.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:d=>{var D;const{targetUrl:u,targetName:c,status:x,createdAt:p}=s[d],g=x===R.BACKUPS.STATUS.PROGRESS&&w().diff(p,"hours")>=R.BACKUPS.TIMEOUT_HOURS,f=x===R.BACKUPS.STATUS.SUCCEEDED&&!g,b=c||((D=o.find(S=>u==null?void 0:u.includes(xe(S==null?void 0:S.endpoint))))==null?void 0:D.name)||"Unknown DID Space";return f?e.jsx(et,{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:d=>{const u=t(d===0?"common.auto":"common.manual");return e.jsx(V,{children:u})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:d=>w(d).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:d=>Q(d)?"":w(d).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:d=>{const u=(s==null?void 0:s[d])??{},{status:c,message:x,createdAt:p,metadata:g}=u,f=c===R.BACKUPS.STATUS.PROGRESS&&w().diff(p,"hours")>=R.BACKUPS.TIMEOUT_HOURS,b=c===R.BACKUPS.STATUS.PROGRESS&&!f,D=c===R.BACKUPS.STATUS.SUCCEEDED&&!f;return b?e.jsxs(C,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(A,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):D?e.jsx(De,{metadata:g}):e.jsx(ke,{status:c,message:x,createdAt:p})}}}],[s,o,t]),a=y.useMemo(()=>!(s!=null&&s.length),[s]);return e.jsx(e.Fragment,{children:a?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(mt,{title:"",loading:i,data:s,columns:n,emptyNode:t("storage.spaces.record.emptyData",r),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}Be.propTypes={};function $e(){const{t}=T();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(dt,{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(ee,{})]}),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(Ce,{})]})]}),e.jsx(Be,{sx:{marginTop:"24px"}}),e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(Ke,{})]})}$e.propTypes={};var Ee={},Vt=ye;Object.defineProperty(Ee,"__esModule",{value:!0});var qe=Ee.default=void 0,Qt=Vt(je()),Xt=e;qe=Ee.default=(0,Qt.default)((0,Xt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var we={},Jt=ye;Object.defineProperty(we,"__esModule",{value:!0});var Ye=we.default=void 0,Zt=Jt(je()),Gt=e;Ye=we.default=(0,Zt.default)((0,Gt.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 Te={},es=ye;Object.defineProperty(Te,"__esModule",{value:!0});var He=Te.default=void 0,ts=es(je()),ss=e;He=Te.default=(0,ts.default)((0,ss.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 Ie({spaceGateway:t,onConfirm:r,onCancel:o}){const{t:s}=T(),[i,n]=y.useState(!1),[a,d]=y.useState(!1),u=(p,g)=>{p==null||p.preventDefault(),p==null||p.stopPropagation(),n(g)},c=async p=>{try{p==null||p.stopPropagation(),d(!0),await(r==null?void 0:r(t)),n(!1)}catch(g){console.error(g),B.error(`${s("storage.space.gateway.delete.failed")}: ${X(g)}`)}finally{n(!1),d(!1)}},x=p=>{u(p,!1),o==null||o(p)};return e.jsxs(e.Fragment,{children:[e.jsxs(q,{color:"red",onClick:p=>u(p,!0),children:[e.jsx(Y,{style:{minWidth:24,color:"red"},children:e.jsx(_t,{fontSize:"small"})}),e.jsx(H,{style:{color:"red"},children:s("common.disconnect")})]}),e.jsx(ft,{title:s("storage.spaces.gateway.delete.title"),open:i,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:a}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:a}},onConfirm:c,onCancel:x,children:e.jsx(C,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}Ie.propTypes={spaceGateway:h.shape({name:h.string.isRequired,url:h.string.isRequired,protected:h.bool}).isRequired,onConfirm:h.func,onCancel:h.func};Ie.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function Re({spaceGateway:t,selected:r,onDelete:o,onConnect:s,enableSwitchToSpace:i,backupInProgress:n,...a}){const{abortBlockletBackup:d}=L(),[u,c]=y.useState(null),{t:x}=T(),[p,g]=y.useState(!1),f=(S,l)=>{S.stopPropagation(),S.preventDefault(),c(l&&S.currentTarget)},b=async S=>{try{g(!0),f(S,!1),await s(t)}catch(l){console.error(l),B.error(l.message)}finally{g(!1)}},D=async S=>{try{g(!0),f(S,!1),await d()}catch(l){console.error(l),B.error(l.message)}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[p||t!=null&&t.loading?e.jsx(A,{sx:{ml:1},size:"24px"}):e.jsx(tt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:S=>f(S,!0),...a,children:e.jsx(zt,{})}),e.jsxs(st,{id:"simple-menu",anchorEl:u,keepMounted:!0,open:!!u,onClose:S=>f(S,!1),children:[e.jsxs(q,{onClick:S=>{f(S,!1),window.open(Oe(t.endpoint?Rt(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(qe,{fontSize:"small"})}),e.jsx(H,{children:x("common.open")})]}),e.jsxs(q,{onClick:S=>{f(S,!1),window.open(Oe(vt(t.endpoint),{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(He,{fontSize:"small"})}),e.jsx(H,{children:x("storage.spaces.strategy.viewBackupFiles")})]}),!r&&i&&e.jsxs(q,{onClick:b,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Ye,{fontSize:"small"})}),e.jsx(H,{children:x("storage.spaces.connect.switchToSpace")})]}),n&&e.jsxs(q,{onClick:D,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Pt,{fontSize:"small"})}),e.jsx(H,{children:x("storage.spaces.connect.abortBlockletBackup")})]}),!n&&e.jsx(Ie,{spaceGateway:t,onConfirm:async()=>{c(null),await(o==null?void 0:o(t))},onCancel:()=>c(null)})]})]})}Re.propTypes={spaceGateway:h.shape({name:h.string.isRequired,url:h.string.isRequired,protected:h.bool,endpoint:h.string.isRequired,loading:h.bool}).isRequired,selected:h.bool.isRequired,enableSwitchToSpace:h.bool,onDelete:h.func,onConnect:h.func,backupInProgress:h.bool};Re.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};const ns=ge(({className:t,...r})=>e.jsx(Se,{...r,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function ve({spaceGateway:t,spaceStatus:r,selected:o,onConnected:s,onDeleted:i,onBackedUp:n}){const{t:a,locale:d}=T(),{blocklet:u}=O(),{api:c,info:{did:x}}=M(),{appDid:p,appName:g,appDescription:f,scopes:b,appUrl:D,referrer:S}=Ne({blocklet:u}),{backupProgress:l,updateSpaceGateway:te,deleteSpaceGateway:se,refreshBackupSummary:ne,refreshBackups:oe}=L(),[U,z]=y.useState(!1),[I,v]=y.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:g},d),scan:a("storage.spaces.authorize.scan",{appName:g},d),confirm:"",success:e.jsx(C,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{v(k=>({...k,open:!1}))}}),re=o&&!U&&r===ue.DISCONNECTED,ae=o&&!U&&!t.loading&&r===ue.CONNECTED,F=o&&U&&r===ue.CONNECTED&&(l==null?void 0:l.progress)>=0,J=async()=>{try{if(await At(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(a("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:he(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:Ue.create({baseURL:he(t.url,"space")}).get,extraParams:{appDid:p,appName:g,appDescription:f,scopes:b,appUrl:D,referrer:S,nodeDid:x,spaceDid:t.did}}))},ie=async(k,K)=>{const m=K(k.endpoint),N=xe(m),E=k.space?K(k.space):{};if(t.did&&N!==t.did){v(de=>({...de,open:!1}));const $=a("storage.spaces.gateway.switch.failedForMismatchSpace",{name:E!=null&&E.name?E.name:""});B.error($),s==null||s(new Error($),t);return}const P={...t,name:E.name??"DID Space",did:E.did??xe(m),endpoint:m};await te(P),v($=>({...$,open:!1})),s==null||s(null,P)},ce=async()=>{try{if(U)return;z(!0),await c.backupBlocklet({input:{appDid:u.appDid,to:"spaces"}})}catch(k){console.error(k),B.error(k.message),n==null||n(k,t)}finally{z(!0)}},le=async()=>{try{await se(t),B.success(a("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),i==null||i(null,t)}catch(k){console.error(k),i==null||i(k,t)}};return y.useEffect(()=>{l!=null&&l.completed?(o&&((l==null?void 0:l.progress)===100?(B.success(a("storage.spaces.backupSuccessfully")),n==null||n(null,t)):l.message&&(n==null||n(new Error(l==null?void 0:l.message),t)),l.progress=0,l.message=""),z(!1),setTimeout(()=>{ne(),oe()},1e3)):l.progress&&z(!0)},[l]),e.jsxs(e.Fragment,{children:[e.jsxs(j,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:a("storage.spaces.strategy.backupNow")}),re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:J,children:a("storage.spaces.disconnected.reconnectNow")}),F&&e.jsx(ns,{title:(l==null?void 0:l.message)&&e.jsx(j,{p:1,sx:{color:"black",backgroundColor:"white"},borderRadius:1,boxShadow:2,children:e.jsx(C,{variant:"body2",children:l.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(A,{variant:"determinate",value:l==null?void 0:l.progress,size:14,sx:{mr:1}}),l==null?void 0:l.progress,"%"]})}),e.jsx(ht,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:d},"get-endpoint")]}),e.jsx(Re,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:o,onDelete:le,onConnect:J,enableSwitchToSpace:(l==null?void 0:l.completed)||Q(l==null?void 0:l.message),backupInProgress:F})]})}ve.propTypes={spaceGateway:h.shape({did:h.string.isRequired,name:h.string.isRequired,url:h.string.isRequired,endpoint:h.string.isRequired,protected:h.bool,loading:h.bool}).isRequired,spaceStatus:h.string.isRequired,selected:h.bool.isRequired,onConnected:h.func,onDeleted:h.func,onBackedUp:h.func};ve.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Ve({...t}){const{t:r}=T();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:r("storage.spaces.backup.records")})}),e.jsx(Ce,{}),e.jsx(Be,{})]})}Ve.propTypes={};function Qe({...t}){const{t:r}=T(),{autoBackup:o,updateAutoBackup:s}=L(),i=async()=>{try{const n=!(o!=null&&o.enabled);await s({enabled:n}),B.success(r(n?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(n){B.error(n.message)}};return e.jsx(Mt,{checked:!!(o!=null&&o.enabled),onChange:i,name:"enableWelcomePage",labelProps:{label:e.jsx(C,{marginRight:"8px",children:e.jsx("span",{children:r("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Qe.propTypes={};function os(){const{t}=T(),{spaceGateways:r,spaceGatewaysLoading:o,spaceGatewayIsSelected:s}=L(),i=o&&!(r!=null&&r.length),n=({spaceGateway:a,spaceStatus:d,selected:u,refresh:c})=>e.jsx(ve,{spaceGateway:a,spaceStatus:d,selected:u,onConnected:()=>c(),onBackedUp:x=>x&&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(Qe,{}),e.jsx(ee,{})]}),e.jsx(j,{mt:2,children:i?e.jsx(j,{display:"flex",justifyContent:"center",children:e.jsx(A,{})}):e.jsx(Ae,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:r.map(a=>e.jsx(Ae,{item:!0,xs:12,md:6,children:e.jsx(ut,{endpoint:a.endpoint,selected:s(a),action:n},a.endpoint)},a.endpoint))})})}),e.jsx(Ve,{sx:{marginTop:"24px"}}),e.jsx(C,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(Ke,{})]})}function rs(){const{spaceGatewaysFirstLoading:t,spaceGateways:r}=L();return t?e.jsx(_e,{relative:"parent",children:e.jsx(A,{})}):Q(r)?e.jsx($e,{}):e.jsx(os,{})}function as(){return e.jsx(be,{children:e.jsx(rs,{})})}function is(){const{spaceGateway:t,settingStorageEndpoint:r,updateSpaceGateway:o,hasStorageEndpoint:s,loading:i,storageEndpoint:n}=Nt(),a=fe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return i?e.jsx(_e,{relative:"parent",children:e.jsx(A,{})}):e.jsxs(j,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(kt,{spaceGateway:t,settingStorageEndpoint:r}):e.jsx(Dt,{}),e.jsx(j,{sx:a,children:e.jsx(Bt,{onConnect:o,storageEndpoint:n})})]})}function cs(){const{t}=T();return e.jsxs(Ut,{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(is,{})]})}function Xe({navOrientation:t,...r}){const{t:o,locale:s}=T(),{blocklet:i}=O(),n=jt({key:"md"}),[a,d]=ot(),u=a.get("tab")||"backup",c=n?"horizontal":t,x=fe(()=>{var l;const D=[{label:o("common.backup"),value:"backup"}],S=(l=i==null?void 0:i.capabilities)==null?void 0:l.didSpace;return(S===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||S===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&D.push({label:o("common.storage"),value:"storage"}),D},[s,c]),g=fe(()=>({backup:e.jsx(as,{}),storage:e.jsx(cs,{})}))[u],f=D=>{d(S=>(D==="backup"?S.delete("tab"):S.set("tab",D),S))};if(x.length<=1)return e.jsx(me,{children:g});const b=e.jsx(xt,{tabs:x,current:u,orientation:c,onChange:f,sx:[{borderRight:1,height:"100%",borderColor:"divider"},c==="horizontal"&&{borderRight:0}]});if(c==="vertical")return e.jsx(j,{...r,children:e.jsxs(W,{direction:{md:"column",lg:"row"},gap:2,children:[e.jsx(j,{sx:{flexShrink:0},children:e.jsx(Le,{left:b})}),e.jsx(j,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:g})})]})});if(c==="horizontal")return e.jsxs(j,{...r,children:[e.jsx(Le,{left:b}),e.jsx(me,{sx:{mt:2},children:g})]})}Xe.propTypes={navOrientation:h.oneOf(["vertical","horizontal"])};Xe.defaultProps={navOrientation:"vertical"};const me=ge(j)`
3
3
  position: relative;
4
4
  min-height: 66vh;
@@ -1,4 +1,4 @@
1
- import{w as de,B as Br}from"./vendor-utils-CxrPpJZS.js";import{bL as De,bM as Dr,bN as Mr,bO as Pr,bP as Cr,bQ as Lr,bR as Vr,bS as Rr,bT as Fr,bU as ar,bV as $r,bW as Gr,bX as zr,bY as Yr,aR as Hr,bK as Zr,aI as Wr}from"./vendor-ux-did-connect-Bh011lgb.js";var ze={exports:{}},Ye={},fr;function Ir(){if(fr)return Ye;fr=1;function r(p){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(p)}function e(p,l,m){return Object.defineProperty(p,"prototype",{writable:!1}),p}function t(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function n(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),l&&f(p,l)}function f(p,l){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,L){return j.__proto__=L,j},f(p,l)}function s(p){var l=q();return function(){var j=S(p),L;if(l){var P=S(this).constructor;L=Reflect.construct(j,arguments,P)}else L=j.apply(this,arguments);return d(this,L)}}function d(p,l){if(l&&(r(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(p)}function x(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function S(p){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},S(p)}var K={},C,T;function N(p,l,m){m||(m=Error);function j(P,te,$){return typeof l=="string"?l:l(P,te,$)}var L=function(P){n($,P);var te=s($);function $(ce,ue,k){var ne;return t(this,$),ne=te.call(this,j(ce,ue,k)),ne.code=p,ne}return e($)}(m);K[p]=L}function B(p,l){if(Array.isArray(p)){var m=p.length;return p=p.map(function(j){return String(j)}),m>2?"one of ".concat(l," ").concat(p.slice(0,m-1).join(", "),", or ")+p[m-1]:m===2?"one of ".concat(l," ").concat(p[0]," or ").concat(p[1]):"of ".concat(l," ").concat(p[0])}else return"of ".concat(l," ").concat(String(p))}function X(p,l,m){return p.substr(0,l.length)===l}function Y(p,l,m){return(m===void 0||m>p.length)&&(m=p.length),p.substring(m-l.length,m)===l}function D(p,l,m){return typeof m!="number"&&(m=0),m+l.length>p.length?!1:p.indexOf(l,m)!==-1}return N("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),N("ERR_INVALID_ARG_TYPE",function(p,l,m){C===void 0&&(C=ir()),C(typeof p=="string","'name' must be a string");var j;typeof l=="string"&&X(l,"not ")?(j="must not be",l=l.replace(/^not /,"")):j="must be";var L;if(Y(p," argument"))L="The ".concat(p," ").concat(j," ").concat(B(l,"type"));else{var P=D(p,".")?"property":"argument";L='The "'.concat(p,'" ').concat(P," ").concat(j," ").concat(B(l,"type"))}return L+=". Received type ".concat(r(m)),L},TypeError),N("ERR_INVALID_ARG_VALUE",function(p,l){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";T===void 0&&(T=De);var j=T.inspect(l);return j.length>128&&(j="".concat(j.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(m,". Received ").concat(j)},TypeError),N("ERR_INVALID_RETURN_VALUE",function(p,l,m){var j;return m&&m.constructor&&m.constructor.name?j="instance of ".concat(m.constructor.name):j="type ".concat(r(m)),"Expected ".concat(p,' to be returned from the "').concat(l,'"')+" function but got ".concat(j,".")},TypeError),N("ERR_MISSING_ARGS",function(){for(var p=arguments.length,l=new Array(p),m=0;m<p;m++)l[m]=arguments[m];C===void 0&&(C=ir()),C(l.length>0,"At least one arg needs to be specified");var j="The ",L=l.length;switch(l=l.map(function(P){return'"'.concat(P,'"')}),L){case 1:j+="".concat(l[0]," argument");break;case 2:j+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:j+=l.slice(0,L-1).join(", "),j+=", and ".concat(l[L-1]," arguments");break}return"".concat(j," must be specified")},TypeError),Ye.codes=K,Ye}var He,sr;function kr(){if(sr)return He;sr=1;function r(h,y){var A=Object.keys(h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(h);y&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(h,_).enumerable})),A.push.apply(A,w)}return A}function e(h){for(var y=1;y<arguments.length;y++){var A=arguments[y]!=null?arguments[y]:{};y%2?r(Object(A),!0).forEach(function(w){t(h,w,A[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach(function(w){Object.defineProperty(h,w,Object.getOwnPropertyDescriptor(A,w))})}return h}function t(h,y,A){return y=d(y),y in h?Object.defineProperty(h,y,{value:A,enumerable:!0,configurable:!0,writable:!0}):h[y]=A,h}function n(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}function f(h,y){for(var A=0;A<y.length;A++){var w=y[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(h,d(w.key),w)}}function s(h,y,A){return y&&f(h.prototype,y),Object.defineProperty(h,"prototype",{writable:!1}),h}function d(h){var y=x(h,"string");return p(y)==="symbol"?y:String(y)}function x(h,y){if(p(h)!=="object"||h===null)return h;var A=h[Symbol.toPrimitive];if(A!==void 0){var w=A.call(h,y||"default");if(p(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(h)}function q(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(y&&y.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),y&&Y(h,y)}function S(h){var y=B();return function(){var w=D(h),_;if(y){var c=D(this).constructor;_=Reflect.construct(w,arguments,c)}else _=w.apply(this,arguments);return K(this,_)}}function K(h,y){if(y&&(p(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(h)}function C(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function T(h){var y=typeof Map=="function"?new Map:void 0;return T=function(w){if(w===null||!X(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y<"u"){if(y.has(w))return y.get(w);y.set(w,_)}function _(){return N(w,arguments,D(this).constructor)}return _.prototype=Object.create(w.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),Y(_,w)},T(h)}function N(h,y,A){return B()?N=Reflect.construct.bind():N=function(_,c,o){var u=[null];u.push.apply(u,c);var v=Function.bind.apply(_,u),b=new v;return o&&Y(b,o.prototype),b},N.apply(null,arguments)}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function X(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function Y(h,y){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,_){return w.__proto__=_,w},Y(h,y)}function D(h){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},D(h)}function p(h){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},p(h)}var l=De,m=l.inspect,j=Ir(),L=j.codes.ERR_INVALID_ARG_TYPE;function P(h,y,A){return(A===void 0||A>h.length)&&(A=h.length),h.substring(A-y.length,A)===y}function te(h,y){if(y=Math.floor(y),h.length==0||y==0)return"";var A=h.length*y;for(y=Math.floor(Math.log(y)/Math.log(2));y;)h+=h,y--;return h+=h.substring(0,A-h.length),h}var $="",ce="",ue="",k="",ne={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Ie=10;function je(h){var y=Object.keys(h),A=Object.create(Object.getPrototypeOf(h));return y.forEach(function(w){A[w]=h[w]}),Object.defineProperty(A,"message",{value:h.message}),A}function he(h){return m(h,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(h,y,A){var w="",_="",c=0,o="",u=!1,v=he(h),b=v.split(`
1
+ import{v as de,B as Br}from"./vendor-utils-B3iZkn2R.js";import{bL as De,bM as Dr,bN as Mr,bO as Pr,bP as Cr,bQ as Lr,bR as Vr,bS as Rr,bT as Fr,bU as ar,bV as $r,bW as Gr,bX as zr,bY as Yr,aR as Hr,bK as Zr,aI as Wr}from"./vendor-ux-did-connect-CX7qG3_M.js";var ze={exports:{}},Ye={},fr;function Ir(){if(fr)return Ye;fr=1;function r(p){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(p)}function e(p,l,m){return Object.defineProperty(p,"prototype",{writable:!1}),p}function t(p,l){if(!(p instanceof l))throw new TypeError("Cannot call a class as a function")}function n(p,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(l&&l.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),l&&f(p,l)}function f(p,l){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,L){return j.__proto__=L,j},f(p,l)}function s(p){var l=q();return function(){var j=S(p),L;if(l){var P=S(this).constructor;L=Reflect.construct(j,arguments,P)}else L=j.apply(this,arguments);return d(this,L)}}function d(p,l){if(l&&(r(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(p)}function x(p){if(p===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function S(p){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},S(p)}var K={},C,T;function N(p,l,m){m||(m=Error);function j(P,te,$){return typeof l=="string"?l:l(P,te,$)}var L=function(P){n($,P);var te=s($);function $(ce,ue,k){var ne;return t(this,$),ne=te.call(this,j(ce,ue,k)),ne.code=p,ne}return e($)}(m);K[p]=L}function B(p,l){if(Array.isArray(p)){var m=p.length;return p=p.map(function(j){return String(j)}),m>2?"one of ".concat(l," ").concat(p.slice(0,m-1).join(", "),", or ")+p[m-1]:m===2?"one of ".concat(l," ").concat(p[0]," or ").concat(p[1]):"of ".concat(l," ").concat(p[0])}else return"of ".concat(l," ").concat(String(p))}function X(p,l,m){return p.substr(0,l.length)===l}function Y(p,l,m){return(m===void 0||m>p.length)&&(m=p.length),p.substring(m-l.length,m)===l}function D(p,l,m){return typeof m!="number"&&(m=0),m+l.length>p.length?!1:p.indexOf(l,m)!==-1}return N("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),N("ERR_INVALID_ARG_TYPE",function(p,l,m){C===void 0&&(C=ir()),C(typeof p=="string","'name' must be a string");var j;typeof l=="string"&&X(l,"not ")?(j="must not be",l=l.replace(/^not /,"")):j="must be";var L;if(Y(p," argument"))L="The ".concat(p," ").concat(j," ").concat(B(l,"type"));else{var P=D(p,".")?"property":"argument";L='The "'.concat(p,'" ').concat(P," ").concat(j," ").concat(B(l,"type"))}return L+=". Received type ".concat(r(m)),L},TypeError),N("ERR_INVALID_ARG_VALUE",function(p,l){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";T===void 0&&(T=De);var j=T.inspect(l);return j.length>128&&(j="".concat(j.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(m,". Received ").concat(j)},TypeError),N("ERR_INVALID_RETURN_VALUE",function(p,l,m){var j;return m&&m.constructor&&m.constructor.name?j="instance of ".concat(m.constructor.name):j="type ".concat(r(m)),"Expected ".concat(p,' to be returned from the "').concat(l,'"')+" function but got ".concat(j,".")},TypeError),N("ERR_MISSING_ARGS",function(){for(var p=arguments.length,l=new Array(p),m=0;m<p;m++)l[m]=arguments[m];C===void 0&&(C=ir()),C(l.length>0,"At least one arg needs to be specified");var j="The ",L=l.length;switch(l=l.map(function(P){return'"'.concat(P,'"')}),L){case 1:j+="".concat(l[0]," argument");break;case 2:j+="".concat(l[0]," and ").concat(l[1]," arguments");break;default:j+=l.slice(0,L-1).join(", "),j+=", and ".concat(l[L-1]," arguments");break}return"".concat(j," must be specified")},TypeError),Ye.codes=K,Ye}var He,sr;function kr(){if(sr)return He;sr=1;function r(h,y){var A=Object.keys(h);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(h);y&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(h,_).enumerable})),A.push.apply(A,w)}return A}function e(h){for(var y=1;y<arguments.length;y++){var A=arguments[y]!=null?arguments[y]:{};y%2?r(Object(A),!0).forEach(function(w){t(h,w,A[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach(function(w){Object.defineProperty(h,w,Object.getOwnPropertyDescriptor(A,w))})}return h}function t(h,y,A){return y=d(y),y in h?Object.defineProperty(h,y,{value:A,enumerable:!0,configurable:!0,writable:!0}):h[y]=A,h}function n(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")}function f(h,y){for(var A=0;A<y.length;A++){var w=y[A];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(h,d(w.key),w)}}function s(h,y,A){return y&&f(h.prototype,y),Object.defineProperty(h,"prototype",{writable:!1}),h}function d(h){var y=x(h,"string");return p(y)==="symbol"?y:String(y)}function x(h,y){if(p(h)!=="object"||h===null)return h;var A=h[Symbol.toPrimitive];if(A!==void 0){var w=A.call(h,y||"default");if(p(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(h)}function q(h,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(y&&y.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),Object.defineProperty(h,"prototype",{writable:!1}),y&&Y(h,y)}function S(h){var y=B();return function(){var w=D(h),_;if(y){var c=D(this).constructor;_=Reflect.construct(w,arguments,c)}else _=w.apply(this,arguments);return K(this,_)}}function K(h,y){if(y&&(p(y)==="object"||typeof y=="function"))return y;if(y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(h)}function C(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function T(h){var y=typeof Map=="function"?new Map:void 0;return T=function(w){if(w===null||!X(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y<"u"){if(y.has(w))return y.get(w);y.set(w,_)}function _(){return N(w,arguments,D(this).constructor)}return _.prototype=Object.create(w.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),Y(_,w)},T(h)}function N(h,y,A){return B()?N=Reflect.construct.bind():N=function(_,c,o){var u=[null];u.push.apply(u,c);var v=Function.bind.apply(_,u),b=new v;return o&&Y(b,o.prototype),b},N.apply(null,arguments)}function B(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function X(h){return Function.toString.call(h).indexOf("[native code]")!==-1}function Y(h,y){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,_){return w.__proto__=_,w},Y(h,y)}function D(h){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},D(h)}function p(h){"@babel/helpers - typeof";return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},p(h)}var l=De,m=l.inspect,j=Ir(),L=j.codes.ERR_INVALID_ARG_TYPE;function P(h,y,A){return(A===void 0||A>h.length)&&(A=h.length),h.substring(A-y.length,A)===y}function te(h,y){if(y=Math.floor(y),h.length==0||y==0)return"";var A=h.length*y;for(y=Math.floor(Math.log(y)/Math.log(2));y;)h+=h,y--;return h+=h.substring(0,A-h.length),h}var $="",ce="",ue="",k="",ne={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Ie=10;function je(h){var y=Object.keys(h),A=Object.create(Object.getPrototypeOf(h));return y.forEach(function(w){A[w]=h[w]}),Object.defineProperty(A,"message",{value:h.message}),A}function he(h){return m(h,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function xe(h,y,A){var w="",_="",c=0,o="",u=!1,v=he(h),b=v.split(`
2
2
  `),E=he(y).split(`
3
3
  `),R=0,H="";if(A==="strictEqual"&&p(h)==="object"&&p(y)==="object"&&h!==null&&y!==null&&(A="strictEqualObject"),b.length===1&&E.length===1&&b[0]!==E[0]){var J=b[0].length+E[0].length;if(J<=Ie){if((p(h)!=="object"||h===null)&&(p(y)!=="object"||y===null)&&(h!==0||y!==0))return"".concat(ne[A],`
4
4